Files
mission-control-v2/frontend/dist/assets/index-CB2Jz083.js
T
HitonabiandClaude Opus 5 5aa5a484a7 feat(frontend): v3-Umbau P3 — ein Store, eine Statusleiste, endlich aria-live
Vierte Etappe. Der Client-Zustand hatte bisher keinen Ort: zwei handgebaute
useSyncExternalStore-Speicher, drei CustomEvent-Kanaele und ein localStorage-Griff
mitten in einem useState — verteilt ueber fuenf Dateien.

## Ein Store (Befund B-08/B-09)

app/store.ts (Zustand, 1,2 kB gzip) haelt genau vier Dinge: Bedienvorlieben
(Schiene, Expertenmodus, Palette), die Lage des Ereignisstroms und die
Meldungs-Warteschlange. Der Kopfkommentar nennt die Regel, nach der etwas dort
landen darf — und ein Test prueft sie: gespeichert werden AUSSCHLIESSLICH
Schienen- und Expertenmodus-Zustand, kein Strom, keine Meldungen, kein Geheimnis.

Der Metrik-Verlauf bleibt bewusst DRAUSSEN (lib/metricsStore.ts): Er nimmt ab P4
jede Sekunde einen Messpunkt entgegen, ein Store-Update pro Sekunde wuerde jede
abonnierende Komponente neu rendern.

Die drei CustomEvent-Kanaele sind ERSATZLOS weg — `grep -r dispatchEvent src`
liefert nichts mehr. Wer die Schublade oeffnen will, setzt `?system=`; wer springen
will, navigiert. Auch der letzte Rest von P2 (`mc-palette-open`) ist aufgeloest.

## Statusleiste (Spezifikation §4.1)

Der Zustand der Box stand bisher verstreut: die Ampel unten in der Sidebar, die
Auslastung nur im Cockpit, das aktive Modell nur im Modell-Manager. Wer in der
Konsole arbeitete, sah gar nichts.

Jetzt eine feste Leiste ueber allen Ansichten: Motor/Hirn-Ampel (klickbar zum
Agenten) · aktive Rolle + Durchsatz mit Sparkline · geteilter Speicher ALS BALKEN
(nicht als Prozent — 128 GB Unified Memory ist die Kernzahl dieser Box) · CPU/GPU
· Temperatur (ab 85 °C bernstein) · Betriebszeit · Token-Summe · Live-Anzeige.

Die Sparklines sind eigenes SVG, ~20 Zeilen. Fuer eine 56-Pixel-Linie waere eine
Diagramm-Bibliothek Verschwendung.

Dafuer neu im Backend: `uptime_s` in /api/system/status (psutil.boot_time).
Gehoert dorthin, weil die Box sich woechentlich selbst neu startet — dann ist
"laeuft seit 20 Minuten" die Antwort auf eine ganze Klasse von Fragen.
Liefert psutil nichts, steht dort None und die Leiste blendet das Feld aus,
statt eine Zahl zu erfinden.

## aria-live (Befund B-11) — und diesmal mit Absender

Im ganzen Frontend gab es KEIN einziges aria-live. app/shell/Meldungen.tsx ist
jetzt die eine Stelle fuer beilaeufige Rueckmeldungen; Fehler bekommen
`assertive` und bleiben stehen, alles andere `polite` und raeumt sich weg.

Wichtig: Die Region ist keine Attrappe. Gespeist wird sie von den Uebergaengen des
Ereignisstroms und vom Konsolen-Neustart (mit dem echten Grund aus ApiError.detail).
Der erste Verbindungsaufbau wird bewusst NICHT gemeldet — sonst begruesst jede
Seite den Nutzer mit "Verbindung wieder da".

## Ehrliche Anzeige statt stillem Altern (Befund B-15/B-18)

lib/events.ts fuehrt die Stromlage jetzt im Store: live · nachlauf · getrennt.
Beim Wechsel wird EINMAL invalidiert — vorher las relax() den Zustand erst beim
naechsten Refetch, nach einem Riss blieb die UI bis zu 150 s im langsamen Modus.

## Bahnbreiten-Deckel (Befund B-10)

Die Arbeitsflaeche endet bei 1600 px. Ohne Deckel zog sich das Cockpit auf einem
3440-px-Ultrawide auf ueber 3 000 px, waehrend die Wurzel-Schriftgroesse mitwuchs
und die Zeilen GROESSER statt lesbarer machte.

## Nebenbei

Der Buendel-Budget-Check aus P0 war fragil: `ls dist/assets/index-*.js | head -1`
kann den falschen treffen, weil Rollup auch kleine geteilte Module "index-*.js"
nennt (gemessen: ein 67-Byte-Chunk neben dem 374-kB-Einstieg). Er waere dann still
immer gruen gewesen. Beide Ampel-Dateien lesen den Einstieg jetzt aus index.html.

## Verifiziert im Browser

  Statusleiste: alle Felder mit Live-Daten, "Laeuft seit 1 Std 10 min"
  Backend abgewuergt  -> Leiste springt auf "Nachlauf" UND die aria-live-Region
                         meldet "Verbindung zur Zentrale verloren" (polite)
  Backend zurueck     -> "Live", ohne Begruessungs-Meldung
  Cockpit-Kachel      -> /cockpit?system=logs, Schublade offen, Reiter "System-Logs"
  Arbeitsflaeche      -> max-width 1600 px

33/33 Tests gruen (7 neue fuer den Store) · ESLint 0 Fehler · tsc sauber ·
Einstieg 118 153 B gzip / Budget 125 000.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:07:09 +02:00

261 lines
365 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-D4VhrGdv.js","assets/refresh-cw-BaiqRBZd.js","assets/file-text-jLFOD20t.js","assets/search-DIWv8lX1.js","assets/shield-C1oLnNqm.js","assets/arrow-right-C2xQ80N8.js","assets/clock-BFJQZ7fi.js","assets/external-link-CeXCWq9C.js","assets/power-ByoRBdY5.js","assets/CommandPalette-BsUl2rJn.js","assets/index-BgjhTkvl.js","assets/LiveAreaChartImpl-CMyy4SAv.js","assets/string-DoZi9Vij.js","assets/ModelsView-qPC018cd.js","assets/JobsBar-CWvPMGpi.js","assets/code-xml-CnLWZOS5.js","assets/zap-CZWNuZRx.js","assets/chevron-down-BVWIvMwj.js","assets/layers-kjHs8USe.js","assets/ConnectView-AK7BtBBi.js","assets/AgentView-CzCLEsLL.js","assets/KonsoleView-g4YWCBNc.js","assets/GuideView-DwKkIjUb.js","assets/AuftragsbuchView-DnGEkS0J.js","assets/SectionLabel-Dvaa0NeT.js","assets/IdeenView-Be2Bc1_I.js","assets/SkillsView-CLg7sPmS.js","assets/WissenView-Wv0zCS6c.js"])))=>i.map(i=>d[i]);
var h0=Object.defineProperty;var Uh=n=>{throw TypeError(n)};var p0=(n,r,s)=>r in n?h0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var gl=(n,r,s)=>p0(n,typeof r!="symbol"?r+"":r,s),Du=(n,r,s)=>r.has(n)||Uh("Cannot "+s);var j=(n,r,s)=>(Du(n,r,"read from private field"),s?s.call(n):r.get(n)),ce=(n,r,s)=>r.has(n)?Uh("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),re=(n,r,s,l)=>(Du(n,r,"write to private field"),l?l.call(n,s):r.set(n,s),s),xe=(n,r,s)=>(Du(n,r,"access private method"),s);var yl=(n,r,s,l)=>({set _(a){re(n,r,a,s)},get _(){return j(n,r,l)}});function m0(n,r){for(var s=0;s<r.length;s++){const l=r[s];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in n)){const c=Object.getOwnPropertyDescriptor(l,a);c&&Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(a){if(a.ep)return;a.ep=!0;const c=s(a);fetch(a.href,c)}})();function nm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fu={exports:{}},Ri={},zu={exports:{}},ve={};/**
* @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 Bh;function g0(){if(Bh)return ve;Bh=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function b(P,U,pe){this.props=P,this.context=U,this.refs=_,this.updater=pe||k}b.prototype.isReactComponent={},b.prototype.setState=function(P,U){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,U,"setState")},b.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function L(){}L.prototype=b.prototype;function R(P,U,pe){this.props=P,this.context=U,this.refs=_,this.updater=pe||k}var F=R.prototype=new L;F.constructor=R,S(F,b.prototype),F.isPureReactComponent=!0;var M=Array.isArray,A=Object.prototype.hasOwnProperty,z={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function V(P,U,pe){var ge,Se={},ye=null,Re=null;if(U!=null)for(ge in U.ref!==void 0&&(Re=U.ref),U.key!==void 0&&(ye=""+U.key),U)A.call(U,ge)&&!G.hasOwnProperty(ge)&&(Se[ge]=U[ge]);var Ee=arguments.length-2;if(Ee===1)Se.children=pe;else if(1<Ee){for(var Le=Array(Ee),tt=0;tt<Ee;tt++)Le[tt]=arguments[tt+2];Se.children=Le}if(P&&P.defaultProps)for(ge in Ee=P.defaultProps,Ee)Se[ge]===void 0&&(Se[ge]=Ee[ge]);return{$$typeof:n,type:P,key:ye,ref:Re,props:Se,_owner:z.current}}function O(P,U){return{$$typeof:n,type:P.type,key:U,ref:P.ref,props:P.props,_owner:P._owner}}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function X(P){var U={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(pe){return U[pe]})}var Y=/\/+/g;function de(P,U){return typeof P=="object"&&P!==null&&P.key!=null?X(""+P.key):U.toString(36)}function W(P,U,pe,ge,Se){var ye=typeof P;(ye==="undefined"||ye==="boolean")&&(P=null);var Re=!1;if(P===null)Re=!0;else switch(ye){case"string":case"number":Re=!0;break;case"object":switch(P.$$typeof){case n:case r:Re=!0}}if(Re)return Re=P,Se=Se(Re),P=ge===""?"."+de(Re,0):ge,M(Se)?(pe="",P!=null&&(pe=P.replace(Y,"$&/")+"/"),W(Se,U,pe,"",function(tt){return tt})):Se!=null&&(Q(Se)&&(Se=O(Se,pe+(!Se.key||Re&&Re.key===Se.key?"":(""+Se.key).replace(Y,"$&/")+"/")+P)),U.push(Se)),1;if(Re=0,ge=ge===""?".":ge+":",M(P))for(var Ee=0;Ee<P.length;Ee++){ye=P[Ee];var Le=ge+de(ye,Ee);Re+=W(ye,U,pe,Le,Se)}else if(Le=x(P),typeof Le=="function")for(P=Le.call(P),Ee=0;!(ye=P.next()).done;)ye=ye.value,Le=ge+de(ye,Ee++),Re+=W(ye,U,pe,Le,Se);else if(ye==="object")throw U=String(P),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Re}function te(P,U,pe){if(P==null)return P;var ge=[],Se=0;return W(P,ge,"","",function(ye){return U.call(pe,ye,Se++)}),ge}function ke(P){if(P._status===-1){var U=P._result;U=U(),U.then(function(pe){(P._status===0||P._status===-1)&&(P._status=1,P._result=pe)},function(pe){(P._status===0||P._status===-1)&&(P._status=2,P._result=pe)}),P._status===-1&&(P._status=0,P._result=U)}if(P._status===1)return P._result.default;throw P._result}var he={current:null},Z={transition:null},J={ReactCurrentDispatcher:he,ReactCurrentBatchConfig:Z,ReactCurrentOwner:z};function ee(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:te,forEach:function(P,U,pe){te(P,function(){U.apply(this,arguments)},pe)},count:function(P){var U=0;return te(P,function(){U++}),U},toArray:function(P){return te(P,function(U){return U})||[]},only:function(P){if(!Q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},ve.Component=b,ve.Fragment=s,ve.Profiler=a,ve.PureComponent=R,ve.StrictMode=l,ve.Suspense=p,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,ve.act=ee,ve.cloneElement=function(P,U,pe){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var ge=S({},P.props),Se=P.key,ye=P.ref,Re=P._owner;if(U!=null){if(U.ref!==void 0&&(ye=U.ref,Re=z.current),U.key!==void 0&&(Se=""+U.key),P.type&&P.type.defaultProps)var Ee=P.type.defaultProps;for(Le in U)A.call(U,Le)&&!G.hasOwnProperty(Le)&&(ge[Le]=U[Le]===void 0&&Ee!==void 0?Ee[Le]:U[Le])}var Le=arguments.length-2;if(Le===1)ge.children=pe;else if(1<Le){Ee=Array(Le);for(var tt=0;tt<Le;tt++)Ee[tt]=arguments[tt+2];ge.children=Ee}return{$$typeof:n,type:P.type,key:Se,ref:ye,props:ge,_owner:Re}},ve.createContext=function(P){return P={$$typeof:h,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:c,_context:P},P.Consumer=P},ve.createElement=V,ve.createFactory=function(P){var U=V.bind(null,P);return U.type=P,U},ve.createRef=function(){return{current:null}},ve.forwardRef=function(P){return{$$typeof:f,render:P}},ve.isValidElement=Q,ve.lazy=function(P){return{$$typeof:w,_payload:{_status:-1,_result:P},_init:ke}},ve.memo=function(P,U){return{$$typeof:g,type:P,compare:U===void 0?null:U}},ve.startTransition=function(P){var U=Z.transition;Z.transition={};try{P()}finally{Z.transition=U}},ve.unstable_act=ee,ve.useCallback=function(P,U){return he.current.useCallback(P,U)},ve.useContext=function(P){return he.current.useContext(P)},ve.useDebugValue=function(){},ve.useDeferredValue=function(P){return he.current.useDeferredValue(P)},ve.useEffect=function(P,U){return he.current.useEffect(P,U)},ve.useId=function(){return he.current.useId()},ve.useImperativeHandle=function(P,U,pe){return he.current.useImperativeHandle(P,U,pe)},ve.useInsertionEffect=function(P,U){return he.current.useInsertionEffect(P,U)},ve.useLayoutEffect=function(P,U){return he.current.useLayoutEffect(P,U)},ve.useMemo=function(P,U){return he.current.useMemo(P,U)},ve.useReducer=function(P,U,pe){return he.current.useReducer(P,U,pe)},ve.useRef=function(P){return he.current.useRef(P)},ve.useState=function(P){return he.current.useState(P)},ve.useSyncExternalStore=function(P,U,pe){return he.current.useSyncExternalStore(P,U,pe)},ve.useTransition=function(){return he.current.useTransition()},ve.version="18.3.1",ve}var $h;function to(){return $h||($h=1,zu.exports=g0()),zu.exports}/**
* @license React
* react-jsx-runtime.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 Vh;function y0(){if(Vh)return Ri;Vh=1;var n=to(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function h(f,p,g){var w,v={},x=null,k=null;g!==void 0&&(x=""+g),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(k=p.ref);for(w in p)l.call(p,w)&&!c.hasOwnProperty(w)&&(v[w]=p[w]);if(f&&f.defaultProps)for(w in p=f.defaultProps,p)v[w]===void 0&&(v[w]=p[w]);return{$$typeof:r,type:f,key:x,ref:k,props:v,_owner:a.current}}return Ri.Fragment=s,Ri.jsx=h,Ri.jsxs=h,Ri}var Hh;function v0(){return Hh||(Hh=1,Fu.exports=y0()),Fu.exports}var m=v0(),H=to();const Gt=nm(H),Kk=m0({__proto__:null,default:Gt},[H]);var vl={},Ou={exports:{}},xt={},Au={exports:{}},Uu={};/**
* @license React
* scheduler.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 Wh;function x0(){return Wh||(Wh=1,(function(n){function r(Z,J){var ee=Z.length;Z.push(J);e:for(;0<ee;){var P=ee-1>>>1,U=Z[P];if(0<a(U,J))Z[P]=J,Z[ee]=U,ee=P;else break e}}function s(Z){return Z.length===0?null:Z[0]}function l(Z){if(Z.length===0)return null;var J=Z[0],ee=Z.pop();if(ee!==J){Z[0]=ee;e:for(var P=0,U=Z.length,pe=U>>>1;P<pe;){var ge=2*(P+1)-1,Se=Z[ge],ye=ge+1,Re=Z[ye];if(0>a(Se,ee))ye<U&&0>a(Re,Se)?(Z[P]=Re,Z[ye]=ee,P=ye):(Z[P]=Se,Z[ge]=ee,P=ge);else if(ye<U&&0>a(Re,ee))Z[P]=Re,Z[ye]=ee,P=ye;else break e}}return J}function a(Z,J){var ee=Z.sortIndex-J.sortIndex;return ee!==0?ee:Z.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var h=Date,f=h.now();n.unstable_now=function(){return h.now()-f}}var p=[],g=[],w=1,v=null,x=3,k=!1,S=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Z){for(var J=s(g);J!==null;){if(J.callback===null)l(g);else if(J.startTime<=Z)l(g),J.sortIndex=J.expirationTime,r(p,J);else break;J=s(g)}}function M(Z){if(_=!1,F(Z),!S)if(s(p)!==null)S=!0,ke(A);else{var J=s(g);J!==null&&he(M,J.startTime-Z)}}function A(Z,J){S=!1,_&&(_=!1,L(V),V=-1),k=!0;var ee=x;try{for(F(J),v=s(p);v!==null&&(!(v.expirationTime>J)||Z&&!X());){var P=v.callback;if(typeof P=="function"){v.callback=null,x=v.priorityLevel;var U=P(v.expirationTime<=J);J=n.unstable_now(),typeof U=="function"?v.callback=U:v===s(p)&&l(p),F(J)}else l(p);v=s(p)}if(v!==null)var pe=!0;else{var ge=s(g);ge!==null&&he(M,ge.startTime-J),pe=!1}return pe}finally{v=null,x=ee,k=!1}}var z=!1,G=null,V=-1,O=5,Q=-1;function X(){return!(n.unstable_now()-Q<O)}function Y(){if(G!==null){var Z=n.unstable_now();Q=Z;var J=!0;try{J=G(!0,Z)}finally{J?de():(z=!1,G=null)}}else z=!1}var de;if(typeof R=="function")de=function(){R(Y)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,te=W.port2;W.port1.onmessage=Y,de=function(){te.postMessage(null)}}else de=function(){b(Y,0)};function ke(Z){G=Z,z||(z=!0,de())}function he(Z,J){V=b(function(){Z(n.unstable_now())},J)}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(Z){Z.callback=null},n.unstable_continueExecution=function(){S||k||(S=!0,ke(A))},n.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<Z?Math.floor(1e3/Z):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return s(p)},n.unstable_next=function(Z){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var ee=x;x=J;try{return Z()}finally{x=ee}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Z,J){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var ee=x;x=Z;try{return J()}finally{x=ee}},n.unstable_scheduleCallback=function(Z,J,ee){var P=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?P+ee:P):ee=P,Z){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=ee+U,Z={id:w++,callback:J,priorityLevel:Z,startTime:ee,expirationTime:U,sortIndex:-1},ee>P?(Z.sortIndex=ee,r(g,Z),s(p)===null&&Z===s(g)&&(_?(L(V),V=-1):_=!0,he(M,ee-P))):(Z.sortIndex=U,r(p,Z),S||k||(S=!0,ke(A))),Z},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(Z){var J=x;return function(){var ee=x;x=J;try{return Z.apply(this,arguments)}finally{x=ee}}}})(Uu)),Uu}var Qh;function w0(){return Qh||(Qh=1,Au.exports=x0()),Au.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 Kh;function k0(){if(Kh)return xt;Kh=1;var n=to(),r=w0();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,a={};function c(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[: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]*$/,w={},v={};function x(e){return p.call(v,e)?!0:p.call(w,e)?!1:g.test(e)?v[e]=!0:(w[e]=!0,!1)}function k(e,t,i,o){if(i!==null&&i.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,t,i,o){if(t===null||typeof t>"u"||k(e,t,i,o))return!0;if(o)return!1;if(i!==null)switch(i.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 _(e,t,i,o,u,d,y){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=y}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(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){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function R(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(L,R);b[t]=new _(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(L,R);b[t]=new _(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(L,R);b[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,i,o){var u=b.hasOwnProperty(t)?b[t]:null;(u!==null?u.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(S(t,i,u,o)&&(i=null),o||u===null?x(t)&&(i===null?e.removeAttribute(t):e.setAttribute(t,""+i)):u.mustUseProperty?e[u.propertyName]=i===null?u.type===3?!1:"":i:(t=u.attributeName,o=u.attributeNamespace,i===null?e.removeAttribute(t):(u=u.type,i=u===3||u===4&&i===!0?"":""+i,o?e.setAttributeNS(o,t,i):e.setAttribute(t,i))))}var M=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),X=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Z=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,P;function U(e){if(P===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return`
`+P+e}var pe=!1;function ge(e,t){if(!e||pe)return"";pe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(D){var o=D}Reflect.construct(e,[],t)}else{try{t.call()}catch(D){o=D}e.call(t.prototype)}else{try{throw Error()}catch(D){o=D}e()}}catch(D){if(D&&o&&typeof D.stack=="string"){for(var u=D.stack.split(`
`),d=o.stack.split(`
`),y=u.length-1,C=d.length-1;1<=y&&0<=C&&u[y]!==d[C];)C--;for(;1<=y&&0<=C;y--,C--)if(u[y]!==d[C]){if(y!==1||C!==1)do if(y--,C--,0>C||u[y]!==d[C]){var E=`
`+u[y].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),E}while(1<=y&&0<=C);break}}}finally{pe=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?U(e):""}function Se(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return""}}function ye(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case z:return"Portal";case O:return"Profiler";case V:return"StrictMode";case de:return"Suspense";case W:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case X:return(e.displayName||"Context")+".Consumer";case Q:return(e._context.displayName||"Context")+".Provider";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case ke:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}function Re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(t);case 8:return t===V?"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 Ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Le(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tt(e){var t=Le(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){o=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cn(e){e._valueTracker||(e._valueTracker=tt(e))}function fr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),o="";return e&&(o=Le(e)?e.checked?"true":"false":e.value),e=o,e!==i?(t.setValue(e),!0):!1}function hr(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 Qr(e,t){var i=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Hs(e,t){var i=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;i=Ee(t.value!=null?t.value:i),e._wrapperState={initialChecked:o,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zt(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function pr(e,t){Zt(e,t);var i=Ee(t.value),o=t.type;if(i!=null)o==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mr(e,t.type,i):t.hasOwnProperty("defaultValue")&&mr(e,t.type,Ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dn(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function mr(e,t,i){(t!=="number"||hr(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var gr=Array.isArray;function Pn(e,t,i,o){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&o&&(e[i].defaultSelected=!0)}else{for(i=""+Ee(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Kr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ke(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(s(92));if(gr(i)){if(1<i.length)throw Error(s(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Ee(i)}}function Mt(e,t){var i=Ee(t.value),o=Ee(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),o!=null&&(e.defaultValue=""+o)}function Yt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ws(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ql(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ws(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var lo,Jc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,i,o,u){MSApp.execUnsafeLocalFunction(function(){return e(t,i,o,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(lo=lo||document.createElement("div"),lo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=lo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ks={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},yg=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){yg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ks[t]=Ks[e]})});function ed(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+t).trim():t+"px"}function td(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=i.indexOf("--")===0,u=ed(i,t[i],o);i==="float"&&(i="cssFloat"),o?e.setProperty(i,u):e[i]=u}}var vg=ee({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 Kl(e,t){if(t){if(vg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Gl(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 ql=null;function Zl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Gr=null,qr=null;function nd(e){if(e=mi(e)){if(typeof Yl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Lo(t),Yl(e.stateNode,e.type,t))}}function rd(e){Gr?qr?qr.push(e):qr=[e]:Gr=e}function sd(){if(Gr){var e=Gr,t=qr;if(qr=Gr=null,nd(e),t)for(e=0;e<t.length;e++)nd(t[e])}}function id(e,t){return e(t)}function od(){}var Xl=!1;function ld(e,t,i){if(Xl)return e(t,i);Xl=!0;try{return id(e,t,i)}finally{Xl=!1,(Gr!==null||qr!==null)&&(od(),sd())}}function Gs(e,t){var i=e.stateNode;if(i===null)return null;var o=Lo(i);if(o===null)return null;i=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,t,typeof i));return i}var Jl=!1;if(f)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){Jl=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Jl=!1}function xg(e,t,i,o,u,d,y,C,E){var D=Array.prototype.slice.call(arguments,3);try{t.apply(i,D)}catch($){this.onError($)}}var Zs=!1,ao=null,uo=!1,ea=null,wg={onError:function(e){Zs=!0,ao=e}};function kg(e,t,i,o,u,d,y,C,E){Zs=!1,ao=null,xg.apply(wg,arguments)}function Sg(e,t,i,o,u,d,y,C,E){if(kg.apply(this,arguments),Zs){if(Zs){var D=ao;Zs=!1,ao=null}else throw Error(s(198));uo||(uo=!0,ea=D)}}function yr(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function ad(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ud(e){if(yr(e)!==e)throw Error(s(188))}function bg(e){var t=e.alternate;if(!t){if(t=yr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var i=e,o=t;;){var u=i.return;if(u===null)break;var d=u.alternate;if(d===null){if(o=u.return,o!==null){i=o;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===i)return ud(u),e;if(d===o)return ud(u),t;d=d.sibling}throw Error(s(188))}if(i.return!==o.return)i=u,o=d;else{for(var y=!1,C=u.child;C;){if(C===i){y=!0,i=u,o=d;break}if(C===o){y=!0,o=u,i=d;break}C=C.sibling}if(!y){for(C=d.child;C;){if(C===i){y=!0,i=d,o=u;break}if(C===o){y=!0,o=d,i=u;break}C=C.sibling}if(!y)throw Error(s(189))}}if(i.alternate!==o)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:t}function cd(e){return e=bg(e),e!==null?dd(e):null}function dd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=dd(e);if(t!==null)return t;e=e.sibling}return null}var fd=r.unstable_scheduleCallback,hd=r.unstable_cancelCallback,_g=r.unstable_shouldYield,Cg=r.unstable_requestPaint,We=r.unstable_now,Eg=r.unstable_getCurrentPriorityLevel,ta=r.unstable_ImmediatePriority,pd=r.unstable_UserBlockingPriority,co=r.unstable_NormalPriority,jg=r.unstable_LowPriority,md=r.unstable_IdlePriority,fo=null,Xt=null;function Pg(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(fo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ut=Math.clz32?Math.clz32:Lg,Ng=Math.log,Rg=Math.LN2;function Lg(e){return e>>>=0,e===0?32:31-(Ng(e)/Rg|0)|0}var ho=64,po=4194304;function Ys(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 mo(e,t){var i=e.pendingLanes;if(i===0)return 0;var o=0,u=e.suspendedLanes,d=e.pingedLanes,y=i&268435455;if(y!==0){var C=y&~u;C!==0?o=Ys(C):(d&=y,d!==0&&(o=Ys(d)))}else y=i&~u,y!==0?o=Ys(y):d!==0&&(o=Ys(d));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,d=t&-t,u>=d||u===16&&(d&4194240)!==0))return t;if((o&4)!==0&&(o|=i&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)i=31-Ut(t),u=1<<i,o|=e[i],t&=~u;return o}function Mg(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tg(e,t){for(var i=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes;0<d;){var y=31-Ut(d),C=1<<y,E=u[y];E===-1?((C&i)===0||(C&o)!==0)&&(u[y]=Mg(C,t)):E<=t&&(e.expiredLanes|=C),d&=~C}}function na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gd(){var e=ho;return ho<<=1,(ho&4194240)===0&&(ho=64),e}function ra(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Xs(e,t,i){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=i}function Ig(e,t){var i=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 o=e.eventTimes;for(e=e.expirationTimes;0<i;){var u=31-Ut(i),d=1<<u;t[u]=0,o[u]=-1,e[u]=-1,i&=~d}}function sa(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var o=31-Ut(i),u=1<<o;u&t|e[o]&t&&(e[o]|=t),i&=~u}}var Pe=0;function yd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var vd,ia,xd,wd,kd,oa=!1,go=[],Nn=null,Rn=null,Ln=null,Js=new Map,ei=new Map,Mn=[],Dg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sd(e,t){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":Js.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ei.delete(t.pointerId)}}function ti(e,t,i,o,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]},t!==null&&(t=mi(t),t!==null&&ia(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Fg(e,t,i,o,u){switch(t){case"focusin":return Nn=ti(Nn,e,t,i,o,u),!0;case"dragenter":return Rn=ti(Rn,e,t,i,o,u),!0;case"mouseover":return Ln=ti(Ln,e,t,i,o,u),!0;case"pointerover":var d=u.pointerId;return Js.set(d,ti(Js.get(d)||null,e,t,i,o,u)),!0;case"gotpointercapture":return d=u.pointerId,ei.set(d,ti(ei.get(d)||null,e,t,i,o,u)),!0}return!1}function bd(e){var t=vr(e.target);if(t!==null){var i=yr(t);if(i!==null){if(t=i.tag,t===13){if(t=ad(i),t!==null){e.blockedOn=t,kd(e.priority,function(){xd(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=aa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);ql=o,i.target.dispatchEvent(o),ql=null}else return t=mi(i),t!==null&&ia(t),e.blockedOn=i,!1;t.shift()}return!0}function _d(e,t,i){yo(e)&&i.delete(t)}function zg(){oa=!1,Nn!==null&&yo(Nn)&&(Nn=null),Rn!==null&&yo(Rn)&&(Rn=null),Ln!==null&&yo(Ln)&&(Ln=null),Js.forEach(_d),ei.forEach(_d)}function ni(e,t){e.blockedOn===t&&(e.blockedOn=null,oa||(oa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,zg)))}function ri(e){function t(u){return ni(u,e)}if(0<go.length){ni(go[0],e);for(var i=1;i<go.length;i++){var o=go[i];o.blockedOn===e&&(o.blockedOn=null)}}for(Nn!==null&&ni(Nn,e),Rn!==null&&ni(Rn,e),Ln!==null&&ni(Ln,e),Js.forEach(t),ei.forEach(t),i=0;i<Mn.length;i++)o=Mn[i],o.blockedOn===e&&(o.blockedOn=null);for(;0<Mn.length&&(i=Mn[0],i.blockedOn===null);)bd(i),i.blockedOn===null&&Mn.shift()}var Zr=M.ReactCurrentBatchConfig,vo=!0;function Og(e,t,i,o){var u=Pe,d=Zr.transition;Zr.transition=null;try{Pe=1,la(e,t,i,o)}finally{Pe=u,Zr.transition=d}}function Ag(e,t,i,o){var u=Pe,d=Zr.transition;Zr.transition=null;try{Pe=4,la(e,t,i,o)}finally{Pe=u,Zr.transition=d}}function la(e,t,i,o){if(vo){var u=aa(e,t,i,o);if(u===null)Ca(e,t,o,xo,i),Sd(e,o);else if(Fg(u,e,t,i,o))o.stopPropagation();else if(Sd(e,o),t&4&&-1<Dg.indexOf(e)){for(;u!==null;){var d=mi(u);if(d!==null&&vd(d),d=aa(e,t,i,o),d===null&&Ca(e,t,o,xo,i),d===u)break;u=d}u!==null&&o.stopPropagation()}else Ca(e,t,o,null,i)}}var xo=null;function aa(e,t,i,o){if(xo=null,e=Zl(o),e=vr(e),e!==null)if(t=yr(e),t===null)e=null;else if(i=t.tag,i===13){if(e=ad(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xo=e,null}function Cd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Eg()){case ta:return 1;case pd:return 4;case co:case jg:return 16;case md:return 536870912;default:return 16}default:return 16}}var Tn=null,ua=null,wo=null;function Ed(){if(wo)return wo;var e,t=ua,i=t.length,o,u="value"in Tn?Tn.value:Tn.textContent,d=u.length;for(e=0;e<i&&t[e]===u[e];e++);var y=i-e;for(o=1;o<=y&&t[i-o]===u[d-o];o++);return wo=u.slice(e,1<o?1-o:void 0)}function ko(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function So(){return!0}function jd(){return!1}function bt(e){function t(i,o,u,d,y){this._reactName=i,this._targetInst=u,this.type=o,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(i=e[C],this[C]=i?i(d):d[C]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?So:jd,this.isPropagationStopped=jd,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=So)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=So)},persist:function(){},isPersistent:So}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ca=bt(Yr),si=ee({},Yr,{view:0,detail:0}),Ug=bt(si),da,fa,ii,bo=ee({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ii&&(ii&&e.type==="mousemove"?(da=e.screenX-ii.screenX,fa=e.screenY-ii.screenY):fa=da=0,ii=e),da)},movementY:function(e){return"movementY"in e?e.movementY:fa}}),Pd=bt(bo),Bg=ee({},bo,{dataTransfer:0}),$g=bt(Bg),Vg=ee({},si,{relatedTarget:0}),ha=bt(Vg),Hg=ee({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),Wg=bt(Hg),Qg=ee({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kg=bt(Qg),Gg=ee({},Yr,{data:0}),Nd=bt(Gg),qg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yg[e])?!!t[e]:!1}function pa(){return Xg}var Jg=ee({},si,{key:function(e){if(e.key){var t=qg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ko(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pa,charCode:function(e){return e.type==="keypress"?ko(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ko(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ey=bt(Jg),ty=ee({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rd=bt(ty),ny=ee({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pa}),ry=bt(ny),sy=ee({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),iy=bt(sy),oy=ee({},bo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ly=bt(oy),ay=[9,13,27,32],ma=f&&"CompositionEvent"in window,oi=null;f&&"documentMode"in document&&(oi=document.documentMode);var uy=f&&"TextEvent"in window&&!oi,Ld=f&&(!ma||oi&&8<oi&&11>=oi),Md=" ",Td=!1;function Id(e,t){switch(e){case"keyup":return ay.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 Xr=!1;function cy(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(Td=!0,Md);case"textInput":return e=t.data,e===Md&&Td?null:e;default:return null}}function dy(e,t){if(Xr)return e==="compositionend"||!ma&&Id(e,t)?(e=Ed(),wo=ua=Tn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ld&&t.locale!=="ko"?null:t.data;default:return null}}var fy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fy[e.type]:t==="textarea"}function zd(e,t,i,o){rd(o),t=Po(t,"onChange"),0<t.length&&(i=new ca("onChange","change",null,i,o),e.push({event:i,listeners:t}))}var li=null,ai=null;function hy(e){tf(e,0)}function _o(e){var t=rs(e);if(fr(t))return e}function py(e,t){if(e==="change")return t}var Od=!1;if(f){var ga;if(f){var ya="oninput"in document;if(!ya){var Ad=document.createElement("div");Ad.setAttribute("oninput","return;"),ya=typeof Ad.oninput=="function"}ga=ya}else ga=!1;Od=ga&&(!document.documentMode||9<document.documentMode)}function Ud(){li&&(li.detachEvent("onpropertychange",Bd),ai=li=null)}function Bd(e){if(e.propertyName==="value"&&_o(ai)){var t=[];zd(t,ai,e,Zl(e)),ld(hy,t)}}function my(e,t,i){e==="focusin"?(Ud(),li=t,ai=i,li.attachEvent("onpropertychange",Bd)):e==="focusout"&&Ud()}function gy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _o(ai)}function yy(e,t){if(e==="click")return _o(t)}function vy(e,t){if(e==="input"||e==="change")return _o(t)}function xy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:xy;function ui(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var u=i[o];if(!p.call(t,u)||!Bt(e[u],t[u]))return!1}return!0}function $d(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vd(e,t){var i=$d(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=t&&o>=t)return{node:i,offset:t-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=$d(i)}}function Hd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wd(){for(var e=window,t=hr();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=hr(e.document)}return t}function va(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 wy(e){var t=Wd(),i=e.focusedElem,o=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&Hd(i.ownerDocument.documentElement,i)){if(o!==null&&va(i)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in i)i.selectionStart=t,i.selectionEnd=Math.min(e,i.value.length);else if(e=(t=i.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=i.textContent.length,d=Math.min(o.start,u);o=o.end===void 0?d:Math.min(o.end,u),!e.extend&&d>o&&(u=o,o=d,d=u),u=Vd(i,d);var y=Vd(i,o);u&&y&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),d>o?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.offset),e.addRange(t)))}}for(t=[],e=i;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<t.length;i++)e=t[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ky=f&&"documentMode"in document&&11>=document.documentMode,Jr=null,xa=null,ci=null,wa=!1;function Qd(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wa||Jr==null||Jr!==hr(o)||(o=Jr,"selectionStart"in o&&va(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ci&&ui(ci,o)||(ci=o,o=Po(xa,"onSelect"),0<o.length&&(t=new ca("onSelect","select",null,t,i),e.push({event:t,listeners:o}),t.target=Jr)))}function Co(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var es={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},ka={},Kd={};f&&(Kd=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Eo(e){if(ka[e])return ka[e];if(!es[e])return e;var t=es[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Kd)return ka[e]=t[i];return e}var Gd=Eo("animationend"),qd=Eo("animationiteration"),Zd=Eo("animationstart"),Yd=Eo("transitionend"),Xd=new Map,Jd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function In(e,t){Xd.set(e,t),c(t,[e])}for(var Sa=0;Sa<Jd.length;Sa++){var ba=Jd[Sa],Sy=ba.toLowerCase(),by=ba[0].toUpperCase()+ba.slice(1);In(Sy,"on"+by)}In(Gd,"onAnimationEnd"),In(qd,"onAnimationIteration"),In(Zd,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(Yd,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var di="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_y=new Set("cancel close invalid load scroll toggle".split(" ").concat(di));function ef(e,t,i){var o=e.type||"unknown-event";e.currentTarget=i,Sg(o,t,void 0,e),e.currentTarget=null}function tf(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],u=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var y=o.length-1;0<=y;y--){var C=o[y],E=C.instance,D=C.currentTarget;if(C=C.listener,E!==d&&u.isPropagationStopped())break e;ef(u,C,D),d=E}else for(y=0;y<o.length;y++){if(C=o[y],E=C.instance,D=C.currentTarget,C=C.listener,E!==d&&u.isPropagationStopped())break e;ef(u,C,D),d=E}}}if(uo)throw e=ea,uo=!1,ea=null,e}function De(e,t){var i=t[La];i===void 0&&(i=t[La]=new Set);var o=e+"__bubble";i.has(o)||(nf(t,e,2,!1),i.add(o))}function _a(e,t,i){var o=0;t&&(o|=4),nf(i,e,o,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function fi(e){if(!e[jo]){e[jo]=!0,l.forEach(function(i){i!=="selectionchange"&&(_y.has(i)||_a(i,!1,e),_a(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,_a("selectionchange",!1,t))}}function nf(e,t,i,o){switch(Cd(t)){case 1:var u=Og;break;case 4:u=Ag;break;default:u=la}i=u.bind(null,t,i,e),u=void 0,!Jl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function Ca(e,t,i,o,u){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var C=o.stateNode.containerInfo;if(C===u||C.nodeType===8&&C.parentNode===u)break;if(y===4)for(y=o.return;y!==null;){var E=y.tag;if((E===3||E===4)&&(E=y.stateNode.containerInfo,E===u||E.nodeType===8&&E.parentNode===u))return;y=y.return}for(;C!==null;){if(y=vr(C),y===null)return;if(E=y.tag,E===5||E===6){o=d=y;continue e}C=C.parentNode}}o=o.return}ld(function(){var D=d,$=Zl(i),K=[];e:{var B=Xd.get(e);if(B!==void 0){var ne=ca,ie=e;switch(e){case"keypress":if(ko(i)===0)break e;case"keydown":case"keyup":ne=ey;break;case"focusin":ie="focus",ne=ha;break;case"focusout":ie="blur",ne=ha;break;case"beforeblur":case"afterblur":ne=ha;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Pd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=$g;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=ry;break;case Gd:case qd:case Zd:ne=Wg;break;case Yd:ne=iy;break;case"scroll":ne=Ug;break;case"wheel":ne=ly;break;case"copy":case"cut":case"paste":ne=Kg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Rd}var oe=(t&4)!==0,Qe=!oe&&e==="scroll",T=oe?B!==null?B+"Capture":null:B;oe=[];for(var N=D,I;N!==null;){I=N;var q=I.stateNode;if(I.tag===5&&q!==null&&(I=q,T!==null&&(q=Gs(N,T),q!=null&&oe.push(hi(N,q,I)))),Qe)break;N=N.return}0<oe.length&&(B=new ne(B,ie,null,i,$),K.push({event:B,listeners:oe}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",B&&i!==ql&&(ie=i.relatedTarget||i.fromElement)&&(vr(ie)||ie[fn]))break e;if((ne||B)&&(B=$.window===$?$:(B=$.ownerDocument)?B.defaultView||B.parentWindow:window,ne?(ie=i.relatedTarget||i.toElement,ne=D,ie=ie?vr(ie):null,ie!==null&&(Qe=yr(ie),ie!==Qe||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(ne=null,ie=D),ne!==ie)){if(oe=Pd,q="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Rd,q="onPointerLeave",T="onPointerEnter",N="pointer"),Qe=ne==null?B:rs(ne),I=ie==null?B:rs(ie),B=new oe(q,N+"leave",ne,i,$),B.target=Qe,B.relatedTarget=I,q=null,vr($)===D&&(oe=new oe(T,N+"enter",ie,i,$),oe.target=I,oe.relatedTarget=Qe,q=oe),Qe=q,ne&&ie)t:{for(oe=ne,T=ie,N=0,I=oe;I;I=ts(I))N++;for(I=0,q=T;q;q=ts(q))I++;for(;0<N-I;)oe=ts(oe),N--;for(;0<I-N;)T=ts(T),I--;for(;N--;){if(oe===T||T!==null&&oe===T.alternate)break t;oe=ts(oe),T=ts(T)}oe=null}else oe=null;ne!==null&&rf(K,B,ne,oe,!1),ie!==null&&Qe!==null&&rf(K,Qe,ie,oe,!0)}}e:{if(B=D?rs(D):window,ne=B.nodeName&&B.nodeName.toLowerCase(),ne==="select"||ne==="input"&&B.type==="file")var le=py;else if(Fd(B))if(Od)le=vy;else{le=gy;var ae=my}else(ne=B.nodeName)&&ne.toLowerCase()==="input"&&(B.type==="checkbox"||B.type==="radio")&&(le=yy);if(le&&(le=le(e,D))){zd(K,le,i,$);break e}ae&&ae(e,B,D),e==="focusout"&&(ae=B._wrapperState)&&ae.controlled&&B.type==="number"&&mr(B,"number",B.value)}switch(ae=D?rs(D):window,e){case"focusin":(Fd(ae)||ae.contentEditable==="true")&&(Jr=ae,xa=D,ci=null);break;case"focusout":ci=xa=Jr=null;break;case"mousedown":wa=!0;break;case"contextmenu":case"mouseup":case"dragend":wa=!1,Qd(K,i,$);break;case"selectionchange":if(ky)break;case"keydown":case"keyup":Qd(K,i,$)}var ue;if(ma)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else Xr?Id(e,i)&&(fe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(fe="onCompositionStart");fe&&(Ld&&i.locale!=="ko"&&(Xr||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&Xr&&(ue=Ed()):(Tn=$,ua="value"in Tn?Tn.value:Tn.textContent,Xr=!0)),ae=Po(D,fe),0<ae.length&&(fe=new Nd(fe,e,null,i,$),K.push({event:fe,listeners:ae}),ue?fe.data=ue:(ue=Dd(i),ue!==null&&(fe.data=ue)))),(ue=uy?cy(e,i):dy(e,i))&&(D=Po(D,"onBeforeInput"),0<D.length&&($=new Nd("onBeforeInput","beforeinput",null,i,$),K.push({event:$,listeners:D}),$.data=ue))}tf(K,t)})}function hi(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Po(e,t){for(var i=t+"Capture",o=[];e!==null;){var u=e,d=u.stateNode;u.tag===5&&d!==null&&(u=d,d=Gs(e,i),d!=null&&o.unshift(hi(e,d,u)),d=Gs(e,t),d!=null&&o.push(hi(e,d,u))),e=e.return}return o}function ts(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rf(e,t,i,o,u){for(var d=t._reactName,y=[];i!==null&&i!==o;){var C=i,E=C.alternate,D=C.stateNode;if(E!==null&&E===o)break;C.tag===5&&D!==null&&(C=D,u?(E=Gs(i,d),E!=null&&y.unshift(hi(i,E,C))):u||(E=Gs(i,d),E!=null&&y.push(hi(i,E,C)))),i=i.return}y.length!==0&&e.push({event:t,listeners:y})}var Cy=/\r\n?/g,Ey=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(Cy,`
`).replace(Ey,"")}function No(e,t,i){if(t=sf(t),sf(e)!==t&&i)throw Error(s(425))}function Ro(){}var Ea=null,ja=null;function Pa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Na=typeof setTimeout=="function"?setTimeout:void 0,jy=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,Py=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(Ny)}:Na;function Ny(e){setTimeout(function(){throw e})}function Ra(e,t){var i=t,o=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(o===0){e.removeChild(u),ri(t);return}o--}else i!=="$"&&i!=="$?"&&i!=="$!"||o++;i=u}while(i);ri(t)}function Dn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function lf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(t===0)return e;t--}else i==="/$"&&t++}e=e.previousSibling}return null}var ns=Math.random().toString(36).slice(2),Jt="__reactFiber$"+ns,pi="__reactProps$"+ns,fn="__reactContainer$"+ns,La="__reactEvents$"+ns,Ry="__reactListeners$"+ns,Ly="__reactHandles$"+ns;function vr(e){var t=e[Jt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[fn]||i[Jt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lf(e);e!==null;){if(i=e[Jt])return i;e=lf(e)}return t}e=i,i=e.parentNode}return null}function mi(e){return e=e[Jt]||e[fn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Lo(e){return e[pi]||null}var Ma=[],ss=-1;function Fn(e){return{current:e}}function Fe(e){0>ss||(e.current=Ma[ss],Ma[ss]=null,ss--)}function Te(e,t){ss++,Ma[ss]=e.current,e.current=t}var zn={},it=Fn(zn),pt=Fn(!1),xr=zn;function is(e,t){var i=e.type.contextTypes;if(!i)return zn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},d;for(d in i)u[d]=t[d];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function mt(e){return e=e.childContextTypes,e!=null}function Mo(){Fe(pt),Fe(it)}function af(e,t,i){if(it.current!==zn)throw Error(s(168));Te(it,t),Te(pt,i)}function uf(e,t,i){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return i;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(s(108,Re(e)||"Unknown",u));return ee({},i,o)}function To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zn,xr=it.current,Te(it,e),Te(pt,pt.current),!0}function cf(e,t,i){var o=e.stateNode;if(!o)throw Error(s(169));i?(e=uf(e,t,xr),o.__reactInternalMemoizedMergedChildContext=e,Fe(pt),Fe(it),Te(it,e)):Fe(pt),Te(pt,i)}var hn=null,Io=!1,Ta=!1;function df(e){hn===null?hn=[e]:hn.push(e)}function My(e){Io=!0,df(e)}function On(){if(!Ta&&hn!==null){Ta=!0;var e=0,t=Pe;try{var i=hn;for(Pe=1;e<i.length;e++){var o=i[e];do o=o(!0);while(o!==null)}hn=null,Io=!1}catch(u){throw hn!==null&&(hn=hn.slice(e+1)),fd(ta,On),u}finally{Pe=t,Ta=!1}}return null}var os=[],ls=0,Do=null,Fo=0,Tt=[],It=0,wr=null,pn=1,mn="";function kr(e,t){os[ls++]=Fo,os[ls++]=Do,Do=e,Fo=t}function ff(e,t,i){Tt[It++]=pn,Tt[It++]=mn,Tt[It++]=wr,wr=e;var o=pn;e=mn;var u=32-Ut(o)-1;o&=~(1<<u),i+=1;var d=32-Ut(t)+u;if(30<d){var y=u-u%5;d=(o&(1<<y)-1).toString(32),o>>=y,u-=y,pn=1<<32-Ut(t)+u|i<<u|o,mn=d+e}else pn=1<<d|i<<u|o,mn=e}function Ia(e){e.return!==null&&(kr(e,1),ff(e,1,0))}function Da(e){for(;e===Do;)Do=os[--ls],os[ls]=null,Fo=os[--ls],os[ls]=null;for(;e===wr;)wr=Tt[--It],Tt[It]=null,mn=Tt[--It],Tt[It]=null,pn=Tt[--It],Tt[It]=null}var _t=null,Ct=null,Ae=!1,$t=null;function hf(e,t){var i=Ot(5,null,null,0);i.elementType="DELETED",i.stateNode=t,i.return=e,t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)}function pf(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,Ct=Dn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,Ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(i=wr!==null?{id:pn,overflow:mn}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},i=Ot(18,null,null,0),i.stateNode=t,i.return=e,e.child=i,_t=e,Ct=null,!0):!1;default:return!1}}function Fa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function za(e){if(Ae){var t=Ct;if(t){var i=t;if(!pf(e,t)){if(Fa(e))throw Error(s(418));t=Dn(i.nextSibling);var o=_t;t&&pf(e,t)?hf(o,i):(e.flags=e.flags&-4097|2,Ae=!1,_t=e)}}else{if(Fa(e))throw Error(s(418));e.flags=e.flags&-4097|2,Ae=!1,_t=e}}}function mf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function zo(e){if(e!==_t)return!1;if(!Ae)return mf(e),Ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pa(e.type,e.memoizedProps)),t&&(t=Ct)){if(Fa(e))throw gf(),Error(s(418));for(;t;)hf(e,t),t=Dn(t.nextSibling)}if(mf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){Ct=Dn(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}Ct=null}}else Ct=_t?Dn(e.stateNode.nextSibling):null;return!0}function gf(){for(var e=Ct;e;)e=Dn(e.nextSibling)}function as(){Ct=_t=null,Ae=!1}function Oa(e){$t===null?$t=[e]:$t.push(e)}var Ty=M.ReactCurrentBatchConfig;function gi(e,t,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(s(309));var o=i.stateNode}if(!o)throw Error(s(147,e));var u=o,d=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===d?t.ref:(t=function(y){var C=u.refs;y===null?delete C[d]:C[d]=y},t._stringRef=d,t)}if(typeof e!="string")throw Error(s(284));if(!i._owner)throw Error(s(290,e))}return e}function Oo(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yf(e){var t=e._init;return t(e._payload)}function vf(e){function t(T,N){if(e){var I=T.deletions;I===null?(T.deletions=[N],T.flags|=16):I.push(N)}}function i(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function o(T,N){for(T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function u(T,N){return T=Qn(T,N),T.index=0,T.sibling=null,T}function d(T,N,I){return T.index=I,e?(I=T.alternate,I!==null?(I=I.index,I<N?(T.flags|=2,N):I):(T.flags|=2,N)):(T.flags|=1048576,N)}function y(T){return e&&T.alternate===null&&(T.flags|=2),T}function C(T,N,I,q){return N===null||N.tag!==6?(N=Nu(I,T.mode,q),N.return=T,N):(N=u(N,I),N.return=T,N)}function E(T,N,I,q){var le=I.type;return le===G?$(T,N,I.props.children,q,I.key):N!==null&&(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ke&&yf(le)===N.type)?(q=u(N,I.props),q.ref=gi(T,N,I),q.return=T,q):(q=al(I.type,I.key,I.props,null,T.mode,q),q.ref=gi(T,N,I),q.return=T,q)}function D(T,N,I,q){return N===null||N.tag!==4||N.stateNode.containerInfo!==I.containerInfo||N.stateNode.implementation!==I.implementation?(N=Ru(I,T.mode,q),N.return=T,N):(N=u(N,I.children||[]),N.return=T,N)}function $(T,N,I,q,le){return N===null||N.tag!==7?(N=Nr(I,T.mode,q,le),N.return=T,N):(N=u(N,I),N.return=T,N)}function K(T,N,I){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Nu(""+N,T.mode,I),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case A:return I=al(N.type,N.key,N.props,null,T.mode,I),I.ref=gi(T,null,N),I.return=T,I;case z:return N=Ru(N,T.mode,I),N.return=T,N;case ke:var q=N._init;return K(T,q(N._payload),I)}if(gr(N)||J(N))return N=Nr(N,T.mode,I,null),N.return=T,N;Oo(T,N)}return null}function B(T,N,I,q){var le=N!==null?N.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return le!==null?null:C(T,N,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return I.key===le?E(T,N,I,q):null;case z:return I.key===le?D(T,N,I,q):null;case ke:return le=I._init,B(T,N,le(I._payload),q)}if(gr(I)||J(I))return le!==null?null:$(T,N,I,q,null);Oo(T,I)}return null}function ne(T,N,I,q,le){if(typeof q=="string"&&q!==""||typeof q=="number")return T=T.get(I)||null,C(N,T,""+q,le);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return T=T.get(q.key===null?I:q.key)||null,E(N,T,q,le);case z:return T=T.get(q.key===null?I:q.key)||null,D(N,T,q,le);case ke:var ae=q._init;return ne(T,N,I,ae(q._payload),le)}if(gr(q)||J(q))return T=T.get(I)||null,$(N,T,q,le,null);Oo(N,q)}return null}function ie(T,N,I,q){for(var le=null,ae=null,ue=N,fe=N=0,Je=null;ue!==null&&fe<I.length;fe++){ue.index>fe?(Je=ue,ue=null):Je=ue.sibling;var Ce=B(T,ue,I[fe],q);if(Ce===null){ue===null&&(ue=Je);break}e&&ue&&Ce.alternate===null&&t(T,ue),N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce,ue=Je}if(fe===I.length)return i(T,ue),Ae&&kr(T,fe),le;if(ue===null){for(;fe<I.length;fe++)ue=K(T,I[fe],q),ue!==null&&(N=d(ue,N,fe),ae===null?le=ue:ae.sibling=ue,ae=ue);return Ae&&kr(T,fe),le}for(ue=o(T,ue);fe<I.length;fe++)Je=ne(ue,T,fe,I[fe],q),Je!==null&&(e&&Je.alternate!==null&&ue.delete(Je.key===null?fe:Je.key),N=d(Je,N,fe),ae===null?le=Je:ae.sibling=Je,ae=Je);return e&&ue.forEach(function(Kn){return t(T,Kn)}),Ae&&kr(T,fe),le}function oe(T,N,I,q){var le=J(I);if(typeof le!="function")throw Error(s(150));if(I=le.call(I),I==null)throw Error(s(151));for(var ae=le=null,ue=N,fe=N=0,Je=null,Ce=I.next();ue!==null&&!Ce.done;fe++,Ce=I.next()){ue.index>fe?(Je=ue,ue=null):Je=ue.sibling;var Kn=B(T,ue,Ce.value,q);if(Kn===null){ue===null&&(ue=Je);break}e&&ue&&Kn.alternate===null&&t(T,ue),N=d(Kn,N,fe),ae===null?le=Kn:ae.sibling=Kn,ae=Kn,ue=Je}if(Ce.done)return i(T,ue),Ae&&kr(T,fe),le;if(ue===null){for(;!Ce.done;fe++,Ce=I.next())Ce=K(T,Ce.value,q),Ce!==null&&(N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return Ae&&kr(T,fe),le}for(ue=o(T,ue);!Ce.done;fe++,Ce=I.next())Ce=ne(ue,T,fe,Ce.value,q),Ce!==null&&(e&&Ce.alternate!==null&&ue.delete(Ce.key===null?fe:Ce.key),N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return e&&ue.forEach(function(f0){return t(T,f0)}),Ae&&kr(T,fe),le}function Qe(T,N,I,q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case A:e:{for(var le=I.key,ae=N;ae!==null;){if(ae.key===le){if(le=I.type,le===G){if(ae.tag===7){i(T,ae.sibling),N=u(ae,I.props.children),N.return=T,T=N;break e}}else if(ae.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ke&&yf(le)===ae.type){i(T,ae.sibling),N=u(ae,I.props),N.ref=gi(T,ae,I),N.return=T,T=N;break e}i(T,ae);break}else t(T,ae);ae=ae.sibling}I.type===G?(N=Nr(I.props.children,T.mode,q,I.key),N.return=T,T=N):(q=al(I.type,I.key,I.props,null,T.mode,q),q.ref=gi(T,N,I),q.return=T,T=q)}return y(T);case z:e:{for(ae=I.key;N!==null;){if(N.key===ae)if(N.tag===4&&N.stateNode.containerInfo===I.containerInfo&&N.stateNode.implementation===I.implementation){i(T,N.sibling),N=u(N,I.children||[]),N.return=T,T=N;break e}else{i(T,N);break}else t(T,N);N=N.sibling}N=Ru(I,T.mode,q),N.return=T,T=N}return y(T);case ke:return ae=I._init,Qe(T,N,ae(I._payload),q)}if(gr(I))return ie(T,N,I,q);if(J(I))return oe(T,N,I,q);Oo(T,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,N!==null&&N.tag===6?(i(T,N.sibling),N=u(N,I),N.return=T,T=N):(i(T,N),N=Nu(I,T.mode,q),N.return=T,T=N),y(T)):i(T,N)}return Qe}var us=vf(!0),xf=vf(!1),Ao=Fn(null),Uo=null,cs=null,Aa=null;function Ua(){Aa=cs=Uo=null}function Ba(e){var t=Ao.current;Fe(Ao),e._currentValue=t}function $a(e,t,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===i)break;e=e.return}}function ds(e,t){Uo=e,Aa=cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(gt=!0),e.firstContext=null)}function Dt(e){var t=e._currentValue;if(Aa!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(Uo===null)throw Error(s(308));cs=e,Uo.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var Sr=null;function Va(e){Sr===null?Sr=[e]:Sr.push(e)}function wf(e,t,i,o){var u=t.interleaved;return u===null?(i.next=i,Va(t)):(i.next=u.next,u.next=i),t.interleaved=i,gn(e,o)}function gn(e,t){e.lanes|=t;var i=e.alternate;for(i!==null&&(i.lanes|=t),i=e,e=e.return;e!==null;)e.childLanes|=t,i=e.alternate,i!==null&&(i.childLanes|=t),i=e,e=e.return;return i.tag===3?i.stateNode:null}var An=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Un(e,t,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(_e&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,gn(e,i)}return u=o.interleaved,u===null?(t.next=t,Va(o)):(t.next=u.next,u.next=t),o.interleaved=t,gn(e,i)}function Bo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,sa(e,i)}}function Sf(e,t){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var u=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};d===null?u=d=y:d=d.next=y,i=i.next}while(i!==null);d===null?u=d=t:d=d.next=t}else u=d=t;i={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:o.shared,effects:o.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function $o(e,t,i,o){var u=e.updateQueue;An=!1;var d=u.firstBaseUpdate,y=u.lastBaseUpdate,C=u.shared.pending;if(C!==null){u.shared.pending=null;var E=C,D=E.next;E.next=null,y===null?d=D:y.next=D,y=E;var $=e.alternate;$!==null&&($=$.updateQueue,C=$.lastBaseUpdate,C!==y&&(C===null?$.firstBaseUpdate=D:C.next=D,$.lastBaseUpdate=E))}if(d!==null){var K=u.baseState;y=0,$=D=E=null,C=d;do{var B=C.lane,ne=C.eventTime;if((o&B)===B){$!==null&&($=$.next={eventTime:ne,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ie=e,oe=C;switch(B=t,ne=i,oe.tag){case 1:if(ie=oe.payload,typeof ie=="function"){K=ie.call(ne,K,B);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=oe.payload,B=typeof ie=="function"?ie.call(ne,K,B):ie,B==null)break e;K=ee({},K,B);break e;case 2:An=!0}}C.callback!==null&&C.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[C]:B.push(C))}else ne={eventTime:ne,lane:B,tag:C.tag,payload:C.payload,callback:C.callback,next:null},$===null?(D=$=ne,E=K):$=$.next=ne,y|=B;if(C=C.next,C===null){if(C=u.shared.pending,C===null)break;B=C,C=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if($===null&&(E=K),u.baseState=E,u.firstBaseUpdate=D,u.lastBaseUpdate=$,t=u.shared.interleaved,t!==null){u=t;do y|=u.lane,u=u.next;while(u!==t)}else d===null&&(u.shared.lanes=0);Cr|=y,e.lanes=y,e.memoizedState=K}}function bf(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],u=o.callback;if(u!==null){if(o.callback=null,o=i,typeof u!="function")throw Error(s(191,u));u.call(o)}}}var yi={},en=Fn(yi),vi=Fn(yi),xi=Fn(yi);function br(e){if(e===yi)throw Error(s(174));return e}function Wa(e,t){switch(Te(xi,t),Te(vi,e),Te(en,yi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ql(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ql(t,e)}Fe(en),Te(en,t)}function fs(){Fe(en),Fe(vi),Fe(xi)}function _f(e){br(xi.current);var t=br(en.current),i=Ql(t,e.type);t!==i&&(Te(vi,e),Te(en,i))}function Qa(e){vi.current===e&&(Fe(en),Fe(vi))}var Be=Fn(0);function Vo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 Ka=[];function Ga(){for(var e=0;e<Ka.length;e++)Ka[e]._workInProgressVersionPrimary=null;Ka.length=0}var Ho=M.ReactCurrentDispatcher,qa=M.ReactCurrentBatchConfig,_r=0,$e=null,qe=null,Ye=null,Wo=!1,wi=!1,ki=0,Iy=0;function ot(){throw Error(s(321))}function Za(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Bt(e[i],t[i]))return!1;return!0}function Ya(e,t,i,o,u,d){if(_r=d,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ho.current=e===null||e.memoizedState===null?Oy:Ay,e=i(o,u),wi){d=0;do{if(wi=!1,ki=0,25<=d)throw Error(s(301));d+=1,Ye=qe=null,t.updateQueue=null,Ho.current=Uy,e=i(o,u)}while(wi)}if(Ho.current=Go,t=qe!==null&&qe.next!==null,_r=0,Ye=qe=$e=null,Wo=!1,t)throw Error(s(300));return e}function Xa(){var e=ki!==0;return ki=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function Ft(){if(qe===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=Ye===null?$e.memoizedState:Ye.next;if(t!==null)Ye=t,qe=e;else{if(e===null)throw Error(s(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function Si(e,t){return typeof t=="function"?t(e):t}function Ja(e){var t=Ft(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var o=qe,u=o.baseQueue,d=i.pending;if(d!==null){if(u!==null){var y=u.next;u.next=d.next,d.next=y}o.baseQueue=u=d,i.pending=null}if(u!==null){d=u.next,o=o.baseState;var C=y=null,E=null,D=d;do{var $=D.lane;if((_r&$)===$)E!==null&&(E=E.next={lane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),o=D.hasEagerState?D.eagerState:e(o,D.action);else{var K={lane:$,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null};E===null?(C=E=K,y=o):E=E.next=K,$e.lanes|=$,Cr|=$}D=D.next}while(D!==null&&D!==d);E===null?y=o:E.next=C,Bt(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseState=y,t.baseQueue=E,i.lastRenderedState=o}if(e=i.interleaved,e!==null){u=e;do d=u.lane,$e.lanes|=d,Cr|=d,u=u.next;while(u!==e)}else u===null&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function eu(e){var t=Ft(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var o=i.dispatch,u=i.pending,d=t.memoizedState;if(u!==null){i.pending=null;var y=u=u.next;do d=e(d,y.action),y=y.next;while(y!==u);Bt(d,t.memoizedState)||(gt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,o]}function Cf(){}function Ef(e,t){var i=$e,o=Ft(),u=t(),d=!Bt(o.memoizedState,u);if(d&&(o.memoizedState=u,gt=!0),o=o.queue,tu(Nf.bind(null,i,o,e),[e]),o.getSnapshot!==t||d||Ye!==null&&Ye.memoizedState.tag&1){if(i.flags|=2048,bi(9,Pf.bind(null,i,o,u,t),void 0,null),Xe===null)throw Error(s(349));(_r&30)!==0||jf(i,t,u)}return u}function jf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Pf(e,t,i,o){t.value=i,t.getSnapshot=o,Rf(t)&&Lf(e)}function Nf(e,t,i){return i(function(){Rf(t)&&Lf(e)})}function Rf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Bt(e,i)}catch{return!0}}function Lf(e){var t=gn(e,1);t!==null&&Qt(t,e,1,-1)}function Mf(e){var t=tn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t.queue=e,e=e.dispatch=zy.bind(null,$e,e),[t.memoizedState,e]}function bi(e,t,i,o){return e={tag:e,create:t,destroy:i,deps:o,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(i=t.lastEffect,i===null?t.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,t.lastEffect=e)),e}function Tf(){return Ft().memoizedState}function Qo(e,t,i,o){var u=tn();$e.flags|=e,u.memoizedState=bi(1|t,i,void 0,o===void 0?null:o)}function Ko(e,t,i,o){var u=Ft();o=o===void 0?null:o;var d=void 0;if(qe!==null){var y=qe.memoizedState;if(d=y.destroy,o!==null&&Za(o,y.deps)){u.memoizedState=bi(t,i,d,o);return}}$e.flags|=e,u.memoizedState=bi(1|t,i,d,o)}function If(e,t){return Qo(8390656,8,e,t)}function tu(e,t){return Ko(2048,8,e,t)}function Df(e,t){return Ko(4,2,e,t)}function Ff(e,t){return Ko(4,4,e,t)}function zf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Of(e,t,i){return i=i!=null?i.concat([e]):null,Ko(4,4,zf.bind(null,t,e),i)}function nu(){}function Af(e,t){var i=Ft();t=t===void 0?null:t;var o=i.memoizedState;return o!==null&&t!==null&&Za(t,o[1])?o[0]:(i.memoizedState=[e,t],e)}function Uf(e,t){var i=Ft();t=t===void 0?null:t;var o=i.memoizedState;return o!==null&&t!==null&&Za(t,o[1])?o[0]:(e=e(),i.memoizedState=[e,t],e)}function Bf(e,t,i){return(_r&21)===0?(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=i):(Bt(i,t)||(i=gd(),$e.lanes|=i,Cr|=i,e.baseState=!0),t)}function Dy(e,t){var i=Pe;Pe=i!==0&&4>i?i:4,e(!0);var o=qa.transition;qa.transition={};try{e(!1),t()}finally{Pe=i,qa.transition=o}}function $f(){return Ft().memoizedState}function Fy(e,t,i){var o=Hn(e);if(i={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null},Vf(e))Hf(t,i);else if(i=wf(e,t,i,o),i!==null){var u=dt();Qt(i,e,o,u),Wf(i,t,o)}}function zy(e,t,i){var o=Hn(e),u={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null};if(Vf(e))Hf(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,C=d(y,i);if(u.hasEagerState=!0,u.eagerState=C,Bt(C,y)){var E=t.interleaved;E===null?(u.next=u,Va(t)):(u.next=E.next,E.next=u),t.interleaved=u;return}}catch{}finally{}i=wf(e,t,u,o),i!==null&&(u=dt(),Qt(i,e,o,u),Wf(i,t,o))}}function Vf(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Hf(e,t){wi=Wo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Wf(e,t,i){if((i&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,sa(e,i)}}var Go={readContext:Dt,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},Oy={readContext:Dt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:If,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Qo(4194308,4,zf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(4,2,e,t)},useMemo:function(e,t){var i=tn();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var o=tn();return t=i!==void 0?i(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Fy.bind(null,$e,e),[o.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:Mf,useDebugValue:nu,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=Mf(!1),t=e[0];return e=Dy.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var o=$e,u=tn();if(Ae){if(i===void 0)throw Error(s(407));i=i()}else{if(i=t(),Xe===null)throw Error(s(349));(_r&30)!==0||jf(o,t,i)}u.memoizedState=i;var d={value:i,getSnapshot:t};return u.queue=d,If(Nf.bind(null,o,d,e),[e]),o.flags|=2048,bi(9,Pf.bind(null,o,d,i,t),void 0,null),i},useId:function(){var e=tn(),t=Xe.identifierPrefix;if(Ae){var i=mn,o=pn;i=(o&~(1<<32-Ut(o)-1)).toString(32)+i,t=":"+t+"R"+i,i=ki++,0<i&&(t+="H"+i.toString(32)),t+=":"}else i=Iy++,t=":"+t+"r"+i.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ay={readContext:Dt,useCallback:Af,useContext:Dt,useEffect:tu,useImperativeHandle:Of,useInsertionEffect:Df,useLayoutEffect:Ff,useMemo:Uf,useReducer:Ja,useRef:Tf,useState:function(){return Ja(Si)},useDebugValue:nu,useDeferredValue:function(e){var t=Ft();return Bf(t,qe.memoizedState,e)},useTransition:function(){var e=Ja(Si)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Cf,useSyncExternalStore:Ef,useId:$f,unstable_isNewReconciler:!1},Uy={readContext:Dt,useCallback:Af,useContext:Dt,useEffect:tu,useImperativeHandle:Of,useInsertionEffect:Df,useLayoutEffect:Ff,useMemo:Uf,useReducer:eu,useRef:Tf,useState:function(){return eu(Si)},useDebugValue:nu,useDeferredValue:function(e){var t=Ft();return qe===null?t.memoizedState=e:Bf(t,qe.memoizedState,e)},useTransition:function(){var e=eu(Si)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Cf,useSyncExternalStore:Ef,useId:$f,unstable_isNewReconciler:!1};function Vt(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function ru(e,t,i,o){t=e.memoizedState,i=i(o,t),i=i==null?t:ee({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var qo={isMounted:function(e){return(e=e._reactInternals)?yr(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternals;var o=dt(),u=Hn(e),d=yn(o,u);d.payload=t,i!=null&&(d.callback=i),t=Un(e,d,u),t!==null&&(Qt(t,e,u,o),Bo(t,e,u))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var o=dt(),u=Hn(e),d=yn(o,u);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=Un(e,d,u),t!==null&&(Qt(t,e,u,o),Bo(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=dt(),o=Hn(e),u=yn(i,o);u.tag=2,t!=null&&(u.callback=t),t=Un(e,u,o),t!==null&&(Qt(t,e,o,i),Bo(t,e,o))}};function Qf(e,t,i,o,u,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,y):t.prototype&&t.prototype.isPureReactComponent?!ui(i,o)||!ui(u,d):!0}function Kf(e,t,i){var o=!1,u=zn,d=t.contextType;return typeof d=="object"&&d!==null?d=Dt(d):(u=mt(t)?xr:it.current,o=t.contextTypes,d=(o=o!=null)?is(e,u):zn),t=new t(i,d),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qo,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=d),t}function Gf(e,t,i,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,o),t.state!==e&&qo.enqueueReplaceState(t,t.state,null)}function su(e,t,i,o){var u=e.stateNode;u.props=i,u.state=e.memoizedState,u.refs={},Ha(e);var d=t.contextType;typeof d=="object"&&d!==null?u.context=Dt(d):(d=mt(t)?xr:it.current,u.context=is(e,d)),u.state=e.memoizedState,d=t.getDerivedStateFromProps,typeof d=="function"&&(ru(e,t,d,i),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&qo.enqueueReplaceState(u,u.state,null),$o(e,i,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function hs(e,t){try{var i="",o=t;do i+=Se(o),o=o.return;while(o);var u=i}catch(d){u=`
Error generating stack: `+d.message+`
`+d.stack}return{value:e,source:t,stack:u,digest:null}}function iu(e,t,i){return{value:e,source:null,stack:i??null,digest:t??null}}function ou(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}var By=typeof WeakMap=="function"?WeakMap:Map;function qf(e,t,i){i=yn(-1,i),i.tag=3,i.payload={element:null};var o=t.value;return i.callback=function(){nl||(nl=!0,ku=o),ou(e,t)},i}function Zf(e,t,i){i=yn(-1,i),i.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=t.value;i.payload=function(){return o(u)},i.callback=function(){ou(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(i.callback=function(){ou(e,t),typeof o!="function"&&($n===null?$n=new Set([this]):$n.add(this));var y=t.stack;this.componentDidCatch(t.value,{componentStack:y!==null?y:""})}),i}function Yf(e,t,i){var o=e.pingCache;if(o===null){o=e.pingCache=new By;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(i)||(u.add(i),e=t0.bind(null,e,t,i),t.then(e,e))}function Xf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Jf(e,t,i,o,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(t=yn(-1,1),t.tag=2,Un(i,t,1))),i.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var $y=M.ReactCurrentOwner,gt=!1;function ct(e,t,i,o){t.child=e===null?xf(t,null,i,o):us(t,e.child,i,o)}function eh(e,t,i,o,u){i=i.render;var d=t.ref;return ds(t,u),o=Ya(e,t,i,o,d,u),i=Xa(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,vn(e,t,u)):(Ae&&i&&Ia(t),t.flags|=1,ct(e,t,o,u),t.child)}function th(e,t,i,o,u){if(e===null){var d=i.type;return typeof d=="function"&&!Pu(d)&&d.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=d,nh(e,t,d,o,u)):(e=al(i.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,(e.lanes&u)===0){var y=d.memoizedProps;if(i=i.compare,i=i!==null?i:ui,i(y,o)&&e.ref===t.ref)return vn(e,t,u)}return t.flags|=1,e=Qn(d,o),e.ref=t.ref,e.return=t,t.child=e}function nh(e,t,i,o,u){if(e!==null){var d=e.memoizedProps;if(ui(d,o)&&e.ref===t.ref)if(gt=!1,t.pendingProps=o=d,(e.lanes&u)!==0)(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,vn(e,t,u)}return lu(e,t,i,o,u)}function rh(e,t,i){var o=t.pendingProps,u=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(ms,Et),Et|=i;else{if((i&1073741824)===0)return e=d!==null?d.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Te(ms,Et),Et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=d!==null?d.baseLanes:i,Te(ms,Et),Et|=o}else d!==null?(o=d.baseLanes|i,t.memoizedState=null):o=i,Te(ms,Et),Et|=o;return ct(e,t,u,i),t.child}function sh(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function lu(e,t,i,o,u){var d=mt(i)?xr:it.current;return d=is(t,d),ds(t,u),i=Ya(e,t,i,o,d,u),o=Xa(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,vn(e,t,u)):(Ae&&o&&Ia(t),t.flags|=1,ct(e,t,i,u),t.child)}function ih(e,t,i,o,u){if(mt(i)){var d=!0;To(t)}else d=!1;if(ds(t,u),t.stateNode===null)Yo(e,t),Kf(t,i,o),su(t,i,o,u),o=!0;else if(e===null){var y=t.stateNode,C=t.memoizedProps;y.props=C;var E=y.context,D=i.contextType;typeof D=="object"&&D!==null?D=Dt(D):(D=mt(i)?xr:it.current,D=is(t,D));var $=i.getDerivedStateFromProps,K=typeof $=="function"||typeof y.getSnapshotBeforeUpdate=="function";K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==o||E!==D)&&Gf(t,y,o,D),An=!1;var B=t.memoizedState;y.state=B,$o(t,o,y,u),E=t.memoizedState,C!==o||B!==E||pt.current||An?(typeof $=="function"&&(ru(t,i,$,o),E=t.memoizedState),(C=An||Qf(t,i,C,o,B,E,D))?(K||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=E),y.props=o,y.state=E,y.context=D,o=C):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{y=t.stateNode,kf(e,t),C=t.memoizedProps,D=t.type===t.elementType?C:Vt(t.type,C),y.props=D,K=t.pendingProps,B=y.context,E=i.contextType,typeof E=="object"&&E!==null?E=Dt(E):(E=mt(i)?xr:it.current,E=is(t,E));var ne=i.getDerivedStateFromProps;($=typeof ne=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==K||B!==E)&&Gf(t,y,o,E),An=!1,B=t.memoizedState,y.state=B,$o(t,o,y,u);var ie=t.memoizedState;C!==K||B!==ie||pt.current||An?(typeof ne=="function"&&(ru(t,i,ne,o),ie=t.memoizedState),(D=An||Qf(t,i,D,o,B,ie,E)||!1)?($||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(o,ie,E),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(o,ie,E)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ie),y.props=o,y.state=ie,y.context=E,o=D):(typeof y.componentDidUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),o=!1)}return au(e,t,i,o,d,u)}function au(e,t,i,o,u,d){sh(e,t);var y=(t.flags&128)!==0;if(!o&&!y)return u&&cf(t,i,!1),vn(e,t,d);o=t.stateNode,$y.current=t;var C=y&&typeof i.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&y?(t.child=us(t,e.child,null,d),t.child=us(t,null,C,d)):ct(e,t,C,d),t.memoizedState=o.state,u&&cf(t,i,!0),t.child}function oh(e){var t=e.stateNode;t.pendingContext?af(e,t.pendingContext,t.pendingContext!==t.context):t.context&&af(e,t.context,!1),Wa(e,t.containerInfo)}function lh(e,t,i,o,u){return as(),Oa(u),t.flags|=256,ct(e,t,i,o),t.child}var uu={dehydrated:null,treeContext:null,retryLane:0};function cu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ah(e,t,i){var o=t.pendingProps,u=Be.current,d=!1,y=(t.flags&128)!==0,C;if((C=y)||(C=e!==null&&e.memoizedState===null?!1:(u&2)!==0),C?(d=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Te(Be,u&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(y=o.children,e=o.fallback,d?(o=t.mode,d=t.child,y={mode:"hidden",children:y},(o&1)===0&&d!==null?(d.childLanes=0,d.pendingProps=y):d=ul(y,o,0,null),e=Nr(e,o,i,null),d.return=t,e.return=t,d.sibling=e,t.child=d,t.child.memoizedState=cu(i),t.memoizedState=uu,e):du(t,y));if(u=e.memoizedState,u!==null&&(C=u.dehydrated,C!==null))return Vy(e,t,y,o,C,u,i);if(d){d=o.fallback,y=t.mode,u=e.child,C=u.sibling;var E={mode:"hidden",children:o.children};return(y&1)===0&&t.child!==u?(o=t.child,o.childLanes=0,o.pendingProps=E,t.deletions=null):(o=Qn(u,E),o.subtreeFlags=u.subtreeFlags&14680064),C!==null?d=Qn(C,d):(d=Nr(d,y,i,null),d.flags|=2),d.return=t,o.return=t,o.sibling=d,t.child=o,o=d,d=t.child,y=e.child.memoizedState,y=y===null?cu(i):{baseLanes:y.baseLanes|i,cachePool:null,transitions:y.transitions},d.memoizedState=y,d.childLanes=e.childLanes&~i,t.memoizedState=uu,o}return d=e.child,e=d.sibling,o=Qn(d,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=i),o.return=t,o.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=o,t.memoizedState=null,o}function du(e,t){return t=ul({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Zo(e,t,i,o){return o!==null&&Oa(o),us(t,e.child,null,i),e=du(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vy(e,t,i,o,u,d,y){if(i)return t.flags&256?(t.flags&=-257,o=iu(Error(s(422))),Zo(e,t,y,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(d=o.fallback,u=t.mode,o=ul({mode:"visible",children:o.children},u,0,null),d=Nr(d,u,y,null),d.flags|=2,o.return=t,d.return=t,o.sibling=d,t.child=o,(t.mode&1)!==0&&us(t,e.child,null,y),t.child.memoizedState=cu(y),t.memoizedState=uu,d);if((t.mode&1)===0)return Zo(e,t,y,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var C=o.dgst;return o=C,d=Error(s(419)),o=iu(d,o,void 0),Zo(e,t,y,o)}if(C=(y&e.childLanes)!==0,gt||C){if(o=Xe,o!==null){switch(y&-y){case 4:u=2;break;case 16:u=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|y))!==0?0:u,u!==0&&u!==d.retryLane&&(d.retryLane=u,gn(e,u),Qt(o,e,u,-1))}return ju(),o=iu(Error(s(421))),Zo(e,t,y,o)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=n0.bind(null,e),u._reactRetry=t,null):(e=d.treeContext,Ct=Dn(u.nextSibling),_t=t,Ae=!0,$t=null,e!==null&&(Tt[It++]=pn,Tt[It++]=mn,Tt[It++]=wr,pn=e.id,mn=e.overflow,wr=t),t=du(t,o.children),t.flags|=4096,t)}function uh(e,t,i){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),$a(e.return,t,i)}function fu(e,t,i,o,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=i,d.tailMode=u)}function ch(e,t,i){var o=t.pendingProps,u=o.revealOrder,d=o.tail;if(ct(e,t,o.children,i),o=Be.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uh(e,i,t);else if(e.tag===19)uh(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Te(Be,o),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&Vo(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),fu(t,!1,u,i,d);break;case"backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Vo(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}fu(t,!0,i,null,d);break;case"together":fu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Cr|=t.lanes,(i&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,i=Qn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Qn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Hy(e,t,i){switch(t.tag){case 3:oh(t),as();break;case 5:_f(t);break;case 1:mt(t.type)&&To(t);break;case 4:Wa(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,u=t.memoizedProps.value;Te(Ao,o._currentValue),o._currentValue=u;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Te(Be,Be.current&1),t.flags|=128,null):(i&t.child.childLanes)!==0?ah(e,t,i):(Te(Be,Be.current&1),e=vn(e,t,i),e!==null?e.sibling:null);Te(Be,Be.current&1);break;case 19:if(o=(i&t.childLanes)!==0,(e.flags&128)!==0){if(o)return ch(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Te(Be,Be.current),o)break;return null;case 22:case 23:return t.lanes=0,rh(e,t,i)}return vn(e,t,i)}var dh,hu,fh,hh;dh=function(e,t){for(var i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},hu=function(){},fh=function(e,t,i,o){var u=e.memoizedProps;if(u!==o){e=t.stateNode,br(en.current);var d=null;switch(i){case"input":u=Qr(e,u),o=Qr(e,o),d=[];break;case"select":u=ee({},u,{value:void 0}),o=ee({},o,{value:void 0}),d=[];break;case"textarea":u=Kr(e,u),o=Kr(e,o),d=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Ro)}Kl(i,o);var y;i=null;for(D in u)if(!o.hasOwnProperty(D)&&u.hasOwnProperty(D)&&u[D]!=null)if(D==="style"){var C=u[D];for(y in C)C.hasOwnProperty(y)&&(i||(i={}),i[y]="")}else D!=="dangerouslySetInnerHTML"&&D!=="children"&&D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&D!=="autoFocus"&&(a.hasOwnProperty(D)?d||(d=[]):(d=d||[]).push(D,null));for(D in o){var E=o[D];if(C=u!=null?u[D]:void 0,o.hasOwnProperty(D)&&E!==C&&(E!=null||C!=null))if(D==="style")if(C){for(y in C)!C.hasOwnProperty(y)||E&&E.hasOwnProperty(y)||(i||(i={}),i[y]="");for(y in E)E.hasOwnProperty(y)&&C[y]!==E[y]&&(i||(i={}),i[y]=E[y])}else i||(d||(d=[]),d.push(D,i)),i=E;else D==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,C=C?C.__html:void 0,E!=null&&C!==E&&(d=d||[]).push(D,E)):D==="children"?typeof E!="string"&&typeof E!="number"||(d=d||[]).push(D,""+E):D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&(a.hasOwnProperty(D)?(E!=null&&D==="onScroll"&&De("scroll",e),d||C===E||(d=[])):(d=d||[]).push(D,E))}i&&(d=d||[]).push("style",i);var D=d;(t.updateQueue=D)&&(t.flags|=4)}},hh=function(e,t,i,o){i!==o&&(t.flags|=4)};function _i(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=i,t}function Wy(e,t,i){var o=t.pendingProps;switch(Da(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return mt(t.type)&&Mo(),lt(t),null;case 3:return o=t.stateNode,fs(),Fe(pt),Fe(it),Ga(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(zo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$t!==null&&(_u($t),$t=null))),hu(e,t),lt(t),null;case 5:Qa(t);var u=br(xi.current);if(i=t.type,e!==null&&t.stateNode!=null)fh(e,t,i,o,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(s(166));return lt(t),null}if(e=br(en.current),zo(t)){o=t.stateNode,i=t.type;var d=t.memoizedProps;switch(o[Jt]=t,o[pi]=d,e=(t.mode&1)!==0,i){case"dialog":De("cancel",o),De("close",o);break;case"iframe":case"object":case"embed":De("load",o);break;case"video":case"audio":for(u=0;u<di.length;u++)De(di[u],o);break;case"source":De("error",o);break;case"img":case"image":case"link":De("error",o),De("load",o);break;case"details":De("toggle",o);break;case"input":Hs(o,d),De("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!d.multiple},De("invalid",o);break;case"textarea":Ke(o,d),De("invalid",o)}Kl(i,d),u=null;for(var y in d)if(d.hasOwnProperty(y)){var C=d[y];y==="children"?typeof C=="string"?o.textContent!==C&&(d.suppressHydrationWarning!==!0&&No(o.textContent,C,e),u=["children",C]):typeof C=="number"&&o.textContent!==""+C&&(d.suppressHydrationWarning!==!0&&No(o.textContent,C,e),u=["children",""+C]):a.hasOwnProperty(y)&&C!=null&&y==="onScroll"&&De("scroll",o)}switch(i){case"input":cn(o),dn(o,d,!0);break;case"textarea":cn(o),Yt(o);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(o.onclick=Ro)}o=u,t.updateQueue=o,o!==null&&(t.flags|=4)}else{y=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ws(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=y.createElement(i,{is:o.is}):(e=y.createElement(i),i==="select"&&(y=e,o.multiple?y.multiple=!0:o.size&&(y.size=o.size))):e=y.createElementNS(e,i),e[Jt]=t,e[pi]=o,dh(e,t,!1,!1),t.stateNode=e;e:{switch(y=Gl(i,o),i){case"dialog":De("cancel",e),De("close",e),u=o;break;case"iframe":case"object":case"embed":De("load",e),u=o;break;case"video":case"audio":for(u=0;u<di.length;u++)De(di[u],e);u=o;break;case"source":De("error",e),u=o;break;case"img":case"image":case"link":De("error",e),De("load",e),u=o;break;case"details":De("toggle",e),u=o;break;case"input":Hs(e,o),u=Qr(e,o),De("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=ee({},o,{value:void 0}),De("invalid",e);break;case"textarea":Ke(e,o),u=Kr(e,o),De("invalid",e);break;default:u=o}Kl(i,u),C=u;for(d in C)if(C.hasOwnProperty(d)){var E=C[d];d==="style"?td(e,E):d==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&Jc(e,E)):d==="children"?typeof E=="string"?(i!=="textarea"||E!=="")&&Qs(e,E):typeof E=="number"&&Qs(e,""+E):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(a.hasOwnProperty(d)?E!=null&&d==="onScroll"&&De("scroll",e):E!=null&&F(e,d,E,y))}switch(i){case"input":cn(e),dn(e,o,!1);break;case"textarea":cn(e),Yt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Ee(o.value));break;case"select":e.multiple=!!o.multiple,d=o.value,d!=null?Pn(e,!!o.multiple,d,!1):o.defaultValue!=null&&Pn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Ro)}switch(i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return lt(t),null;case 6:if(e&&t.stateNode!=null)hh(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(s(166));if(i=br(xi.current),br(en.current),zo(t)){if(o=t.stateNode,i=t.memoizedProps,o[Jt]=t,(d=o.nodeValue!==i)&&(e=_t,e!==null))switch(e.tag){case 3:No(o.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&No(o.nodeValue,i,(e.mode&1)!==0)}d&&(t.flags|=4)}else o=(i.nodeType===9?i:i.ownerDocument).createTextNode(o),o[Jt]=t,t.stateNode=o}return lt(t),null;case 13:if(Fe(Be),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ae&&Ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)gf(),as(),t.flags|=98560,d=!1;else if(d=zo(t),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(s(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[Jt]=t}else as(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),d=!1}else $t!==null&&(_u($t),$t=null),d=!0;if(!d)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=i,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Ze===0&&(Ze=3):ju())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return fs(),hu(e,t),e===null&&fi(t.stateNode.containerInfo),lt(t),null;case 10:return Ba(t.type._context),lt(t),null;case 17:return mt(t.type)&&Mo(),lt(t),null;case 19:if(Fe(Be),d=t.memoizedState,d===null)return lt(t),null;if(o=(t.flags&128)!==0,y=d.rendering,y===null)if(o)_i(d,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=Vo(e),y!==null){for(t.flags|=128,_i(d,!1),o=y.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=i,i=t.child;i!==null;)d=i,e=o,d.flags&=14680066,y=d.alternate,y===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=y.childLanes,d.lanes=y.lanes,d.child=y.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=y.memoizedProps,d.memoizedState=y.memoizedState,d.updateQueue=y.updateQueue,d.type=y.type,e=y.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return Te(Be,Be.current&1|2),t.child}e=e.sibling}d.tail!==null&&We()>gs&&(t.flags|=128,o=!0,_i(d,!1),t.lanes=4194304)}else{if(!o)if(e=Vo(y),e!==null){if(t.flags|=128,o=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),_i(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!Ae)return lt(t),null}else 2*We()-d.renderingStartTime>gs&&i!==1073741824&&(t.flags|=128,o=!0,_i(d,!1),t.lanes=4194304);d.isBackwards?(y.sibling=t.child,t.child=y):(i=d.last,i!==null?i.sibling=y:t.child=y,d.last=y)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=We(),t.sibling=null,i=Be.current,Te(Be,o?i&1|2:i&1),t):(lt(t),null);case 22:case 23:return Eu(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Et&1073741824)!==0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Qy(e,t){switch(Da(t),t.tag){case 1:return mt(t.type)&&Mo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),Fe(pt),Fe(it),Ga(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Qa(t),null;case 13:if(Fe(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));as()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(Be),null;case 4:return fs(),null;case 10:return Ba(t.type._context),null;case 22:case 23:return Eu(),null;case 24:return null;default:return null}}var Xo=!1,at=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,se=null;function ps(e,t){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(o){Ve(e,t,o)}else i.current=null}function pu(e,t,i){try{i()}catch(o){Ve(e,t,o)}}var ph=!1;function Gy(e,t){if(Ea=vo,e=Wd(),va(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var y=0,C=-1,E=-1,D=0,$=0,K=e,B=null;t:for(;;){for(var ne;K!==i||u!==0&&K.nodeType!==3||(C=y+u),K!==d||o!==0&&K.nodeType!==3||(E=y+o),K.nodeType===3&&(y+=K.nodeValue.length),(ne=K.firstChild)!==null;)B=K,K=ne;for(;;){if(K===e)break t;if(B===i&&++D===u&&(C=y),B===d&&++$===o&&(E=y),(ne=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=ne}i=C===-1||E===-1?null:{start:C,end:E}}else i=null}i=i||{start:0,end:0}}else i=null;for(ja={focusedElem:e,selectionRange:i},vo=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var ie=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var oe=ie.memoizedProps,Qe=ie.memoizedState,T=t.stateNode,N=T.getSnapshotBeforeUpdate(t.elementType===t.type?oe:Vt(t.type,oe),Qe);T.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(q){Ve(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return ie=ph,ph=!1,ie}function Ci(e,t,i){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var d=u.destroy;u.destroy=void 0,d!==void 0&&pu(t,i,d)}u=u.next}while(u!==o)}}function Jo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var o=i.create;i.destroy=o()}i=i.next}while(i!==t)}}function mu(e){var t=e.ref;if(t!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof t=="function"?t(e):t.current=e}}function mh(e){var t=e.alternate;t!==null&&(e.alternate=null,mh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[pi],delete t[La],delete t[Ry],delete t[Ly])),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 gh(e){return e.tag===5||e.tag===3||e.tag===4}function yh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(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 gu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Ro));else if(o!==4&&(e=e.child,e!==null))for(gu(e,t,i),e=e.sibling;e!==null;)gu(e,t,i),e=e.sibling}function yu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(yu(e,t,i),e=e.sibling;e!==null;)yu(e,t,i),e=e.sibling}var nt=null,Ht=!1;function Bn(e,t,i){for(i=i.child;i!==null;)vh(e,t,i),i=i.sibling}function vh(e,t,i){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(fo,i)}catch{}switch(i.tag){case 5:at||ps(i,t);case 6:var o=nt,u=Ht;nt=null,Bn(e,t,i),nt=o,Ht=u,nt!==null&&(Ht?(e=nt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):nt.removeChild(i.stateNode));break;case 18:nt!==null&&(Ht?(e=nt,i=i.stateNode,e.nodeType===8?Ra(e.parentNode,i):e.nodeType===1&&Ra(e,i),ri(e)):Ra(nt,i.stateNode));break;case 4:o=nt,u=Ht,nt=i.stateNode.containerInfo,Ht=!0,Bn(e,t,i),nt=o,Ht=u;break;case 0:case 11:case 14:case 15:if(!at&&(o=i.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var d=u,y=d.destroy;d=d.tag,y!==void 0&&((d&2)!==0||(d&4)!==0)&&pu(i,t,y),u=u.next}while(u!==o)}Bn(e,t,i);break;case 1:if(!at&&(ps(i,t),o=i.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=i.memoizedProps,o.state=i.memoizedState,o.componentWillUnmount()}catch(C){Ve(i,t,C)}Bn(e,t,i);break;case 21:Bn(e,t,i);break;case 22:i.mode&1?(at=(o=at)||i.memoizedState!==null,Bn(e,t,i),at=o):Bn(e,t,i);break;default:Bn(e,t,i)}}function xh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new Ky),t.forEach(function(o){var u=r0.bind(null,e,o);i.has(o)||(i.add(o),o.then(u,u))})}}function Wt(e,t){var i=t.deletions;if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];try{var d=e,y=t,C=y;e:for(;C!==null;){switch(C.tag){case 5:nt=C.stateNode,Ht=!1;break e;case 3:nt=C.stateNode.containerInfo,Ht=!0;break e;case 4:nt=C.stateNode.containerInfo,Ht=!0;break e}C=C.return}if(nt===null)throw Error(s(160));vh(d,y,u),nt=null,Ht=!1;var E=u.alternate;E!==null&&(E.return=null),u.return=null}catch(D){Ve(u,t,D)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wh(t,e),t=t.sibling}function wh(e,t){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wt(t,e),nn(e),o&4){try{Ci(3,e,e.return),Jo(3,e)}catch(oe){Ve(e,e.return,oe)}try{Ci(5,e,e.return)}catch(oe){Ve(e,e.return,oe)}}break;case 1:Wt(t,e),nn(e),o&512&&i!==null&&ps(i,i.return);break;case 5:if(Wt(t,e),nn(e),o&512&&i!==null&&ps(i,i.return),e.flags&32){var u=e.stateNode;try{Qs(u,"")}catch(oe){Ve(e,e.return,oe)}}if(o&4&&(u=e.stateNode,u!=null)){var d=e.memoizedProps,y=i!==null?i.memoizedProps:d,C=e.type,E=e.updateQueue;if(e.updateQueue=null,E!==null)try{C==="input"&&d.type==="radio"&&d.name!=null&&Zt(u,d),Gl(C,y);var D=Gl(C,d);for(y=0;y<E.length;y+=2){var $=E[y],K=E[y+1];$==="style"?td(u,K):$==="dangerouslySetInnerHTML"?Jc(u,K):$==="children"?Qs(u,K):F(u,$,K,D)}switch(C){case"input":pr(u,d);break;case"textarea":Mt(u,d);break;case"select":var B=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!d.multiple;var ne=d.value;ne!=null?Pn(u,!!d.multiple,ne,!1):B!==!!d.multiple&&(d.defaultValue!=null?Pn(u,!!d.multiple,d.defaultValue,!0):Pn(u,!!d.multiple,d.multiple?[]:"",!1))}u[pi]=d}catch(oe){Ve(e,e.return,oe)}}break;case 6:if(Wt(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,d=e.memoizedProps;try{u.nodeValue=d}catch(oe){Ve(e,e.return,oe)}}break;case 3:if(Wt(t,e),nn(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ri(t.containerInfo)}catch(oe){Ve(e,e.return,oe)}break;case 4:Wt(t,e),nn(e);break;case 13:Wt(t,e),nn(e),u=e.child,u.flags&8192&&(d=u.memoizedState!==null,u.stateNode.isHidden=d,!d||u.alternate!==null&&u.alternate.memoizedState!==null||(wu=We())),o&4&&xh(e);break;case 22:if($=i!==null&&i.memoizedState!==null,e.mode&1?(at=(D=at)||$,Wt(t,e),at=D):Wt(t,e),nn(e),o&8192){if(D=e.memoizedState!==null,(e.stateNode.isHidden=D)&&!$&&(e.mode&1)!==0)for(se=e,$=e.child;$!==null;){for(K=se=$;se!==null;){switch(B=se,ne=B.child,B.tag){case 0:case 11:case 14:case 15:Ci(4,B,B.return);break;case 1:ps(B,B.return);var ie=B.stateNode;if(typeof ie.componentWillUnmount=="function"){o=B,i=B.return;try{t=o,ie.props=t.memoizedProps,ie.state=t.memoizedState,ie.componentWillUnmount()}catch(oe){Ve(o,i,oe)}}break;case 5:ps(B,B.return);break;case 22:if(B.memoizedState!==null){bh(K);continue}}ne!==null?(ne.return=B,se=ne):bh(K)}$=$.sibling}e:for($=null,K=e;;){if(K.tag===5){if($===null){$=K;try{u=K.stateNode,D?(d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(C=K.stateNode,E=K.memoizedProps.style,y=E!=null&&E.hasOwnProperty("display")?E.display:null,C.style.display=ed("display",y))}catch(oe){Ve(e,e.return,oe)}}}else if(K.tag===6){if($===null)try{K.stateNode.nodeValue=D?"":K.memoizedProps}catch(oe){Ve(e,e.return,oe)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===e)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===e)break e;for(;K.sibling===null;){if(K.return===null||K.return===e)break e;$===K&&($=null),K=K.return}$===K&&($=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:Wt(t,e),nn(e),o&4&&xh(e);break;case 21:break;default:Wt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var i=e.return;i!==null;){if(gh(i)){var o=i;break e}i=i.return}throw Error(s(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(Qs(u,""),o.flags&=-33);var d=yh(e);yu(e,d,u);break;case 3:case 4:var y=o.stateNode.containerInfo,C=yh(e);gu(e,C,y);break;default:throw Error(s(161))}}catch(E){Ve(e,e.return,E)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qy(e,t,i){se=e,kh(e)}function kh(e,t,i){for(var o=(e.mode&1)!==0;se!==null;){var u=se,d=u.child;if(u.tag===22&&o){var y=u.memoizedState!==null||Xo;if(!y){var C=u.alternate,E=C!==null&&C.memoizedState!==null||at;C=Xo;var D=at;if(Xo=y,(at=E)&&!D)for(se=u;se!==null;)y=se,E=y.child,y.tag===22&&y.memoizedState!==null?_h(u):E!==null?(E.return=y,se=E):_h(u);for(;d!==null;)se=d,kh(d),d=d.sibling;se=u,Xo=C,at=D}Sh(e)}else(u.subtreeFlags&8772)!==0&&d!==null?(d.return=u,se=d):Sh(e)}}function Sh(e){for(;se!==null;){var t=se;if((t.flags&8772)!==0){var i=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:at||Jo(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!at)if(i===null)o.componentDidMount();else{var u=t.elementType===t.type?i.memoizedProps:Vt(t.type,i.memoizedProps);o.componentDidUpdate(u,i.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var d=t.updateQueue;d!==null&&bf(t,d,o);break;case 3:var y=t.updateQueue;if(y!==null){if(i=null,t.child!==null)switch(t.child.tag){case 5:i=t.child.stateNode;break;case 1:i=t.child.stateNode}bf(t,y,i)}break;case 5:var C=t.stateNode;if(i===null&&t.flags&4){i=C;var E=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&i.focus();break;case"img":E.src&&(i.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var D=t.alternate;if(D!==null){var $=D.memoizedState;if($!==null){var K=$.dehydrated;K!==null&&ri(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}at||t.flags&512&&mu(t)}catch(B){Ve(t,t.return,B)}}if(t===e){se=null;break}if(i=t.sibling,i!==null){i.return=t.return,se=i;break}se=t.return}}function bh(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var i=t.sibling;if(i!==null){i.return=t.return,se=i;break}se=t.return}}function _h(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{Jo(4,t)}catch(E){Ve(t,i,E)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var u=t.return;try{o.componentDidMount()}catch(E){Ve(t,u,E)}}var d=t.return;try{mu(t)}catch(E){Ve(t,d,E)}break;case 5:var y=t.return;try{mu(t)}catch(E){Ve(t,y,E)}}}catch(E){Ve(t,t.return,E)}if(t===e){se=null;break}var C=t.sibling;if(C!==null){C.return=t.return,se=C;break}se=t.return}}var Zy=Math.ceil,el=M.ReactCurrentDispatcher,vu=M.ReactCurrentOwner,zt=M.ReactCurrentBatchConfig,_e=0,Xe=null,Ge=null,rt=0,Et=0,ms=Fn(0),Ze=0,Ei=null,Cr=0,tl=0,xu=0,ji=null,yt=null,wu=0,gs=1/0,xn=null,nl=!1,ku=null,$n=null,rl=!1,Vn=null,sl=0,Pi=0,Su=null,il=-1,ol=0;function dt(){return(_e&6)!==0?We():il!==-1?il:il=We()}function Hn(e){return(e.mode&1)===0?1:(_e&2)!==0&&rt!==0?rt&-rt:Ty.transition!==null?(ol===0&&(ol=gd()),ol):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:Cd(e.type)),e)}function Qt(e,t,i,o){if(50<Pi)throw Pi=0,Su=null,Error(s(185));Xs(e,i,o),((_e&2)===0||e!==Xe)&&(e===Xe&&((_e&2)===0&&(tl|=i),Ze===4&&Wn(e,rt)),vt(e,o),i===1&&_e===0&&(t.mode&1)===0&&(gs=We()+500,Io&&On()))}function vt(e,t){var i=e.callbackNode;Tg(e,t);var o=mo(e,e===Xe?rt:0);if(o===0)i!==null&&hd(i),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(i!=null&&hd(i),t===1)e.tag===0?My(Eh.bind(null,e)):df(Eh.bind(null,e)),Py(function(){(_e&6)===0&&On()}),i=null;else{switch(yd(o)){case 1:i=ta;break;case 4:i=pd;break;case 16:i=co;break;case 536870912:i=md;break;default:i=co}i=Ih(i,Ch.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function Ch(e,t){if(il=-1,ol=0,(_e&6)!==0)throw Error(s(327));var i=e.callbackNode;if(ys()&&e.callbackNode!==i)return null;var o=mo(e,e===Xe?rt:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=ll(e,o);else{t=o;var u=_e;_e|=2;var d=Ph();(Xe!==e||rt!==t)&&(xn=null,gs=We()+500,jr(e,t));do try{Jy();break}catch(C){jh(e,C)}while(!0);Ua(),el.current=d,_e=u,Ge!==null?t=0:(Xe=null,rt=0,t=Ze)}if(t!==0){if(t===2&&(u=na(e),u!==0&&(o=u,t=bu(e,u))),t===1)throw i=Ei,jr(e,0),Wn(e,o),vt(e,We()),i;if(t===6)Wn(e,o);else{if(u=e.current.alternate,(o&30)===0&&!Yy(u)&&(t=ll(e,o),t===2&&(d=na(e),d!==0&&(o=d,t=bu(e,d))),t===1))throw i=Ei,jr(e,0),Wn(e,o),vt(e,We()),i;switch(e.finishedWork=u,e.finishedLanes=o,t){case 0:case 1:throw Error(s(345));case 2:Pr(e,yt,xn);break;case 3:if(Wn(e,o),(o&130023424)===o&&(t=wu+500-We(),10<t)){if(mo(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){dt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Na(Pr.bind(null,e,yt,xn),t);break}Pr(e,yt,xn);break;case 4:if(Wn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,u=-1;0<o;){var y=31-Ut(o);d=1<<y,y=t[y],y>u&&(u=y),o&=~d}if(o=u,o=We()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Zy(o/1960))-o,10<o){e.timeoutHandle=Na(Pr.bind(null,e,yt,xn),o);break}Pr(e,yt,xn);break;case 5:Pr(e,yt,xn);break;default:throw Error(s(329))}}}return vt(e,We()),e.callbackNode===i?Ch.bind(null,e):null}function bu(e,t){var i=ji;return e.current.memoizedState.isDehydrated&&(jr(e,t).flags|=256),e=ll(e,t),e!==2&&(t=yt,yt=i,t!==null&&_u(t)),e}function _u(e){yt===null?yt=e:yt.push.apply(yt,e)}function Yy(e){for(var t=e;;){if(t.flags&16384){var i=t.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var o=0;o<i.length;o++){var u=i[o],d=u.getSnapshot;u=u.value;try{if(!Bt(d(),u))return!1}catch{return!1}}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~xu,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-Ut(t),o=1<<i;e[i]=-1,t&=~o}}function Eh(e){if((_e&6)!==0)throw Error(s(327));ys();var t=mo(e,0);if((t&1)===0)return vt(e,We()),null;var i=ll(e,t);if(e.tag!==0&&i===2){var o=na(e);o!==0&&(t=o,i=bu(e,o))}if(i===1)throw i=Ei,jr(e,0),Wn(e,t),vt(e,We()),i;if(i===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pr(e,yt,xn),vt(e,We()),null}function Cu(e,t){var i=_e;_e|=1;try{return e(t)}finally{_e=i,_e===0&&(gs=We()+500,Io&&On())}}function Er(e){Vn!==null&&Vn.tag===0&&(_e&6)===0&&ys();var t=_e;_e|=1;var i=zt.transition,o=Pe;try{if(zt.transition=null,Pe=1,e)return e()}finally{Pe=o,zt.transition=i,_e=t,(_e&6)===0&&On()}}function Eu(){Et=ms.current,Fe(ms)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,jy(i)),Ge!==null)for(i=Ge.return;i!==null;){var o=i;switch(Da(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Mo();break;case 3:fs(),Fe(pt),Fe(it),Ga();break;case 5:Qa(o);break;case 4:fs();break;case 13:Fe(Be);break;case 19:Fe(Be);break;case 10:Ba(o.type._context);break;case 22:case 23:Eu()}i=i.return}if(Xe=e,Ge=e=Qn(e.current,null),rt=Et=t,Ze=0,Ei=null,xu=tl=Cr=0,yt=ji=null,Sr!==null){for(t=0;t<Sr.length;t++)if(i=Sr[t],o=i.interleaved,o!==null){i.interleaved=null;var u=o.next,d=i.pending;if(d!==null){var y=d.next;d.next=u,o.next=y}i.pending=o}Sr=null}return e}function jh(e,t){do{var i=Ge;try{if(Ua(),Ho.current=Go,Wo){for(var o=$e.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}Wo=!1}if(_r=0,Ye=qe=$e=null,wi=!1,ki=0,vu.current=null,i===null||i.return===null){Ze=1,Ei=t,Ge=null;break}e:{var d=e,y=i.return,C=i,E=t;if(t=rt,C.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var D=E,$=C,K=$.tag;if(($.mode&1)===0&&(K===0||K===11||K===15)){var B=$.alternate;B?($.updateQueue=B.updateQueue,$.memoizedState=B.memoizedState,$.lanes=B.lanes):($.updateQueue=null,$.memoizedState=null)}var ne=Xf(y);if(ne!==null){ne.flags&=-257,Jf(ne,y,C,d,t),ne.mode&1&&Yf(d,D,t),t=ne,E=D;var ie=t.updateQueue;if(ie===null){var oe=new Set;oe.add(E),t.updateQueue=oe}else ie.add(E);break e}else{if((t&1)===0){Yf(d,D,t),ju();break e}E=Error(s(426))}}else if(Ae&&C.mode&1){var Qe=Xf(y);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),Jf(Qe,y,C,d,t),Oa(hs(E,C));break e}}d=E=hs(E,C),Ze!==4&&(Ze=2),ji===null?ji=[d]:ji.push(d),d=y;do{switch(d.tag){case 3:d.flags|=65536,t&=-t,d.lanes|=t;var T=qf(d,E,t);Sf(d,T);break e;case 1:C=E;var N=d.type,I=d.stateNode;if((d.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&($n===null||!$n.has(I)))){d.flags|=65536,t&=-t,d.lanes|=t;var q=Zf(d,C,t);Sf(d,q);break e}}d=d.return}while(d!==null)}Rh(i)}catch(le){t=le,Ge===i&&i!==null&&(Ge=i=i.return);continue}break}while(!0)}function Ph(){var e=el.current;return el.current=Go,e===null?Go:e}function ju(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),Xe===null||(Cr&268435455)===0&&(tl&268435455)===0||Wn(Xe,rt)}function ll(e,t){var i=_e;_e|=2;var o=Ph();(Xe!==e||rt!==t)&&(xn=null,jr(e,t));do try{Xy();break}catch(u){jh(e,u)}while(!0);if(Ua(),_e=i,el.current=o,Ge!==null)throw Error(s(261));return Xe=null,rt=0,Ze}function Xy(){for(;Ge!==null;)Nh(Ge)}function Jy(){for(;Ge!==null&&!_g();)Nh(Ge)}function Nh(e){var t=Th(e.alternate,e,Et);e.memoizedProps=e.pendingProps,t===null?Rh(e):Ge=t,vu.current=null}function Rh(e){var t=e;do{var i=t.alternate;if(e=t.return,(t.flags&32768)===0){if(i=Wy(i,t,Et),i!==null){Ge=i;return}}else{if(i=Qy(i,t),i!==null){i.flags&=32767,Ge=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Ge=null;return}}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Ze===0&&(Ze=5)}function Pr(e,t,i){var o=Pe,u=zt.transition;try{zt.transition=null,Pe=1,e0(e,t,i,o)}finally{zt.transition=u,Pe=o}return null}function e0(e,t,i,o){do ys();while(Vn!==null);if((_e&6)!==0)throw Error(s(327));i=e.finishedWork;var u=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var d=i.lanes|i.childLanes;if(Ig(e,d),e===Xe&&(Ge=Xe=null,rt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||rl||(rl=!0,Ih(co,function(){return ys(),null})),d=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||d){d=zt.transition,zt.transition=null;var y=Pe;Pe=1;var C=_e;_e|=4,vu.current=null,Gy(e,i),wh(i,e),wy(ja),vo=!!Ea,ja=Ea=null,e.current=i,qy(i),Cg(),_e=C,Pe=y,zt.transition=d}else e.current=i;if(rl&&(rl=!1,Vn=e,sl=u),d=e.pendingLanes,d===0&&($n=null),Pg(i.stateNode),vt(e,We()),t!==null)for(o=e.onRecoverableError,i=0;i<t.length;i++)u=t[i],o(u.value,{componentStack:u.stack,digest:u.digest});if(nl)throw nl=!1,e=ku,ku=null,e;return(sl&1)!==0&&e.tag!==0&&ys(),d=e.pendingLanes,(d&1)!==0?e===Su?Pi++:(Pi=0,Su=e):Pi=0,On(),null}function ys(){if(Vn!==null){var e=yd(sl),t=zt.transition,i=Pe;try{if(zt.transition=null,Pe=16>e?16:e,Vn===null)var o=!1;else{if(e=Vn,Vn=null,sl=0,(_e&6)!==0)throw Error(s(331));var u=_e;for(_e|=4,se=e.current;se!==null;){var d=se,y=d.child;if((se.flags&16)!==0){var C=d.deletions;if(C!==null){for(var E=0;E<C.length;E++){var D=C[E];for(se=D;se!==null;){var $=se;switch($.tag){case 0:case 11:case 15:Ci(8,$,d)}var K=$.child;if(K!==null)K.return=$,se=K;else for(;se!==null;){$=se;var B=$.sibling,ne=$.return;if(mh($),$===D){se=null;break}if(B!==null){B.return=ne,se=B;break}se=ne}}}var ie=d.alternate;if(ie!==null){var oe=ie.child;if(oe!==null){ie.child=null;do{var Qe=oe.sibling;oe.sibling=null,oe=Qe}while(oe!==null)}}se=d}}if((d.subtreeFlags&2064)!==0&&y!==null)y.return=d,se=y;else e:for(;se!==null;){if(d=se,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:Ci(9,d,d.return)}var T=d.sibling;if(T!==null){T.return=d.return,se=T;break e}se=d.return}}var N=e.current;for(se=N;se!==null;){y=se;var I=y.child;if((y.subtreeFlags&2064)!==0&&I!==null)I.return=y,se=I;else e:for(y=N;se!==null;){if(C=se,(C.flags&2048)!==0)try{switch(C.tag){case 0:case 11:case 15:Jo(9,C)}}catch(le){Ve(C,C.return,le)}if(C===y){se=null;break e}var q=C.sibling;if(q!==null){q.return=C.return,se=q;break e}se=C.return}}if(_e=u,On(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(fo,e)}catch{}o=!0}return o}finally{Pe=i,zt.transition=t}}return!1}function Lh(e,t,i){t=hs(i,t),t=qf(e,t,1),e=Un(e,t,1),t=dt(),e!==null&&(Xs(e,1,t),vt(e,t))}function Ve(e,t,i){if(e.tag===3)Lh(e,e,i);else for(;t!==null;){if(t.tag===3){Lh(t,e,i);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($n===null||!$n.has(o))){e=hs(i,e),e=Zf(t,e,1),t=Un(t,e,1),e=dt(),t!==null&&(Xs(t,1,e),vt(t,e));break}}t=t.return}}function t0(e,t,i){var o=e.pingCache;o!==null&&o.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&i,Xe===e&&(rt&i)===i&&(Ze===4||Ze===3&&(rt&130023424)===rt&&500>We()-wu?jr(e,0):xu|=i),vt(e,t)}function Mh(e,t){t===0&&((e.mode&1)===0?t=1:(t=po,po<<=1,(po&130023424)===0&&(po=4194304)));var i=dt();e=gn(e,t),e!==null&&(Xs(e,t,i),vt(e,i))}function n0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Mh(e,i)}function r0(e,t){var i=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(s(314))}o!==null&&o.delete(t),Mh(e,i)}var Th;Th=function(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)gt=!0;else{if((e.lanes&i)===0&&(t.flags&128)===0)return gt=!1,Hy(e,t,i);gt=(e.flags&131072)!==0}else gt=!1,Ae&&(t.flags&1048576)!==0&&ff(t,Fo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Yo(e,t),e=t.pendingProps;var u=is(t,it.current);ds(t,i),u=Ya(null,t,o,e,u,i);var d=Xa();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(o)?(d=!0,To(t)):d=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ha(t),u.updater=qo,t.stateNode=u,u._reactInternals=t,su(t,o,e,i),t=au(null,t,o,!0,d,i)):(t.tag=0,Ae&&d&&Ia(t),ct(null,t,u,i),t=t.child),t;case 16:o=t.elementType;e:{switch(Yo(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=i0(o),e=Vt(o,e),u){case 0:t=lu(null,t,o,e,i);break e;case 1:t=ih(null,t,o,e,i);break e;case 11:t=eh(null,t,o,e,i);break e;case 14:t=th(null,t,o,Vt(o.type,e),i);break e}throw Error(s(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),lu(e,t,o,u,i);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),ih(e,t,o,u,i);case 3:e:{if(oh(t),e===null)throw Error(s(387));o=t.pendingProps,d=t.memoizedState,u=d.element,kf(e,t),$o(t,o,null,i);var y=t.memoizedState;if(o=y.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){u=hs(Error(s(423)),t),t=lh(e,t,o,i,u);break e}else if(o!==u){u=hs(Error(s(424)),t),t=lh(e,t,o,i,u);break e}else for(Ct=Dn(t.stateNode.containerInfo.firstChild),_t=t,Ae=!0,$t=null,i=xf(t,null,o,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(as(),o===u){t=vn(e,t,i);break e}ct(e,t,o,i)}t=t.child}return t;case 5:return _f(t),e===null&&za(t),o=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,y=u.children,Pa(o,u)?y=null:d!==null&&Pa(o,d)&&(t.flags|=32),sh(e,t),ct(e,t,y,i),t.child;case 6:return e===null&&za(t),null;case 13:return ah(e,t,i);case 4:return Wa(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=us(t,null,o,i):ct(e,t,o,i),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),eh(e,t,o,u,i);case 7:return ct(e,t,t.pendingProps,i),t.child;case 8:return ct(e,t,t.pendingProps.children,i),t.child;case 12:return ct(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,d=t.memoizedProps,y=u.value,Te(Ao,o._currentValue),o._currentValue=y,d!==null)if(Bt(d.value,y)){if(d.children===u.children&&!pt.current){t=vn(e,t,i);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var C=d.dependencies;if(C!==null){y=d.child;for(var E=C.firstContext;E!==null;){if(E.context===o){if(d.tag===1){E=yn(-1,i&-i),E.tag=2;var D=d.updateQueue;if(D!==null){D=D.shared;var $=D.pending;$===null?E.next=E:(E.next=$.next,$.next=E),D.pending=E}}d.lanes|=i,E=d.alternate,E!==null&&(E.lanes|=i),$a(d.return,i,t),C.lanes|=i;break}E=E.next}}else if(d.tag===10)y=d.type===t.type?null:d.child;else if(d.tag===18){if(y=d.return,y===null)throw Error(s(341));y.lanes|=i,C=y.alternate,C!==null&&(C.lanes|=i),$a(y,i,t),y=d.sibling}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===t){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}ct(e,t,u.children,i),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,ds(t,i),u=Dt(u),o=o(u),t.flags|=1,ct(e,t,o,i),t.child;case 14:return o=t.type,u=Vt(o,t.pendingProps),u=Vt(o.type,u),th(e,t,o,u,i);case 15:return nh(e,t,t.type,t.pendingProps,i);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),Yo(e,t),t.tag=1,mt(o)?(e=!0,To(t)):e=!1,ds(t,i),Kf(t,o,u),su(t,o,u,i),au(null,t,o,!0,e,i);case 19:return ch(e,t,i);case 22:return rh(e,t,i)}throw Error(s(156,t.tag))};function Ih(e,t){return fd(e,t)}function s0(e,t,i,o){this.tag=e,this.key=i,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,i,o){return new s0(e,t,i,o)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function i0(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===te)return 14}return 2}function Qn(e,t){var i=e.alternate;return i===null?(i=Ot(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function al(e,t,i,o,u,d){var y=2;if(o=e,typeof e=="function")Pu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Nr(i.children,u,d,t);case V:y=8,u|=8;break;case O:return e=Ot(12,i,t,u|2),e.elementType=O,e.lanes=d,e;case de:return e=Ot(13,i,t,u),e.elementType=de,e.lanes=d,e;case W:return e=Ot(19,i,t,u),e.elementType=W,e.lanes=d,e;case he:return ul(i,u,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:y=10;break e;case X:y=9;break e;case Y:y=11;break e;case te:y=14;break e;case ke:y=16,o=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Ot(y,i,t,u),t.elementType=e,t.type=o,t.lanes=d,t}function Nr(e,t,i,o){return e=Ot(7,e,o,t),e.lanes=i,e}function ul(e,t,i,o){return e=Ot(22,e,o,t),e.elementType=he,e.lanes=i,e.stateNode={isHidden:!1},e}function Nu(e,t,i){return e=Ot(6,e,null,t),e.lanes=i,e}function Ru(e,t,i){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o0(e,t,i,o,u){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=ra(0),this.expirationTimes=ra(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ra(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Lu(e,t,i,o,u,d,y,C,E){return e=new o0(e,t,i,C,E),t===1?(t=1,d===!0&&(t|=8)):t=0,d=Ot(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:o,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ha(d),e}function l0(e,t,i){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:o==null?null:""+o,children:e,containerInfo:t,implementation:i}}function Dh(e){if(!e)return zn;e=e._reactInternals;e:{if(yr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var i=e.type;if(mt(i))return uf(e,i,t)}return t}function Fh(e,t,i,o,u,d,y,C,E){return e=Lu(i,o,!0,e,u,d,y,C,E),e.context=Dh(null),i=e.current,o=dt(),u=Hn(i),d=yn(o,u),d.callback=t??null,Un(i,d,u),e.current.lanes=u,Xs(e,u,o),vt(e,o),e}function cl(e,t,i,o){var u=t.current,d=dt(),y=Hn(u);return i=Dh(i),t.context===null?t.context=i:t.pendingContext=i,t=yn(d,y),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Un(u,t,y),e!==null&&(Qt(e,u,y,d),Bo(e,u,y)),y}function dl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Mu(e,t){zh(e,t),(e=e.alternate)&&zh(e,t)}function a0(){return null}var Oh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Tu(e){this._internalRoot=e}fl.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));cl(e,t,null,null)},fl.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Er(function(){cl(null,e,null,null)}),t[fn]=null}};function fl(e){this._internalRoot=e}fl.prototype.unstable_scheduleHydration=function(e){if(e){var t=wd();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Mn.length&&t!==0&&t<Mn[i].priority;i++);Mn.splice(i,0,e),i===0&&bd(e)}};function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ah(){}function u0(e,t,i,o,u){if(u){if(typeof o=="function"){var d=o;o=function(){var D=dl(y);d.call(D)}}var y=Fh(t,o,e,0,null,!1,!1,"",Ah);return e._reactRootContainer=y,e[fn]=y.current,fi(e.nodeType===8?e.parentNode:e),Er(),y}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var C=o;o=function(){var D=dl(E);C.call(D)}}var E=Lu(e,0,!1,null,null,!1,!1,"",Ah);return e._reactRootContainer=E,e[fn]=E.current,fi(e.nodeType===8?e.parentNode:e),Er(function(){cl(t,E,i,o)}),E}function pl(e,t,i,o,u){var d=i._reactRootContainer;if(d){var y=d;if(typeof u=="function"){var C=u;u=function(){var E=dl(y);C.call(E)}}cl(t,y,e,u)}else y=u0(i,t,e,u,o);return dl(y)}vd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=Ys(t.pendingLanes);i!==0&&(sa(t,i|1),vt(t,We()),(_e&6)===0&&(gs=We()+500,On()))}break;case 13:Er(function(){var o=gn(e,1);if(o!==null){var u=dt();Qt(o,e,1,u)}}),Mu(e,1)}},ia=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var i=dt();Qt(t,e,134217728,i)}Mu(e,134217728)}},xd=function(e){if(e.tag===13){var t=Hn(e),i=gn(e,t);if(i!==null){var o=dt();Qt(i,e,t,o)}Mu(e,t)}},wd=function(){return Pe},kd=function(e,t){var i=Pe;try{return Pe=e,t()}finally{Pe=i}},Yl=function(e,t,i){switch(t){case"input":if(pr(e,i),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var o=i[t];if(o!==e&&o.form===e.form){var u=Lo(o);if(!u)throw Error(s(90));fr(o),pr(o,u)}}}break;case"textarea":Mt(e,i);break;case"select":t=i.value,t!=null&&Pn(e,!!i.multiple,t,!1)}},id=Cu,od=Er;var c0={usingClientEntryPoint:!1,Events:[mi,rs,Lo,rd,sd,Cu]},Ni={findFiberByHostInstance:vr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d0={bundleType:Ni.bundleType,version:Ni.version,rendererPackageName:Ni.rendererPackageName,rendererConfig:Ni.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=cd(e),e===null?null:e.stateNode},findFiberByHostInstance:Ni.findFiberByHostInstance||a0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ml.isDisabled&&ml.supportsFiber)try{fo=ml.inject(d0),Xt=ml}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c0,xt.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Iu(t))throw Error(s(200));return l0(e,t,null,i)},xt.createRoot=function(e,t){if(!Iu(e))throw Error(s(299));var i=!1,o="",u=Oh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Lu(e,1,!1,null,null,i,!1,o,u),e[fn]=t.current,fi(e.nodeType===8?e.parentNode:e),new Tu(t)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=cd(t),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return Er(e)},xt.hydrate=function(e,t,i){if(!hl(t))throw Error(s(200));return pl(null,e,t,!0,i)},xt.hydrateRoot=function(e,t,i){if(!Iu(e))throw Error(s(405));var o=i!=null&&i.hydratedSources||null,u=!1,d="",y=Oh;if(i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),t=Fh(t,null,e,1,i??null,u,!1,d,y),e[fn]=t.current,fi(e),o)for(e=0;e<o.length;e++)i=o[e],u=i._getVersion,u=u(i._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[i,u]:t.mutableSourceEagerHydrationData.push(i,u);return new fl(t)},xt.render=function(e,t,i){if(!hl(t))throw Error(s(200));return pl(null,e,t,!1,i)},xt.unmountComponentAtNode=function(e){if(!hl(e))throw Error(s(40));return e._reactRootContainer?(Er(function(){pl(null,null,e,!1,function(){e._reactRootContainer=null,e[fn]=null})}),!0):!1},xt.unstable_batchedUpdates=Cu,xt.unstable_renderSubtreeIntoContainer=function(e,t,i,o){if(!hl(i))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return pl(e,t,i,!1,o)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Gh;function S0(){if(Gh)return Ou.exports;Gh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ou.exports=k0(),Ou.exports}var qh;function b0(){if(qh)return vl;qh=1;var n=S0();return vl.createRoot=n.createRoot,vl.hydrateRoot=n.hydrateRoot,vl}var _0=b0();const C0=nm(_0);var no=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tr,Xn,Es,Qp,E0=(Qp=class extends no{constructor(){super();ce(this,Tr);ce(this,Xn);ce(this,Es);re(this,Es,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){j(this,Xn)||this.setEventListener(j(this,Es))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,Xn))==null||r.call(this),re(this,Xn,void 0))}setEventListener(r){var s;re(this,Es,r),(s=j(this,Xn))==null||s.call(this),re(this,Xn,r(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()}))}setFocused(r){j(this,Tr)!==r&&(re(this,Tr,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(s=>{s(r)})}isFocused(){var r;return typeof j(this,Tr)=="boolean"?j(this,Tr):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Tr=new WeakMap,Xn=new WeakMap,Es=new WeakMap,Qp),Rc=new E0,j0={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},Jn,Nc,Kp,P0=(Kp=class{constructor(){ce(this,Jn,j0);ce(this,Nc,!1)}setTimeoutProvider(n){re(this,Jn,n)}setTimeout(n,r){return j(this,Jn).setTimeout(n,r)}clearTimeout(n){j(this,Jn).clearTimeout(n)}setInterval(n,r){return j(this,Jn).setInterval(n,r)}clearInterval(n){j(this,Jn).clearInterval(n)}},Jn=new WeakMap,Nc=new WeakMap,Kp),Lr=new P0;function N0(n){setTimeout(n,0)}var R0=typeof window>"u"||"Deno"in globalThis;function kt(){}function L0(n,r){return typeof n=="function"?n(r):n}function ec(n){return typeof n=="number"&&n>=0&&n!==1/0}function rm(n,r){return Math.max(n+(r||0)-Date.now(),0)}function lr(n,r){return typeof n=="function"?n(r):n}function Pt(n,r){return typeof n=="function"?n(r):n}function Zh(n,r){const{type:s="all",exact:l,fetchStatus:a,predicate:c,queryKey:h,stale:f}=n;if(h){if(l){if(r.queryHash!==Lc(h,r.options))return!1}else if(!Vi(r.queryKey,h))return!1}if(s!=="all"){const p=r.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof f=="boolean"&&r.isStale()!==f||a&&a!==r.state.fetchStatus||c&&!c(r))}function Yh(n,r){const{exact:s,status:l,predicate:a,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(s){if($i(r.options.mutationKey)!==$i(c))return!1}else if(!Vi(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||a&&!a(r))}function Lc(n,r){return((r==null?void 0:r.queryKeyHashFn)||$i)(n)}function $i(n){return JSON.stringify(n,(r,s)=>nc(s)?Object.keys(s).sort().reduce((l,a)=>(l[a]=s[a],l),{}):s)}function Vi(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>Vi(n[s],r[s])):!1}var M0=Object.prototype.hasOwnProperty;function sm(n,r,s=0){if(n===r)return n;if(s>500)return r;const l=Xh(n)&&Xh(r);if(!l&&!(nc(n)&&nc(r)))return r;const c=(l?n:Object.keys(n)).length,h=l?r:Object.keys(r),f=h.length,p=l?new Array(f):{};let g=0;for(let w=0;w<f;w++){const v=l?w:h[w],x=n[v],k=r[v];if(x===k){p[v]=x,(l?w<c:M0.call(n,v))&&g++;continue}if(x===null||k===null||typeof x!="object"||typeof k!="object"){p[v]=k;continue}const S=sm(x,k,s+1);p[v]=S,S===x&&g++}return c===f&&g===c?n:p}function tc(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function Xh(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function nc(n){if(!Jh(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Jh(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Jh(n){return Object.prototype.toString.call(n)==="[object Object]"}function T0(n){return new Promise(r=>{Lr.setTimeout(r,n)})}function rc(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?sm(n,r):r}function I0(n,r,s=0){const l=[...n,r];return s&&l.length>s?l.slice(1):l}function D0(n,r,s=0){const l=[r,...n];return s&&l.length>s?l.slice(0,-1):l}var Mc=Symbol();function im(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Mc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function om(n,r){return typeof n=="function"?n(...r):!!n}function F0(n,r,s){let l=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=r()),l||(l=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Hi=(()=>{let n=()=>R0;return{isServer(){return n()},setIsServer(r){n=r}}})();function sc(){let n,r;const s=new Promise((a,c)=>{n=a,r=c});s.status="pending",s.catch(()=>{});function l(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{l({status:"fulfilled",value:a}),n(a)},s.reject=a=>{l({status:"rejected",reason:a}),r(a)},s}var z0=N0;function O0(){let n=[],r=0,s=f=>{f()},l=f=>{f()},a=z0;const c=f=>{r?n.push(f):a(()=>{s(f)})},h=()=>{const f=n;n=[],f.length&&a(()=>{l(()=>{f.forEach(p=>{s(p)})})})};return{batch:f=>{let p;r++;try{p=f()}finally{r--,r||h()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{l=f},setScheduler:f=>{a=f}}}var st=O0(),js,er,Ps,Gp,A0=(Gp=class extends no{constructor(){super();ce(this,js,!0);ce(this,er);ce(this,Ps);re(this,Ps,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r(!0),l=()=>r(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",l)}}})}onSubscribe(){j(this,er)||this.setEventListener(j(this,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,er))==null||r.call(this),re(this,er,void 0))}setEventListener(r){var s;re(this,Ps,r),(s=j(this,er))==null||s.call(this),re(this,er,r(this.setOnline.bind(this)))}setOnline(r){j(this,js)!==r&&(re(this,js,r),this.listeners.forEach(l=>{l(r)}))}isOnline(){return j(this,js)}},js=new WeakMap,er=new WeakMap,Ps=new WeakMap,Gp),Rl=new A0;function U0(n){return Math.min(1e3*2**n,3e4)}function lm(n){return(n??"online")==="online"?Rl.isOnline():!0}var ic=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function am(n){let r=!1,s=0,l;const a=sc(),c=()=>a.status!=="pending",h=_=>{var b;if(!c()){const L=new ic(_);x(L),(b=n.onCancel)==null||b.call(n,L)}},f=()=>{r=!0},p=()=>{r=!1},g=()=>Rc.isFocused()&&(n.networkMode==="always"||Rl.isOnline())&&n.canRun(),w=()=>lm(n.networkMode)&&n.canRun(),v=_=>{c()||(l==null||l(),a.resolve(_))},x=_=>{c()||(l==null||l(),a.reject(_))},k=()=>new Promise(_=>{var b;l=L=>{(c()||g())&&_(L)},(b=n.onPause)==null||b.call(n)}).then(()=>{var _;l=void 0,c()||(_=n.onContinue)==null||_.call(n)}),S=()=>{if(c())return;let _;const b=s===0?n.initialPromise:void 0;try{_=b??n.fn()}catch(L){_=Promise.reject(L)}Promise.resolve(_).then(v).catch(L=>{var z;if(c())return;const R=n.retry??(Hi.isServer()?0:3),F=n.retryDelay??U0,M=typeof F=="function"?F(s,L):F,A=R===!0||typeof R=="number"&&s<R||typeof R=="function"&&R(s,L);if(r||!A){x(L);return}s++,(z=n.onFail)==null||z.call(n,s,L),T0(M).then(()=>g()?void 0:k()).then(()=>{r?x(L):S()})})};return{promise:a,status:()=>a.status,cancel:h,continue:()=>(l==null||l(),a),cancelRetry:f,continueRetry:p,canStart:w,start:()=>(w()?S():k().then(S),a)}}var Ir,qp,um=(qp=class{constructor(){ce(this,Ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ec(this.gcTime)&&re(this,Ir,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Hi.isServer()?1/0:300*1e3))}clearGcTimeout(){j(this,Ir)!==void 0&&(Lr.clearTimeout(j(this,Ir)),re(this,Ir,void 0))}},Ir=new WeakMap,qp);function B0(n){return{onFetch:(r,s)=>{var w,v,x,k,S;const l=r.options,a=(x=(v=(w=r.fetchOptions)==null?void 0:w.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,c=((k=r.state.data)==null?void 0:k.pages)||[],h=((S=r.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const g=async()=>{let _=!1;const b=F=>{F0(F,()=>r.signal,()=>_=!0)},L=im(r.options,r.fetchOptions),R=async(F,M,A)=>{if(_)return Promise.reject(r.signal.reason);if(M==null&&F.pages.length)return Promise.resolve(F);const G=(()=>{const X={client:r.client,queryKey:r.queryKey,pageParam:M,direction:A?"backward":"forward",meta:r.options.meta};return b(X),X})(),V=await L(G),{maxPages:O}=r.options,Q=A?D0:I0;return{pages:Q(F.pages,V,O),pageParams:Q(F.pageParams,M,O)}};if(a&&c.length){const F=a==="backward",M=F?$0:ep,A={pages:c,pageParams:h},z=M(l,A);f=await R(A,z,F)}else{const F=n??c.length;do{const M=p===0?h[0]??l.initialPageParam:ep(l,f);if(p>0&&M==null)break;f=await R(f,M),p++}while(p<F)}return f};r.options.persister?r.fetchFn=()=>{var _,b;return(b=(_=r.options).persister)==null?void 0:b.call(_,g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=g}}}function ep(n,{pages:r,pageParams:s}){const l=r.length-1;return r.length>0?n.getNextPageParam(r[l],r,s[l],s):void 0}function $0(n,{pages:r,pageParams:s}){var l;return r.length>0?(l=n.getPreviousPageParam)==null?void 0:l.call(n,r[0],r,s[0],s):void 0}var Ns,Dr,Rs,At,Fr,et,Zi,zr,jt,cm,kn,Zp,V0=(Zp=class extends um{constructor(r){super();ce(this,jt);ce(this,Ns);ce(this,Dr);ce(this,Rs);ce(this,At);ce(this,Fr);ce(this,et);ce(this,Zi);ce(this,zr);re(this,zr,!1),re(this,Zi,r.defaultOptions),this.setOptions(r.options),this.observers=[],re(this,Fr,r.client),re(this,At,j(this,Fr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,re(this,Dr,np(this.options)),this.state=r.state??j(this,Dr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,Ns)}get promise(){var r;return(r=j(this,et))==null?void 0:r.promise}setOptions(r){if(this.options={...j(this,Zi),...r},r!=null&&r._type&&re(this,Ns,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=np(this.options);s.data!==void 0&&(this.setState(tp(s.data,s.dataUpdatedAt)),re(this,Dr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,At).remove(this)}setData(r,s){const l=rc(this.state.data,r,this.options);return xe(this,jt,kn).call(this,{data:l,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),l}setState(r){xe(this,jt,kn).call(this,{type:"setState",state:r})}cancel(r){var l,a;const s=(l=j(this,et))==null?void 0:l.promise;return(a=j(this,et))==null||a.cancel(r),s?s.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return j(this,Dr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>Pt(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>lr(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!rm(this.state.dataUpdatedAt,r)}onFocus(){var s;const r=this.observers.find(l=>l.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(s=j(this,et))==null||s.continue()}onOnline(){var s;const r=this.observers.find(l=>l.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(s=j(this,et))==null||s.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),j(this,At).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(s=>s!==r),this.observers.length||(j(this,et)&&(j(this,zr)||xe(this,jt,cm).call(this)?j(this,et).cancel({revert:!0}):j(this,et).cancelRetry()),this.scheduleGc()),j(this,At).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,jt,kn).call(this,{type:"invalidate"})}async fetch(r,s){var g,w,v,x,k,S,_,b,L,R,F;if(this.state.fetchStatus!=="idle"&&((g=j(this,et))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(j(this,et))return j(this,et).continueRetry(),j(this,et).promise}if(r&&this.setOptions(r),!this.options.queryFn){const M=this.observers.find(A=>A.options.queryFn);M&&this.setOptions(M.options)}const l=new AbortController,a=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(re(this,zr,!0),l.signal)})},c=()=>{const M=im(this.options,s),z=(()=>{const G={client:j(this,Fr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return re(this,zr,!1),this.options.persister?this.options.persister(M,z,this):M(z)},f=(()=>{const M={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:j(this,Fr),state:this.state,fetchFn:c};return a(M),M})(),p=j(this,Ns)==="infinite"?B0(this.options.pages):this.options.behavior;p==null||p.onFetch(f,this),re(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=f.fetchOptions)==null?void 0:w.meta))&&xe(this,jt,kn).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta}),re(this,et,am({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:M=>{M instanceof ic&&M.revert&&this.setState({...j(this,Rs),fetchStatus:"idle"}),l.abort()},onFail:(M,A)=>{xe(this,jt,kn).call(this,{type:"failed",failureCount:M,error:A})},onPause:()=>{xe(this,jt,kn).call(this,{type:"pause"})},onContinue:()=>{xe(this,jt,kn).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const M=await j(this,et).start();if(M===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(M),(k=(x=j(this,At).config).onSuccess)==null||k.call(x,M,this),(_=(S=j(this,At).config).onSettled)==null||_.call(S,M,this.state.error,this),M}catch(M){if(M instanceof ic){if(M.silent)return j(this,et).promise;if(M.revert){if(this.state.data===void 0)throw M;return this.state.data}}throw xe(this,jt,kn).call(this,{type:"error",error:M}),(L=(b=j(this,At).config).onError)==null||L.call(b,M,this),(F=(R=j(this,At).config).onSettled)==null||F.call(R,this.state.data,M,this),M}finally{this.scheduleGc()}}},Ns=new WeakMap,Dr=new WeakMap,Rs=new WeakMap,At=new WeakMap,Fr=new WeakMap,et=new WeakMap,Zi=new WeakMap,zr=new WeakMap,jt=new WeakSet,cm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},kn=function(r){const s=l=>{switch(r.type){case"failed":return{...l,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...dm(l.data,this.options),fetchMeta:r.meta??null};case"success":const a={...l,...tp(r.data,r.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Rs,r.manual?a:void 0),a;case"error":const c=r.error;return{...l,error:c,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...r.state}}};this.state=s(this.state),st.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),j(this,At).notify({query:this,type:"updated",action:r})})},Zp);function dm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lm(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function tp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function np(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,l=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var wt,be,Yi,ft,Or,Ls,Sn,tr,Xi,Ms,Ts,Ar,Ur,nr,Is,je,Fi,oc,lc,ac,uc,cc,dc,fc,fm,Yp,H0=(Yp=class extends no{constructor(r,s){super();ce(this,je);ce(this,wt);ce(this,be);ce(this,Yi);ce(this,ft);ce(this,Or);ce(this,Ls);ce(this,Sn);ce(this,tr);ce(this,Xi);ce(this,Ms);ce(this,Ts);ce(this,Ar);ce(this,Ur);ce(this,nr);ce(this,Is,new Set);this.options=s,re(this,wt,r),re(this,tr,null),re(this,Sn,sc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,be).addObserver(this),rp(j(this,be),this.options)?xe(this,je,Fi).call(this):this.updateResult(),xe(this,je,uc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hc(j(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hc(j(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,je,cc).call(this),xe(this,je,dc).call(this),j(this,be).removeObserver(this)}setOptions(r){const s=this.options,l=j(this,be);if(this.options=j(this,wt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pt(this.options.enabled,j(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,je,fc).call(this),j(this,be).setOptions(this.options),s._defaulted&&!tc(this.options,s)&&j(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,be),observer:this});const a=this.hasListeners();a&&sp(j(this,be),l,this.options,s)&&xe(this,je,Fi).call(this),this.updateResult(),a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||lr(this.options.staleTime,j(this,be))!==lr(s.staleTime,j(this,be)))&&xe(this,je,oc).call(this);const c=xe(this,je,lc).call(this);a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||c!==j(this,nr))&&xe(this,je,ac).call(this,c)}getOptimisticResult(r){const s=j(this,wt).getQueryCache().build(j(this,wt),r),l=this.createResult(s,r);return Q0(this,l)&&(re(this,ft,l),re(this,Ls,this.options),re(this,Or,j(this,be).state)),l}getCurrentResult(){return j(this,ft)}trackResult(r,s){return new Proxy(r,{get:(l,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&j(this,Sn).status==="pending"&&j(this,Sn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,a))})}trackProp(r){j(this,Is).add(r)}getCurrentQuery(){return j(this,be)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const s=j(this,wt).defaultQueryOptions(r),l=j(this,wt).getQueryCache().build(j(this,wt),s);return l.fetch().then(()=>this.createResult(l,s))}fetch(r){return xe(this,je,Fi).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,ft)))}createResult(r,s){var O;const l=j(this,be),a=this.options,c=j(this,ft),h=j(this,Or),f=j(this,Ls),g=r!==l?r.state:j(this,Yi),{state:w}=r;let v={...w},x=!1,k;if(s._optimisticResults){const Q=this.hasListeners(),X=!Q&&rp(r,s),Y=Q&&sp(r,l,s,a);(X||Y)&&(v={...v,...dm(w.data,r.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:S,errorUpdatedAt:_,status:b}=v;k=v.data;let L=!1;if(s.placeholderData!==void 0&&k===void 0&&b==="pending"){let Q;c!=null&&c.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(Q=c.data,L=!0):Q=typeof s.placeholderData=="function"?s.placeholderData((O=j(this,Ts))==null?void 0:O.state.data,j(this,Ts)):s.placeholderData,Q!==void 0&&(b="success",k=rc(c==null?void 0:c.data,Q,s),x=!0)}if(s.select&&k!==void 0&&!L)if(c&&k===(h==null?void 0:h.data)&&s.select===j(this,Xi))k=j(this,Ms);else try{re(this,Xi,s.select),k=s.select(k),k=rc(c==null?void 0:c.data,k,s),re(this,Ms,k),re(this,tr,null)}catch(Q){re(this,tr,Q)}j(this,tr)&&(S=j(this,tr),k=j(this,Ms),_=Date.now(),b="error");const R=v.fetchStatus==="fetching",F=b==="pending",M=b==="error",A=F&&R,z=k!==void 0,V={status:b,fetchStatus:v.fetchStatus,isPending:F,isSuccess:b==="success",isError:M,isInitialLoading:A,isLoading:A,data:k,dataUpdatedAt:v.dataUpdatedAt,error:S,errorUpdatedAt:_,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:R,isRefetching:R&&!F,isLoadingError:M&&!z,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:M&&z,isStale:Tc(r,s),refetch:this.refetch,promise:j(this,Sn),isEnabled:Pt(s.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Q=V.data!==void 0,X=V.status==="error"&&!Q,Y=te=>{X?te.reject(V.error):Q&&te.resolve(V.data)},de=()=>{const te=re(this,Sn,V.promise=sc());Y(te)},W=j(this,Sn);switch(W.status){case"pending":r.queryHash===l.queryHash&&Y(W);break;case"fulfilled":(X||V.data!==W.value)&&de();break;case"rejected":(!X||V.error!==W.reason)&&de();break}}return V}updateResult(){const r=j(this,ft),s=this.createResult(j(this,be),this.options);if(re(this,Or,j(this,be).state),re(this,Ls,this.options),j(this,Or).data!==void 0&&re(this,Ts,j(this,be)),tc(s,r))return;re(this,ft,s);const l=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!j(this,Is).size)return!0;const h=new Set(c??j(this,Is));return this.options.throwOnError&&h.add("error"),Object.keys(j(this,ft)).some(f=>{const p=f;return j(this,ft)[p]!==r[p]&&h.has(p)})};xe(this,je,fm).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,je,uc).call(this)}},wt=new WeakMap,be=new WeakMap,Yi=new WeakMap,ft=new WeakMap,Or=new WeakMap,Ls=new WeakMap,Sn=new WeakMap,tr=new WeakMap,Xi=new WeakMap,Ms=new WeakMap,Ts=new WeakMap,Ar=new WeakMap,Ur=new WeakMap,nr=new WeakMap,Is=new WeakMap,je=new WeakSet,Fi=function(r){xe(this,je,fc).call(this);let s=j(this,be).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(kt)),s},oc=function(){xe(this,je,cc).call(this);const r=lr(this.options.staleTime,j(this,be));if(Hi.isServer()||j(this,ft).isStale||!ec(r))return;const l=rm(j(this,ft).dataUpdatedAt,r)+1;re(this,Ar,Lr.setTimeout(()=>{j(this,ft).isStale||this.updateResult()},l))},lc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,be)):this.options.refetchInterval)??!1},ac=function(r){xe(this,je,dc).call(this),re(this,nr,r),!(Hi.isServer()||Pt(this.options.enabled,j(this,be))===!1||!ec(j(this,nr))||j(this,nr)===0)&&re(this,Ur,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rc.isFocused())&&xe(this,je,Fi).call(this)},j(this,nr)))},uc=function(){xe(this,je,oc).call(this),xe(this,je,ac).call(this,xe(this,je,lc).call(this))},cc=function(){j(this,Ar)!==void 0&&(Lr.clearTimeout(j(this,Ar)),re(this,Ar,void 0))},dc=function(){j(this,Ur)!==void 0&&(Lr.clearInterval(j(this,Ur)),re(this,Ur,void 0))},fc=function(){const r=j(this,wt).getQueryCache().build(j(this,wt),this.options);if(r===j(this,be))return;const s=j(this,be);re(this,be,r),re(this,Yi,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},fm=function(r){st.batch(()=>{r.listeners&&this.listeners.forEach(s=>{s(j(this,ft))}),j(this,wt).getQueryCache().notify({query:j(this,be),type:"observerResultsUpdated"})})},Yp);function W0(n,r){return Pt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Pt(r.retryOnMount,n)===!1)}function rp(n,r){return W0(n,r)||n.state.data!==void 0&&hc(n,r,r.refetchOnMount)}function hc(n,r,s){if(Pt(r.enabled,n)!==!1&&lr(r.staleTime,n)!=="static"){const l=typeof s=="function"?s(n):s;return l==="always"||l!==!1&&Tc(n,r)}return!1}function sp(n,r,s,l){return(n!==r||Pt(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Tc(n,s)}function Tc(n,r){return Pt(r.enabled,n)!==!1&&n.isStaleByTime(lr(r.staleTime,n))}function Q0(n,r){return!tc(n.getCurrentResult(),r)}var Ji,sn,ut,Br,on,Zn,Xp,K0=(Xp=class extends um{constructor(r){super();ce(this,on);ce(this,Ji);ce(this,sn);ce(this,ut);ce(this,Br);re(this,Ji,r.client),this.mutationId=r.mutationId,re(this,ut,r.mutationCache),re(this,sn,[]),this.state=r.state||G0(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){j(this,sn).includes(r)||(j(this,sn).push(r),this.clearGcTimeout(),j(this,ut).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){re(this,sn,j(this,sn).filter(s=>s!==r)),this.scheduleGc(),j(this,ut).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){j(this,sn).length||(this.state.status==="pending"?this.scheduleGc():j(this,ut).remove(this))}continue(){var r;return((r=j(this,Br))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var h,f,p,g,w,v,x,k,S,_,b,L,R,F,M,A,z,G;const s=()=>{xe(this,on,Zn).call(this,{type:"continue"})},l={client:j(this,Ji),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Br,am({fn:()=>this.options.mutationFn?this.options.mutationFn(r,l):Promise.reject(new Error("No mutationFn found")),onFail:(V,O)=>{xe(this,on,Zn).call(this,{type:"failed",failureCount:V,error:O})},onPause:()=>{xe(this,on,Zn).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,ut).canRun(this)}));const a=this.state.status==="pending",c=!j(this,Br).canStart();try{if(a)s();else{xe(this,on,Zn).call(this,{type:"pending",variables:r,isPaused:c}),j(this,ut).config.onMutate&&await j(this,ut).config.onMutate(r,this,l);const O=await((f=(h=this.options).onMutate)==null?void 0:f.call(h,r,l));O!==this.state.context&&xe(this,on,Zn).call(this,{type:"pending",context:O,variables:r,isPaused:c})}const V=await j(this,Br).start();return await((g=(p=j(this,ut).config).onSuccess)==null?void 0:g.call(p,V,r,this.state.context,this,l)),await((v=(w=this.options).onSuccess)==null?void 0:v.call(w,V,r,this.state.context,l)),await((k=(x=j(this,ut).config).onSettled)==null?void 0:k.call(x,V,null,this.state.variables,this.state.context,this,l)),await((_=(S=this.options).onSettled)==null?void 0:_.call(S,V,null,r,this.state.context,l)),xe(this,on,Zn).call(this,{type:"success",data:V}),V}catch(V){try{await((L=(b=j(this,ut).config).onError)==null?void 0:L.call(b,V,r,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((F=(R=this.options).onError)==null?void 0:F.call(R,V,r,this.state.context,l))}catch(O){Promise.reject(O)}try{await((A=(M=j(this,ut).config).onSettled)==null?void 0:A.call(M,void 0,V,this.state.variables,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((G=(z=this.options).onSettled)==null?void 0:G.call(z,void 0,V,r,this.state.context,l))}catch(O){Promise.reject(O)}throw xe(this,on,Zn).call(this,{type:"error",error:V}),V}finally{j(this,ut).runNext(this)}}},Ji=new WeakMap,sn=new WeakMap,ut=new WeakMap,Br=new WeakMap,on=new WeakSet,Zn=function(r){const s=l=>{switch(r.type){case"failed":return{...l,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...l,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:r.error,failureCount:l.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=s(this.state),st.batch(()=>{j(this,sn).forEach(l=>{l.onMutationUpdate(r)}),j(this,ut).notify({mutation:this,type:"updated",action:r})})},Xp);function G0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bn,Kt,eo,Jp,q0=(Jp=class extends no{constructor(r={}){super();ce(this,bn);ce(this,Kt);ce(this,eo);this.config=r,re(this,bn,new Set),re(this,Kt,new Map),re(this,eo,0)}build(r,s,l){const a=new K0({client:r,mutationCache:this,mutationId:++yl(this,eo)._,options:r.defaultMutationOptions(s),state:l});return this.add(a),a}add(r){j(this,bn).add(r);const s=xl(r);if(typeof s=="string"){const l=j(this,Kt).get(s);l?l.push(r):j(this,Kt).set(s,[r])}this.notify({type:"added",mutation:r})}remove(r){if(j(this,bn).delete(r)){const s=xl(r);if(typeof s=="string"){const l=j(this,Kt).get(s);if(l)if(l.length>1){const a=l.indexOf(r);a!==-1&&l.splice(a,1)}else l[0]===r&&j(this,Kt).delete(s)}}this.notify({type:"removed",mutation:r})}canRun(r){const s=xl(r);if(typeof s=="string"){const l=j(this,Kt).get(s),a=l==null?void 0:l.find(c=>c.state.status==="pending");return!a||a===r}else return!0}runNext(r){var l;const s=xl(r);if(typeof s=="string"){const a=(l=j(this,Kt).get(s))==null?void 0:l.find(c=>c!==r&&c.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){st.batch(()=>{j(this,bn).forEach(r=>{this.notify({type:"removed",mutation:r})}),j(this,bn).clear(),j(this,Kt).clear()})}getAll(){return Array.from(j(this,bn))}find(r){const s={exact:!0,...r};return this.getAll().find(l=>Yh(s,l))}findAll(r={}){return this.getAll().filter(s=>Yh(r,s))}notify(r){st.batch(()=>{this.listeners.forEach(s=>{s(r)})})}resumePausedMutations(){const r=this.getAll().filter(s=>s.state.isPaused);return st.batch(()=>Promise.all(r.map(s=>s.continue().catch(kt))))}},bn=new WeakMap,Kt=new WeakMap,eo=new WeakMap,Jp);function xl(n){var r;return(r=n.options.scope)==null?void 0:r.id}var ln,em,Z0=(em=class extends no{constructor(r={}){super();ce(this,ln);this.config=r,re(this,ln,new Map)}build(r,s,l){const a=s.queryKey,c=s.queryHash??Lc(a,s);let h=this.get(c);return h||(h=new V0({client:r,queryKey:a,queryHash:c,options:r.defaultQueryOptions(s),state:l,defaultOptions:r.getQueryDefaults(a)}),this.add(h)),h}add(r){j(this,ln).has(r.queryHash)||(j(this,ln).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const s=j(this,ln).get(r.queryHash);s&&(r.destroy(),s===r&&j(this,ln).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){st.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return j(this,ln).get(r)}getAll(){return[...j(this,ln).values()]}find(r){const s={exact:!0,...r};return this.getAll().find(l=>Zh(s,l))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(l=>Zh(r,l)):s}notify(r){st.batch(()=>{this.listeners.forEach(s=>{s(r)})})}onFocus(){st.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},ln=new WeakMap,em),He,rr,sr,Ds,Fs,ir,zs,Os,tm,Y0=(tm=class{constructor(n={}){ce(this,He);ce(this,rr);ce(this,sr);ce(this,Ds);ce(this,Fs);ce(this,ir);ce(this,zs);ce(this,Os);re(this,He,n.queryCache||new Z0),re(this,rr,n.mutationCache||new q0),re(this,sr,n.defaultOptions||{}),re(this,Ds,new Map),re(this,Fs,new Map),re(this,ir,0)}mount(){yl(this,ir)._++,j(this,ir)===1&&(re(this,zs,Rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onFocus())})),re(this,Os,Rl.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var n,r;yl(this,ir)._--,j(this,ir)===0&&((n=j(this,zs))==null||n.call(this),re(this,zs,void 0),(r=j(this,Os))==null||r.call(this),re(this,Os,void 0))}isFetching(n){return j(this,He).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,rr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=j(this,He).get(r.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=j(this,He).build(this,r),l=s.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(lr(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(l))}getQueriesData(n){return j(this,He).findAll(n).map(({queryKey:r,state:s})=>{const l=s.data;return[r,l]})}setQueryData(n,r,s){const l=this.defaultQueryOptions({queryKey:n}),a=j(this,He).get(l.queryHash),c=a==null?void 0:a.state.data,h=L0(r,c);if(h!==void 0)return j(this,He).build(this,l).setData(h,{...s,manual:!0})}setQueriesData(n,r,s){return st.batch(()=>j(this,He).findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,r,s)]))}getQueryState(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=j(this,He).get(r.queryHash))==null?void 0:s.state}removeQueries(n){const r=j(this,He);st.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=j(this,He);return st.batch(()=>(s.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},l=st.batch(()=>j(this,He).findAll(n).map(a=>a.cancel(s)));return Promise.all(l).then(kt).catch(kt)}invalidateQueries(n,r={}){return st.batch(()=>(j(this,He).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},l=st.batch(()=>j(this,He).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,s);return s.throwOnError||(c=c.catch(kt)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(l).then(kt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=j(this,He).build(this,r);return s.isStaleByTime(lr(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(kt).catch(kt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(kt).catch(kt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Rl.isOnline()?j(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,He)}getMutationCache(){return j(this,rr)}getDefaultOptions(){return j(this,sr)}setDefaultOptions(n){re(this,sr,n)}setQueryDefaults(n,r){j(this,Ds).set($i(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...j(this,Ds).values()],s={};return r.forEach(l=>{Vi(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,r){j(this,Fs).set($i(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...j(this,Fs).values()],s={};return r.forEach(l=>{Vi(n,l.mutationKey)&&Object.assign(s,l.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...j(this,sr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=Lc(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Mc&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,sr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,He).clear(),j(this,rr).clear()}},He=new WeakMap,rr=new WeakMap,sr=new WeakMap,Ds=new WeakMap,Fs=new WeakMap,ir=new WeakMap,zs=new WeakMap,Os=new WeakMap,tm),hm=H.createContext(void 0),Ic=n=>{const r=H.useContext(hm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},X0=({client:n,children:r})=>(H.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),m.jsx(hm.Provider,{value:n,children:r})),pm=H.createContext(!1),J0=()=>H.useContext(pm);pm.Provider;function ev(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var tv=H.createContext(ev()),nv=()=>H.useContext(tv),rv=(n,r,s)=>{const l=s!=null&&s.state.error&&typeof n.throwOnError=="function"?om(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(r.isReset()||(n.retryOnMount=!1))},sv=n=>{H.useEffect(()=>{n.clearReset()},[n])},iv=({result:n,errorResetBoundary:r,throwOnError:s,query:l,suspense:a})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||om(s,[n.error,l])),ov=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...a)=>s(l(...a)):s(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},lv=(n,r)=>n.isLoading&&n.isFetching&&!r,av=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,ip=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function uv(n,r,s){var k,S,_,b;const l=J0(),a=nv(),c=Ic(),h=c.defaultQueryOptions(n);(S=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||S.call(k,h);const f=c.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=l?"isRestoring":p?"optimistic":void 0,ov(h),rv(h,a,f),sv(a);const g=!c.getQueryCache().get(h.queryHash),[w]=H.useState(()=>new r(c,h)),v=w.getOptimisticResult(h),x=!l&&p;if(H.useSyncExternalStore(H.useCallback(L=>{const R=x?w.subscribe(st.batchCalls(L)):kt;return w.updateResult(),R},[w,x]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),H.useEffect(()=>{w.setOptions(h)},[h,w]),av(h,v))throw ip(h,w,a);if(iv({result:v,errorResetBoundary:a,throwOnError:h.throwOnError,query:f,suspense:h.suspense}))throw v.error;if((b=(_=c.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,h,v),h.experimental_prefetchInRender&&!Hi.isServer()&&lv(v,l)){const L=g?ip(h,w,a):f==null?void 0:f.promise;L==null||L.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?v:w.trackResult(v)}function Oe(n,r){return uv(n,H0)}const cv=!1;var mm=H.useLayoutEffect;function dv(n,r,s){H.useEffect(()=>{if(!n.current||s||typeof IntersectionObserver!="function")return()=>r();const l=new IntersectionObserver(a=>{r(a.pop())},{rootMargin:"100px"});return l.observe(n.current),()=>{l.disconnect(),r()}},[r,s,n])}function fv(n){const r=H.useRef(null);return H.useImperativeHandle(n,()=>r.current,[]),r}function Wi(n){return n[n.length-1]}function As(n,r){return typeof n=="function"?n(r):n}const gm=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable;function ym(n){for(const r in n)if(gm.call(n,r))return!0;return!1}const pv=()=>Object.create(null),Rr=(n,r)=>Mr(n,r,pv);function Mr(n,r,s=()=>({}),l=0){if(n===r)return n;if(l>500)return r;const a=r,c=ap(n)&&ap(a);if(!c&&!(Ll(n)&&Ll(a)))return a;const h=c?n:op(n);if(!h)return a;const f=c?a:op(a);if(!f)return a;const p=h.length,g=f.length,w=c?new Array(g):s();let v=0;for(let x=0;x<g;x++){const k=c?x:f[x],S=n[k],_=a[k];if(S===_){w[k]=S,(c?x<p:gm.call(n,k))&&v++;continue}if(S===null||_===null||typeof S!="object"||typeof _!="object"){w[k]=_;continue}const b=Mr(S,_,s,l+1);w[k]=b,b===S&&v++}return p===g&&v===p?n:w}function op(n){const r=Object.keys(n);if(r.length!==Object.getOwnPropertyNames(n).length)return!1;const s=Object.getOwnPropertySymbols(n);if(s.length===0)return r;for(const l of s){if(!hv.call(n,l))return!1;r.push(l)}return r}function Ll(n){if(!lp(n))return!1;const r=n.constructor;if(typeof r>"u")return!0;const s=r.prototype;return!(!lp(s)||!s.hasOwnProperty("isPrototypeOf"))}function lp(n){return Object.prototype.toString.call(n)==="[object Object]"}function ap(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ar(n,r,s){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let l=0,a=n.length;l<a;l++)if(!ar(n[l],r[l],s))return!1;return!0}if(Ll(n)&&Ll(r)){const l=(s==null?void 0:s.ignoreUndefined)??!0;if(s!=null&&s.partial){for(const h in r)if((!l||r[h]!==void 0)&&!ar(n[h],r[h],s))return!1;return!0}let a=0;if(!l)a=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&a++;let c=0;for(const h in r)if((!l||r[h]!==void 0)&&(c++,c>a||!ar(n[h],r[h],s)))return!1;return a===c}return!1}const mv=/[\x00-\x1f\x7f"<>`{}]/g;function gv(n){return n.replace(mv,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function up(n){let r;try{r=decodeURI(n)}catch{r=n.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return gv(r)}const yv=["http:","https:","mailto:","tel:"];function Ml(n,r){if(!n)return!1;try{const s=new URL(n);return!r.has(s.protocol)}catch{return!1}}function Li(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let s=0,l="",a;for(;(a=r.exec(n))!==null;)l+=up(n.slice(s,a.index))+a[0],s=r.lastIndex;l=l+up(s?n.slice(s):n);let c=!1;return l.startsWith("//")&&(c=!0,l="/"+l.replace(/^\/+/,"")),{path:l,handledProtocolRelativeURL:c}}function vv(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function xv(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!==r[s])return!1;return!0}function Dc(){throw new Error("Invariant failed")}function Tl(n){const r=new Map;let s,l;const a=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,l&&(l.next=c,c.prev=l)):(c.next.prev=void 0,s=c.next,c.next=void 0,l&&(c.prev=l,l.next=c)),l=c)};return{get(c){const h=r.get(c);if(h)return a(h),h.value},set(c,h){if(r.size>=n&&s){const p=s;r.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===l&&(l=void 0)}const f=r.get(c);if(f)f.value=h,a(f);else{const p={key:c,value:h,prev:l};l&&(l.next=p),l=p,s||(s=p),r.set(c,p)}},clear(){r.clear(),s=void 0,l=void 0}}}const or=4,vm=5;function xm(n,r,s=new Uint16Array(6)){const l=n.indexOf("/",r),a=l===-1?n.length:l,c=n.substring(r,a);if(!c||!c.includes("$"))return s[0]=0,s[1]=r,s[2]=r,s[3]=a,s[4]=a,s[5]=a,s;if(c==="$"){const p=n.length;return s[0]=2,s[1]=r,s[2]=r,s[3]=p,s[4]=p,s[5]=p,s}if(c.charCodeAt(0)===36)return s[0]=1,s[1]=r,s[2]=r+1,s[3]=a,s[4]=a,s[5]=a,s;const h=c.indexOf("{");let f;if(h!==-1&&h+1<c.length&&(f=c.indexOf("}",h))!==-1){const p=c.charCodeAt(h+1);if(p===45){if(h+2<c.length&&c.charCodeAt(h+2)===36){const g=h+3,w=f;if(g<w)return s[0]=3,s[1]=r+h,s[2]=r+g,s[3]=r+w,s[4]=r+f+1,s[5]=a,s}}else if(p===36){const g=h+1,w=h+2;return w===f?(s[0]=2,s[1]=r+h,s[2]=r+g,s[3]=r+w,s[4]=r+f+1,s[5]=n.length,s):(s[0]=1,s[1]=r+h,s[2]=r+w,s[3]=r+f,s[4]=r+f+1,s[5]=a,s)}}return s[0]=0,s[1]=r,s[2]=r,s[3]=a,s[4]=a,s[5]=a,s}function Al(n,r,s,l,a,c,h,f){var g,w;f==null||f(s);let p=l;{const v=s.fullPath??s.from,x=s.options,k=v.length,S=(x==null?void 0:x.caseSensitive)??n,_=((g=x==null?void 0:x.params)==null?void 0:g.parse)??(x==null?void 0:x.parseParams);for(;p<k;){const L=xm(v,p,r);let R;const F=p,M=L[5];p=M+1,c++;const A=L[0];switch(A){case 0:{const z=v.substring(L[2],L[3]);let G=z,V;S?V=a.static??(a.static=new Map):(G=z.toLowerCase(),V=a.staticInsensitive??(a.staticInsensitive=new Map));const O=V.get(G);if(O)R=O;else{const Q=ks(v);Q.parent=a,Q.depth=c,R=Q,V.set(G,Q)}break}case 1:case 3:case 2:{let z=v.substring(F,L[1]),G=v.substring(L[4],M);const V=S&&!!(z||G);S||(z=z.toLowerCase(),G=G.toLowerCase());const O=A===1?a.dynamic:A===3?a.optional:a.wildcard,Q=A!==2&&!_&&(O==null?void 0:O.find(X=>!X.parse&&X.caseSensitive===V&&X.prefix===z&&X.suffix===G));if(Q)R=Q;else{const X=wv(A,v,V,z,G);R=X,X.parent=a,X.depth=c;let Y;A===1?Y=a.dynamic??(a.dynamic=[]):A===3?Y=a.optional??(a.optional=[]):Y=a.wildcard??(a.wildcard=[]),Y.push(X),Y.length===2&&(h==null||h.push(Y))}break}}a=R}if(_&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const L=ks(v);L.kind=vm,L.parent=a,c++,L.depth=c,a.pathless??(a.pathless=[]),a.pathless.push(L),a=L}const b=(s.path||!s.children)&&!s.isRoot;if(b&&v.endsWith("/")){const L=ks(v);L.kind=or,L.parent=a,c++,L.depth=c,a.index=L,a=L}a.parse=_??null,a.priority=((w=x==null?void 0:x.params)==null?void 0:w.priority)??0,b&&!a.route&&(a.route=s,a.fullPath=v)}if(s.children)for(const v of s.children)Al(n,r,v,p,a,c,h,f)}function wm(n,r){if(n.parse&&!r.parse)return-1;if(!n.parse&&r.parse)return 1;if(n.parse&&r.parse&&(n.priority||r.priority))return r.priority-n.priority;if(n.prefix&&r.prefix&&n.prefix!==r.prefix){if(n.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(n.prefix))return 1}if(n.suffix&&r.suffix&&n.suffix!==r.suffix){if(n.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(n.suffix))return 1}return n.prefix&&!r.prefix?-1:!n.prefix&&r.prefix?1:n.suffix&&!r.suffix?-1:!n.suffix&&r.suffix?1:n.caseSensitive&&!r.caseSensitive?-1:!n.caseSensitive&&r.caseSensitive?1:0}function ks(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function wv(n,r,s,l,a){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:s,prefix:l,suffix:a}}function kv(n,r){const s=ks("/"),l=new Uint16Array(6),a=[];for(const c of n)Al(!1,l,c,1,s,0,a);for(const c of a)c.sort(wm);r.masksTree=s,r.flatCache=Tl(1e3)}function Sv(n,r){n||(n="/");const s=r.flatCache.get(n);if(s!==void 0)return s;const l=Fc(n,r.masksTree);return r.flatCache.set(n,l),l}function bv(n,r,s,l,a){n||(n="/"),l||(l="/");const c=r?`case\0${n}`:n;let h=a.singleCache.get(c);return h||(h=ks("/"),Al(r,new Uint16Array(6),{from:n},1,h,0),a.singleCache.set(c,h)),Fc(l,h,s)}function _v(n,r,s=!1){const l=s?n:`nofuzz\0${n}`,a=r.matchCache.get(l);if(a!==void 0)return a;n||(n="/");let c;try{c=Fc(n,r.segmentTree,s)}catch(h){if(h instanceof URIError)c=null;else throw h}return c&&(c.branch=Sm(c.route)),r.matchCache.set(l,c),c}function Cv(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Ev(n,r=!1,s){const l=ks(n.fullPath),a=new Uint16Array(6),c=[],h={},f={};let p=0;Al(r,a,n,1,l,0,c,g=>{if(s==null||s(g,p),g.id in h&&Dc(),h[g.id]=g,p!==0&&g.path){const w=Cv(g.fullPath);(!f[w]||g.fullPath.endsWith("/"))&&(f[w]=g)}p++});for(const g of c)g.sort(wm);return{processedTree:{segmentTree:l,singleCache:Tl(1e3),matchCache:Tl(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:f}}function Fc(n,r,s=!1){const l=n.split("/"),a=Pv(n,l,r,s);if(!a)return null;const[c]=km(n,l,a);return{route:a.node.route,rawParams:c}}function km(n,r,s){var w,v,x,k;const l=jv(s.node);let a=null;const c=Object.create(null);let h=((w=s.extract)==null?void 0:w.part)??0,f=((v=s.extract)==null?void 0:v.node)??0,p=((x=s.extract)==null?void 0:x.path)??0,g=((k=s.extract)==null?void 0:k.segment)??0;for(;f<l.length;h++,f++,p++,g++){const S=l[f];if(S.kind===or)break;if(S.kind===vm){g--,h--,p--;continue}const _=r[h],b=p;if(_&&(p+=_.length),S.kind===1){a??(a=s.node.fullPath.split("/"));const L=a[g],R=S.prefix.length;if(L.charCodeAt(R)===123){const F=S.suffix.length,M=L.substring(R+2,L.length-F-1),A=_.substring(R,_.length-F);c[M]=decodeURIComponent(A)}else{const F=L.substring(1);c[F]=decodeURIComponent(_)}}else if(S.kind===3){if(s.skipped&1<<f){h--,p=b-1;continue}a??(a=s.node.fullPath.split("/"));const L=a[g],R=S.prefix.length,F=S.suffix.length,M=L.substring(R+3,L.length-F-1),A=S.suffix||S.prefix?_.substring(R,_.length-F):_;A&&(c[M]=decodeURIComponent(A))}else if(S.kind===2){const L=S,R=n.substring(b+L.prefix.length,n.length-L.suffix.length),F=decodeURIComponent(R);c["*"]=F,c._splat=F;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:h,node:f,path:p,segment:g}]}function Sm(n){const r=[n];for(;n.parentRoute;)n=n.parentRoute,r.push(n);return r.reverse(),r}function jv(n){const r=Array(n.depth+1);do r[n.depth]=n,n=n.parent;while(n);return r}function Pv(n,r,s,l){if(n==="/"&&s.index)return{node:s.index,skipped:0};const a=!Wi(r),c=a&&n!=="/",h=r.length-(a?1:0),f=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;f.length;){const w=f.pop(),{node:v,index:x,skipped:k,statics:S,dynamics:_,optionals:b}=w;let{extract:L,rawParams:R}=w;if(v.kind===2&&v.route&&!kl(g,w))continue;if(v.parse){if(!cp(n,r,w))continue;R=w.rawParams,L=w.extract}l&&v.route&&v.kind!==or&&kl(p,w)&&(p=w);const F=x===h;if(F&&(v.route&&(!c||v.kind===or||v.kind===2)&&kl(g,w)&&(g=w),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const M=F?void 0:r[x];let A;if(F&&v.index){const z={node:v.index,index:x,skipped:k,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R};let G=!0;if(v.index.parse&&(cp(n,r,z)||(G=!1)),G){if(!_&&!b&&!k&&Nv(S,h))return z;kl(g,z)&&(g=z)}}if(v.wildcard)for(let z=v.wildcard.length-1;z>=0;z--){const G=v.wildcard[z],{prefix:V,suffix:O}=G;if(!(V&&(F||!(G.caseSensitive?M:A??(A=M.toLowerCase())).startsWith(V)))){if(O){if(F)continue;const Q=r.slice(x).join("/"),X=Q.slice(-O.length);if((G.caseSensitive?X:X.toLowerCase())!==O||Q.length-O.length<V.length)continue}f.push({node:G,index:h,skipped:k,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R})}}if(v.optional){const z=k|1<<v.depth+1;for(let G=v.optional.length-1;G>=0;G--){const V=v.optional[G];f.push({node:V,index:x,skipped:z,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R})}if(!F)for(let G=v.optional.length-1;G>=0;G--){const V=v.optional[G],{prefix:O,suffix:Q}=V;if(O||Q){const X=V.caseSensitive?M:A??(A=M.toLowerCase());if(O&&!X.startsWith(O)||Q&&X.indexOf(Q,X.length-Q.length)<O.length)continue}f.push({node:V,index:x+1,skipped:k,statics:S,dynamics:_,optionals:b+wl(h,x),extract:L,rawParams:R})}}if(!F&&v.dynamic&&M)for(let z=v.dynamic.length-1;z>=0;z--){const G=v.dynamic[z],{prefix:V,suffix:O}=G;if(V||O){const Q=G.caseSensitive?M:A??(A=M.toLowerCase());if(V&&!Q.startsWith(V)||O&&Q.indexOf(O,Q.length-O.length)<V.length)continue}f.push({node:G,index:x+1,skipped:k,statics:S,dynamics:_+wl(h,x),optionals:b,extract:L,rawParams:R})}if(!F&&v.staticInsensitive){const z=v.staticInsensitive.get(A??(A=M.toLowerCase()));z&&f.push({node:z,index:x+1,skipped:k,statics:S+wl(h,x),dynamics:_,optionals:b,extract:L,rawParams:R})}if(!F&&v.static){const z=v.static.get(M);z&&f.push({node:z,index:x+1,skipped:k,statics:S+wl(h,x),dynamics:_,optionals:b,extract:L,rawParams:R})}if(v.pathless)for(let z=v.pathless.length-1;z>=0;z--){const G=v.pathless[z];f.push({node:G,index:x,skipped:k,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R})}}if(g)return g;if(l&&p){let w=p.index;for(let x=0;x<p.index;x++)w+=r[x].length;const v=w===n.length?"/":n.slice(w);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function wl(n,r){return 2**(n-r-1)}function Nv(n,r){return n===2**(r-1)-1}function cp(n,r,s){let l,a;try{[l,a]=km(n,r,s)}catch{return null}if(s.rawParams=l,s.extract=a,!s.node.parse)return!0;try{if(s.node.parse(l)===!1)return null}catch{}return!0}function kl(n,r){return n?r.statics>n.statics||r.statics===n.statics&&(r.dynamics>n.dynamics||r.dynamics===n.dynamics&&(r.optionals>n.optionals||r.optionals===n.optionals&&((r.node.kind===or)>(n.node.kind===or)||r.node.kind===or==(n.node.kind===or)&&r.node.depth>n.node.depth))):!0}function Cl(n){return El(n.filter(r=>r!==void 0).join("/"))}function El(n){return n.replace(/\/{2,}/g,"/")}function bm(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function _n(n){const r=n.length;return r>1&&n[r-1]==="/"?n.replace(/\/{1,}$/,""):n}function _m(n){return _n(bm(n))}function Il(n,r){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${r}/`?n.slice(0,-1):n}function Rv(n,r,s){return Il(n,s)===Il(r,s)}function Lv({base:n,to:r,trailingSlash:s="never",cache:l}){if(r.includes("//")&&(r=El(r)),r.startsWith("/"))return r.length===1||s==="preserve"?r:s==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const a=r===".";let c;if(l){c=a?n:n+"\0"+r;const g=l.get(c);if(g)return g}let h;if(a)h=n.split("/");else{for(n.includes("//")&&(n=El(n)),h=n.split("/");h.length>1&&Wi(h)==="";)h.pop();const g=r.split("/");for(let w=0,v=g.length;w<v;w++){const x=g[w];x===""?w?w===v-1&&h.push(x):h=[x]:x===".."?h.length>1?h.pop():h=[""]:x==="."||h.push(x)}}h.length>1&&(Wi(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));const f=h.join("/"),p=(a?El(f):f)||"/";return c&&l&&l.set(c,p),p}function Mv(n){const r=new Map(n.map(a=>[encodeURIComponent(a),a])),s=Array.from(r.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),l=new RegExp(s,"g");return a=>a.replace(l,c=>r.get(c)??c)}function Bu(n,r,s){const l=r[n];return typeof l!="string"?l:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(l)?l:l.split("/").map(a=>fp(a,s)).join("/"):fp(l,s)}function dp({path:n,params:r,decoder:s,...l}){let a=!1;const c=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:a};if(!n.includes("$"))return{interpolatedPath:n,usedParams:c,isMissingParams:a};const h=n.length;let f=0,p,g="";for(;f<h;){const w=f;p=xm(n,w,p);const v=p[5];if(f=v+1,w===v)continue;const x=p[0];if(x===0){g+="/"+n.substring(w,v);continue}if(x===2){const k=r._splat;c._splat=k,c["*"]=k;const S=n.substring(w,p[1]),_=n.substring(p[4],v);if(!k){a=!0,(S||_)&&(g+="/"+S+_);continue}const b=Bu("_splat",r,s);g+="/"+S+b+_;continue}if(x===1){const k=n.substring(p[2],p[3]);!a&&!(k in r)&&(a=!0),c[k]=r[k];const S=n.substring(w,p[1]),_=n.substring(p[4],v),b=Bu(k,r,s)??"undefined";g+="/"+S+b+_;continue}if(x===3){const k=n.substring(p[2],p[3]),S=r[k];if(S==null)continue;c[k]=S;const _=n.substring(w,p[1]),b=n.substring(p[4],v),L=Bu(k,r,s)??"";g+="/"+_+L+b;continue}}return n.endsWith("/")&&(g+="/"),{usedParams:c,interpolatedPath:g||"/",isMissingParams:a}}function fp(n,r){const s=encodeURIComponent(n);return(r==null?void 0:r(s))??s}function Us(n){return(n==null?void 0:n.isNotFound)===!0}function Tv(){try{return sessionStorage}catch{return}}const Iv="tsr-scroll-restoration-v1_3",Ss=Tv();function Dv(){try{return JSON.parse((Ss==null?void 0:Ss.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Fv(){try{Ss==null||Ss.setItem(Iv,JSON.stringify(Yn))}catch{}}const Yn=Dv(),hp="data-scroll-restoration-id",zv=n=>n.state.__TSR_key||n.href;function Ov(n){const r=n.getAttribute(hp);if(r)return`[${hp}="${r}"]`;let s="",l=n,a;for(;a=l.parentNode;){let c=1,h=l;for(;h=h.previousElementSibling;)c++;const f=`${l.localName}:nth-child(${c})`;s=s?`${f} > ${s}`:f,l=a}return s}let Sl=!1;const jl="window";function pc(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function pp(n){const r=new Set;for(const s of n){if(s===jl)continue;const l=pc(s);l&&r.add(l)}return r}function Av(n,r){const s=n.options.scrollRestoration,l=n._scroll;s&&(l.restoring=!0);const a=n.options.getScrollRestorationKey||zv,c=new Set,h=f=>{const p=Yn[f]||(Yn[f]={});for(const g of c)g===document?p[jl]={scrollX,scrollY}:g.isConnected&&(p[Ov(g)]={scrollX:g.scrollLeft,scrollY:g.scrollTop})};s&&!l.restoration&&(l.restoration=!0,Sl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{Sl||c.add(f.target)},!0),n.subscribe("onBeforeLoad",f=>{f.fromLocation&&h(a(f.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{h(a(n.stores.resolvedLocation.get()??n.stores.location.get())),Fv()})),!l.reset&&(l.reset=!0,n.subscribe("onRendered",f=>{var _;const p=n.options.scrollRestorationBehavior,g=n.options.scrollToTopSelectors,w=l.next,v=l.hash;let x;if(c.clear(),l.next=!0,l.hash=!1,typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const k=a(f.toLocation),S=f.fromLocation&&a(f.fromLocation);if(l.restoring&&S&&S!==k){const b=Yn[S];if(b){let L=Yn[k];for(const R in b){if(R===jl){if(w)continue}else{const F=pc(R);if(!F||w&&g&&(x??(x=pp(g)),x.has(F)))continue}L||(L=Yn[k]={}),L[R]??(L[R]=b[R])}}}Sl=!0;try{const b=f.toLocation.hash,L=f.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(w){!b&&g&&(x??(x=pp(g)));const F=b&&L&&v,M=l.restoring?Yn[k]:void 0;if(M)for(const A in M){const{scrollX:z,scrollY:G}=M[A];if(A===jl){if(F)continue;scrollTo({top:G,left:z,behavior:p}),R=!0}else{const V=pc(A);V&&(V.scrollLeft=z,V.scrollTop=G,x==null||x.delete(V))}}if(!b){const A={top:0,left:0,behavior:p};if(R||scrollTo(A),x)for(const z of x)z.scrollTo(A)}}!R&&b&&L&&((_=document.getElementById(b))==null||_.scrollIntoView(L))}finally{Sl=!1}}))}function Uv(n,r=String){const s=new URLSearchParams;for(const l in n){const a=n[l];a!==void 0&&s.set(l,r(a))}return s.toString()}function $u(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function Bv(n){const r=new URLSearchParams(n),s=Object.create(null);for(const[l,a]of r.entries()){const c=s[l];c==null?s[l]=$u(a):Array.isArray(c)?c.push($u(a)):s[l]=[c,$u(a)]}return s}const $v=/^(?:\s|["[{\d-]|fa|nu|tr)/,Vv=Wv(JSON.parse),Hv=Qv(JSON.stringify,JSON.parse);function Wv(n){return r=>{r[0]==="?"&&(r=r.substring(1));const s=Bv(r);for(const l in s){const a=s[l];if(typeof a=="string")try{s[l]=n(a)}catch{}}return s}}function Qv(n,r){const s=r===JSON.parse;function l(a){if(a&&typeof a=="object")try{return n(a)}catch{}else if(r&&typeof a=="string"){if(s&&!$v.test(a))return a;try{return r(a),n(a)}catch{}}return a}return a=>{const c=Uv(a,l);return c?`?${c}`:""}}const bs="__root__";function Cm(n){if(n.statusCode=n.statusCode||n.code||307,!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const r=new Headers(n.headers);n.href&&r.get("Location")===null&&r.set("Location",n.href);const s=new Response(null,{status:n.statusCode,headers:r});if(s.options=n,n.throw)throw s;return s}function Em(n){return n instanceof Response&&!!n.options}function Kv(n){return{input:({url:r})=>{for(const s of n)r=mc(s,r);return r},output:({url:r})=>{for(let s=n.length-1;s>=0;s--)r=jm(n[s],r);return r}}}function Gv(n){const r=_m(n.basepath),s=`/${r}`,l=n.caseSensitive?s:s.toLowerCase(),a=`${l}/`;return{input:({url:c})=>{const h=n.caseSensitive?c.pathname:c.pathname.toLowerCase();return h===l?c.pathname="/":h.startsWith(a)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Cl(["/",r,c.pathname]),c)}}function mc(n,r){var l;const s=(l=n==null?void 0:n.input)==null?void 0:l.call(n,{url:r});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return r}function jm(n,r){var l;const s=(l=n==null?void 0:n.output)==null?void 0:l.call(n,{url:r});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return r}function qv(n,r){const{createMutableStore:s,createReadonlyStore:l,batch:a}=r,c=new Map,h=s("idle"),f=s(n),p=s(void 0),g=s([]),w=l(()=>g.get().map(_=>c.get(_).get())),v=l(()=>({status:h.get(),isLoading:h.get()==="pending",matches:w.get(),location:f.get(),resolvedLocation:p.get()}));function x(_){let b=c.get(_);return b||(b=s(void 0),c.set(_,b)),b}const k={status:h,location:f,resolvedLocation:p,ids:g,matches:w,byRoute:c,__store:v,getMatchStore:x,setMatches:S};function S(_){const b=g.get(),L=_.map(R=>R.routeId);a(()=>{xv(b,L)||g.set(L);for(const R of b)L.includes(R)||c.get(R).set(()=>{});for(const R of _){const F=x(R.routeId);F.get()!==R&&F.set(R)}})}return k}var ur="__TSR_index",mp="popstate",gp="beforeunload";function Zv(n){let r=n.getLocation();const s=new Set,l=h=>{r=n.getLocation(),s.forEach(f=>f({location:r,action:h}))},a=h=>{n.notifyOnIndexChange??!0?l(h):r=n.getLocation()},c=async({task:h,navigateOpts:f,...p})=>{var v,x;if((f==null?void 0:f.ignoreBlocker)??!1){h();return}const g=((v=n.getBlockers)==null?void 0:v.call(n))??[],w=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&w)for(const k of g){const S=Dl(p.path,p.state);if(await k.blockerFn({currentLocation:r,nextLocation:S,action:p.type})){(x=n.onBlocked)==null||x.call(n);return}}h()};return{get location(){return r},get length(){return n.getLength()},subscribers:s,subscribe:h=>(s.add(h),()=>{s.delete(h)}),push:(h,f,p)=>{const g=r.state[ur];f=yp(g+1,f),c({task:()=>{n.pushState(h,f),l({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:f})},replace:(h,f,p)=>{const g=r.state[ur];f=yp(g,f),c({task:()=>{n.replaceState(h,f),l({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:f})},go:(h,f)=>{c({task:()=>{n.go(h),a({type:"GO",index:h})},navigateOpts:f,type:"GO"})},back:h=>{c({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),a({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{c({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),a({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>r.state[ur]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const f=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...f,h]),()=>{var w,v;const g=((w=n.getBlockers)==null?void 0:w.call(n))??[];(v=n.setBlockers)==null||v.call(n,g.filter(x=>x!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:l}}function yp(n,r){r||(r={});const s=zc();return{...r,key:s,__TSR_key:s,[ur]:n}}function Yv(n){var G,V;const r=typeof document<"u"?window:void 0,s=r.history.pushState,l=r.history.replaceState;let a=[];const c=()=>a,h=O=>a=O,f=(O=>O),p=(()=>Dl(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((G=r.history.state)!=null&&G.__TSR_key)&&!((V=r.history.state)!=null&&V.key)){const O=zc();r.history.replaceState({[ur]:0,key:O,__TSR_key:O},"")}let g=p(),w,v=!1,x=!1,k=!1,S=!1;const _=()=>g;let b;const L=()=>{b&&(z._ignoreSubscribers=!0,(b[2]?r.history.pushState:r.history.replaceState)(b[1],"",b[0]),z._ignoreSubscribers=!1,b=void 0,w=void 0)},R=(O,Q,X)=>{const Y=f(Q),de=!!b;de||(w=g),g=Dl(Q,X),b=[Y,X,(b==null?void 0:b[2])||O],de||queueMicrotask(()=>L())},F=O=>{g=p(),z.notify({type:O})},M=async()=>{if(x){x=!1;return}const O=p(),Q=O.state[ur]-g.state[ur],X=Q===1,Y=Q===-1,de=!X&&!Y||v;v=!1;const W=de?"GO":Y?"BACK":"FORWARD",te=de?{type:"GO",index:Q}:{type:Y?"BACK":"FORWARD"};if(k)k=!1;else{const ke=c();if(typeof document<"u"&&ke.length){for(const he of ke)if(await he.blockerFn({currentLocation:g,nextLocation:O,action:W})){x=!0,r.history.go(1),z.notify(te);return}}}g=p(),z.notify(te)},A=O=>{if(S){S=!1;return}let Q=!1;const X=c();if(typeof document<"u"&&X.length)for(const Y of X){const de=Y.enableBeforeUnload??!0;if(de===!0){Q=!0;break}if(typeof de=="function"&&de()===!0){Q=!0;break}}if(Q)return O.preventDefault(),O.returnValue=""},z=Zv({getLocation:_,getLength:()=>r.history.length,pushState:(O,Q)=>R(!0,O,Q),replaceState:(O,Q)=>R(!1,O,Q),back:O=>(O&&(k=!0),S=!0,r.history.back()),forward:O=>{O&&(k=!0),S=!0,r.history.forward()},go:O=>{v=!0,r.history.go(O)},createHref:O=>f(O),flush:L,destroy:()=>{r.history.pushState=s,r.history.replaceState=l,r.removeEventListener(gp,A,{capture:!0}),r.removeEventListener(mp,M)},onBlocked:()=>{w&&g!==w&&(g=w)},getBlockers:c,setBlockers:h,notifyOnIndexChange:!1});return r.addEventListener(gp,A,{capture:!0}),r.addEventListener(mp,M),r.history.pushState=function(...O){const Q=s.apply(r.history,O);return z._ignoreSubscribers||F("PUSH"),Q},r.history.replaceState=function(...O){const Q=l.apply(r.history,O);return z._ignoreSubscribers||F("REPLACE"),Q},z}function Xv(n){let r=n.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function Dl(n,r){const s=Xv(n),l=s.indexOf("#"),a=s.indexOf("?"),c=zc();return{href:s,pathname:s.substring(0,l>0?a>0?Math.min(l,a):l:a>0?a:s.length),hash:l>-1?s.substring(l):"",search:a>-1?s.slice(a,l===-1?void 0:l):"",state:r||{[ur]:0,key:c,__TSR_key:c}}}function zc(){return(Math.random()+1).toString(36).substring(7)}function vp(n){var r,s;return n.options.loader||n.options.beforeLoad||n.lazyFn||((r=n.options.component)==null?void 0:r.preload)||((s=n.options.pendingComponent)==null?void 0:s.preload)}function Ul(n,r){return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}function xp({key:n,__TSR_key:r,__TSR_index:s,__hashScrollIntoViewOptions:l,...a}){return a}function Jv(n,r,s,l){var a,c,h,f;for(const p of r){if(l&&n._tx!==l)return;s.some(g=>g.routeId===p.routeId)||(c=(a=n.routesById[p.routeId].options).onLeave)==null||c.call(a,p)}for(const p of s){if(l&&n._tx!==l)return;(f=(h=n.routesById[p.routeId].options)[r.some(g=>g.routeId===p.routeId)?"onStay":"onEnter"])==null||f.call(h,p)}}var ex=class{constructor(n,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async s=>(s(),!1),this.update=s=>{const l=this.options,a=this.basepath??(l==null?void 0:l.basepath)??"/",c=this.basepath===void 0,h=l==null?void 0:l.rewrite;if(this.options={...l,...s},this.isServer=this.options.isServer??cv??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Mv(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Yv()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let g;this.resolvePathCache=Tl(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=qv(this.latestLocation,g),Av(this)}const f=this.options.basepath??"/",p=this.options.rewrite;if(c||a!==f||h!==p){this.basepath=f;const g=[],w=_m(f);w&&w!=="/"&&g.push(Gv({basepath:f})),p&&g.push(p),this.rewrite=g.length===0?void 0:g.length===1?g[0]:Kv(g),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=Ev(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});return this.options.routeMasks&&kv(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,l)=>{const a={eventType:s,fn:l};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=s=>{for(const l of this.subscribers)if(l.eventType===s.type)try{l.fn(s)}catch(a){console.error(a)}},this.parseLocation=(s,l)=>{const a=({pathname:p,search:g,hash:w,href:v,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const L=this.options.parseSearch(g),R=this.options.stringifySearch(L);return{href:p+R+w,publicHref:p+R+w,pathname:Li(p).path,external:!1,searchStr:R,search:Rr(l==null?void 0:l.search,L),hash:Li(w.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}}const k=new URL(v,this.origin),S=mc(this.rewrite,k),_=this.options.parseSearch(S.search),b=this.options.stringifySearch(_);return S.search=b,{href:S.href.replace(S.origin,""),publicHref:v,pathname:Li(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:b,search:Rr(l==null?void 0:l.search,_),hash:Li(S.hash.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}},c=a(s),{__tempLocation:h,__tempKey:f}=c.state;if(h&&(!f||f===this.tempLocationKey)){const p=a(h);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(s,l)=>Lv({base:s,to:l,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,l,a)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:l},a):this.matchRoutesInternal(s,l),this.getMatchedRoutes=s=>{const l=Object.create(null),a=_v(_n(s),this.processedTree,!0);return a&&Object.assign(l,a.rawParams),[(a==null?void 0:a.branch)||[this.routesById.__root__],l,a==null?void 0:a.route]},this.buildLocation=s=>{const l=(c={})=>{var O,Q;if(c.href){const X=Dl(c.href,{});c={...c,to:mc(this.rewrite,new URL(X.pathname,this.origin)).pathname,search:this.options.parseSearch(X.search),hash:X.hash.slice(1)}}const h=c._fromLocation||this._pendingLocation||this.latestLocation,f=this.matchRoutesLightweight(h);c.from;const p=c.unsafeRelative==="path"?h.pathname:c.from??f[1],g=f[2],w=f[3],v=this.resolvePathWithBase(p,c.to?`${c.to}`:".");let x=wp(c.params,w);const k=this.routesByPath[_n(v)];let S;if(k)S=this.getRouteBranch(k);else if(v.includes("$"))S=[];else{const[X,Y,de]=this.getMatchedRoutes(v);S=X,this.options.notFoundRoute&&(!de||de.path!=="/"&&Y["**"])&&(S=[...S,this.options.notFoundRoute])}if(S.length&&ym(x))for(const X of S){const Y=((O=X.options.params)==null?void 0:O.stringify)??X.options.stringifyParams;if(Y){x===w&&(x=Object.assign(Object.create(null),x));try{Object.assign(x,Y(x))}catch{}}}const _=s.leaveParams?v:Li(dp({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let b=g;if(s._includeValidateSearch&&((Q=this.options.search)!=null&&Q.strict)){const X={};S.forEach(Y=>{if(Y.options.validateSearch)try{Object.assign(X,Pl(Y.options.validateSearch,{...X,...b}))}catch{}}),b=X}b=nx(b,c,S,s._includeValidateSearch),b=Rr(g,b);const L=this.options.stringifySearch(b),R=c.hash===!0?h.hash:c.hash?As(c.hash,h.hash):void 0,F=R?`#${R}`:"";let M=c.state===!0?h.state:c.state?As(c.state,h.state):{};c.state&&(M=Mr(h.state,M));const A=`${_}${L}${F}`;let z,G,V=!1;if(this.rewrite){const X=new URL(A,this.origin),Y=jm(this.rewrite,X);z=X.href.replace(X.origin,""),Y.origin!==this.origin?(G=Y.href,V=!0):G=Y.pathname+Y.search+Y.hash}else z=vv(A),G=z;return{publicHref:G,href:z,pathname:_,search:b,searchStr:L,state:M,hash:R??"",external:V,unmaskOnReload:c.unmaskOnReload}},a=l(s);if(s.mask)a.maskedLocation=l({from:s.from,...s.mask});else if(this.options.routeMasks){const c=Sv(a.pathname,this.processedTree);if(c){const h=Object.assign(Object.create(null),c.rawParams),{from:f,params:p,...g}=c.route,w=wp(p,h);a.maskedLocation=l({from:s.from,...g,params:w})}}return a},this.commitLocation=async({viewTransition:s,ignoreBlocker:l,...a})=>{let c;const h=_n(this.latestLocation.href)===_n(a.href)&&ar(xp(a.state),xp(this.latestLocation.state)),f=this._commitPromise;let p;const g=new Promise(w=>{p=w});if(g.resolve=()=>{p(),f==null||f.resolve()},this._commitPromise=g,h)this.load();else{let{maskedLocation:w,hashScrollIntoView:v,...x}=a;w&&(x={...w,state:{...w.state,__tempKey:void 0,__tempLocation:{...x,search:x.searchStr,state:{...x.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(x.unmaskOnReload??this.options.unmaskOnReload??!1)&&(x.state.__tempKey=this.tempLocationKey)),x.state.__hashScrollIntoViewOptions=v??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,c=a.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](x.publicHref,x.state,{ignoreBlocker:l}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.next=a.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:l,hashScrollIntoView:a,viewTransition:c,ignoreBlocker:h,...f}={})=>{const p=this.buildLocation({...f,_includeValidateSearch:!0});this._pendingLocation=p;const g=this.commitLocation({...p,viewTransition:c,replace:s,resetScroll:l,hashScrollIntoView:a,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:s,reloadDocument:l,href:a,publicHref:c,...h})=>{var p,g;let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!l&&(l=!0),l){if(s!==void 0||!a){const v=this.buildLocation({to:s,...h});a=a??v.publicHref,c=c??v.publicHref}const w=!f&&c?c:a;if(Ml(w,this.protocolAllowlist))return;if(!h.ignoreBlocker){const v=((g=(p=this.history).getBlockers)==null?void 0:g.call(p))??[];for(const x of v)if(x!=null&&x.blockerFn&&await x.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}h.replace?window.location.replace(w):window.location.href=w;return}return this.buildAndCommitLocation({...h,href:a,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s!=null&&s.action&&(this._scroll.hash=s.action.type==="PUSH"||s.action.type==="REPLACE"),await dx(this,s)},this.startViewTransition=s=>{var a,c;const l=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,l&&typeof document.startViewTransition=="function"){let h;if(typeof l=="object"&&((c=(a=window.CSS)==null?void 0:a.supports)!=null&&c.call(a,"selector(:active-view-transition-type(a))"))){const f=this.latestLocation,p=this.stores.resolvedLocation.get(),g=typeof l.types=="function"?l.types(Ul(f,p)):l.types;if(g===!1)return s();h={update:s,types:g}}else h=s;return document.startViewTransition(h).updateCallbackDone}return s()},this.invalidate=s=>{var g,w;const l=this._committed,a=s==null?void 0:s.filter,c=this._preloads,h=new Set([...l,...this._cache.values(),...[...(c==null?void 0:c.values())??[]].flat(),...((g=this._tx)==null?void 0:g[3])??[]].filter(v=>!a||a(v)).map(v=>v.id)),f=[];for(const[v,x]of c??[])x.some(k=>h.has(k.id))&&(c.delete(v),f.push(v));const p=v=>{if(h.has(v.id)){const x=this.routesById[v.routeId],k={...v,invalid:!0,...(s!=null&&s.forcePending||v.status==="error"||v.status==="notFound")&&vp(x)?{status:"pending",error:void 0}:void 0};return v._flight=void 0,k}return v};this._committed=l.map(p);for(const[v,x]of this._cache)h.has(v)&&(x.invalid=!0,s!=null&&s.forcePending&&(x.status="pending"));for(const v of h)(w=this._flights)==null||w.delete(v);for(const v of f)v.abort();return this.shouldViewTransition=!1,this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const l=s.headers.get("Location");if(s.options.href){if(l)try{const a=new URL(l);if(this.origin&&a.origin===this.origin){const c=a.pathname+a.search+a.hash;s.options.href=c,s.headers.set("Location",c)}}catch{}}else{const a=this.buildLocation(s.options).publicHref||"/";s.options.href=a,s.headers.set("Location",a)}if(s.options.href&&Ml(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{var g;const l=this._cache,a=this._preloads,c=s==null?void 0:s.filter,h=[],f=[];for(const[w,v]of l)(!c||c(v))&&(f.push(w),h.push(v));const p=[];for(const[w,v]of a??[])(!c||v.some(c))&&(p.push(w),h.push(...v));for(const w of f)l.delete(w);for(const w of p)a.delete(w);for(const w of h){const v=w._flight;w._flight=void 0,v&&!--v[2]&&(((g=this._flights)==null?void 0:g.get(w.id))===v&&this._flights.delete(w.id),p.push(v[1]))}for(const w of p)w.abort()},this.loadRouteChunk=_s,this.preloadRoute=s=>fx(this,s),this.matchRoute=(s,l)=>{const a={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(a),h=this.stores.status.get()==="pending";if(l!=null&&l.pending&&!h)return!1;const f=(l==null?void 0:l.pending)??!h?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=bv(c.pathname,(l==null?void 0:l.caseSensitive)??!1,(l==null?void 0:l.fuzzy)??!1,f.pathname,this.processedTree);return!p||s.params&&!ar(p.rawParams,s.params,{partial:!0})?!1:(l==null?void 0:l.includeSearch)??!0?ar(f.search,c.search,{partial:!0})?p.rawParams:!1:p.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??Hv,parseSearch:n.parseSearch??Vv,protocolAllowlist:n.protocolAllowlist??yv}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:r,processedTree:s}){this.routesById=n,this.routesByPath=r,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)}getRouteBranch(n){let r=this.routeBranchCache.get(n);return r||(r=Sm(n),this.routeBranchCache.set(n,r)),r}matchRoutesInternal(n,r){var x,k;const[s,l,a]=this.getMatchedRoutes(n.pathname);let c=s,h=!1;(a?a.path!=="/"&&l["**"]:_n(n.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:h=!0);const f=h?rx(this.options.notFoundMode,c):void 0,p=new Array(c.length),g=this._committed,w=(S,_)=>{const b=g[_];return(b==null?void 0:b.routeId)===S.id?b:S===this.options.notFoundRoute?g.find(L=>L.routeId===S.id):void 0};let v;for(let S=0;S<c.length;S++){const _=c[S],b=p[S-1];let L,R,F;{const te=(b==null?void 0:b.search)??n.search,ke=(b==null?void 0:b._strictSearch)??void 0;try{const he=Pl(_.options.validateSearch,{...te})??void 0;L={...te,...he},R={...ke,...he}}catch(he){let Z=he;if(he instanceof Fl||(Z=new Fl(he.message,{cause:he})),r!=null&&r.throwOnError)throw Z;L=te,R={},F=Z}}let M="",A="";try{M=((k=(x=_.options).loaderDeps)==null?void 0:k.call(x,{search:L}))??"",A=M&&JSON.stringify(M)||""}catch(te){if(r!=null&&r.throwOnError)throw te;F??(F=te)}const{interpolatedPath:z,usedParams:G}=dp({path:_.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),V=_.id+z+A,O=w(_,S),Q=this._cache.get(V)??((O==null?void 0:O.id)===V?O:void 0);v=(Q==null?void 0:Q._strictParams)??Object.assign(G,v);let X;if(!Q)try{kp(_,v)}catch(te){if(Us(te)||Em(te)?X=te:X=new tx(te.message,{cause:te}),r!=null&&r.throwOnError)throw X}const Y=O?"stay":"enter";let de;if(Q)de={...Q,cause:Y,search:Rr(O?O.search:Q.search,L),_strictSearch:R,searchError:F};else{const te=vp(_)?"pending":"success";de={id:V,ssr:_.options.ssr,index:S,routeId:_.id,params:(O==null?void 0:O.params)??v,_strictParams:v,pathname:z,updatedAt:Date.now(),search:O?Rr(O.search,L):L,_strictSearch:R,searchError:F,status:te,isFetching:!1,error:void 0,paramsError:X,context:{},abortController:(r==null?void 0:r._controller)??new AbortController,cause:Y,loaderDeps:O?Mr(O.loaderDeps,M):M,invalid:!1,preload:!1,staticData:_.options.staticData||{},fullPath:_.fullPath}}const W=f===_.id;de._notFound&&!W&&(de.error=void 0),de._notFound=W,p[S]=de}for(let S=0;S<p.length;S++){const _=p[S];_.params=_.cause==="stay"?Rr(_.params,v):v,r!=null&&r._controller&&(_.context={})}return p}matchRoutesLightweight(n){const r=Wi(this.stores.ids.get()),s=r?this.stores.byRoute.get(r).get():void 0,l=s==null?void 0:s.id,a=this.lightweightCache.get(n);if(a&&a[0]===l)return a[1];const[c,h]=this.getMatchedRoutes(n.pathname),f=Wi(c),p={...n.search};for(const x of c)try{Object.assign(p,Pl(x.options.validateSearch,p))}catch{}const g=s&&s.routeId===f.id&&s.pathname===n.pathname;let w;if(g)w=s.params;else{const x=Object.assign(Object.create(null),h);for(const k of c)try{kp(k,x)}catch{}w=x}const v=[c,f.fullPath,p,w];return this.lightweightCache.set(n,[l,v]),v}},Fl=class extends Error{},tx=class extends Error{};function Pl(n,r){if(n==null)return{};if("~standard"in n){const s=n["~standard"].validate(r);if(s instanceof Promise)throw new Fl("Async validation not supported");if(s.issues)throw new Fl(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in n?n.parse(r):typeof n=="function"?n(r):{}}function nx(n,r,s,l){var h;const a=[];for(const f of s){const p=f.options;if("search"in p)(h=p.search)!=null&&h.middlewares&&a.push(...p.search.middlewares);else if(p.preSearchFilters||p.postSearchFilters){const w=({search:v,next:x})=>{const k=x(p.preSearchFilters?p.preSearchFilters.reduce((S,_)=>_(S),v):v);return p.postSearchFilters?p.postSearchFilters.reduce((S,_)=>_(S),k):k};a.push(w)}const g=p.validateSearch;if(l&&g){const w=({search:v,next:x,meta:k})=>{const S=x(v);try{const _=Pl(g,S);if(k&&_)for(const b in _)b in S||(k.defaulted||(k.defaulted=new Map)).set(b,_[b]);return{...S,..._}}catch{}return S};a.push(w)}}const c=(f,p,g)=>{if(f>=a.length){if(!r.search)return{};if(r.search===!0)return p;const v=As(r.search,p);return g&&(g.explicit=v),v}const w=(v,x)=>{if(x){const k=g||{};return{search:c(f+1,v,k),meta:k}}return c(f+1,v,g)};return a[f]({search:p,next:w,meta:g})};return c(0,n)}function rx(n,r){if(n!=="root"){let s;for(let l=r.length-1;l>=0;l--){const a=r[l];if(a.options.notFoundComponent)return a.id;s||(s=a.children&&a.id)}if(s)return s}return bs}function wp(n,r){if(n===!1||n===null)return Object.create(null);if((n??!0)===!0)return r;const s=Object.assign(Object.create(null),r);return Object.assign(s,As(n,s))}function kp(n,r){var l;const s=((l=n.options.params)==null?void 0:l.parse)??n.options.parseParams;s&&Object.assign(r,s(r))}function gc(n,r){var s,l;return(l=(s=n.options[r])==null?void 0:s.preload)==null?void 0:l.call(s)}function sx(n,r){const s=gc(n,"component");let l=gc(n,"pendingComponent");return r&&(l?l=l.then(r):r()),s&&l?Promise.all([s,l]).then(()=>{}):s??l}function _s(n,r,s){const l=()=>r===!1?void 0:r?gc(n,r):sx(n,s),a=n._lazy;if(a)return a===!0?l():a.then(l);if(!n.lazyFn)return l();const c=n.lazyFn().then(h=>{{const{id:f,...p}=h.options;Object.assign(n.options,p),n._lazy=!0}},h=>{throw n._lazy=void 0,h});return n._lazy=c,c.then(l)}function Oc(n){const r=n.findIndex(s=>s.status!=="success"||s._notFound)+1;return r&&r<n.length?n.slice(0,r):n}const un=0,En=1,Bl=2,Nt=3,cr=[4];function Qi(n){return typeof n[0]=="number"}function Vr(n,r){return r.aborted?Promise.race([Promise.reject(r),n]):new Promise((s,l)=>{const a=()=>l(r);r.addEventListener("abort",a,{once:!0}),Promise.resolve(n).then(s,l).finally(()=>r.removeEventListener("abort",a))})}function Hr(n,r){return n.routesById[r.routeId]}function Ki(n,r,s){return Em(n)?[Nt,n]:Us(n)?(n.routeId||(n.routeId=s),[Bl,n]):r?(typeof(n==null?void 0:n.then)=="function"&&(n=new Error("A Promise was thrown",{cause:n})),[En,n]):[un,n]}function Ac(n,r){var l,a;let s=Ki(r,!0,n.id);if(s[0]!==En)return s;try{(a=(l=n.options).onError)==null||a.call(l,s[1])}catch(c){s=Ki(c,!0,n.id)}return s}function Oi(n,r,s,l,a){return a[0].signal.aborted?cr:$c(n,r,s,Ac(s,l),a)}async function ix(n,r,s,l,a,c){var w,v;const[h,f]=r,p=s[0].signal,g=!!s[3];for(let x=s[6]??0;x<l;x++){const k=f[x],S=Hr(n,k);k.abortController=s[0];const _=((w=f[x-1])==null?void 0:w.context)??n.options.context??{},b={params:k.params,location:h,navigate:M=>n.navigate({...M,_fromLocation:h}),buildLocation:n.buildLocation,cause:g?"preload":k.cause,abortController:s[0],preload:g,matches:f,routeId:S.id};try{const M=k._ctx||(k._ctx=S.options.context?S.options.context({...b,deps:k.loaderDeps,context:_})||{}:void 0);k.context={..._,...M}}catch(M){return Cn(n,k),[x,Oi(n,r,S,M,s)]}if(p.aborted)return[x,cr];const L=k.paramsError??k.searchError;if(L!==void 0)return Cn(n,k),[x,Oi(n,r,S,L,s)];const R=S.options.beforeLoad;if(!R)continue;const F=k.status;x>=c&&(k.status="pending",(v=s[7])==null||v.call(s));try{Gi(n,k,"beforeLoad",s[0]);const M=await Vr(R({...b,search:k.search,context:k.context,...n.options.additionalContext}),p);if(p.aborted)return[x,cr];const A=$c(n,r,S,Ki(M,!1,S.id),s);if(A[0]!==un)return Cn(n,k),[x,A];k.context={...k.context,...M}}catch(M){return Cn(n,k),[x,Oi(n,r,S,M,s)]}finally{k.status=F,Gi(n,k,!1,s[0])}}a()}function Uc(n,r,s){var l;if(!(!s||--s[2])){if(((l=n._flights)==null?void 0:l.get(r.id))===s){const a=n._tx;if(a&&!a[0].signal.aborted&&!a[3].includes(r)&&a[3].some(c=>c.id===r.id)&&a[3].some(c=>c.isFetching==="beforeLoad"))return;n._flights.delete(r.id)}return s[1]}}function Cn(n,r){var l;const s=r._flight;r._flight=void 0,(l=Uc(n,r,s))==null||l.abort()}function St(n,r,s,l){var c;const a=[];for(const h of r)if(!(s!=null&&s.includes(h))){const f=h._flight;if(h._flight=void 0,l&&(f==null?void 0:f[2])===1&&((c=n._flights)==null?void 0:c.get(h.id))===f&&(s!=null&&s.some(p=>p.id===h.id)))f[2]=0;else{const p=Uc(n,h,f);p&&a.push(p)}}for(const h of a)h.abort()}function Bc(n){for(const r of n){const s=r._flight;s&&s[2]++}}function Gi(n,r,s,l){var h;if(r.isFetching=s,l&&((h=n._tx)==null?void 0:h[0])!==l)return;const a=n.stores.byRoute.get(r.routeId),c=a==null?void 0:a.get();(c==null?void 0:c.id)===r.id&&a.set({...c,isFetching:s})}function Pm(n,r,s,l,a,c,h){const f=r[0];return{params:s.params,location:f,navigate:p=>n.navigate({...p,_fromLocation:f}),cause:h?"preload":s.cause,abortController:a,preload:h,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:l,...n.options.additionalContext}}async function Sp(n,r,s,l,a,c,h){const f=h[0],p=f.signal;if(p.aborted)return cr;if(!a)return[un,void 0];let g=s._flight;Gi(n,s,"loader",f);try{if(!g){const w=new AbortController;g=[Promise.resolve().then(()=>a(Pm(n,r,s,l,w,c,!!h[3]))).then(v=>Ki(v,!1,l.id),v=>Ki(v,!0,l.id)).then(v=>{var x;return v[0]!==un&&((x=n._flights)==null?void 0:x.get(s.id))===g&&(n._flights.delete(s.id),g[2]||w.abort()),v[0]===En&&g[2]?Ac(l,v[1]):v}),w,1],(n._flights??(n._flights=new Map)).set(s.id,g)}return s._flight=g,s.abortController=g[1],$c(n,r,l,await Vr(g[0],p),h)}catch(w){if(w!==p||!p.aborted)throw w;return Cn(n,s),cr}finally{Gi(n,s,!1,f)}}function bp(n,r,s){r[0]!==Nt&&(n.status="success",n.error=void 0,r[0]===un?(n.loaderData=r[1],n.invalid=!1,n.updatedAt=Date.now(),n.preload=s):n.invalid=!0)}function ox(n,r,s){const l=n._cache.get(r.id);if(l!==s||n._committed.some(c=>c.id===r.id&&c._flight===r._flight))return;const a={...r,_notFound:void 0,context:{}};a._flight&&a._flight[2]++,n._cache.set(r.id,a),l&&Cn(n,l)}function _p(n,r){return r[0]===En||r[0]===Bl?{...n,status:r[0]===En?"error":"notFound",error:r[1],_flight:void 0}:n}function lx(n,r,s,l,a,c,h){var Y,de;const f=r[1][s],p=Hr(n,f),g=!!c[3],w=n._cache.get(f.id);let v,x=!1,k;try{if(f.status==="success"&&(v=p.options.shouldReload,typeof v=="function"&&(v=v(Pm(n,r,f,p,c[0],a,g))),c[0].signal.aborted&&(k=cr)),!k)if(f.status!=="success")x=!0;else{const W=g||f.preload?p.options.preloadStaleTime??n.options.defaultPreloadStaleTime??3e4:p.options.staleTime??n.options.defaultStaleTime??0;x=!!(f.invalid||v||v===void 0&&Date.now()-f.updatedAt>=W&&(c[5]||f.cause==="enter"||c[2].some(te=>te.routeId===f.routeId&&te.id!==f.id)))}}catch(W){f.invalid=!0,Cn(n,f),k=Oi(n,r,p,W,c)}const S=p.options.loader,_=typeof S=="function",b=_?S:S==null?void 0:S.handler,L=!g||p.options.preload!==!1;let R=L&&S?(Y=n._flights)==null?void 0:Y.get(f.id):void 0;R===f._flight||k?R=void 0:R&&!x&&!g&&v===void 0?x=!0:x||(R=void 0);const F=!!(S&&x&&f.status==="success"&&!g&&!c[4]&&((_?void 0:S.staleReloadMode)??n.options.defaultStaleReloadMode)!=="blocking"),M=x&&L,A=M&&!F&&(f.status!=="success"||!!S),z=s>=h?c[7]:void 0,G=p.lazyFn&&p._lazy!==!0?z:void 0;if(M&&!S&&(f.invalid=!1,f.updatedAt=Date.now()),R&&R[2]++,A){const W=f._flight;f._flight=R,(de=Uc(n,f,W))==null||de.abort(),s>=h&&(f.status="pending"),z==null||z()}M||(f.isFetching=!1);const V=(k?Promise.resolve(k):A?Sp(n,r,f,p,b,a,c):Promise.resolve([un,f.loaderData])).then(W=>(A&&(bp(f,W,g),W[0]===un&&(S&&!c[0].signal.aborted&&ox(n,f,w),s>=h&&(f.status="pending"))),W)),O=Vr(Promise.resolve().then(()=>_s(p,void 0,G)),c[0].signal).then(()=>{},W=>r[1].some((te,ke)=>ke<=s&&(te.status==="error"||te.status==="notFound"||te._notFound))?void 0:[s,Oi(n,r,p,W,c)]).then(W=>V.then(te=>(A&&!W&&te[0]===un&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",z==null||z()),W)));if(l.push([s,V,O]),!F)return V.then(W=>_p(f,W));const Q={...f,status:"pending",preload:!1,_flight:R};f.invalid=!1,f.isFetching="loader";const X=Sp(n,r,Q,p,b,a,c).then(W=>(f.isFetching=!1,bp(Q,W,!1),W));return(r[2]??(r[2]=[])).push([s,X,O,Q]),X.then(W=>_p(Q,W))}async function yc(n,r,s,l,a=0){const c=s==null?void 0:s[1][1];let h=c!=null&&c.routeId?r.findIndex(f=>f.routeId===c.routeId):(s==null?void 0:s[0])??r.length-1;h<0&&(h=0);for(let f=h;f>=0;f--){const p=Hr(n,r[f]);try{const g=_s(p,!1);g&&await Vr(g,l)}catch(g){if(g===l&&l.aborted)throw g}if(p.options.notFoundComponent)return f}return c!=null&&c.routeId?h:a}function $r(n,r){r[2]&&(St(n,r[2].map(s=>s[3])),r[2]=void 0)}async function Cp(n,r,s,l){let a;try{await Promise.all(n.map(c=>c[1].then(async h=>{const f=c[0];if(!(l&&f>=await l)){if(h[0]>=Nt)throw[f,h];!a&&h[0]!==un&&(a=[f,h],await Promise.all((s??[]).map(p=>{if(!(p[0]<=f))return p[1].then(g=>{if(g[0]===Nt)throw[p[0],g]})})))}})))}catch(c){return c}return r??a}function $c(n,r,s,l,a,c){for(;l[0]===Nt;){const h=l[1],f=h.options;if(f.reloadDocument?a[3]:a[1]>=20)return l;try{return f.href&&f.reloadDocument?(n.resolveRedirect(h),l):[Nt,h,n.buildLocation({...f,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(p){l=c?[En,p]:Ac(s,p),c=!0}}return l}async function Nm(n,r,s,l,a,c){const h=r[1];let f=await a,p=!1;const g=h.findIndex(k=>k._notFound),w=k=>k[1][0]===Bl?yc(n,h,k,l.signal):k[0];let v=g<0?h.length:g;if(((f==null?void 0:f[1][0])??0)>=Nt)v=0;else if(f){v=f[2]??(f[2]=await w(f));for(const k of s){if(k[0]>=v)break;const S=await k[1];if(S[0]!==un&&S[0]<Nt&&!("loaderData"in h[k[0]])){f=[k[0],S],v=f[2]=await w(f);break}}}for(const k of s){if(k[0]>=v)break;const S=await k[2];if(S){f=S;break}}if(((f==null?void 0:f[1][0])??0)>=Nt){const k=f[1];if(k[0]!==Nt||k[1].options.reloadDocument||k[2])return $r(n,r),k;p=!0,f=[0,[En,new Error("Too many redirects")]]}const x=f?f[2]??await w(f):g;if(x>=0){const k=f==null?void 0:f[1],S=k==null?void 0:k[0],_=h[x],b=k==null?void 0:k[1],L=()=>{k&&(_._notFound=void 0,S===En?_.status="error":(b.routeId=_.routeId,_.routeId===n.routeTree.id?(_.status="success",_._notFound=!0):_.status="notFound"),_.error=b,_.isFetching=!1)};L(),k||c==null||c();const R=Hr(n,_);try{await Vr(k?Promise.resolve().then(()=>_s(R,S===En?"errorComponent":"notFoundComponent")):Promise.all([_s(R),_s(R,"notFoundComponent")]),l.signal)}catch(F){if(F===l.signal&&l.signal.aborted)return $r(n,r),cr}k?p&&(l.abort(),await Promise.all([...s.map(F=>F[1]),...s.map(F=>F[2]),...(r[2]??[]).map(F=>F[1])]),$r(n,r),St(n,h),L()):_.status="success"}return r}async function Rm(n,r,s,l=0,a=r[1].length){var h,f;const c=r[1];for(let p=l;p<a;p++){const g=c[p],w=Hr(n,g).options;if(w.head||w.scripts)try{const v={ssr:n.options.ssr,matches:c,match:g,params:g.params,loaderData:g.loaderData},[x,k]=await Vr(Promise.all([(h=w.head)==null?void 0:h.call(w,v),(f=w.scripts)==null?void 0:f.call(w,v)]),s);g.meta=x==null?void 0:x.meta,g.links=x==null?void 0:x.links,g.headScripts=x==null?void 0:x.scripts,g.styles=x==null?void 0:x.styles,g.scripts=k}catch(v){if(v===s&&s.aborted)break;console.error(v)}if(g.status!=="success"||g._notFound)break}return r}async function Lm(n,r,s,l){var f;const a=[r,s],c=l[0].signal;let h;try{const p=n.stores.matches.get();let g=s.findIndex(R=>R._notFound);if(n.options.notFoundMode!=="root"&&g>=0){const R=await yc(n,s,void 0,c,g);s[g]._notFound=void 0,s[R]._notFound=!0,g=R}let w=g<0?s.length:g+1,v=0;for(;v<w&&v!==g;){const R=s[v],F=l[2][v],M=p[v];if((F==null?void 0:F.id)!==R.id||F.status!=="success"||F._notFound||R.preload||(M==null?void 0:M.id)!==R.id||M.status!=="success"||M._notFound)break;v++}const x=[],k=l[6]??0;let S=k?Promise.resolve(s[k-1]):void 0;const _=()=>{for(let R=k;R<w&&!c.aborted;R++)S=lx(n,a,R,x,S,l,v)},b=await ix(n,a,l,w,_,v);if(b){if(l[4]=!0,w=b[0],b[1][0]===Bl){const R=await yc(n,s,b,c);b[2]=R,w=Math.min(w,R+1)}else b[1][0]>=Nt&&(w=0);_()}if(!c.aborted&&!l[3]){const R=[];for(const[F,M]of n._flights??[])M[2]||(n._flights.delete(F),R.push(M[1]));for(const F of R)F.abort()}const L=Nm(n,a,x,l[0],Cp(x,b,a[2]),l[7]);(f=a[2])!=null&&f.length&&(a[3]=Cp(a[2],void 0,void 0,L.then(R=>Qi(R)?0:Oc(s).length,()=>0))),h=await L}catch(p){if($r(n,a),p===c&&c.aborted)return cr;throw p}return Qi(h)?h:Rm(n,h,c,l[6]===s.length?l[6]:0)}function vc(n,r){var c,h;if(n._tx!==r)return;const s=r[3],l=n.stores.matches.get();let a=n._pending;for(let f=0;f<s.length;f++){const p=s[f],g=p.status==="success"&&!p._notFound,w=((c=l[f])==null?void 0:c.id)===p.id&&((h=l[f])==null?void 0:h.status)==="pending";if(g&&!w)continue;const v=Hr(n,p),x=g||p.invalid?0:v.options.pendingMs??n.options.defaultPendingMs,k=v.options.pendingComponent??n.options.defaultPendingComponent;if(!k||typeof x!="number"||x===1/0){a&&(a[0]=r,a[2]=0,a[4]=!0);return}const S=v.options.pendingMinMs??n.options.defaultPendingMinMs??0;let _=!1;if((a==null?void 0:a[1])===p.id?(_=a[0]!==r,a[0]=r):(clearTimeout(a==null?void 0:a[3]),n._pending=a=void 0),a||(n._pending=a=[r,p.id,w?Date.now()+S:r[4]+x,void 0,w||void 0,k]),a[4]&&!_&&a[5]===k)return;if(a[5]=k,!a[4]){clearTimeout(a[3]);const R=a[2]-Date.now();if(R>0){a[3]=setTimeout(()=>vc(n,r),R);return}a[2]=0}const b=s.map(R=>({...R,_flight:void 0}));b[f].status="pending";const L=a[4]=n.startTransition(()=>n.stores.setMatches(b),b).then(R=>(R&&n._pending===a&&a[4]===L&&!a[2]&&(a[2]=Date.now()+S),R));return}}function Mi(n,r){var l;const s=n._pending;(n._tx===r||!((l=n._tx)!=null&&l[3].some(a=>a.id===(s==null?void 0:s[1]))))&&(clearTimeout(s==null?void 0:s[3]),n._pending=void 0)}async function Ep(n,r){const s=n._pending;if(!s)return;clearTimeout(s[3]);const l=s[2]-Date.now();if(!s[4]||l<=0||!Oc(r[3]).some(c=>c.id===s[1]))return;let a;try{await Vr(new Promise(c=>{a=setTimeout(c,l)}),r[0].signal)}catch{}clearTimeout(a)}function Mm(n,r){n._committed=r,n.stores.setMatches(r)}function ax(n,r,s,l){const a=n._committed,c=n._cache;for(const p of s)p.preload=!1,l&&(p._assetEnd=void 0);const h=Oc(s).length,f=new Map;{const p=Date.now();for(const g of[...a,...c.values()]){if(g.status!=="success"||s.some((v,x)=>v.id===g.id&&(x<h||v.status==="success")))continue;const w=Hr(n,g);!w.options.loader||p-g.updatedAt>=(g.preload?w.options.preloadGcTime??n.options.defaultPreloadGcTime??3e5:w.options.gcTime??n.options.defaultGcTime??3e5)||f.set(g.id,c.get(g.id)===g?g:{...g,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],n._cache=f,Mm(n,s),St(n,[...c.values(),...a],[...s,...f.values()]),Jv(n,a,s,r)}async function bl(n,r){let s=n._tx;for(;s&&s!==r;){if(await s[5],n._tx===s)return;s=n._tx}}function Tm(n,r,s){const l=s[1].options,a=s[2];if(!a)return n.navigate({...l,replace:!0,ignoreBlocker:!0});if(l.reloadDocument)return n.navigate({href:a.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});a._redirects=r[1]+1,n._pendingLocation=a;const c=n.commitLocation({...a,viewTransition:l.viewTransition,replace:!0,resetScroll:l.resetScroll,hashScrollIntoView:l.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{n._pendingLocation===a&&(n._pendingLocation=void 0)}),c}async function ux(n,r,s,l,a){const c=s.map(p=>({...p}));Bc(c);for(const p of l)Cn(n,c[p[0]]),c[p[0]]=p[3];const h=[r[2],c];let f;try{f=await Nm(n,h,l,r[0],a)}catch(p){throw St(n,c),p}if(Qi(f)){St(n,c),f[0]===Nt&&n._tx===r&&n._committed===s&&await Tm(n,r,f);return}if(await Rm(n,f,r[0].signal),n._tx!==r||n._committed!==s){St(n,c);return}for(const p of c){const g=n._cache.get(p.id);g!=null&&g._flight&&g._flight===p._flight&&(n._cache.delete(p.id),Cn(n,g))}Mm(n,c),St(n,s,c)}async function cx(n,r,s,l,a,c){const h=await Lm(n,r[2],r[3],[r[0],r[1],n._committed,void 0,a,s,c,l]);if(Qi(h)){const v=h[0]===Nt&&n._tx===r;if((!v||h[1].options.reloadDocument)&&Mi(n,r),St(n,r[3]),r[3]=[],!v)return;if(n._tx!==r){Mi(n,r);return}await Tm(n,r,h);return}const f=h[1];if(n._tx===r&&await Ep(n,r),n._tx!==r){Mi(n,r),St(n,f),$r(n,h);return}const p=r[2],g=Ul(p,n.stores.resolvedLocation.get()),w=h[2];await n.startViewTransition(async()=>{var k;if(n._tx===r&&await Ep(n,r),n._tx!==r){Mi(n,r),St(n,f),$r(n,h);return}const v=()=>{Mi(n,r),ax(n,r,f,c),n._tx===r&&(n.emit({type:"onLoad",...g}),n._tx===r&&n.emit({type:"onBeforeRouteMount",...g}))},x=await n.startTransition(v,f);if(n._tx!==r){$r(n,h);return}w!=null&&w.length&&ux(n,r,f,w,h[3]).catch(console.error),n.batch(()=>{n.stores.resolvedLocation.set(p),n.stores.status.set("idle"),n._tx===r&&n.emit({type:"onResolved",...g}),x&&n._tx===r&&n.emit({type:"onRendered",...g})}),n._tx===r&&((k=n._commitPromise)==null||k.resolve(),n._commitPromise=void 0)})}async function dx(n,r){var M;const s=n._tx,l=n.stores.resolvedLocation.get(),a=l??n.stores.location.get(),c=n.latestLocation,h=n._pendingLocation,f=(h==null?void 0:h.href)===c.href?h._redirects??0:0,p=n._handoff,g=p==null?void 0:p[0](),w=new AbortController,v=n._preflight;if(n._preflight=w,g||p==null||p[1](),v==null||v.abort(),!w.signal.aborted){const A=Ul(c,l);n.emit({type:"onBeforeNavigate",...A}),w.signal.aborted||n.emit({type:"onBeforeLoad",...A})}if(w.signal.aborted){await bl(n,s);return}const x=a.href===c.href;let k=w;const S=n.matchRoutes(c,{_controller:w});Bc(S);const _=g?p[1](S):void 0;if(_?k=g:g==null||g.abort(),w.signal.aborted){St(n,S),await bl(n,s);return}n._preflight=void 0;let b;const L=()=>cx(n,F,x,()=>vc(n,F),r==null?void 0:r.sync,_),R=r!=null&&r.sync?new Promise(A=>b=A):Promise.resolve().then(L).then(),F=[k,f,c,S,Date.now(),R];if(n._tx=F,s){for(const A of n.stores.matches.get()){if(n._tx!==F)break;A.isFetching&&Gi(n,A,!1)}s[0].abort(),St(n,s[3],F[3],!0)}if(n._tx!==F){St(n,F[3]),F[3]=[],b==null||b(),await bl(n,F);return}n.batch(()=>{n.stores.status.set("pending"),n.stores.location.set(c)}),(_||!n._committed.length&&((M=S[0])==null?void 0:M.status)!=="success"&&!S.some(A=>A._notFound))&&vc(n,F),b==null||b(L()),await R,await bl(n,F)}async function fx(n,r){let s=n.buildLocation(r);for(let l=0;;l++){const a=n._committed,c=new AbortController;let h,f,p;try{try{h=n.matchRoutes(s,{_controller:c}),Bc(h),f=(n._preloads??(n._preloads=new Map)).set(c,h),p=await Lm(n,s,h,[c,l,a,!0])}finally{f&&(f=f.delete(c),St(n,h)),c.abort()}if(!Qi(p))return p[1];if(!f||p.length<3)return;s=p[2]}catch(g){Us(g)||console.error(g);return}}}const hx="Error preloading route! ☝️";var Im=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=r=>{var p,g;this.originalIndex=r.originalIndex;const s=this.options,l=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(g=(p=this.options).getParentRoute)==null?void 0:g.call(p),l?this._path=bs:this.parentRoute||Dc();let a=l?bs:s==null?void 0:s.path;a&&a!=="/"&&(a=bm(a));const c=(s==null?void 0:s.id)||a;let h=l?bs:Cl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),h!=="__root__"&&(h=Cl(["/",h]));const f=h==="__root__"?"/":Cl([this.parentRoute.fullPath,a]);this._path=a,this._id=h,this._fullPath=f,this._to=_n(f)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>Cm({from:this.fullPath,...r}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},px=class extends Im{constructor(n){super(n)}},Vc=class extends H.Component{constructor(...n){super(...n),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(n,r){const s=n.getResetKey();return r.error&&r.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var s,l;(l=(s=this.props).onCatch)==null||l.call(s,n,r)}render(){const n=this.state.error;return n?H.createElement(this.props.errorComponent??mx,{error:n,reset:this.reset}):this.props.children}};function mx({error:n}){const[r,s]=H.useState(!1);return m.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[m.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),m.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(l=>!l),children:r?"Hide Error":"Show Error"})]}),m.jsx("div",{style:{height:".25rem"}}),r?m.jsx("div",{children:m.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?m.jsx("code",{children:n.message}):null})}):null]})}function gx({children:n,fallback:r=null}){return m.jsx(Gt.Fragment,{children:Dm()?n:r})}function Dm(){return Gt.useSyncExternalStore(yx,()=>!0,()=>!1)}function yx(){return()=>{}}var Fm=H.createContext(null);function qt(n){return H.useContext(Fm)}var $l=H.createContext(void 0),vx=H.createContext(void 0),Ue=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Ue||{});function xx({update:n,notify:r,unwatched:s}){return{link:l,unlink:a,propagate:c,checkDirty:h,shallowPropagate:f};function l(g,w,v){const x=w.depsTail;if(x!==void 0&&x.dep===g)return;const k=x!==void 0?x.nextDep:w.deps;if(k!==void 0&&k.dep===g){k.version=v,w.depsTail=k;return}const S=g.subsTail;if(S!==void 0&&S.version===v&&S.sub===w)return;const _=w.depsTail=g.subsTail={version:v,dep:g,sub:w,prevDep:x,nextDep:k,prevSub:S,nextSub:void 0};k!==void 0&&(k.prevDep=_),x!==void 0?x.nextDep=_:w.deps=_,S!==void 0?S.nextSub=_:g.subs=_}function a(g,w=g.sub){const v=g.dep,x=g.prevDep,k=g.nextDep,S=g.nextSub,_=g.prevSub;return k!==void 0?k.prevDep=x:w.depsTail=x,x!==void 0?x.nextDep=k:w.deps=k,S!==void 0?S.prevSub=_:v.subsTail=_,_!==void 0?_.nextSub=S:(v.subs=S)===void 0&&s(v),k}function c(g){let w=g.nextSub,v;e:do{const x=g.sub;let k=x.flags;if(k&60?k&12?k&4?!(k&48)&&p(g,x)?(x.flags=k|40,k&=1):k=0:x.flags=k&-9|32:k=0:x.flags=k|32,k&2&&r(x),k&1){const S=x.subs;if(S!==void 0){const _=(g=S).nextSub;_!==void 0&&(v={value:w,prev:v},w=_);continue}}if((g=w)!==void 0){w=g.nextSub;continue}for(;v!==void 0;)if(g=v.value,v=v.prev,g!==void 0){w=g.nextSub;continue e}break}while(!0)}function h(g,w){let v,x=0,k=!1;e:do{const S=g.dep,_=S.flags;if(w.flags&16)k=!0;else if((_&17)===17){if(n(S)){const b=S.subs;b.nextSub!==void 0&&f(b),k=!0}}else if((_&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(v={value:g,prev:v}),g=S.deps,w=S,++x;continue}if(!k){const b=g.nextDep;if(b!==void 0){g=b;continue}}for(;x--;){const b=w.subs,L=b.nextSub!==void 0;if(L?(g=v.value,v=v.prev):g=b,k){if(n(w)){L&&f(b),w=g.sub;continue}k=!1}else w.flags&=-33;w=g.sub;const R=g.nextDep;if(R!==void 0){g=R;continue e}}return k}while(!0)}function f(g){do{const w=g.sub,v=w.flags;(v&48)===32&&(w.flags=v|16,(v&6)===2&&r(w))}while((g=g.nextSub)!==void 0)}function p(g,w){let v=w.depsTail;for(;v!==void 0;){if(v===g)return!0;v=v.prevDep}return!1}}function wx(n,r,s){var c,h,f;const l=typeof n=="object",a=l?n:void 0;return{next:(c=l?n.next:n)==null?void 0:c.bind(a),error:(h=l?n.error:r)==null?void 0:h.bind(a),complete:(f=l?n.complete:s)==null?void 0:f.bind(a)}}const xc=[];let Nl=0;const{link:jp,unlink:kx,propagate:Sx,checkDirty:zm,shallowPropagate:Pp}=xx({update(n){return n._update()},notify(n){xc[wc++]=n,n.flags&=~Ue.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ue.Mutable|Ue.Dirty,zl(n))}});let _l=0,wc=0,rn,kc=0;function bx(n){try{++kc,n()}finally{--kc||Om()}}function zl(n){const r=n.depsTail;let s=r!==void 0?r.nextDep:n.deps;for(;s!==void 0;)s=kx(s,n)}function Om(){if(!(kc>0)){for(;_l<wc;){const n=xc[_l];xc[_l++]=void 0,n.notify()}_l=0,wc=0}}function Np(n,r){const s=typeof n=="function",l=n,a={_snapshot:s?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Ue.None:Ue.Mutable,get(){return rn!==void 0&&jp(a,rn,Nl),a._snapshot},subscribe(c){const h=wx(c),f={current:!1},p=_x(()=>{var g;a.get(),f.current?(g=h.next)==null||g.call(h,a._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const h=rn,f=(r==null?void 0:r.compare)??Object.is;if(s)rn=a,++Nl,a.depsTail=void 0;else if(c===void 0)return!1;s&&(a.flags=Ue.Mutable|Ue.RecursedCheck);try{const p=a._snapshot,g=typeof c=="function"?c(p):c===void 0&&s?l(p):c;return p===void 0||!f(p,g)?(a._snapshot=g,!0):!1}finally{rn=h,s&&(a.flags&=~Ue.RecursedCheck),zl(a)}}};return s?(a.flags=Ue.Mutable|Ue.Dirty,a.get=function(){const c=a.flags;if(c&Ue.Dirty||c&Ue.Pending&&zm(a.deps,a)){if(a._update()){const h=a.subs;h!==void 0&&Pp(h)}}else c&Ue.Pending&&(a.flags=c&~Ue.Pending);return rn!==void 0&&jp(a,rn,Nl),a._snapshot}):a.set=function(c){if(a._update(c)){const h=a.subs;h!==void 0&&(Sx(h),Pp(h),Om())}},a}function _x(n){const r=()=>{const l=rn;rn=s,++Nl,s.depsTail=void 0,s.flags=Ue.Watching|Ue.RecursedCheck;try{return n()}finally{rn=l,s.flags&=~Ue.RecursedCheck,zl(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ue.Watching|Ue.RecursedCheck,notify(){const l=this.flags;l&Ue.Dirty||l&Ue.Pending&&zm(this.deps,this)?r():this.flags=Ue.Watching},stop(){this.flags=Ue.None,this.depsTail=void 0,zl(this)}};return r(),s}var Vu={exports:{}},Hu={},Wu={exports:{}},Qu={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Rp;function Cx(){if(Rp)return Qu;Rp=1;var n=to();function r(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var s=typeof Object.is=="function"?Object.is:r,l=n.useState,a=n.useEffect,c=n.useLayoutEffect,h=n.useDebugValue;function f(v,x){var k=x(),S=l({inst:{value:k,getSnapshot:x}}),_=S[0].inst,b=S[1];return c(function(){_.value=k,_.getSnapshot=x,p(_)&&b({inst:_})},[v,k,x]),a(function(){return p(_)&&b({inst:_}),v(function(){p(_)&&b({inst:_})})},[v]),h(k),k}function p(v){var x=v.getSnapshot;v=v.value;try{var k=x();return!s(v,k)}catch{return!0}}function g(v,x){return x()}var w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return Qu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:w,Qu}var Lp;function Ex(){return Lp||(Lp=1,Wu.exports=Cx()),Wu.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Mp;function jx(){if(Mp)return Hu;Mp=1;var n=to(),r=Ex();function s(g,w){return g===w&&(g!==0||1/g===1/w)||g!==g&&w!==w}var l=typeof Object.is=="function"?Object.is:s,a=r.useSyncExternalStore,c=n.useRef,h=n.useEffect,f=n.useMemo,p=n.useDebugValue;return Hu.useSyncExternalStoreWithSelector=function(g,w,v,x,k){var S=c(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=f(function(){function L(z){if(!R){if(R=!0,F=z,z=x(z),k!==void 0&&_.hasValue){var G=_.value;if(k(G,z))return M=G}return M=z}if(G=M,l(F,z))return G;var V=x(z);return k!==void 0&&k(G,V)?(F=z,G):(F=z,M=V)}var R=!1,F,M,A=v===void 0?null:v;return[function(){return L(w())},A===null?void 0:function(){return L(A())}]},[w,v,x,k]);var b=a(g,S[0],S[1]);return h(function(){_.hasValue=!0,_.value=b},[b]),p(b),b},Hu}var Tp;function Px(){return Tp||(Tp=1,Vu.exports=jx()),Vu.exports}var Nx=Px();function Rx(n,r){return n===r}function jn(n,r,s=Rx){const l=H.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:f}=n.subscribe(h);return f},[n]),a=H.useCallback(()=>n==null?void 0:n.get(),[n]);return Nx.useSyncExternalStoreWithSelector(l,a,a,r,s)}var Ip={};function Am(n,r){const s=H.useRef();return l=>{const a=n!=null&&n.select?n.select(l):l;return(n==null?void 0:n.structuralSharing)??r.options.defaultStructuralSharing?s.current=Mr(s.current,a):a}}function Wr(n){const r=qt(),s=H.useContext(n.from?vx:$l),l=n.from??s,a=r.stores.getMatchStore(l),c=Am(n,r),h=jn(a,f=>f?c(f):Ip);if(h!==Ip)return h;(n.shouldThrow??!0)&&Dc()}function Um(n){return Wr({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.loaderData):r.loaderData})}function Bm(n){const{select:r,...s}=n;return Wr({...s,select:l=>r?r(l.loaderDeps):l.loaderDeps})}function $m(n){return Wr({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:r=>{const s=n.strict===!1?r.params:r._strictParams;return n.select?n.select(s):s}})}function Vm(n){return Wr({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.search):r.search})}function ro(n){const r=qt();return H.useCallback(s=>r.navigate({...s,from:s.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,r])}function Hm(n){return Wr({...n,select:r=>n.select?n.select(r.context):r.context})}function Ku(n){const r=H.useRef(n);return ar(r.current,n,{ignoreUndefined:!1})||(r.current=n),r.current}function Lx(n,r){return n[0]===r[0]&&n[1]===r[1]&&n[2]===r[2]}function Mx(n,r,s){if(n!=null&&n.external)return Ml(n.href,s)?void 0:n.href;if(!Ax(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),Ml(r,s)?void 0:r}catch{}}function Tx(n,r,s,l,a,c){if(c)return!1;if(s!=null&&s.exact){if(!Rv(n.pathname,r.pathname,l))return!1}else{const h=Il(n.pathname,l),f=Il(r.pathname,l);if(!(h.startsWith(f)&&(h.length===f.length||h[f.length]==="/")))return!1}return((s==null?void 0:s.includeSearch)??!0)&&!ar(n.search,r.search,{partial:!(s!=null&&s.exact),ignoreUndefined:!(s!=null&&s.explicitUndefined)})?!1:s!=null&&s.includeHash?a&&n.hash===r.hash:!0}function Ix(n,r){const s=qt(),l=fv(r),{activeProps:a,inactiveProps:c,activeOptions:h,to:f,preload:p,preloadDelay:g,preloadIntentProximity:w,hashScrollIntoView:v,replace:x,startTransition:k,resetScroll:S,viewTransition:_,children:b,target:L,disabled:R,style:F,className:M,onClick:A,onBlur:z,onFocus:G,onMouseEnter:V,onMouseLeave:O,onTouchStart:Q,ignoreBlocker:X,params:Y,search:de,hash:W,state:te,mask:ke,reloadDocument:he,unsafeRelative:Z,from:J,_fromLocation:ee,...P}=n,U=Dm(),pe=Ku(n.search),ge=Ku(n.params),Se=Ku(h),ye=H.useMemo(()=>n,[s,n.from,n._fromLocation,n.hash,n.to,pe,ge,n.state,n.mask,n.unsafeRelative]),Re=H.useCallback(Ke=>{const Mt=s.buildLocation({_fromLocation:Ke,...ye}),Yt=Ox(Mt.maskedLocation?Mt.maskedLocation.publicHref:Mt.publicHref,Mt.maskedLocation?Mt.maskedLocation.external:Mt.external,s.history,R),Ws=Mx(Yt,f,s.protocolAllowlist);return[Yt==null?void 0:Yt.href,Ws,Tx(Ke,Mt,Se,s.basepath,U,Ws!==void 0)]},[Se,R,U,ye,s,f]),[Ee,Le,tt]=jn(s.stores.location,Re,Lx),cn=tt?As(a,{})??Dx:Gu,fr=tt?Gu:As(c,{})??Gu,hr=[M,cn.className,fr.className].filter(Boolean).join(" "),Qr=(F||cn.style||fr.style)&&{...F,...cn.style,...fr.style},Hs=H.useRef(!1),Zt=n.reloadDocument||Le||R?!1:p??s.options.defaultPreload,pr=g??s.options.defaultPreloadDelay??0,dn=H.useCallback(()=>{s.preloadRoute(ye).catch(Ke=>{console.warn(Ke),console.warn(hx)})},[s,ye]),mr=H.useCallback(Ke=>{if(!Ke){qu(l);return}if(!(Ke.isIntersecting??Zt==="intent")){Ke.isIntersecting===!1&&qu(l);return}if(!pr){dn();return}Ai.has(l)||Ai.set(l,setTimeout(()=>{Ai.delete(l),dn()},pr))},[dn,l,Zt,pr]);dv(l,mr,Zt!=="viewport"),H.useEffect(()=>{Hs.current||Zt==="render"&&(dn(),Hs.current=!0)},[dn,Zt]);const gr=Ke=>{const Mt=Ke.currentTarget.getAttribute("target"),Yt=L!==void 0?L:Mt;!R&&!(Ke.metaKey||Ke.altKey||Ke.ctrlKey||Ke.shiftKey)&&!Ke.defaultPrevented&&(!Yt||Yt==="_self")&&Ke.button===0&&(Ke.preventDefault(),s.navigate({...ye,replace:x,resetScroll:S,hashScrollIntoView:v,startTransition:k,viewTransition:_,ignoreBlocker:X}))};if(Le)return{...P,ref:l,href:Le,...b&&{children:b},...L&&{target:L},...R&&{disabled:R},...F&&{style:F},...M&&{className:M},...A&&{onClick:A},...z&&{onBlur:z},...G&&{onFocus:G},...V&&{onMouseEnter:V},...O&&{onMouseLeave:O},...Q&&{onTouchStart:Q}};const Pn=()=>{Zt==="intent"&&dn()},Kr=()=>{Zt==="intent"&&qu(l)};return{...P,...cn,...fr,href:Ee,ref:l,onClick:vs([A,gr]),onBlur:vs([z,Kr]),onFocus:vs([G,mr]),onMouseEnter:vs([V,mr]),onMouseLeave:vs([O,Kr]),onTouchStart:vs([Q,Pn]),disabled:!!R,target:L,...Qr&&{style:Qr},...hr&&{className:hr},...R&&Fx,...tt&&zx}}var Gu={},Dx={className:"active"},Fx={role:"link","aria-disabled":!0},zx={"data-status":"active","aria-current":"page"},Ai=new WeakMap,qu=n=>{clearTimeout(Ai.get(n)),Ai.delete(n)},vs=n=>r=>{for(const s of n)if(s){if(r.defaultPrevented)return;s(r)}};function Ox(n,r,s,l){if(!l)return r?{href:n,external:!0}:{href:s.createHref(n)||"/",external:!1}}function Ax(n){if(typeof n!="string")return!1;const r=n.charCodeAt(0);return r===47?n.charCodeAt(1)!==47:r===46}var Vl=H.forwardRef((n,r)=>{const{_asChild:s,...l}=n,{type:a,...c}=Ix(l,r),h=typeof l.children=="function"?l.children({isActive:c["data-status"]==="active"}):l.children;if(!s){const{disabled:f,...p}=c;return H.createElement("a",p,h)}return H.createElement(s,c,h)}),Ux=class extends Im{constructor(n){super(n),this.useMatch=r=>Wr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Hm({...r,from:this.id}),this.useSearch=r=>Vm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>$m({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Bm({...r,from:this.id}),this.useLoaderData=r=>Um({...r,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>m.jsx(Vl,{ref:s,from:this.fullPath,...r}))}};function so(n){return new Ux(n)}var Bx=class extends px{constructor(n){super(n),this.useMatch=r=>Wr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Hm({...r,from:this.id}),this.useSearch=r=>Vm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>$m({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Bm({...r,from:this.id}),this.useLoaderData=r=>Um({...r,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>m.jsx(Vl,{ref:s,from:this.fullPath,...r}))}};function $x(n){return new Bx(n)}function Vx(n){const r=qt(),s=`not-found-${jn(r.stores.location,l=>l.pathname)}-${jn(r.stores.status,l=>l)}`;return m.jsx(Vc,{getResetKey:()=>s,onCatch:(l,a)=>{var c;if(Us(l))(c=n.onCatch)==null||c.call(n,l,a);else throw l},errorComponent:({error:l})=>{var a;if(Us(l))return(a=n.fallback)==null?void 0:a.call(n,l);throw l},children:n.children})}function Hx(){return m.jsx("p",{children:"Not Found"})}function ws(n){return m.jsx(m.Fragment,{children:n.children})}function Wm(n,r,s){return r.options.notFoundComponent?m.jsx(r.options.notFoundComponent,{...s}):n.options.defaultNotFoundComponent?m.jsx(n.options.defaultNotFoundComponent,{...s}):m.jsx(Hx,{})}function Hl(n,r){const s=(r==null?void 0:r.options.pendingComponent)??n.options.defaultPendingComponent;return s?m.jsx(s,{}):null}var Wx=(n,r)=>n[0]===r[0]&&n[1]===r[1],Qm=(n,r,s)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||s===!1||s==="data-only"||!n.ssr,Km=H.memo(function({routeId:r}){const s=qt();return m.jsx(Qx,{router:s,match:jn(s.stores.getMatchStore(r),l=>l)})});function Qx({router:n,match:r}){var v,x;const s=n.routesById[r.routeId],l=Hl(n,s),a=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??((v=n.options.notFoundRoute)==null?void 0:v.options.component):s.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",p=Qm(n,s,r.ssr)&&(s.options.wrapInSuspense??l??(((x=s.options.errorComponent)==null?void 0:x.preload)||f))?H.Suspense:ws,g=a?Vc:ws,w=h?Vx:ws;return m.jsxs(s.isRoot?s.options.shellComponent??ws:ws,{children:[m.jsx($l.Provider,{value:r.routeId,children:m.jsx(p,{fallback:l,children:m.jsx(g,{getResetKey:()=>r,errorComponent:a,onCatch:(k,S)=>{if(Us(k))throw k.routeId??(k.routeId=r.routeId),k;c==null||c(k,S)},children:m.jsx(w,{fallback:k=>{if(k.routeId??(k.routeId=r.routeId),k.routeId!==r.routeId)throw k;return H.createElement(h,k)},children:f?m.jsx(gx,{fallback:l,children:m.jsx(Dp,{match:r})}):m.jsx(Dp,{match:r})})})})}),null]})}var Dp=H.memo(function({match:r}){const s=qt(),l=r.routeId,a=s.routesById[l],c=H.useMemo(()=>{var p;const f=(p=a.options.remountDeps??s.options.defaultRemountDeps)==null?void 0:p({routeId:l,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return f?JSON.stringify(f):void 0},[l,r.loaderDeps,r._strictParams,r._strictSearch,a.options.remountDeps,s.options.defaultRemountDeps]),h=H.useMemo(()=>{const f=a.options.component??s.options.defaultComponent;return f?m.jsx(f,{},c):m.jsx(Gm,{})},[c,a.options.component,s.options.defaultComponent]);if(r.status==="pending"){if(s.ssr&&!Qm(s,a,r.ssr))return h;if(s._tx)throw s._tx[5];return Hl(s,a)}if(r.status==="notFound")return Wm(s,a,r.error);if(r.status==="error")throw r.error;return h}),Gm=H.memo(function(){const r=qt(),s=H.useContext($l);let l,a,c;{const f=r.stores.getMatchStore(s);[l,a]=jn(f,p=>[!!p._notFound,p.error],Wx),c=jn(r.stores.ids,p=>p[p.indexOf(s)+1])}if(l)return Wm(r,r.routesById[s],a);if(!c)return null;const h=m.jsx(Km,{routeId:c});return s===bs?m.jsx(H.Suspense,{fallback:Hl(r),children:h}):h});function qm(n,r){const s=n[1];n.length=0,s==null||s(r)}function Kx({t:n}){const r=qt(),s=r._rendered??(r._rendered=[]);return r.startTransition=(l,a)=>new Promise(c=>{qm(s,!1),s.push(a,c),n(r),H.startTransition(l)}),mm(()=>{const l=r.history.subscribe(r.load);r.updateLatestLocation();const a=r.latestLocation,c=r.buildLocation({to:a.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(_n(a.publicHref)!==_n(c.publicHref))return r.commitLocation({...c,replace:!0,ignoreBlocker:!0}),l;const h=r.stores.resolvedLocation.get();return(h==null?void 0:h.href)===a.href&&h.state.__TSR_key===a.state.__TSR_key?s.push(r.stores.matches.get(),f=>{f&&r.emit({type:"onRendered",...Ul(h,h)})}):r._tx||r.load({sync:!0}).catch(console.error),l},[r,r.history]),null}function Gx(){const n=qt(),r=n.routesById[bs],s=Hl(n,r),l=n.ssr?ws:H.Suspense,a=m.jsxs(m.Fragment,{children:[m.jsx(Kx,{t:H.useState()[1]}),m.jsx(l,{fallback:s,children:m.jsx(qx,{})})]});return n.options.InnerWrap?m.jsx(n.options.InnerWrap,{children:a}):a}function qx(){const n=qt(),r=n._rendered,s=jn(n.stores.matches,h=>r[0]??h),l=s[0],a=l==null?void 0:l.routeId;mm(()=>{r[0]===s&&qm(r,!0)},[r,s]);const c=a?m.jsx(Km,{routeId:a}):null;return m.jsx($l.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?c:m.jsx(Vc,{getResetKey:()=>l,onCatch:void 0,children:c})})}var Zx=n=>({createMutableStore:Np,createReadonlyStore:Np,batch:bx}),Yx=n=>new Xx(n),Xx=class extends ex{constructor(n){super(n,Zx)}};function Jx({router:n,children:r,...s}){ym(s)&&n.update({...n.options,...s,context:{...n.options.context,...s.context}});const l=m.jsx(Fm.Provider,{value:n,children:r});return n.options.Wrap?m.jsx(n.options.Wrap,{children:l}):l}function e1({router:n,...r}){return m.jsx(Jx,{router:n,...r,children:m.jsx(Gx,{})})}function Fp(n){const r=qt({warn:(n==null?void 0:n.router)===void 0}),s=(n==null?void 0:n.router)||r;return jn(s.stores.__store,Am(n,s))}const t1="modulepreload",n1=function(n){return"/"+n},zp={},Lt=function(r,s,l){let a=Promise.resolve();if(s&&s.length>0){let h=function(g){return Promise.all(g.map(w=>Promise.resolve(w).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=h(s.map(g=>{if(g=n1(g),g in zp)return;zp[g]=!0;const w=g.endsWith(".css"),v=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const x=document.createElement("link");if(x.rel=w?"stylesheet":t1,w||(x.as="script"),x.crossOrigin="",x.href=g,p&&x.setAttribute("nonce",p),document.head.appendChild(x),w)return new Promise((k,S)=>{x.addEventListener("load",k),x.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(h){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=h,window.dispatchEvent(f),!f.defaultPrevented)throw h}return a.then(h=>{for(const f of h||[])f.status==="rejected"&&c(f.reason);return r().catch(c)})};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const r1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zm=(...n)=>n.filter((r,s,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===s).join(" ").trim();/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var s1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i1=H.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:h,...f},p)=>H.createElement("svg",{ref:p,...s1,width:r,height:r,stroke:n,strokeWidth:l?Number(s)*24/Number(r):s,className:Zm("lucide",a),...f},[...h.map(([g,w])=>H.createElement(g,w)),...Array.isArray(c)?c:[c]]));/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const we=(n,r)=>{const s=H.forwardRef(({className:l,...a},c)=>H.createElement(i1,{ref:c,iconNode:r,className:Zm(`lucide-${r1(n)}`,l),...a}));return s.displayName=`${n}`,s};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o1=we("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const l1=we("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sc=we("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ym=we("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const a1=we("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u1=we("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c1=we("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ui=we("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d1=we("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xm=we("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f1=we("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const h1=we("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p1=we("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const m1=we("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g1=we("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y1=we("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const v1=we("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const x1=we("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hc=we("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w1=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k1=we("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S1=we("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const b1=we("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wc=we("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _1=we("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C1=we("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qc=we("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E1=we("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jm=we("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kc=we("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j1=we("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P1=we("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N1=we("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ol=we("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R1=we("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gc=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qi=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:k1,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:b1,group:"Operativ"},{id:"auftraege",pfad:"/auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Hc,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:Sc,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:x1,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:S1,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Qc,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:N1,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:Xm,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:Ym,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Sc,group:"Wartung"}];function eg(n){return[...qi].sort((r,s)=>s.pfad.length-r.pfad.length).find(r=>n===r.pfad||n.startsWith(r.pfad+"/"))}const Op=n=>{let r;const s=new Set,l=(g,w)=>{const v=typeof g=="function"?g(r):g;if(!Object.is(v,r)){const x=r;r=w??(typeof v!="object"||v===null)?v:Object.assign({},r,v),s.forEach(k=>k(r,x))}},a=()=>r,f={setState:l,getState:a,getInitialState:()=>p,subscribe:g=>(s.add(g),()=>s.delete(g))},p=r=n(l,a,f);return f},L1=(n=>n?Op(n):Op),M1=n=>n;function T1(n,r=M1){const s=Gt.useSyncExternalStore(n.subscribe,Gt.useCallback(()=>r(n.getState()),[n,r]),Gt.useCallback(()=>r(n.getInitialState()),[n,r]));return Gt.useDebugValue(s),s}const I1=n=>{const r=L1(n),s=l=>T1(r,l);return Object.assign(s,r),s},D1=(n=>I1);function F1(n,r){let s;try{s=n()}catch{return}return{getItem:a=>{var c;const h=p=>p===null?null:JSON.parse(p,void 0),f=(c=s.getItem(a))!=null?c:null;return f instanceof Promise?f.then(h):h(f)},setItem:(a,c)=>s.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>s.removeItem(a)}}const bc=n=>r=>{try{const s=n(r);return s instanceof Promise?s:{then(l){return bc(l)(s)},catch(l){return this}}}catch(s){return{then(l){return this},catch(l){return bc(l)(s)}}}},z1=(n,r)=>(s,l,a)=>{let c={storage:F1(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,L)=>({...L,...b}),...r},h=!1,f=0;const p=new Set,g=new Set;let w=c.storage;if(!w)return n((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),s(...b)},l,a);const v=()=>{const b=c.partialize({...l()});return w.setItem(c.name,{state:b,version:c.version})},x=a.setState;a.setState=(b,L)=>(x(b,L),v());const k=n((...b)=>(s(...b),v()),l,a);a.getInitialState=()=>k;let S;const _=()=>{var b,L;if(!w)return;const R=++f;h=!1,p.forEach(M=>{var A;return M((A=l())!=null?A:k)});const F=((L=c.onRehydrateStorage)==null?void 0:L.call(c,(b=l())!=null?b:k))||void 0;return bc(w.getItem.bind(w))(c.name).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==c.version){if(c.migrate){const A=c.migrate(M.state,M.version);return A instanceof Promise?A.then(z=>[!0,z]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,M.state];return[!1,void 0]}).then(M=>{var A;if(R!==f)return;const[z,G]=M;if(S=c.merge(G,(A=l())!=null?A:k),s(S,!0),z)return v()}).then(()=>{R===f&&(F==null||F(l(),void 0),S=l(),h=!0,g.forEach(M=>M(S)))}).catch(M=>{R===f&&(F==null||F(void 0,M))})};return a.persist={setOptions:b=>{c={...c,...b},b.storage&&(w=b.storage)},clearStorage:()=>{++f,w==null||w.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>_(),hasHydrated:()=>h,onHydrate:b=>(p.add(b),()=>{p.delete(b)}),onFinishHydration:b=>(g.add(b),()=>{g.delete(b)})},c.skipHydration||_(),S||k},O1=z1;let A1=0;const Rt=D1()(O1(n=>({ui:{schieneEingeklappt:!1,paletteOffen:!1,expertenmodus:!1},strom:{lage:"getrennt",letztesEreignis:null},meldungen:[],schieneUmschalten:()=>n(r=>({ui:{...r.ui,schieneEingeklappt:!r.ui.schieneEingeklappt}})),palette:r=>n(s=>({ui:{...s.ui,paletteOffen:r}})),expertenmodus:r=>n(s=>({ui:{...s.ui,expertenmodus:r}})),stromLage:r=>n(s=>({strom:{...s.strom,lage:r}})),stromEreignis:()=>n(r=>({strom:{...r.strom,letztesEreignis:Date.now()}})),melden:(r,s)=>n(l=>({meldungen:[...l.meldungen,{id:`m${++A1}`,art:r,text:s,seit:Date.now()}].slice(-6)})),meldungWeg:r=>n(s=>({meldungen:s.meldungen.filter(l=>l.id!==r)}))}),{name:"mc_ui",partialize:n=>({ui:{schieneEingeklappt:n.ui.schieneEingeklappt,expertenmodus:n.ui.expertenmodus}}),merge:(n,r)=>{const s=n;return{...r,ui:{...r.ui,...(s==null?void 0:s.ui)??{}}}}})),U1=()=>Rt(n=>n.ui.expertenmodus),B1=()=>Rt(n=>n.ui.schieneEingeklappt),$1=()=>Rt(n=>n.ui.paletteOffen),V1=()=>Rt(n=>n.strom.lage),H1=()=>Rt(n=>n.meldungen),Ap=(n,r)=>Rt.getState().melden(n,r),Zu=n=>Rt.getState().stromLage(n),W1=()=>Rt.getState().stromEreignis();function tg(n){var r,s,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(r=0;r<a;r++)n[r]&&(s=tg(n[r]))&&(l&&(l+=" "),l+=s)}else for(s in n)n[s]&&(l&&(l+=" "),l+=s);return l}function Q1(){for(var n,r,s=0,l="",a=arguments.length;s<a;s++)(n=arguments[s])&&(r=tg(n))&&(l&&(l+=" "),l+=r);return l}const qc="-",K1=n=>{const r=q1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:h=>{const f=h.split(qc);return f[0]===""&&f.length!==1&&f.shift(),ng(f,r)||G1(h)},getConflictingClassGroupIds:(h,f)=>{const p=s[h]||[];return f&&l[h]?[...p,...l[h]]:p}}},ng=(n,r)=>{var h;if(n.length===0)return r.classGroupId;const s=n[0],l=r.nextPart.get(s),a=l?ng(n.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const c=n.join(qc);return(h=r.validators.find(({validator:f})=>f(c)))==null?void 0:h.classGroupId},Up=/^\[(.+)\]$/,G1=n=>{if(Up.test(n)){const r=Up.exec(n)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},q1=n=>{const{theme:r,prefix:s}=n,l={nextPart:new Map,validators:[]};return Y1(Object.entries(n.classGroups),s).forEach(([c,h])=>{_c(h,l,c,r)}),l},_c=(n,r,s,l)=>{n.forEach(a=>{if(typeof a=="string"){const c=a===""?r:Bp(r,a);c.classGroupId=s;return}if(typeof a=="function"){if(Z1(a)){_c(a(l),r,s,l);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([c,h])=>{_c(h,Bp(r,c),s,l)})})},Bp=(n,r)=>{let s=n;return r.split(qc).forEach(l=>{s.nextPart.has(l)||s.nextPart.set(l,{nextPart:new Map,validators:[]}),s=s.nextPart.get(l)}),s},Z1=n=>n.isThemeGetter,Y1=(n,r)=>r?n.map(([s,l])=>{const a=l.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([h,f])=>[r+h,f])):c);return[s,a]}):n,X1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,l=new Map;const a=(c,h)=>{s.set(c,h),r++,r>n&&(r=0,l=s,s=new Map)};return{get(c){let h=s.get(c);if(h!==void 0)return h;if((h=l.get(c))!==void 0)return a(c,h),h},set(c,h){s.has(c)?s.set(c,h):a(c,h)}}},rg="!",J1=n=>{const{separator:r,experimentalParseClassName:s}=n,l=r.length===1,a=r[0],c=r.length,h=f=>{const p=[];let g=0,w=0,v;for(let b=0;b<f.length;b++){let L=f[b];if(g===0){if(L===a&&(l||f.slice(b,b+c)===r)){p.push(f.slice(w,b)),w=b+c;continue}if(L==="/"){v=b;continue}}L==="["?g++:L==="]"&&g--}const x=p.length===0?f:f.substring(w),k=x.startsWith(rg),S=k?x.substring(1):x,_=v&&v>w?v-w:void 0;return{modifiers:p,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:_}};return s?f=>s({className:f,parseClassName:h}):h},ew=n=>{if(n.length<=1)return n;const r=[];let s=[];return n.forEach(l=>{l[0]==="["?(r.push(...s.sort(),l),s=[]):s.push(l)}),r.push(...s.sort()),r},tw=n=>({cache:X1(n.cacheSize),parseClassName:J1(n),...K1(n)}),nw=/\s+/,rw=(n,r)=>{const{parseClassName:s,getClassGroupId:l,getConflictingClassGroupIds:a}=r,c=[],h=n.trim().split(nw);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{modifiers:w,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:k}=s(g);let S=!!k,_=l(S?x.substring(0,k):x);if(!_){if(!S){f=g+(f.length>0?" "+f:f);continue}if(_=l(x),!_){f=g+(f.length>0?" "+f:f);continue}S=!1}const b=ew(w).join(":"),L=v?b+rg:b,R=L+_;if(c.includes(R))continue;c.push(R);const F=a(_,S);for(let M=0;M<F.length;++M){const A=F[M];c.push(L+A)}f=g+(f.length>0?" "+f:f)}return f};function sw(){let n=0,r,s,l="";for(;n<arguments.length;)(r=arguments[n++])&&(s=sg(r))&&(l&&(l+=" "),l+=s);return l}const sg=n=>{if(typeof n=="string")return n;let r,s="";for(let l=0;l<n.length;l++)n[l]&&(r=sg(n[l]))&&(s&&(s+=" "),s+=r);return s};function iw(n,...r){let s,l,a,c=h;function h(p){const g=r.reduce((w,v)=>v(w),n());return s=tw(g),l=s.cache.get,a=s.cache.set,c=f,f(p)}function f(p){const g=l(p);if(g)return g;const w=rw(p,s);return a(p,w),w}return function(){return c(sw.apply(null,arguments))}}const ze=n=>{const r=s=>s[n]||[];return r.isThemeGetter=!0,r},ig=/^\[(?:([a-z-]+):)?(.+)\]$/i,ow=/^\d+\/\d+$/,lw=new Set(["px","full","screen"]),aw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wn=n=>Cs(n)||lw.has(n)||ow.test(n),Gn=n=>$s(n,"length",ww),Cs=n=>!!n&&!Number.isNaN(Number(n)),Yu=n=>$s(n,"number",Cs),Ti=n=>!!n&&Number.isInteger(Number(n)),hw=n=>n.endsWith("%")&&Cs(n.slice(0,-1)),me=n=>ig.test(n),qn=n=>aw.test(n),pw=new Set(["length","size","percentage"]),mw=n=>$s(n,pw,og),gw=n=>$s(n,"position",og),yw=new Set(["image","url"]),vw=n=>$s(n,yw,Sw),xw=n=>$s(n,"",kw),Ii=()=>!0,$s=(n,r,s)=>{const l=ig.exec(n);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):s(l[2]):!1},ww=n=>uw.test(n)&&!cw.test(n),og=()=>!1,kw=n=>dw.test(n),Sw=n=>fw.test(n),bw=()=>{const n=ze("colors"),r=ze("spacing"),s=ze("blur"),l=ze("brightness"),a=ze("borderColor"),c=ze("borderRadius"),h=ze("borderSpacing"),f=ze("borderWidth"),p=ze("contrast"),g=ze("grayscale"),w=ze("hueRotate"),v=ze("invert"),x=ze("gap"),k=ze("gradientColorStops"),S=ze("gradientColorStopPositions"),_=ze("inset"),b=ze("margin"),L=ze("opacity"),R=ze("padding"),F=ze("saturate"),M=ze("scale"),A=ze("sepia"),z=ze("skew"),G=ze("space"),V=ze("translate"),O=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",me,r],Y=()=>[me,r],de=()=>["",wn,Gn],W=()=>["auto",Cs,me],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",me],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Cs,me];return{cacheSize:500,separator:":",theme:{colors:[Ii],spacing:[wn,Gn],blur:["none","",qn,me],brightness:P(),borderColor:[n],borderRadius:["none","","full",qn,me],borderSpacing:Y(),borderWidth:de(),contrast:P(),grayscale:J(),hueRotate:P(),invert:J(),gap:Y(),gradientColorStops:[n],gradientColorStopPositions:[hw,Gn],inset:X(),margin:X(),opacity:P(),padding:Y(),saturate:P(),scale:P(),sepia:J(),skew:P(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[qn]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),me]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ti,me]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Ti,me]}],"grid-cols":[{"grid-cols":[Ii]}],"col-start-end":[{col:["auto",{span:["full",Ti,me]},me]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Ii]}],"row-start-end":[{row:["auto",{span:[Ti,me]},me]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,r]}],"min-w":[{"min-w":[me,r,"min","max","fit"]}],"max-w":[{"max-w":[me,r,"none","full","min","max","fit","prose",{screen:[qn]},qn]}],h:[{h:[me,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,r,"auto","min","max","fit"]}],"font-size":[{text:["base",qn,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yu]}],"font-family":[{font:[Ii]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",Cs,Yu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wn,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[L]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wn,Gn]}],"underline-offset":[{"underline-offset":["auto",wn,me]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[L]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),gw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vw]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[L]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[L]}],"divide-style":[{divide:ke()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[wn,me]}],"outline-w":[{outline:[wn,Gn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[L]}],"ring-offset-w":[{"ring-offset":[wn,Gn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",qn,xw]}],"shadow-color":[{shadow:[Ii]}],opacity:[{opacity:[L]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[l]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",qn,me]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[v]}],saturate:[{saturate:[F]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[L]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Ti,me]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[wn,Gn,Yu]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_w=iw(bw);function Me(...n){return _w(Q1(n))}function Gk(n){return n?n.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function Cw(){const n=U1(),r=Rt(s=>s.expertenmodus);return m.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[m.jsxs("button",{onClick:()=>r(!1),"aria-pressed":!n,className:Me("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[m.jsx(P1,{className:"h-3.5 w-3.5"})," Einfach"]}),m.jsxs("button",{onClick:()=>r(!0),"aria-pressed":n,className:Me("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[m.jsx(j1,{className:"h-3.5 w-3.5"})," Experte"]})]})}let zi=!1;const Ew=()=>zi;function jw(){const n=Ic();H.useEffect(()=>{const r=new EventSource("/api/events");let s=!1;return r.onopen=()=>{zi=!0,Zu("live"),s&&Ap("erfolg","Verbindung zur Zentrale ist wieder da."),s=!0,n.invalidateQueries()},r.onerror=()=>{zi&&(zi=!1,Zu("nachlauf"),Ap("warnung","Verbindung zur Zentrale verloren — die Anzeigen laufen im Nachlauf."),n.invalidateQueries())},r.addEventListener("invalidate",l=>{var a;try{const c=((a=JSON.parse(l.data))==null?void 0:a.keys)??[];for(const h of c)n.invalidateQueries({queryKey:[h]});W1()}catch{}}),()=>{zi=!1,Zu("getrennt"),r.close()}},[n])}class Pw extends Error{constructor(s,l,a){super(a||`${s} ${l}`);gl(this,"status");gl(this,"detail");this.name="ApiError",this.status=s,this.detail=a}}async function Nw(n){try{const r=await n.text();if(!r)return null;try{const s=JSON.parse(r),l=(s==null?void 0:s.detail)??(s==null?void 0:s.err)??(s==null?void 0:s.message);return typeof l=="string"&&l.trim()?l.trim():Array.isArray(l)&&l.length&&l.map(a=>a==null?void 0:a.msg).filter(Boolean).join("; ")||null}catch{return r.slice(0,200).split(`
`)[0].trim()||null}}catch{return null}}async function Ne(n,r){const s=await fetch(n,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!s.ok)throw new Pw(s.status,s.statusText,await Nw(s));return s.json()}const qk=(n,r,s=!1,l=!0)=>Ne("/api/groups",{method:"PUT",body:JSON.stringify({group:n,members:r,swap:s,persist:l})}),Zk=n=>Ne("/api/routing/policy",{method:"PUT",body:JSON.stringify(n)}),Ie={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:n=>["drafts",n??""],connect:n=>["connect",n??""],connectHealth:["connect-health"],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},ht={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Wl=n=>()=>Ew()?n*5:n,Rw=(n=ht.schnell)=>Oe({queryKey:Ie.auftragsbuch,queryFn:()=>Ne("/api/auftragsbuch"),refetchInterval:Wl(n)}),Lw=(n=ht.gemuetlich)=>Oe({queryKey:Ie.ideen,queryFn:()=>Ne("/api/ideen"),refetchInterval:Wl(n)}),Yk=(n,r=!1)=>Oe({queryKey:["ideen-log",n],queryFn:()=>Ne(`/api/ideen/${n}/log`),enabled:r,refetchInterval:4e3,staleTime:0}),Xk=(n=150,r=ht.gemuetlich)=>Oe({queryKey:[...Ie.chronik,n],queryFn:()=>Ne(`/api/chronik?limit=${n}`),refetchInterval:Wl(r),select:s=>s.items??[]}),Jk=()=>Oe({queryKey:Ie.wissen,queryFn:()=>Ne("/api/wissen")}),eS=(n=ht.traege,r=!0)=>Oe({queryKey:Ie.zeitmaschine,queryFn:()=>Ne("/api/zeitmaschine"),refetchInterval:n,enabled:r}),Mw=(n=12,r=ht.schnell)=>Oe({queryKey:Ie.voiceTrace,queryFn:()=>Ne(`/api/voice/trace?limit=${n}`),refetchInterval:r,select:s=>s.turns??[]}),tS=(n=!0)=>Oe({queryKey:Ie.memoryGraph,queryFn:()=>Ne("/api/wissen/graph"),enabled:n,staleTime:60*1e3}),Zc=()=>Oe({queryKey:Ie.health,queryFn:()=>Ne("/api/health"),refetchInterval:ht.normal}),io=(n=ht.graph)=>Oe({queryKey:Ie.systemStatus,queryFn:()=>Ne("/api/system/status"),refetchInterval:n}),lg=(n,r=!0)=>Oe({queryKey:["metrics-history",n],queryFn:()=>Ne(`/api/system/history?minutes=${n}`),enabled:r,refetchInterval:6e4}),ag=(n=ht.normal)=>Oe({queryKey:Ie.services,queryFn:()=>Ne("/api/system/services"),refetchInterval:n}),ug=(n=ht.schnell)=>Oe({queryKey:Ie.models,queryFn:()=>Ne("/api/models"),refetchInterval:Wl(n)}),nS=(n=ht.normal)=>Oe({queryKey:Ie.groups,queryFn:()=>Ne("/api/groups"),refetchInterval:n}),Tw=(n=ht.normal)=>Oe({queryKey:Ie.routing,queryFn:()=>Ne("/api/routing"),refetchInterval:n}),rS=()=>Oe({queryKey:Ie.routingPolicy,queryFn:()=>Ne("/api/routing/policy")}),sS=(n=3e3,r=!0)=>Oe({queryKey:Ie.jobs,queryFn:()=>Ne("/api/jobs"),refetchInterval:n,enabled:r,select:s=>s.jobs??[]}),Yc=(n=ht.graph)=>Oe({queryKey:Ie.tokenStats,queryFn:()=>Ne("/api/system/token-stats"),refetchInterval:n}),Iw=(n=ht.normal)=>Oe({queryKey:Ie.agentStatus,queryFn:()=>Ne("/api/agent/status"),refetchInterval:n}),iS=(n=ht.traege)=>Oe({queryKey:Ie.hermesBrain,queryFn:()=>Ne("/api/agent/brain"),refetchInterval:n}),Dw=(n=ht.traege)=>Oe({queryKey:Ie.updates,queryFn:()=>Ne("/api/maintenance/updates"),refetchInterval:n}),oS=()=>Oe({queryKey:Ie.discover,queryFn:()=>Ne("/api/discover")}),lS=n=>Oe({queryKey:Ie.drafts(n),queryFn:()=>Ne(`/api/models/drafts?target=${encodeURIComponent(n??"")}`),enabled:!!n}),aS=n=>Oe({queryKey:Ie.connect(n),queryFn:()=>Ne(n?`/api/connect?${n}`:"/api/connect")}),Fw=()=>Oe({queryKey:Ie.connectHealth,queryFn:()=>Ne("/api/connect/health"),refetchInterval:15e3});function uS(n,...r){for(const s of r)n.invalidateQueries({queryKey:s})}let Cc=[],Ec=[];const jc=new Set,cg=()=>jc.forEach(n=>n());function dg(n){return jc.add(n),()=>{jc.delete(n)}}function zw(n){Cc=[...Cc,n].slice(-40),cg()}function Ow(n){Ec=[...Ec,n].slice(-40),cg()}const fg=()=>H.useSyncExternalStore(dg,()=>Cc),hg=()=>H.useSyncExternalStore(dg,()=>Ec);function Aw(){const{data:n,dataUpdatedAt:r}=io(),{data:s,dataUpdatedAt:l}=Yc(),a=H.useRef(null);H.useEffect(()=>{var c,h,f,p;n&&zw({t:Date.now(),cpu:((c=n.cpu)==null?void 0:c.percent)??0,ram:((h=n.ram)==null?void 0:h.percent)??0,gpu:((f=n.gpu)==null?void 0:f.busy_percent)??null,disk:((p=n.disk)==null?void 0:p.percent)??null})},[r]),H.useEffect(()=>{if(!s)return;const c=Date.now(),h=s.prompt_tokens,f=s.completion_tokens;if(a.current){const p=Math.max((c-a.current.t)/1e3,.001);Ow({t:c,prompt:Math.max(0,(h-a.current.p)/p),completion:Math.max(0,(f-a.current.c)/p)})}a.current={p:h,c:f,t:c}},[l])}function an(n){return(n/1024**3).toFixed(1)}function cS(n){return n?n>1024**3?`${(n/1024**3).toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`:""}function dS(n){if(!n)return"—";const r=n/1024**3;return r>=1?`${r.toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`}function fS(n){if(!n)return"";const r=Math.floor(n/60);return r>0?`${r} min`:`${n} s`}function hS(n){return n?`${Math.round(n/1024)}k`:"—"}function pS(n){return n?new Date(n*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Uw(n){if(n==null||n<0)return null;const r=Math.floor(n/86400),s=Math.floor(n%86400/3600),l=Math.floor(n%3600/60);return r>0?`${r} T ${s} Std`:s>0?`${s} Std ${l} min`:`${l} min`}function $p({werte:n,farbe:r,breite:s=56,hoehe:l=14}){if(n.length<2)return m.jsx("div",{style:{width:s,height:l},"aria-hidden":"true"});const a=Math.max(...n,1),c=s/(n.length-1),h=n.map((f,p)=>`${p===0?"M":"L"}${(p*c).toFixed(1)},${(l-f/a*l).toFixed(1)}`).join(" ");return m.jsx("svg",{width:s,height:l,viewBox:`0 0 ${s} ${l}`,"aria-hidden":"true",className:"shrink-0",children:m.jsx("path",{d:h,fill:"none",stroke:r,strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round"})})}function xs({children:n,titel:r,className:s}){return m.jsx("div",{title:r,className:Me("flex shrink-0 items-center gap-1.5 border-r border-border/30 px-3",s),children:n})}function Bw(){var L,R,F,M,A,z,G,V;const{data:n,isError:r}=Zc(),{data:s}=io(),{data:l}=Tw(),{data:a}=Yc(),c=fg(),h=hg(),f=V1(),p=!r&&!!(n!=null&&n.engine_reachable),g=p&&(n!=null&&n.brain?n.brain.ready:!0),w=((L=n==null?void 0:n.brain)==null?void 0:L.role)??((F=(R=l==null?void 0:l.lanes)==null?void 0:R[0])==null?void 0:F.name)??null,v=((M=s==null?void 0:s.ram)==null?void 0:M.percent)??0,x=Math.max(((A=s==null?void 0:s.temp)==null?void 0:A.cpu)??0,((z=s==null?void 0:s.temp)==null?void 0:z.gpu)??0),k=h.length?h[h.length-1].completion:0,S=Uw(s==null?void 0:s.uptime_s),b={live:{punkt:"bg-emerald-500",text:"Live",titel:"Ereignisstrom steht — Änderungen erscheinen sofort."},nachlauf:{punkt:"bg-amber-500",text:"Nachlauf",titel:"Ereignisstrom gerissen — die Ansicht fragt wieder im Takt nach."},getrennt:{punkt:"bg-red-500",text:"Getrennt",titel:"Keine Verbindung zur Zentrale — die Zahlen sind veraltet."}}[f];return m.jsxs("footer",{className:"flex h-11 shrink-0 items-stretch overflow-x-auto border-t border-border/40 bg-card/40 font-mono text-[11px] backdrop-blur-sm scrollbar-thin","aria-label":"Zustand der Box",children:[m.jsxs(Vl,{to:"/agent",className:"flex shrink-0 items-center gap-2.5 border-r border-border/30 px-3 transition-colors hover:bg-accent/50",children:[m.jsxs("span",{className:"flex items-center gap-1.5",title:p?"Motor (Engine) läuft":"Motor (Engine) läuft nicht",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",p?"bg-emerald-500":"bg-red-500"),"aria-hidden":"true"}),m.jsx("span",{className:p?"text-muted-foreground":"font-semibold text-red-400",children:"Motor"})]}),m.jsxs("span",{className:"flex items-center gap-1.5",title:g?"Lucys Hirn ist bereit":"Lucys Hirn ist nicht bereit",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",g?"bg-emerald-500":"bg-amber-500"),"aria-hidden":"true"}),m.jsx("span",{className:g?"text-muted-foreground":"font-semibold text-amber-400",children:"Hirn"})]})]}),m.jsxs(xs,{titel:"Aktive Rolle und aktueller Ausgabe-Durchsatz",children:[m.jsx("span",{className:"font-semibold text-primary",children:w??"—"}),m.jsx("span",{className:"tabular-nums text-muted-foreground",children:k>0?`${k.toFixed(0)} t/s`:"leerlauf"}),m.jsx($p,{werte:h.map(O=>O.completion),farbe:"hsl(172 72% 50%)"})]}),m.jsxs(xs,{titel:s?`Geteilter Speicher (Unified Memory): ${an(s.ram.used)} von ${an(s.ram.total)} GB belegt`:"Speicher",children:[m.jsx("span",{className:"text-muted-foreground",children:"Speicher"}),m.jsx("div",{className:"h-2 w-24 overflow-hidden rounded-sm border border-border/50 bg-background/60","aria-hidden":"true",children:m.jsx("div",{className:Me("h-full transition-[width] duration-500",v>90?"bg-red-500":v>75?"bg-amber-500":"bg-primary"),style:{width:`${Math.min(100,v)}%`}})}),m.jsx("span",{className:"tabular-nums text-foreground",children:s?`${an(s.ram.used)}/${an(s.ram.total)} GB`:"—"})]}),m.jsxs(xs,{titel:"Auslastung von Prozessor und Grafikeinheit",children:[m.jsx("span",{className:"text-muted-foreground",children:"CPU"}),m.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(((G=s==null?void 0:s.cpu)==null?void 0:G.percent)??0)," %"]}),m.jsx($p,{werte:c.map(O=>O.cpu),farbe:"hsl(199 89% 58%)"}),((V=s==null?void 0:s.gpu)==null?void 0:V.busy_percent)!=null&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"ml-1 text-muted-foreground",children:"GPU"}),m.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(s.gpu.busy_percent)," %"]})]})]}),x>0&&m.jsxs(xs,{titel:"Höchste gemessene Temperatur (Prozessor oder Grafikeinheit)",children:[m.jsx("span",{className:"text-muted-foreground",children:"Temp"}),m.jsxs("span",{className:Me("tabular-nums",x>=85?"font-semibold text-amber-400":"text-foreground"),children:[Math.round(x)," °C"]})]}),S&&m.jsxs(xs,{titel:"Betriebszeit seit dem letzten Neustart der Box",children:[m.jsx("span",{className:"text-muted-foreground",children:"Läuft seit"}),m.jsx("span",{className:"tabular-nums text-foreground",children:S})]}),a&&m.jsx(xs,{titel:"Seit Beginn verarbeitete Token und die damit gesparten Cloud-Kosten",children:m.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[a.total_tokens.toLocaleString("de-DE")," Token · ",a.saved_eur.toFixed(0)," € gespart"]})}),m.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 px-3",title:b.titel,children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",b.punkt,f==="live"&&"animate-pulse"),"aria-hidden":"true"}),m.jsx("span",{className:"text-muted-foreground",children:b.text})]})]})}const $w=6e3,Vw={info:{rand:"border-sky-500/40",farbe:"text-sky-300",Icon:w1},erfolg:{rand:"border-emerald-500/40",farbe:"text-emerald-300",Icon:d1},warnung:{rand:"border-amber-500/40",farbe:"text-amber-300",Icon:Ol},fehler:{rand:"border-red-500/40",farbe:"text-red-300",Icon:f1}};function Hw(){const n=H1(),r=Rt(s=>s.meldungWeg);return H.useEffect(()=>{const s=n.filter(l=>l.art!=="fehler").map(l=>window.setTimeout(()=>r(l.id),Math.max(1e3,$w-(Date.now()-l.seit))));return()=>s.forEach(window.clearTimeout)},[n,r]),m.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[70] flex w-full max-w-sm flex-col gap-2",role:"status","aria-live":"polite","aria-atomic":"false",children:n.map(s=>{const{rand:l,farbe:a,Icon:c}=Vw[s.art];return m.jsxs("div",{className:Me("pointer-events-auto flex items-start gap-2.5 rounded-lg border bg-card/95 px-3.5 py-2.5 shadow-xl backdrop-blur",l),"aria-live":s.art==="fehler"?"assertive":"polite",children:[m.jsx(c,{className:Me("mt-0.5 h-4 w-4 shrink-0",a),"aria-hidden":"true"}),m.jsx("p",{className:"flex-1 text-xs leading-relaxed text-foreground",children:s.text}),m.jsx("button",{onClick:()=>r(s.id),"aria-label":"Meldung schließen",className:"shrink-0 cursor-pointer rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:m.jsx(Gc,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},s.id)})})}const Ww=H.lazy(()=>Lt(()=>import("./SystemDrawer-D4VhrGdv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(n=>({default:n.SystemDrawer}))),Qw=H.lazy(()=>Lt(()=>import("./CommandPalette-BsUl2rJn.js"),__vite__mapDeps([9,10])).then(n=>({default:n.CommandPalette})));function Kw(){return m.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:m.jsx(Wc,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const Gw=/Mac|iPhone|iPad/.test(navigator.platform);function qw(){Aw(),jw();const n=ro(),r=Fp({select:_=>_.location.pathname}),s=Fp({select:_=>_.location.search.system}),l=B1(),a=Rt(_=>_.schieneUmschalten),c=$1(),h=Rt(_=>_.palette),[f,p]=H.useState(!1),[g,w]=H.useState(!1);H.useEffect(()=>{c&&w(!0)},[c]),H.useEffect(()=>{const _=b=>{(b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="k"&&(b.preventDefault(),h(!Rt.getState().ui.paletteOffen))};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[h]);const v=H.useCallback(_=>{n({to:".",search:b=>({...b,system:_}),replace:!0})},[n]),{data:x,isError:k}=Zc();H.useEffect(()=>{document.documentElement.classList.add("dark")},[]),H.useEffect(()=>{p(!1)},[r]);const S=eg(r);return m.jsxs("div",{className:"flex h-full relative",children:[m.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),m.jsx(Hw,{}),m.jsxs(H.Suspense,{fallback:null,children:[g&&m.jsx(Qw,{}),s&&m.jsx(Ww,{open:!0,onClose:()=>v(void 0),defaultTab:s==="logs"?"logs":"maintenance"})]}),m.jsx("aside",{className:Me("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",l?"w-16":"w-60"),children:m.jsx(Vp,{collapsed:l,onToggleCollapse:a,pfad:r,health:x,backendDown:k})}),m.jsxs("div",{className:Me("md:hidden fixed inset-0 z-50 transition-opacity duration-200",f?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!f,children:[m.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>p(!1)}),m.jsx("aside",{className:Me("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",f?"translate-x-0":"-translate-x-full"),children:m.jsx(Vp,{collapsed:!1,onClose:()=>p(!1),pfad:r,health:x,backendDown:k})})]}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[m.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[m.jsx("button",{onClick:()=>p(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:m.jsx(_1,{className:"h-5 w-5","aria-hidden":"true"})}),m.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:S==null?void 0:S.hint})]}),m.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m.jsx(Cw,{}),m.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),m.jsxs("button",{onClick:()=>h(!0),className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[m.jsx(h1,{className:"h-3.5 w-3.5"}),m.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),m.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:Gw?"⌘K":"Strg+K"})]})]})]}),m.jsx("main",{className:"flex-1 overflow-y-auto scrollbar-thin",children:m.jsx("div",{className:"mx-auto w-full max-w-[1600px] p-4 md:p-6",children:m.jsx(H.Suspense,{fallback:m.jsx(Kw,{}),children:m.jsx(Gm,{})})})}),m.jsx(Bw,{})]})]})}function Vp({collapsed:n,onToggleCollapse:r,onClose:s,pfad:l,health:a,backendDown:c}){var p,g,w,v,x;const h=eg(l),{data:f}=io();return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Me("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[m.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[m.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&m.jsxs("div",{className:"leading-tight",children:[m.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),m.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r&&m.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?m.jsx(Ui,{className:"h-4 w-4","aria-hidden":"true"}):m.jsx(c1,{className:"h-4 w-4","aria-hidden":"true"})}),s&&m.jsx("button",{onClick:s,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:m.jsx(Gc,{className:"h-4 w-4","aria-hidden":"true"})})]}),m.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let k=null;return qi.map(S=>{const _=S.group!==k;k=S.group;const b=(h==null?void 0:h.id)===S.id;return m.jsxs("div",{className:"space-y-1",children:[_&&(n?k!==qi[0].group&&m.jsx("div",{className:"my-3 border-t border-border/30"}):m.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:S.group})),m.jsxs(Vl,{to:S.pfad,onClick:s,"aria-current":b?"page":void 0,className:Me("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",b?n?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?S.label:void 0,"aria-label":n?S.label:void 0,children:[m.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&m.jsx("span",{className:"truncate",children:S.label})]})]},S.id)})})()}),m.jsx("div",{className:Me("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?m.jsx("div",{className:"flex justify-center",children:m.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",c||!a?"bg-red-500":a.engine_reachable?a.brain&&!a.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:c?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":a?a.engine_reachable?a.brain&&!a.brain.ready?`Hirn offline (${a.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):m.jsxs("div",{className:"space-y-2 text-left",children:[c?m.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),m.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),m.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&m.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),m.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",m.jsx("span",{className:"truncate",children:"Backend offline"})]}),(f==null?void 0:f.versions)&&m.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[m.jsxs("div",{className:"truncate",title:f.versions.mc2?`${f.versions.mc2.branch}-${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""} (${f.versions.mc2.date})`:"nicht gefunden",children:[m.jsx("strong",{children:"MC2:"})," ",f.versions.mc2?`${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""}`:"—"]}),m.jsxs("div",{className:"truncate",title:((p=f.versions.engine)==null?void 0:p.type)==="git"?`${f.versions.engine.branch}-${f.versions.engine.hash}${f.versions.engine.dirty?"*":""} (${f.versions.engine.date})`:((g=f.versions.engine)==null?void 0:g.version_text)||"unbekannt",children:[m.jsx("strong",{children:"Engine:"})," ",((w=f.versions.engine)==null?void 0:w.type)==="git"?`${f.versions.engine.hash}${f.versions.engine.dirty?"*":""}`:((x=(v=f.versions.engine)==null?void 0:v.version_text)==null?void 0:x.split(" ").pop())||"—"]}),m.jsxs("div",{className:"truncate",title:f.versions.hermes_agent?`${f.versions.hermes_agent.branch}-${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""} (${f.versions.hermes_agent.date})`:"nicht gefunden",children:[m.jsx("strong",{children:"Hermes Agent:"})," ",f.versions.hermes_agent?`${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function oo({titel:n,text:r,fehler:s,onErneut:l}){const a=s instanceof Error?s.stack||s.message:s?String(s):null;return m.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-6",children:m.jsxs("div",{className:"mc-card max-w-lg space-y-4 p-6",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(Ol,{className:"h-5 w-5 shrink-0 text-amber-400","aria-hidden":"true"}),m.jsx("h1",{className:"font-space text-lg font-bold tracking-tight",children:n})]}),m.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:r}),m.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[l&&m.jsxs("button",{onClick:l,className:"flex h-9 cursor-pointer items-center gap-1.5 rounded-lg bg-primary px-4 text-xs font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:[m.jsx(E1,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Erneut versuchen"]}),m.jsx("a",{href:"/cockpit",className:"flex h-9 items-center rounded-lg border border-border/60 bg-background/20 px-4 text-xs font-semibold text-muted-foreground transition-colors hover:bg-accent",children:"Zum Cockpit"})]}),a&&m.jsxs("details",{className:"pt-1",children:[m.jsx("summary",{className:"cursor-pointer text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70 hover:text-foreground",children:"Technische Einzelheiten"}),m.jsx("pre",{className:"scrollbar-thin mt-2 max-h-52 overflow-auto rounded-lg border border-border/40 bg-background/40 p-3 font-mono text-[10px] leading-relaxed text-muted-foreground",children:a})]})]})})}function Zw(){var V,O,Q,X,Y,de;const{data:n,isError:r}=Zc(),{data:s,isError:l}=ag(),{data:a}=ug(),{data:c}=io(),h=r||l,f=!!n&&!!s,p=W=>{var te;return(te=s==null?void 0:s.services.find(ke=>ke.unit===W))==null?void 0:te.ok},g=W=>!!(s!=null&&s.services.some(te=>te.unit===W)),w=n==null?void 0:n.engine_reachable,v=(V=n==null?void 0:n.brain)==null?void 0:V.ready,x=((O=n==null?void 0:n.brain)==null?void 0:O.model)||((Q=a==null?void 0:a.models.find(W=>W.role==="hermes"))==null?void 0:Q.name)||"",k=[];h&&k.push({id:"mc2",label:"Steuerpult (MC2)",icon:Jm,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),k.push((()=>{const W={id:"brain",label:"Lucys Hirn",icon:a1,critical:!0};return f?w===!1?{...W,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:v===!1?{...W,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:x?{kind:"loadModel",model:x,label:"Hirn aufwecken"}:void 0}:{...W,status:"ok",detail:"Wach und ansprechbar."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"vision",label:"Lucys Augen",icon:m1,critical:!1};if(!f||!a)return{...W,status:"loading",detail:"Wird geprüft …"};const te=a.models.find(he=>he.role==="vision");return te?(a.running??[]).includes(te.name)?{...W,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...W,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:te.name,label:"Augen wecken"}}:{...W,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),k.push((()=>{const W={id:"memory",label:"Lucys Gedächtnis",icon:l1,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...W,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gateway antwortet nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Gateway neu starten"}}})()),k.push((()=>{const W={id:"gateway",label:"Verbindung (Gateway)",icon:Qc,critical:!0},te=n?n.gateway_reachable:p("mc2-gateway");if(!f||te===void 0)return{...W,status:"loading",detail:"Wird geprüft …"};const ke=g("mc2-gateway")?"mc2-gateway":"mission-control-2";return te?{...W,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...W,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:ke,label:"Gateway neu starten"}}})()),k.push((()=>{const W={id:"steward",label:"Wächter (Steward)",icon:Kc,critical:!1};return f?g("mc2-steward")?p("mc2-steward")?{...W,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...W,status:"warn",detail:"Der Wächter schläft — niemand meldet gerade Ausfälle oder wärmt Modelle nach.",repair:{kind:"restart",service:"mc2-steward",label:"Wächter neu starten"}}:{...W,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"agent",label:"Lucys Agent (Hermes)",icon:Sc,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...W,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),k.push((()=>{const W={id:"voice",label:"Lucys Stimme",icon:C1,critical:!1},te=p("voice-service");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Lucy kann hören und sprechen."}:{...W,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const S=((X=c==null?void 0:c.ram)==null?void 0:X.total)??0,_=((Y=c==null?void 0:c.ram)==null?void 0:Y.used)??0,b=((de=c==null?void 0:c.ram)==null?void 0:de.percent)??(S>0?Math.min(100,_/S*100):0),L=1024**3,R=S?b>=93?{status:"full",usedGb:_/L,totalGb:S/L,pct:b,text:"Speicher fast voll — Lucy könnte langsamer werden."}:b>=85?{status:"warn",usedGb:_/L,totalGb:S/L,pct:b,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:_/L,totalGb:S/L,pct:b,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},F=k.some(W=>W.status==="loading"),M=k.filter(W=>W.critical&&W.status==="down"),A=k.filter(W=>W.status==="warn"||!W.critical&&W.status==="down"),z=R.status==="full";return{verdict:F&&!M.length?"loading":M.length?"problem":A.length||z?"warn":"gut",checks:k,memory:R,problems:M,warns:A,unreachable:h}}function Yw({type:n,title:r,message:s,defaultValue:l,autoValue:a,autoLabel:c,onConfirm:h,onCancel:f}){const p=H.useRef(null);return m.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":r,children:m.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[m.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:r}),m.jsx("button",{onClick:f||(()=>h()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:m.jsx(Gc,{className:"h-4 w-4","aria-hidden":"true"})})]}),m.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:s}),n==="prompt"&&m.jsxs("div",{className:"flex gap-2",children:[m.jsx("input",{ref:p,type:"text",defaultValue:l,"aria-label":r,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:g=>{var w;g.key==="Enter"&&h((w=p.current)==null?void 0:w.value)}}),a!==void 0&&m.jsx("button",{type:"button",onClick:()=>{p.current&&(p.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:c||"Auto"})]}),m.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(n==="confirm"||n==="prompt")&&m.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),m.jsx("button",{onClick:()=>{var w;const g=n==="prompt"?(w=p.current)==null?void 0:w.value:void 0;h(g)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:n==="confirm"?"Ja, fortfahren":n==="prompt"?"Übernehmen":"OK"})]})]})})}function Xw(){const[n,r]=H.useState(null),s=H.useCallback(()=>r(null),[]),l=H.useCallback((f,p,g)=>{r({type:"alert",title:f,message:p,onConfirm:()=>{r(null),g==null||g()}})},[]),a=H.useCallback((f,p,g,w)=>{r({type:"confirm",title:f,message:p,onConfirm:()=>{r(null),g()},onCancel:()=>{r(null),w==null||w()}})},[]),c=H.useCallback((f,p,g,w,v,x)=>{r({type:"prompt",title:f,message:p,defaultValue:g,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:k=>{r(null),w(k)},onCancel:()=>{r(null),v==null||v()}})},[]),h=n?m.jsx(Yw,{...n}):null;return{showAlert:l,showConfirm:a,showPrompt:c,close:s,dialogElement:h}}const Jw={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},ek={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function Di({icon:n,title:r,value:s,unit:l,tone:a="muted",hint:c,onClick:h}){return m.jsxs("button",{onClick:h,className:Me("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",ek[a]),children:[m.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[m.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:m.jsx(n,{className:"h-5 w-5"})}),m.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",Jw[a]),title:c})]}),m.jsxs("div",{className:"flex items-baseline gap-1.5",children:[m.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:s}),l&&m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]}),m.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[m.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:r}),m.jsx(Ui,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),c&&m.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:c})]})}function tk(){const{data:n,error:r}=io(),s=fg();return{sys:n,hist:s,error:r}}const nk=H.lazy(()=>Lt(()=>import("./LiveAreaChartImpl-CMyy4SAv.js"),__vite__mapDeps([11,12,10])));function pg(n){return m.jsx(H.Suspense,{fallback:m.jsx(rk,{height:n.height??176}),children:m.jsx(nk,{...n})})}function rk({height:n}){return m.jsx("div",{style:{height:n},className:"flex w-full items-end","aria-hidden":"true",children:m.jsx("div",{className:"h-px w-full bg-border/40"})})}const mg={"1h":60,"24h":1440},Hp={live:"Live","1h":"1 h","24h":"24 h"};function gg({value:n,onChange:r}){return m.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Hp).map(s=>m.jsx("button",{onClick:()=>r(s),className:Me("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",n===s?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:Hp[s]},s))})}const sk=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function ik(){var w,v,x,k;const{sys:n,hist:r}=tk(),[s,l]=H.useState("live"),a=lg(s==="live"?60:mg[s],s!=="live"),c=H.useMemo(()=>{var S;return s==="live"?r:(((S=a.data)==null?void 0:S.points)??[]).map(_=>({t:_.t*1e3,cpu:_.cpu,ram:_.ram,gpu:_.gpu,disk:_.disk}))},[s,r,a.data]),h=!!(n!=null&&n.gpu&&n.gpu.busy_percent!=null&&n.gpu.gtt_used!=null&&n.gpu.gtt_total!=null),f=sk.filter(S=>S.key!=="gpu"||h),p={cpu:(w=n==null?void 0:n.cpu)==null?void 0:w.percent,ram:(v=n==null?void 0:n.ram)==null?void 0:v.percent,gpu:h?n.gpu.busy_percent:null,disk:(x=n==null?void 0:n.disk)==null?void 0:x.percent},g={cpu:(k=n==null?void 0:n.cpu)!=null&&k.cores?`${n.cpu.cores} Cores`:"",ram:n?`${an(n.ram.used)}/${an(n.ram.total)} GB`:"",gpu:h?`${an(n.gpu.gtt_used)}/${an(n.gpu.gtt_total)} GB`:"",disk:n!=null&&n.disk?`${an(n.disk.used)}/${an(n.disk.total)} GB`:""};return m.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[m.jsx(p1,{className:"h-4.5 w-4.5 text-primary"}),m.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s==="live"&&m.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),m.jsx("div",{className:"ml-auto",children:m.jsx(gg,{value:s,onChange:l})})]}),n?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:f.map(S=>m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),m.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),m.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[S.key]??0),"%"]}),g[S.key]&&m.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:g[S.key]})]},S.key))}),s!=="live"&&c.length===0&&m.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(s==="live"||c.length>0)&&m.jsx(pg,{data:c,series:f,unit:"%",yMode:"percent",height:176,showTime:!0})]}):m.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(n==null?void 0:n.temp)&&(n.temp.cpu||n.temp.gpu)&&m.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[n.temp.cpu!=null&&m.jsxs("span",{children:["CPU Temp: ",n.temp.cpu," °C"]}),n.temp.gpu!=null&&m.jsxs("span",{children:["GPU Temp: ",n.temp.gpu," °C"]})]})]})}const Bs=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],Bi=n=>n==null?"":`${(n/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function ok(n){const r=Math.max(0,Date.now()/1e3-n);return r<60?`vor ${Math.round(r)} s`:r<3600?`vor ${Math.round(r/60)} min`:`vor ${Math.round(r/3600)} h`}function Pc(n){return Bs.reduce((r,s)=>r+(n[s.key]??0),0)}function lk(n){let r=null;for(const s of Bs){const l=n[s.key];l!=null&&(r==null||l>r.ms)&&(r={label:s.label,color:s.color,ms:l})}return r}function ak({t:n,scale:r}){const s=Bs.map(l=>`${l.label} ${Bi(n[l.key])}`).join(" · ");return m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:ok(n.ts)}),m.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:s,children:[m.jsx("div",{className:"absolute inset-0 flex",children:Bs.map(l=>{const a=n[l.key];return!a||a<=0?null:m.jsx("div",{style:{width:`${a/r*100}%`,background:l.color},className:"h-full first:rounded-l-sm"},l.key)})}),n.error&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),m.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:n.error?"":Bi(Pc(n))})]})}function uk(){const{data:n}=Mw(12),r=n??[],s=Math.max(1,...r.map(c=>Pc(c))),l=r[0],a=l?lk(l):null;return m.jsxs("div",{className:"mc-card p-5",children:[m.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(g1,{className:"h-4.5 w-4.5 text-primary"}),m.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),m.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l?m.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[m.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${l.error?"text-rose-400":"text-foreground"}`,children:l.error?"Fehler":Bi(Pc(l))}),m.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!l.error&&a&&m.jsxs(m.Fragment,{children:[" · Täter: ",m.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",Bi(a.ms)]})]})]}):m.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),l&&!l.error&&m.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Bs.filter(c=>l[c.key]!=null).map(c=>`${c.label} ${Bi(l[c.key])}`).join(" · ")})]}),m.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Bs.map(c=>m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:c.color}}),m.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c.label})]},c.key))})]}),r.length>0?m.jsx("div",{className:"space-y-1.5",children:r.map(c=>m.jsx(ak,{t:c,scale:s},c.id))}):m.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),m.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Gedächtnis-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const Wp=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function ck(){const{data:n}=Yc(),r=hg(),[s,l]=H.useState("live"),a=lg(s==="live"?60:mg[s],s!=="live"),c=H.useMemo(()=>{var w;if(s==="live")return r;const p=((w=a.data)==null?void 0:w.points)??[],g=[];for(let v=1;v<p.length;v++){const x=p[v-1],k=p[v];if(x.tp==null||k.tp==null||x.tc==null||k.tc==null)continue;const S=Math.max(k.t-x.t,1);g.push({t:k.t*1e3,prompt:Math.max(0,(k.tp-x.tp)/S),completion:Math.max(0,(k.tc-x.tc)/S)})}return g},[s,r,a.data]),h=r[r.length-1],f=h?Math.round(h.prompt+h.completion):0;return m.jsxs("div",{className:"mc-card p-5",children:[m.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(o1,{className:"h-4.5 w-4.5 text-primary"}),m.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),s==="live"&&m.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n&&m.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[m.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:f.toLocaleString("de-DE")}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),n&&m.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[m.jsxs("div",{children:[n.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",m.jsxs("span",{className:"text-emerald-400/90",children:[n.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),m.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",n.prompt_tokens.toLocaleString("de-DE")," · Output ",n.completion_tokens.toLocaleString("de-DE")]})]})]}),m.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2 pt-1",children:[m.jsx(gg,{value:s,onChange:l}),m.jsx("div",{className:"flex flex-col items-end gap-1.5",children:Wp.map(p=>m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),m.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),m.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((h==null?void 0:h[p.key])??0)})]},p.key))})]})]}),s!=="live"&&c.length===0?m.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):n?m.jsx(pg,{data:c,series:Wp,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):m.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),m.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function Xc(){const n=ro();return r=>n({to:".",search:s=>({...s,system:r})})}function dk({onNavigate:n}){var te,ke,he,Z;const r=Xc(),{data:s}=ug(),{data:l}=ag(),{data:a}=Dw(),{data:c}=Iw(),{data:h}=Fw(),{data:f}=Rw(),{data:p}=Lw(),g=Zw(),{showAlert:w,dialogElement:v}=Xw(),x=Ic(),[k,S]=H.useState({});async function _(J,ee){S(P=>({...P,[J]:!0}));try{if(ee.kind==="loadModel")await Ne(`/api/models/${encodeURIComponent(ee.model)}/load`,{method:"POST"});else{const P=await Ne("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ee.service})});P.ok||w("Reparatur nicht ganz geklappt",(P.err||"Unbekannter Fehler")+(ee.needsSudo?`
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}x.invalidateQueries({queryKey:Ie.health}),x.invalidateQueries({queryKey:Ie.services}),x.invalidateQueries({queryKey:Ie.models})}catch(P){w("Reparatur fehlgeschlagen",String((P==null?void 0:P.message)||P))}finally{S(P=>({...P,[J]:!1}))}}const b=((te=s==null?void 0:s.running)==null?void 0:te.length)??0,L=(l==null?void 0:l.services.filter(J=>J.ok).length)??0,R=(l==null?void 0:l.services.length)??0,F=R-L,M=(a?(a.os>0?1:0)+(a.engine>0?1:0)+(a.swap>0?1:0)+(a.models>0?1:0):0)+(((ke=a==null?void 0:a.components)==null?void 0:ke.filter(J=>J.update===!0).length)??0),A=f!=null&&f.available?f.open_count:0,z=p!=null&&p.available?p.items.filter(J=>J.status==="blocked").length:0,G=h?[h.gateway,h.memory,h.desktop_gateway]:[],V=G.filter(J=>J==null?void 0:J.ok).length,O=h?h.gateway.ok?h.memory.ok?h.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",Q=(he=s==null?void 0:s.models)==null?void 0:he.find(J=>J.role==="hermes"),X=Q!=null&&Q.name?(Z=Q.name.split("/").pop())==null?void 0:Z.replace(/\.gguf$/i,""):"",Y=l==null?void 0:l.services.filter(J=>!J.ok).map(J=>J.name).join(", "),de=a?[a.os>0&&"OS",a.engine>0&&"Engine",a.swap>0&&"Swap",a.models>0&&"Modelle"].filter(Boolean):[],W=de.length>0?de.join(" + "):"";return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[m.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[m.jsx(fk,{verdict:g.verdict,memory:g.memory,warns:g.warns,problems:g.problems}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Leistung"}),m.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:m.jsx(ik,{})}),m.jsx("div",{className:"mt-4",children:m.jsx(uk,{})}),m.jsx("div",{className:"mt-4",children:m.jsx(ck,{})})]}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Bereiche"}),m.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[m.jsx(Di,{icon:Hc,title:"Auftragsbuch",value:f!=null&&f.available?A:"—",unit:A===1?"Vorschlag":"Vorschläge",tone:f?z>0||A>0?"warn":"ok":"loading",hint:z>0?`${z} Karte${z===1?"":"n"} wartet auf deine Antwort`:A>0?`${A} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>n("auftraege")}),m.jsx(Di,{icon:Ym,title:"Modelle",value:b,unit:"warm",tone:b>0?"ok":"muted",hint:X?`Hirn: ${X}`:"Kein Hermes-Modell geladen",onClick:()=>n("models")}),m.jsx(Di,{icon:Jm,title:"Dienste",value:l?`${L}/${R}`:"…",unit:"laufen",tone:l?F>0?"warn":"ok":"loading",hint:Y?`Ausfall: ${Y}`:"Alle Dienste online",onClick:()=>r("wartung")}),m.jsx(Di,{icon:Kc,title:"Updates",value:a?M>0?M:"0":"…",unit:M>0?"bereit":"aktuell",tone:a?M>0?"warn":"ok":"loading",hint:M>0?`Verfügbar: ${W}`:"Alles auf dem neuesten Stand",onClick:()=>r("wartung")}),m.jsx(Di,{icon:Qc,title:"Verbinden",value:h?`${V}/${G.length}`:"…",unit:"Leitungen",tone:h?V===G.length?"ok":"warn":"loading",hint:O?`Gestört: ${O}`:"Hermes Desktop & IDEs bereit",onClick:()=>n("connect")})]})]})]}),m.jsxs("div",{className:"space-y-6",children:[m.jsx(hk,{problems:g.problems,pendingCount:M,openAuftraege:A,blockedIdeen:z,busy:k,onRepair:_,onNavigate:n}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Werkzeuge & Diagnose"}),m.jsx(pk,{agent:c,svcErrors:F,onNavigate:n})]})]})]}),v]})}function Xu({children:n}){return m.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:n})}function fk({verdict:n,memory:r,warns:s,problems:l}){const a=s.length?`${s[0].label}: ${s[0].detail}${s.length>1?` (+${s.length-1} weitere)`:""}`:r.status==="full"?r.text:"Nichts Schlimmes — nur ein Hinweis.",c=l.length?`${l[0].label}: ${l[0].detail}${l.length>1?` (+${l.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",h={loading:{ring:"border-border/60 bg-card/45",icon:Wc,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:v1,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Ol,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Ol,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:c}}[n],f=h.icon,p={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[r.status],g={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[r.status];return m.jsxs("div",{className:Me("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",h.ring),children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:m.jsx(f,{className:Me("h-6 w-6",h.iconCls)})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:h.title}),m.jsx("p",{className:"text-xs text-muted-foreground",children:h.sub})]})]}),m.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[m.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[m.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[m.jsx(y1,{className:"h-3.5 w-3.5"})," Speicher"]}),m.jsx("span",{className:Me("font-mono font-bold",p),children:r.status==="unknown"?"—":`${r.usedGb.toFixed(1)} / ${r.totalGb.toFixed(1)} GB`})]}),m.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:m.jsx("div",{className:Me("h-full rounded-full transition-all duration-500",g),style:{width:`${r.pct}%`}})})]})]})}function hk({problems:n,pendingCount:r,openAuftraege:s,blockedIdeen:l,busy:a,onRepair:c,onNavigate:h}){const f=Xc(),p=r>0,g=s>0,w=l>0,v=n.length===0&&!p&&!g&&!w;return m.jsx("div",{className:"h-full flex flex-col justify-between",children:v?m.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[m.jsx(u1,{className:"h-5 w-5 shrink-0 text-emerald-400"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):m.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[n.map(x=>m.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[m.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:m.jsx(x.icon,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"text-sm font-bold text-foreground",children:x.label}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:x.detail})]})]}),x.repair&&m.jsxs("button",{onClick:()=>x.repair&&c(x.id,x.repair),disabled:!!a[x.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[a[x.id]?m.jsx(Wc,{className:"h-3.5 w-3.5 animate-spin"}):m.jsx(R1,{className:"h-3.5 w-3.5"}),x.repair.label]})]},x.id)),w&&m.jsxs("button",{onClick:()=>h("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:m.jsx(Xm,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Karte",l===1?"":"n"," braucht deine Antwort"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),g&&m.jsxs("button",{onClick:()=>h("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:m.jsx(Hc,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[s," Vorschl",s===1?"ag":"äge"," im Auftragsbuch"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),p&&m.jsxs("button",{onClick:()=>f("wartung"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:m.jsx(Kc,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Update",r===1?"":"s"," bereit"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function pk({agent:n,svcErrors:r,onNavigate:s}){const l=Xc(),a=[{label:"Hermes Agent",status:n?n.gateway_reachable?"Bereit":"Offline":"…",tone:n?n.gateway_reachable?"ok":"alert":"loading",action:()=>s("agent")},{label:"Konsole (Box-Shell)",status:n?n.box_console_reachable?"Bereit":"Offline":"…",tone:n?n.box_console_reachable?"ok":"warn":"loading",action:()=>s("konsole")},{label:"Systemlogs & Diagnose",status:r>0?`${r} Fehler`:"Keine Fehler",tone:r>0?"alert":"ok",action:()=>l("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>s("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>s("chronik")}];return m.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:m.jsx("div",{className:"divide-y divide-border/20",children:a.map((c,h)=>{const f={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[c.tone];return m.jsxs("button",{onClick:c.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[m.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:c.label}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:Me("text-[10px] font-semibold font-mono",c.tone==="ok"?"text-emerald-400":c.tone==="warn"?"text-amber-400":c.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:c.status}),m.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full",f)})]})]},h)})})})}const mk=H.lazy(()=>Lt(()=>import("./ModelsView-qPC018cd.js"),__vite__mapDeps([13,14,15,16,3,8,17,18])).then(n=>({default:n.ModelsView}))),gk=H.lazy(()=>Lt(()=>import("./ConnectView-AK7BtBBi.js"),__vite__mapDeps([19,5,17])).then(n=>({default:n.ConnectView}))),yk=H.lazy(()=>Lt(()=>import("./AgentView-CzCLEsLL.js"),__vite__mapDeps([20,7,4])).then(n=>({default:n.AgentView}))),vk=H.lazy(()=>Lt(()=>import("./KonsoleView-g4YWCBNc.js"),__vite__mapDeps([21,7,1])).then(n=>({default:n.KonsoleView}))),xk=H.lazy(()=>Lt(()=>import("./GuideView-DwKkIjUb.js"),__vite__mapDeps([22,16,18,4])).then(n=>({default:n.GuideView}))),wk=H.lazy(()=>Lt(()=>import("./AuftragsbuchView-DnGEkS0J.js"),__vite__mapDeps([23,24,1,5,6,17])).then(n=>({default:n.AuftragsbuchView}))),kk=H.lazy(()=>Lt(()=>import("./IdeenView-Be2Bc1_I.js"),__vite__mapDeps([25,24,15,6,18,17,2,1])).then(n=>({default:n.IdeenView}))),Sk=H.lazy(()=>Lt(()=>import("./SkillsView-CLg7sPmS.js"),__vite__mapDeps([26,14])).then(n=>({default:n.SkillsView}))),bk=H.lazy(()=>Lt(()=>import("./ChronikView-yUg-fPj_.js"),[]).then(n=>({default:n.ChronikView}))),_k=H.lazy(()=>Lt(()=>import("./WissenView-Wv0zCS6c.js"),__vite__mapDeps([27,12,1,3,2])).then(n=>({default:n.WissenView}))),Ck=n=>{const r=n.system;return r==="wartung"||r==="logs"?{system:r}:{}},Vs=$x({component:qw,validateSearch:Ck,notFoundComponent:()=>m.jsx(oo,{titel:"Diese Seite gibt es nicht",text:"Der Link zeigt auf eine Ansicht, die Mission Control nicht kennt. Vielleicht stammt er aus einer älteren Fassung."})}),Ek=so({getParentRoute:()=>Vs,path:"/",beforeLoad:()=>{throw Cm({to:"/cockpit"})}});function dr(n,r){return so({getParentRoute:()=>Vs,path:n,component:r,errorComponent:({error:s,reset:l})=>m.jsx(oo,{titel:"Diese Ansicht ist abgestürzt",text:"Der Rest von Mission Control läuft weiter. Erneut versuchen — oder in eine andere Ansicht wechseln.",fehler:s,onErneut:l})})}function jk(){const n=ro();return m.jsx(dk,{onNavigate:r=>{const s=qi.find(l=>l.id===r);s&&n({to:s.pfad})}})}const Pk=dr("/cockpit",()=>m.jsx(jk,{})),Nk=dr("/auftraege",()=>m.jsx(wk,{})),Rk=dr("/skills",()=>m.jsx(Sk,{})),Lk=dr("/chronik",()=>m.jsx(bk,{})),Mk=dr("/verbinden",()=>m.jsx(gk,{})),Tk=dr("/konsole",()=>m.jsx(vk,{})),Ik=dr("/anleitung",()=>m.jsx(xk,{})),Dk=dr("/agent",()=>m.jsx(yk,{})),Fk=so({getParentRoute:()=>Vs,path:"/ideen",validateSearch:n=>typeof n.offen=="string"&&n.offen?{offen:n.offen}:{},component:()=>m.jsx(kk,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),zk=so({getParentRoute:()=>Vs,path:"/wissen",validateSearch:n=>typeof n.datei=="string"&&n.datei?{datei:n.datei}:{},component:()=>m.jsx(_k,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Ok=so({getParentRoute:()=>Vs,path:"/modelle",validateSearch:n=>{const r=n.reiter;return r==="werkbank"||r==="routing"||r==="discover"?{reiter:r}:{}},component:()=>m.jsx(mk,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Ak=Vs.addChildren([Ek,Pk,Fk,Nk,Rk,Lk,zk,Mk,Tk,Ik,Ok,Dk]),Uk=Yx({routeTree:Ak,scrollRestoration:!0,defaultPreload:!1});class Bk extends Gt.Component{constructor(){super(...arguments);gl(this,"state",{error:null})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,l){console.error("Unbehandelter UI-Fehler:",s,l.componentStack)}render(){return this.state.error?m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:m.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[m.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),m.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),m.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const $k=Object.fromEntries(qi.map(n=>[n.id,n.pfad]));function Vk(){const n=window.location.hash.replace(/^#\/?/,"");if(!n)return;const r=$k[n];r&&window.history.replaceState(null,"",r+window.location.search)}const Ju="mc_neuladen_wegen_version";function Hk(){window.addEventListener("vite:preloadError",n=>{sessionStorage.getItem(Ju)||(n.preventDefault(),sessionStorage.setItem(Ju,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(Ju),5e3)})}Vk();Hk();const Wk=new Y0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});C0.createRoot(document.getElementById("root")).render(m.jsx(Gt.StrictMode,{children:m.jsx(Bk,{children:m.jsx(X0,{client:Wk,children:m.jsx(e1,{router:Uk})})})}));export{g1 as $,Vm as A,a1 as B,u1 as C,aS as D,m1 as E,Fw as F,Ui as G,y1 as H,w1 as I,d1 as J,f1 as K,Wc as L,Iw as M,Gk as N,Sc as O,o1 as P,Ap as Q,E1 as R,N1 as S,Ol as T,uS as U,Jm as V,R1 as W,Gc as X,Ym as Y,Qc as Z,b1 as _,rS as a,P1 as a0,Rw as a1,Lw as a2,pS as a3,Hc as a4,Yk as a5,Xm as a6,no as a7,tc as a8,$i as a9,G0 as aa,st as ab,kt as ac,om as ad,Oe as ae,sS as af,fS as ag,Xk as ah,x1 as ai,Kc as aj,v1 as ak,eS as al,Gt as am,nm as an,Jk as ao,tS as ap,S1 as aq,ag as ar,Kk as as,qi as at,Q1 as au,Nx as av,to as aw,S0 as ax,Me as b,we as c,Zk as d,l1 as e,ug as f,nS as g,io as h,iS as i,m as j,Xw as k,dS as l,lS as m,Ne as n,an as o,U1 as p,Ie as q,H as r,qk as s,p1 as t,Ic as u,hS as v,oS as w,Dw as x,cS as y,ro as z};