const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-BqYzprU9.js","assets/refresh-cw-CTp9Wnlo.js","assets/file-text-BN2uI732.js","assets/search-CES9eee3.js","assets/shield-DuTFhOFM.js","assets/arrow-right-DrtT4MFG.js","assets/clock-geHux9wJ.js","assets/external-link-DPeXL_3q.js","assets/power-t1doBEG9.js","assets/CommandPalette-FxofQTPj.js","assets/index-CLtv5X6m.js","assets/LiveAreaChartImpl-DDkrCKJU.js","assets/string-DoZi9Vij.js","assets/ModelsView-Dn4Ryn0Z.js","assets/JobsBar-B0XdGtEh.js","assets/code-xml-CWTq52sX.js","assets/zap-fipupct_.js","assets/chevron-down-hb9Pt4vA.js","assets/layers-DGDzGr16.js","assets/ConnectView-BdqWBHRP.js","assets/AgentView-CW6l1s2v.js","assets/SectionLabel-D0h88ho8.js","assets/KonsoleView-CsAZfGsS.js","assets/GuideView-Coe5WKp_.js","assets/AuftragsbuchView-CwIgN4P-.js","assets/hammer-CE6Zn7Q-.js","assets/IdeenAnsicht-Crw42hu2.js","assets/SkillsView-BPwq8_ZP.js","assets/WissenView-Cm8edL44.js"])))=>i.map(i=>d[i]); var w0=Object.defineProperty;var $h=n=>{throw TypeError(n)};var k0=(n,r,s)=>r in n?w0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var wl=(n,r,s)=>k0(n,typeof r!="symbol"?r+"":r,s),Ou=(n,r,s)=>r.has(n)||$h("Cannot "+s);var j=(n,r,s)=>(Ou(n,r,"read from private field"),s?s.call(n):r.get(n)),de=(n,r,s)=>r.has(n)?$h("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),re=(n,r,s,l)=>(Ou(n,r,"write to private field"),l?l.call(n,s):r.set(n,s),s),we=(n,r,s)=>(Ou(n,r,"access private method"),s);var kl=(n,r,s,l)=>({set _(a){re(n,r,a,s)},get _(){return j(n,r,l)}});function S0(n,r){for(var s=0;sl[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 sm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Au={exports:{}},Ti={},Uu={exports:{}},xe={};/** * @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 Vh;function b0(){if(Vh)return xe;Vh=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"),m=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),y=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function _(P,U,pe){this.props=P,this.context=U,this.refs=b,this.updater=pe||k}_.prototype.isReactComponent={},_.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")},_.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function R(){}R.prototype=_.prototype;function L(P,U,pe){this.props=P,this.context=U,this.refs=b,this.updater=pe||k}var z=L.prototype=new R;z.constructor=L,S(z,_.prototype),z.isPureReactComponent=!0;var M=Array.isArray,A=Object.prototype.hasOwnProperty,F={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function V(P,U,pe){var ge,Se={},ve=null,Re=null;if(U!=null)for(ge in U.ref!==void 0&&(Re=U.ref),U.key!==void 0&&(ve=""+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>>1,U=Y[P];if(0>>1;Pa(Se,ee))vea(Re,Se)?(Y[P]=Re,Y[ve]=ee,P=ve):(Y[P]=Se,Y[ge]=ee,P=ge);else if(vea(Re,ee))Y[P]=Re,Y[ve]=ee,P=ve;else break e}}return J}function a(Y,J){var ee=Y.sortIndex-J.sortIndex;return ee!==0?ee:Y.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=[],m=[],w=1,y=null,x=3,k=!1,S=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(Y){for(var J=s(m);J!==null;){if(J.callback===null)l(m);else if(J.startTime<=Y)l(m),J.sortIndex=J.expirationTime,r(p,J);else break;J=s(m)}}function M(Y){if(b=!1,z(Y),!S)if(s(p)!==null)S=!0,ye(A);else{var J=s(m);J!==null&&he(M,J.startTime-Y)}}function A(Y,J){S=!1,b&&(b=!1,R(V),V=-1),k=!0;var ee=x;try{for(z(J),y=s(p);y!==null&&(!(y.expirationTime>J)||Y&&!X());){var P=y.callback;if(typeof P=="function"){y.callback=null,x=y.priorityLevel;var U=P(y.expirationTime<=J);J=n.unstable_now(),typeof U=="function"?y.callback=U:y===s(p)&&l(p),z(J)}else l(p);y=s(p)}if(y!==null)var pe=!0;else{var ge=s(m);ge!==null&&he(M,ge.startTime-J),pe=!1}return pe}finally{y=null,x=ee,k=!1}}var F=!1,G=null,V=-1,O=5,Q=-1;function X(){return!(n.unstable_now()-QY||125P?(Y.sortIndex=ee,r(m,Y),s(p)===null&&Y===s(m)&&(b?(R(V),V=-1):b=!0,he(M,ee-P))):(Y.sortIndex=U,r(p,Y),S||k||(S=!0,ye(A))),Y},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(Y){var J=x;return function(){var ee=x;x=J;try{return Y.apply(this,arguments)}finally{x=ee}}}})(Vu)),Vu}var Gh;function j0(){return Gh||(Gh=1,$u.exports=E0()),$u.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 qh;function P0(){if(qh)return xt;qh=1;var n=io(),r=j0();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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={},y={};function x(e){return p.call(y,e)?!0:p.call(w,e)?!1:m.test(e)?y[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 b(e,t,i,o,u,d,v){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=v}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new b(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){_[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function L(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(R,L);_[t]=new b(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(R,L);_[t]=new b(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(R,L);_[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function z(e,t,i,o){var u=_.hasOwnProperty(t)?_[t]:null;(u!==null?u.type!==0:o||!(2C||u[v]!==d[C]){var E=` `+u[v].replace(" at new "," at ");return e.displayName&&E.includes("")&&(E=E.replace("",e.displayName)),E}while(1<=v&&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 ve(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 F:return"Portal";case O:return"Profiler";case V:return"StrictMode";case ae:return"Suspense";case H: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 Z: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:ve(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return ve(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 ve(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(v){o=""+v,d.call(this,v)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(v){o=""+v},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 Ks(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&&z(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"+t.valueOf().toString()+"",t=fo.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 Zs={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},_g=["Webkit","ms","Moz","O"];Object.keys(Zs).forEach(function(e){_g.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zs[t]=Zs[e]})});function nd(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Zs.hasOwnProperty(e)&&Zs[e]?(""+t).trim():t+"px"}function rd(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=i.indexOf("--")===0,u=nd(i,t[i],o);i==="float"&&(i="cssFloat"),o?e.setProperty(i,u):e[i]=u}}var Cg=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 Zl(e,t){if(t){if(Cg[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 Yl(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 Xl=null;function Jl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ea=null,Gr=null,qr=null;function sd(e){if(e=vi(e)){if(typeof ea!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Do(t),ea(e.stateNode,e.type,t))}}function id(e){Gr?qr?qr.push(e):qr=[e]:Gr=e}function od(){if(Gr){var e=Gr,t=qr;if(qr=Gr=null,sd(e),t)for(e=0;e>>=0,e===0?32:31-(zg(e)/Fg|0)|0}var yo=64,vo=4194304;function ei(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 xo(e,t){var i=e.pendingLanes;if(i===0)return 0;var o=0,u=e.suspendedLanes,d=e.pingedLanes,v=i&268435455;if(v!==0){var C=v&~u;C!==0?o=ei(C):(d&=v,d!==0&&(o=ei(d)))}else v=i&~u,v!==0?o=ei(v):d!==0&&(o=ei(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;0i;i++)t.push(e);return t}function ti(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 Bg(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=ui),Id=" ",Dd=!1;function zd(e,t){switch(e){case"keyup":return my.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function yy(e,t){switch(e){case"compositionend":return Fd(t);case"keypress":return t.which!==32?null:(Dd=!0,Id);case"textInput":return e=t.data,e===Id&&Dd?null:e;default:return null}}function vy(e,t){if(Xr)return e==="compositionend"||!va&&zd(e,t)?(e=Pd(),_o=fa=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)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=Hd(i)}}function Qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(){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 ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jy(e){var t=Kd(),i=e.focusedElem,o=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&Qd(i.ownerDocument.documentElement,i)){if(o!==null&&ka(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=Wd(i,d);var v=Wd(i,o);u&&v&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),d>o?(e.addRange(t),e.extend(v.node,v.offset)):(t.setEnd(v.node,v.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=document.documentMode,Jr=null,Sa=null,hi=null,ba=!1;function Gd(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ba||Jr==null||Jr!==hr(o)||(o=Jr,"selectionStart"in o&&ka(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}),hi&&fi(hi,o)||(hi=o,o=Mo(Sa,"onSelect"),0ss||(e.current=Da[ss],Da[ss]=null,ss--)}function Ie(e,t){ss++,Da[ss]=e.current,e.current=t}var Fn={},it=zn(Fn),pt=zn(!1),xr=Fn;function is(e,t){var i=e.type.contextTypes;if(!i)return Fn;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 zo(){Fe(pt),Fe(it)}function cf(e,t,i){if(it.current!==Fn)throw Error(s(168));Ie(it,t),Ie(pt,i)}function df(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 Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fn,xr=it.current,Ie(it,e),Ie(pt,pt.current),!0}function ff(e,t,i){var o=e.stateNode;if(!o)throw Error(s(169));i?(e=df(e,t,xr),o.__reactInternalMemoizedMergedChildContext=e,Fe(pt),Fe(it),Ie(it,e)):Fe(pt),Ie(pt,i)}var hn=null,Oo=!1,za=!1;function hf(e){hn===null?hn=[e]:hn.push(e)}function Ay(e){Oo=!0,hf(e)}function On(){if(!za&&hn!==null){za=!0;var e=0,t=Ne;try{var i=hn;for(Ne=1;e>=v,u-=v,pn=1<<32-Ut(t)+u|i<fe?(Je=ce,ce=null):Je=ce.sibling;var Ce=B(T,ce,I[fe],q);if(Ce===null){ce===null&&(ce=Je);break}e&&ce&&Ce.alternate===null&&t(T,ce),N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce,ce=Je}if(fe===I.length)return i(T,ce),Ae&&kr(T,fe),le;if(ce===null){for(;fefe?(Je=ce,ce=null):Je=ce.sibling;var Kn=B(T,ce,Ce.value,q);if(Kn===null){ce===null&&(ce=Je);break}e&&ce&&Kn.alternate===null&&t(T,ce),N=d(Kn,N,fe),ue===null?le=Kn:ue.sibling=Kn,ue=Kn,ce=Je}if(Ce.done)return i(T,ce),Ae&&kr(T,fe),le;if(ce===null){for(;!Ce.done;fe++,Ce=I.next())Ce=K(T,Ce.value,q),Ce!==null&&(N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce);return Ae&&kr(T,fe),le}for(ce=o(T,ce);!Ce.done;fe++,Ce=I.next())Ce=ne(ce,T,fe,Ce.value,q),Ce!==null&&(e&&Ce.alternate!==null&&ce.delete(Ce.key===null?fe:Ce.key),N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce);return e&&ce.forEach(function(x0){return t(T,x0)}),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,ue=N;ue!==null;){if(ue.key===le){if(le=I.type,le===G){if(ue.tag===7){i(T,ue.sibling),N=u(ue,I.props.children),N.return=T,T=N;break e}}else if(ue.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ye&&xf(le)===ue.type){i(T,ue.sibling),N=u(ue,I.props),N.ref=xi(T,ue,I),N.return=T,T=N;break e}i(T,ue);break}else t(T,ue);ue=ue.sibling}I.type===G?(N=Nr(I.props.children,T.mode,q,I.key),N.return=T,T=N):(q=fl(I.type,I.key,I.props,null,T.mode,q),q.ref=xi(T,N,I),q.return=T,T=q)}return v(T);case F:e:{for(ue=I.key;N!==null;){if(N.key===ue)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=Tu(I,T.mode,q),N.return=T,T=N}return v(T);case ye:return ue=I._init,Qe(T,N,ue(I._payload),q)}if(gr(I))return ie(T,N,I,q);if(J(I))return oe(T,N,I,q);$o(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=Mu(I,T.mode,q),N.return=T,T=N),v(T)):i(T,N)}return Qe}var us=wf(!0),kf=wf(!1),Vo=zn(null),Ho=null,cs=null,$a=null;function Va(){$a=cs=Ho=null}function Ha(e){var t=Vo.current;Fe(Vo),e._currentValue=t}function Wa(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){Ho=e,$a=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($a!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(Ho===null)throw Error(s(308));cs=e,Ho.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var Sr=null;function Qa(e){Sr===null?Sr=[e]:Sr.push(e)}function Sf(e,t,i,o){var u=t.interleaved;return u===null?(i.next=i,Qa(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 Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bf(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,Qa(o)):(t.next=u.next,u.next=t),o.interleaved=t,gn(e,i)}function Wo(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,la(e,i)}}function _f(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 v={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};d===null?u=d=v:d=d.next=v,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 Qo(e,t,i,o){var u=e.updateQueue;An=!1;var d=u.firstBaseUpdate,v=u.lastBaseUpdate,C=u.shared.pending;if(C!==null){u.shared.pending=null;var E=C,D=E.next;E.next=null,v===null?d=D:v.next=D,v=E;var $=e.alternate;$!==null&&($=$.updateQueue,C=$.lastBaseUpdate,C!==v&&(C===null?$.firstBaseUpdate=D:C.next=D,$.lastBaseUpdate=E))}if(d!==null){var K=u.baseState;v=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,v|=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 v|=u.lane,u=u.next;while(u!==t)}else d===null&&(u.shared.lanes=0);Cr|=v,e.lanes=v,e.memoizedState=K}}function Cf(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;ti?i:4,e(!0);var o=Xa.transition;Xa.transition={};try{e(!1),t()}finally{Ne=i,Xa.transition=o}}function Hf(){return zt().memoizedState}function Vy(e,t,i){var o=Hn(e);if(i={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null},Wf(e))Qf(t,i);else if(i=Sf(e,t,i,o),i!==null){var u=ft();Qt(i,e,o,u),Kf(i,t,o)}}function Hy(e,t,i){var o=Hn(e),u={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null};if(Wf(e))Qf(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var v=t.lastRenderedState,C=d(v,i);if(u.hasEagerState=!0,u.eagerState=C,Bt(C,v)){var E=t.interleaved;E===null?(u.next=u,Qa(t)):(u.next=E.next,E.next=u),t.interleaved=u;return}}catch{}finally{}i=Sf(e,t,u,o),i!==null&&(u=ft(),Qt(i,e,o,u),Kf(i,t,o))}}function Wf(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Qf(e,t){bi=qo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Kf(e,t,i){if((i&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,la(e,i)}}var Xo={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},Wy={readContext:Dt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:zf,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Zo(4194308,4,Af.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zo(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=Vy.bind(null,$e,e),[o.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:If,useDebugValue:iu,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=If(!1),t=e[0];return e=$y.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||Nf(o,t,i)}u.memoizedState=i;var d={value:i,getSnapshot:t};return u.queue=d,zf(Lf.bind(null,o,d,e),[e]),o.flags|=2048,Ei(9,Rf.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=_i++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=v.createElement(i,{is:o.is}):(e=v.createElement(i),i==="select"&&(v=e,o.multiple?v.multiple=!0:o.size&&(v.size=o.size))):e=v.createElementNS(e,i),e[Jt]=t,e[yi]=o,hh(e,t,!1,!1),t.stateNode=e;e:{switch(v=Yl(i,o),i){case"dialog":ze("cancel",e),ze("close",e),u=o;break;case"iframe":case"object":case"embed":ze("load",e),u=o;break;case"video":case"audio":for(u=0;ugs&&(t.flags|=128,o=!0,ji(d,!1),t.lanes=4194304)}else{if(!o)if(e=Ko(v),e!==null){if(t.flags|=128,o=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),ji(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!Ae)return lt(t),null}else 2*We()-d.renderingStartTime>gs&&i!==1073741824&&(t.flags|=128,o=!0,ji(d,!1),t.lanes=4194304);d.isBackwards?(v.sibling=t.child,t.child=v):(i=d.last,i!==null?i.sibling=v:t.child=v,d.last=v)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=We(),t.sibling=null,i=Be.current,Ie(Be,o?i&1|2:i&1),t):(lt(t),null);case 22:case 23:return Nu(),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 Jy(e,t){switch(Oa(t),t.tag){case 1:return mt(t.type)&&zo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),Fe(pt),Fe(it),Ya(),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 Ha(t.type._context),null;case 22:case 23:return Nu(),null;case 24:return null;default:return null}}var nl=!1,at=!1,e0=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 yu(e,t,i){try{i()}catch(o){Ve(e,t,o)}}var gh=!1;function t0(e,t){if(Na=So,e=Kd(),ka(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 v=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=v+u),K!==d||o!==0&&K.nodeType!==3||(E=v+o),K.nodeType===3&&(v+=K.nodeValue.length),(ne=K.firstChild)!==null;)B=K,K=ne;for(;;){if(K===e)break t;if(B===i&&++D===u&&(C=v),B===d&&++$===o&&(E=v),(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(Ra={focusedElem:e,selectionRange:i},So=!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=gh,gh=!1,ie}function Pi(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&&yu(t,i,d)}u=u.next}while(u!==o)}}function rl(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 vu(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 yh(e){var t=e.alternate;t!==null&&(e.alternate=null,yh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[yi],delete t[Ia],delete t[Fy],delete t[Oy])),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 vh(e){return e.tag===5||e.tag===3||e.tag===4}function xh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xu(e,t,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=Io));else if(o!==4&&(e=e.child,e!==null))for(xu(e,t,i),e=e.sibling;e!==null;)xu(e,t,i),e=e.sibling}function wu(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(wu(e,t,i),e=e.sibling;e!==null;)wu(e,t,i),e=e.sibling}var nt=null,Ht=!1;function Bn(e,t,i){for(i=i.child;i!==null;)wh(e,t,i),i=i.sibling}function wh(e,t,i){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(go,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?Ta(e.parentNode,i):e.nodeType===1&&Ta(e,i),oi(e)):Ta(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,v=d.destroy;d=d.tag,v!==void 0&&((d&2)!==0||(d&4)!==0)&&yu(i,t,v),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 kh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new e0),t.forEach(function(o){var u=c0.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;ou&&(u=v),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*r0(o/1960))-o,10e?16:e,Vn===null)var o=!1;else{if(e=Vn,Vn=null,al=0,(_e&6)!==0)throw Error(s(331));var u=_e;for(_e|=4,se=e.current;se!==null;){var d=se,v=d.child;if((se.flags&16)!==0){var C=d.deletions;if(C!==null){for(var E=0;EWe()-bu?jr(e,0):Su|=i),vt(e,t)}function Ih(e,t){t===0&&((e.mode&1)===0?t=1:(t=vo,vo<<=1,(vo&130023424)===0&&(vo=4194304)));var i=ft();e=gn(e,t),e!==null&&(ti(e,t,i),vt(e,i))}function u0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ih(e,i)}function c0(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),Ih(e,i)}var Dh;Dh=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,Yy(e,t,i);gt=(e.flags&131072)!==0}else gt=!1,Ae&&(t.flags&1048576)!==0&&pf(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;tl(e,t),e=t.pendingProps;var u=is(t,it.current);ds(t,i),u=eu(null,t,o,e,u,i);var d=tu();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,Fo(t)):d=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ka(t),u.updater=Jo,t.stateNode=u,u._reactInternals=t,lu(t,o,e,i),t=du(null,t,o,!0,d,i)):(t.tag=0,Ae&&d&&Fa(t),dt(null,t,u,i),t=t.child),t;case 16:o=t.elementType;e:{switch(tl(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=f0(o),e=Vt(o,e),u){case 0:t=cu(null,t,o,e,i);break e;case 1:t=lh(null,t,o,e,i);break e;case 11:t=nh(null,t,o,e,i);break e;case 14:t=rh(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),cu(e,t,o,u,i);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),lh(e,t,o,u,i);case 3:e:{if(ah(t),e===null)throw Error(s(387));o=t.pendingProps,d=t.memoizedState,u=d.element,bf(e,t),Qo(t,o,null,i);var v=t.memoizedState;if(o=v.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){u=hs(Error(s(423)),t),t=uh(e,t,o,i,u);break e}else if(o!==u){u=hs(Error(s(424)),t),t=uh(e,t,o,i,u);break e}else for(Ct=Dn(t.stateNode.containerInfo.firstChild),_t=t,Ae=!0,$t=null,i=kf(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}dt(e,t,o,i)}t=t.child}return t;case 5:return Ef(t),e===null&&Ua(t),o=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,v=u.children,La(o,u)?v=null:d!==null&&La(o,d)&&(t.flags|=32),oh(e,t),dt(e,t,v,i),t.child;case 6:return e===null&&Ua(t),null;case 13:return ch(e,t,i);case 4:return Ga(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=us(t,null,o,i):dt(e,t,o,i),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),nh(e,t,o,u,i);case 7:return dt(e,t,t.pendingProps,i),t.child;case 8:return dt(e,t,t.pendingProps.children,i),t.child;case 12:return dt(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,d=t.memoizedProps,v=u.value,Ie(Vo,o._currentValue),o._currentValue=v,d!==null)if(Bt(d.value,v)){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){v=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),Wa(d.return,i,t),C.lanes|=i;break}E=E.next}}else if(d.tag===10)v=d.type===t.type?null:d.child;else if(d.tag===18){if(v=d.return,v===null)throw Error(s(341));v.lanes|=i,C=v.alternate,C!==null&&(C.lanes|=i),Wa(v,i,t),v=d.sibling}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===t){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}dt(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,dt(e,t,o,i),t.child;case 14:return o=t.type,u=Vt(o,t.pendingProps),u=Vt(o.type,u),rh(e,t,o,u,i);case 15:return sh(e,t,t.type,t.pendingProps,i);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),tl(e,t),t.tag=1,mt(o)?(e=!0,Fo(t)):e=!1,ds(t,i),qf(t,o,u),lu(t,o,u,i),du(null,t,o,!0,e,i);case 19:return fh(e,t,i);case 22:return ih(e,t,i)}throw Error(s(156,t.tag))};function zh(e,t){return pd(e,t)}function d0(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 d0(e,t,i,o)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function f0(e){if(typeof e=="function")return Lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)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 fl(e,t,i,o,u,d){var v=2;if(o=e,typeof e=="function")Lu(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case G:return Nr(i.children,u,d,t);case V:v=8,u|=8;break;case O:return e=Ot(12,i,t,u|2),e.elementType=O,e.lanes=d,e;case ae:return e=Ot(13,i,t,u),e.elementType=ae,e.lanes=d,e;case H:return e=Ot(19,i,t,u),e.elementType=H,e.lanes=d,e;case he:return hl(i,u,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:v=10;break e;case X:v=9;break e;case Z:v=11;break e;case te:v=14;break e;case ye:v=16,o=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Ot(v,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 hl(e,t,i,o){return e=Ot(22,e,o,t),e.elementType=he,e.lanes=i,e.stateNode={isHidden:!1},e}function Mu(e,t,i){return e=Ot(6,e,null,t),e.lanes=i,e}function Tu(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 h0(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=oa(0),this.expirationTimes=oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Iu(e,t,i,o,u,d,v,C,E){return e=new h0(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},Ka(d),e}function p0(e,t,i){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Bu.exports=P0(),Bu.exports}var Yh;function R0(){if(Yh)return Sl;Yh=1;var n=N0();return Sl.createRoot=n.createRoot,Sl.hydrateRoot=n.hydrateRoot,Sl}var L0=R0();const M0=sm(L0);var oo=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,Ps,Gp,T0=(Gp=class extends oo{constructor(){super();de(this,Tr);de(this,Xn);de(this,Ps);re(this,Ps,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,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,Xn))==null||r.call(this),re(this,Xn,void 0))}setEventListener(r){var s;re(this,Ps,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,Ps=new WeakMap,Gp),Lc=new T0,I0={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},Jn,Rc,qp,D0=(qp=class{constructor(){de(this,Jn,I0);de(this,Rc,!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,Rc=new WeakMap,qp),Lr=new D0;function z0(n){setTimeout(n,0)}var F0=typeof window>"u"||"Deno"in globalThis;function kt(){}function O0(n,r){return typeof n=="function"?n(r):n}function rc(n){return typeof n=="number"&&n>=0&&n!==1/0}function im(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 Xh(n,r){const{type:s="all",exact:l,fetchStatus:a,predicate:c,queryKey:h,stale:f}=n;if(h){if(l){if(r.queryHash!==Mc(h,r.options))return!1}else if(!Ki(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 Jh(n,r){const{exact:s,status:l,predicate:a,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(s){if(Qi(r.options.mutationKey)!==Qi(c))return!1}else if(!Ki(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||a&&!a(r))}function Mc(n,r){return((r==null?void 0:r.queryKeyHashFn)||Qi)(n)}function Qi(n){return JSON.stringify(n,(r,s)=>ic(s)?Object.keys(s).sort().reduce((l,a)=>(l[a]=s[a],l),{}):s)}function Ki(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>Ki(n[s],r[s])):!1}var A0=Object.prototype.hasOwnProperty;function om(n,r,s=0){if(n===r)return n;if(s>500)return r;const l=ep(n)&&ep(r);if(!l&&!(ic(n)&&ic(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 m=0;for(let w=0;w{Lr.setTimeout(r,n)})}function oc(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?om(n,r):r}function B0(n,r,s=0){const l=[...n,r];return s&&l.length>s?l.slice(1):l}function $0(n,r,s=0){const l=[r,...n];return s&&l.length>s?l.slice(0,-1):l}var Tc=Symbol();function lm(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Tc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function am(n,r){return typeof n=="function"?n(...r):!!n}function V0(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 Gi=(()=>{let n=()=>F0;return{isServer(){return n()},setIsServer(r){n=r}}})();function lc(){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 H0=z0;function W0(){let n=[],r=0,s=f=>{f()},l=f=>{f()},a=H0;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=W0(),Ns,er,Rs,Zp,Q0=(Zp=class extends oo{constructor(){super();de(this,Ns,!0);de(this,er);de(this,Rs);re(this,Rs,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,Rs))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,er))==null||r.call(this),re(this,er,void 0))}setEventListener(r){var s;re(this,Rs,r),(s=j(this,er))==null||s.call(this),re(this,er,r(this.setOnline.bind(this)))}setOnline(r){j(this,Ns)!==r&&(re(this,Ns,r),this.listeners.forEach(l=>{l(r)}))}isOnline(){return j(this,Ns)}},Ns=new WeakMap,er=new WeakMap,Rs=new WeakMap,Zp),Il=new Q0;function K0(n){return Math.min(1e3*2**n,3e4)}function um(n){return(n??"online")==="online"?Il.isOnline():!0}var ac=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function cm(n){let r=!1,s=0,l;const a=lc(),c=()=>a.status!=="pending",h=b=>{var _;if(!c()){const R=new ac(b);x(R),(_=n.onCancel)==null||_.call(n,R)}},f=()=>{r=!0},p=()=>{r=!1},m=()=>Lc.isFocused()&&(n.networkMode==="always"||Il.isOnline())&&n.canRun(),w=()=>um(n.networkMode)&&n.canRun(),y=b=>{c()||(l==null||l(),a.resolve(b))},x=b=>{c()||(l==null||l(),a.reject(b))},k=()=>new Promise(b=>{var _;l=R=>{(c()||m())&&b(R)},(_=n.onPause)==null||_.call(n)}).then(()=>{var b;l=void 0,c()||(b=n.onContinue)==null||b.call(n)}),S=()=>{if(c())return;let b;const _=s===0?n.initialPromise:void 0;try{b=_??n.fn()}catch(R){b=Promise.reject(R)}Promise.resolve(b).then(y).catch(R=>{var F;if(c())return;const L=n.retry??(Gi.isServer()?0:3),z=n.retryDelay??K0,M=typeof z=="function"?z(s,R):z,A=L===!0||typeof L=="number"&&sm()?void 0:k()).then(()=>{r?x(R):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,Yp,dm=(Yp=class{constructor(){de(this,Ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rc(this.gcTime)&&re(this,Ir,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Gi.isServer()?1/0:300*1e3))}clearGcTimeout(){j(this,Ir)!==void 0&&(Lr.clearTimeout(j(this,Ir)),re(this,Ir,void 0))}},Ir=new WeakMap,Yp);function G0(n){return{onFetch:(r,s)=>{var w,y,x,k,S;const l=r.options,a=(x=(y=(w=r.fetchOptions)==null?void 0:w.meta)==null?void 0:y.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 m=async()=>{let b=!1;const _=z=>{V0(z,()=>r.signal,()=>b=!0)},R=lm(r.options,r.fetchOptions),L=async(z,M,A)=>{if(b)return Promise.reject(r.signal.reason);if(M==null&&z.pages.length)return Promise.resolve(z);const G=(()=>{const X={client:r.client,queryKey:r.queryKey,pageParam:M,direction:A?"backward":"forward",meta:r.options.meta};return _(X),X})(),V=await R(G),{maxPages:O}=r.options,Q=A?$0:B0;return{pages:Q(z.pages,V,O),pageParams:Q(z.pageParams,M,O)}};if(a&&c.length){const z=a==="backward",M=z?q0:np,A={pages:c,pageParams:h},F=M(l,A);f=await L(A,F,z)}else{const z=n??c.length;do{const M=p===0?h[0]??l.initialPageParam:np(l,f);if(p>0&&M==null)break;f=await L(f,M),p++}while(p{var b,_;return(_=(b=r.options).persister)==null?void 0:_.call(b,m,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=m}}}function np(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 q0(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 Ls,Dr,Ms,At,zr,et,eo,Fr,jt,fm,kn,Xp,Z0=(Xp=class extends dm{constructor(r){super();de(this,jt);de(this,Ls);de(this,Dr);de(this,Ms);de(this,At);de(this,zr);de(this,et);de(this,eo);de(this,Fr);re(this,Fr,!1),re(this,eo,r.defaultOptions),this.setOptions(r.options),this.observers=[],re(this,zr,r.client),re(this,At,j(this,zr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,re(this,Dr,sp(this.options)),this.state=r.state??j(this,Dr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,Ls)}get promise(){var r;return(r=j(this,et))==null?void 0:r.promise}setOptions(r){if(this.options={...j(this,eo),...r},r!=null&&r._type&&re(this,Ls,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=sp(this.options);s.data!==void 0&&(this.setState(rp(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=oc(this.state.data,r,this.options);return we(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){we(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===Tc||!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:!im(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,Fr)||we(this,jt,fm).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||we(this,jt,kn).call(this,{type:"invalidate"})}async fetch(r,s){var m,w,y,x,k,S,b,_,R,L,z;if(this.state.fetchStatus!=="idle"&&((m=j(this,et))==null?void 0:m.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,Fr,!0),l.signal)})},c=()=>{const M=lm(this.options,s),F=(()=>{const G={client:j(this,zr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return re(this,Fr,!1),this.options.persister?this.options.persister(M,F,this):M(F)},f=(()=>{const M={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:j(this,zr),state:this.state,fetchFn:c};return a(M),M})(),p=j(this,Ls)==="infinite"?G0(this.options.pages):this.options.behavior;p==null||p.onFetch(f,this),re(this,Ms,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=f.fetchOptions)==null?void 0:w.meta))&&we(this,jt,kn).call(this,{type:"fetch",meta:(y=f.fetchOptions)==null?void 0:y.meta}),re(this,et,cm({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:M=>{M instanceof ac&&M.revert&&this.setState({...j(this,Ms),fetchStatus:"idle"}),l.abort()},onFail:(M,A)=>{we(this,jt,kn).call(this,{type:"failed",failureCount:M,error:A})},onPause:()=>{we(this,jt,kn).call(this,{type:"pause"})},onContinue:()=>{we(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),(b=(S=j(this,At).config).onSettled)==null||b.call(S,M,this.state.error,this),M}catch(M){if(M instanceof ac){if(M.silent)return j(this,et).promise;if(M.revert){if(this.state.data===void 0)throw M;return this.state.data}}throw we(this,jt,kn).call(this,{type:"error",error:M}),(R=(_=j(this,At).config).onError)==null||R.call(_,M,this),(z=(L=j(this,At).config).onSettled)==null||z.call(L,this.state.data,M,this),M}finally{this.scheduleGc()}}},Ls=new WeakMap,Dr=new WeakMap,Ms=new WeakMap,At=new WeakMap,zr=new WeakMap,et=new WeakMap,eo=new WeakMap,Fr=new WeakMap,jt=new WeakSet,fm=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,...hm(l.data,this.options),fetchMeta:r.meta??null};case"success":const a={...l,...rp(r.data,r.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Ms,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})})},Xp);function hm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:um(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function rp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sp(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,to,ht,Or,Ts,Sn,tr,no,Is,Ds,Ar,Ur,nr,zs,je,Ui,uc,cc,dc,fc,hc,pc,mc,pm,Jp,Y0=(Jp=class extends oo{constructor(r,s){super();de(this,je);de(this,wt);de(this,be);de(this,to);de(this,ht);de(this,Or);de(this,Ts);de(this,Sn);de(this,tr);de(this,no);de(this,Is);de(this,Ds);de(this,Ar);de(this,Ur);de(this,nr);de(this,zs,new Set);this.options=s,re(this,wt,r),re(this,tr,null),re(this,Sn,lc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,be).addObserver(this),ip(j(this,be),this.options)?we(this,je,Ui).call(this):this.updateResult(),we(this,je,fc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gc(j(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gc(j(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,je,hc).call(this),we(this,je,pc).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");we(this,je,mc).call(this),j(this,be).setOptions(this.options),s._defaulted&&!sc(this.options,s)&&j(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,be),observer:this});const a=this.hasListeners();a&&op(j(this,be),l,this.options,s)&&we(this,je,Ui).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)))&&we(this,je,uc).call(this);const c=we(this,je,cc).call(this);a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||c!==j(this,nr))&&we(this,je,dc).call(this,c)}getOptimisticResult(r){const s=j(this,wt).getQueryCache().build(j(this,wt),r),l=this.createResult(s,r);return J0(this,l)&&(re(this,ht,l),re(this,Ts,this.options),re(this,Or,j(this,be).state)),l}getCurrentResult(){return j(this,ht)}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,zs).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 we(this,je,Ui).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,ht)))}createResult(r,s){var O;const l=j(this,be),a=this.options,c=j(this,ht),h=j(this,Or),f=j(this,Ts),m=r!==l?r.state:j(this,to),{state:w}=r;let y={...w},x=!1,k;if(s._optimisticResults){const Q=this.hasListeners(),X=!Q&&ip(r,s),Z=Q&&op(r,l,s,a);(X||Z)&&(y={...y,...hm(w.data,r.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:S,errorUpdatedAt:b,status:_}=y;k=y.data;let R=!1;if(s.placeholderData!==void 0&&k===void 0&&_==="pending"){let Q;c!=null&&c.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(Q=c.data,R=!0):Q=typeof s.placeholderData=="function"?s.placeholderData((O=j(this,Ds))==null?void 0:O.state.data,j(this,Ds)):s.placeholderData,Q!==void 0&&(_="success",k=oc(c==null?void 0:c.data,Q,s),x=!0)}if(s.select&&k!==void 0&&!R)if(c&&k===(h==null?void 0:h.data)&&s.select===j(this,no))k=j(this,Is);else try{re(this,no,s.select),k=s.select(k),k=oc(c==null?void 0:c.data,k,s),re(this,Is,k),re(this,tr,null)}catch(Q){re(this,tr,Q)}j(this,tr)&&(S=j(this,tr),k=j(this,Is),b=Date.now(),_="error");const L=y.fetchStatus==="fetching",z=_==="pending",M=_==="error",A=z&&L,F=k!==void 0,V={status:_,fetchStatus:y.fetchStatus,isPending:z,isSuccess:_==="success",isError:M,isInitialLoading:A,isLoading:A,data:k,dataUpdatedAt:y.dataUpdatedAt,error:S,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!z,isLoadingError:M&&!F,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:M&&F,isStale:Ic(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,Z=te=>{X?te.reject(V.error):Q&&te.resolve(V.data)},ae=()=>{const te=re(this,Sn,V.promise=lc());Z(te)},H=j(this,Sn);switch(H.status){case"pending":r.queryHash===l.queryHash&&Z(H);break;case"fulfilled":(X||V.data!==H.value)&&ae();break;case"rejected":(!X||V.error!==H.reason)&&ae();break}}return V}updateResult(){const r=j(this,ht),s=this.createResult(j(this,be),this.options);if(re(this,Or,j(this,be).state),re(this,Ts,this.options),j(this,Or).data!==void 0&&re(this,Ds,j(this,be)),sc(s,r))return;re(this,ht,s);const l=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!j(this,zs).size)return!0;const h=new Set(c??j(this,zs));return this.options.throwOnError&&h.add("error"),Object.keys(j(this,ht)).some(f=>{const p=f;return j(this,ht)[p]!==r[p]&&h.has(p)})};we(this,je,pm).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,je,fc).call(this)}},wt=new WeakMap,be=new WeakMap,to=new WeakMap,ht=new WeakMap,Or=new WeakMap,Ts=new WeakMap,Sn=new WeakMap,tr=new WeakMap,no=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Ar=new WeakMap,Ur=new WeakMap,nr=new WeakMap,zs=new WeakMap,je=new WeakSet,Ui=function(r){we(this,je,mc).call(this);let s=j(this,be).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(kt)),s},uc=function(){we(this,je,hc).call(this);const r=lr(this.options.staleTime,j(this,be));if(Gi.isServer()||j(this,ht).isStale||!rc(r))return;const l=im(j(this,ht).dataUpdatedAt,r)+1;re(this,Ar,Lr.setTimeout(()=>{j(this,ht).isStale||this.updateResult()},l))},cc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,be)):this.options.refetchInterval)??!1},dc=function(r){we(this,je,pc).call(this),re(this,nr,r),!(Gi.isServer()||Pt(this.options.enabled,j(this,be))===!1||!rc(j(this,nr))||j(this,nr)===0)&&re(this,Ur,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||Lc.isFocused())&&we(this,je,Ui).call(this)},j(this,nr)))},fc=function(){we(this,je,uc).call(this),we(this,je,dc).call(this,we(this,je,cc).call(this))},hc=function(){j(this,Ar)!==void 0&&(Lr.clearTimeout(j(this,Ar)),re(this,Ar,void 0))},pc=function(){j(this,Ur)!==void 0&&(Lr.clearInterval(j(this,Ur)),re(this,Ur,void 0))},mc=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,to,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},pm=function(r){st.batch(()=>{r.listeners&&this.listeners.forEach(s=>{s(j(this,ht))}),j(this,wt).getQueryCache().notify({query:j(this,be),type:"observerResultsUpdated"})})},Jp);function X0(n,r){return Pt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Pt(r.retryOnMount,n)===!1)}function ip(n,r){return X0(n,r)||n.state.data!==void 0&&gc(n,r,r.refetchOnMount)}function gc(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&&Ic(n,r)}return!1}function op(n,r,s,l){return(n!==r||Pt(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Ic(n,s)}function Ic(n,r){return Pt(r.enabled,n)!==!1&&n.isStaleByTime(lr(r.staleTime,n))}function J0(n,r){return!sc(n.getCurrentResult(),r)}var ro,sn,ut,Br,on,Zn,em,ev=(em=class extends dm{constructor(r){super();de(this,on);de(this,ro);de(this,sn);de(this,ut);de(this,Br);re(this,ro,r.client),this.mutationId=r.mutationId,re(this,ut,r.mutationCache),re(this,sn,[]),this.state=r.state||tv(),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,m,w,y,x,k,S,b,_,R,L,z,M,A,F,G;const s=()=>{we(this,on,Zn).call(this,{type:"continue"})},l={client:j(this,ro),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Br,cm({fn:()=>this.options.mutationFn?this.options.mutationFn(r,l):Promise.reject(new Error("No mutationFn found")),onFail:(V,O)=>{we(this,on,Zn).call(this,{type:"failed",failureCount:V,error:O})},onPause:()=>{we(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{we(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&&we(this,on,Zn).call(this,{type:"pending",context:O,variables:r,isPaused:c})}const V=await j(this,Br).start();return await((m=(p=j(this,ut).config).onSuccess)==null?void 0:m.call(p,V,r,this.state.context,this,l)),await((y=(w=this.options).onSuccess)==null?void 0:y.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((b=(S=this.options).onSettled)==null?void 0:b.call(S,V,null,r,this.state.context,l)),we(this,on,Zn).call(this,{type:"success",data:V}),V}catch(V){try{await((R=(_=j(this,ut).config).onError)==null?void 0:R.call(_,V,r,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((z=(L=this.options).onError)==null?void 0:z.call(L,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=(F=this.options).onSettled)==null?void 0:G.call(F,void 0,V,r,this.state.context,l))}catch(O){Promise.reject(O)}throw we(this,on,Zn).call(this,{type:"error",error:V}),V}finally{j(this,ut).runNext(this)}}},ro=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})})},em);function tv(){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,so,tm,nv=(tm=class extends oo{constructor(r={}){super();de(this,bn);de(this,Kt);de(this,so);this.config=r,re(this,bn,new Set),re(this,Kt,new Map),re(this,so,0)}build(r,s,l){const a=new ev({client:r,mutationCache:this,mutationId:++kl(this,so)._,options:r.defaultMutationOptions(s),state:l});return this.add(a),a}add(r){j(this,bn).add(r);const s=bl(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=bl(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=bl(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=bl(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=>Jh(s,l))}findAll(r={}){return this.getAll().filter(s=>Jh(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,so=new WeakMap,tm);function bl(n){var r;return(r=n.options.scope)==null?void 0:r.id}var ln,nm,rv=(nm=class extends oo{constructor(r={}){super();de(this,ln);this.config=r,re(this,ln,new Map)}build(r,s,l){const a=s.queryKey,c=s.queryHash??Mc(a,s);let h=this.get(c);return h||(h=new Z0({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=>Xh(s,l))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(l=>Xh(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,nm),He,rr,sr,Fs,Os,ir,As,Us,rm,sv=(rm=class{constructor(n={}){de(this,He);de(this,rr);de(this,sr);de(this,Fs);de(this,Os);de(this,ir);de(this,As);de(this,Us);re(this,He,n.queryCache||new rv),re(this,rr,n.mutationCache||new nv),re(this,sr,n.defaultOptions||{}),re(this,Fs,new Map),re(this,Os,new Map),re(this,ir,0)}mount(){kl(this,ir)._++,j(this,ir)===1&&(re(this,As,Lc.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onFocus())})),re(this,Us,Il.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var n,r;kl(this,ir)._--,j(this,ir)===0&&((n=j(this,As))==null||n.call(this),re(this,As,void 0),(r=j(this,Us))==null||r.call(this),re(this,Us,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=O0(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 Il.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,Fs).set(Qi(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...j(this,Fs).values()],s={};return r.forEach(l=>{Ki(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,r){j(this,Os).set(Qi(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...j(this,Os).values()],s={};return r.forEach(l=>{Ki(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=Mc(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===Tc&&(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,Fs=new WeakMap,Os=new WeakMap,ir=new WeakMap,As=new WeakMap,Us=new WeakMap,rm),mm=W.createContext(void 0),Dc=n=>{const r=W.useContext(mm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},iv=({client:n,children:r})=>(W.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),g.jsx(mm.Provider,{value:n,children:r})),gm=W.createContext(!1),ov=()=>W.useContext(gm);gm.Provider;function lv(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var av=W.createContext(lv()),uv=()=>W.useContext(av),cv=(n,r,s)=>{const l=s!=null&&s.state.error&&typeof n.throwOnError=="function"?am(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(r.isReset()||(n.retryOnMount=!1))},dv=n=>{W.useEffect(()=>{n.clearReset()},[n])},fv=({result:n,errorResetBoundary:r,throwOnError:s,query:l,suspense:a})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||am(s,[n.error,l])),hv=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))}},pv=(n,r)=>n.isLoading&&n.isFetching&&!r,mv=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,lp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function gv(n,r,s){var k,S,b,_;const l=ov(),a=uv(),c=Dc(),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,hv(h),cv(h,a,f),dv(a);const m=!c.getQueryCache().get(h.queryHash),[w]=W.useState(()=>new r(c,h)),y=w.getOptimisticResult(h),x=!l&&p;if(W.useSyncExternalStore(W.useCallback(R=>{const L=x?w.subscribe(st.batchCalls(R)):kt;return w.updateResult(),L},[w,x]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),W.useEffect(()=>{w.setOptions(h)},[h,w]),mv(h,y))throw lp(h,w,a);if(fv({result:y,errorResetBoundary:a,throwOnError:h.throwOnError,query:f,suspense:h.suspense}))throw y.error;if((_=(b=c.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||_.call(b,h,y),h.experimental_prefetchInRender&&!Gi.isServer()&&pv(y,l)){const R=m?lp(h,w,a):f==null?void 0:f.promise;R==null||R.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?y:w.trackResult(y)}function De(n,r){return gv(n,Y0)}const yv=!1;var ym=W.useLayoutEffect;function vv(n,r,s){W.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 xv(n){const r=W.useRef(null);return W.useImperativeHandle(n,()=>r.current,[]),r}function qi(n){return n[n.length-1]}function Bs(n,r){return typeof n=="function"?n(r):n}const vm=Object.prototype.hasOwnProperty,wv=Object.prototype.propertyIsEnumerable;function xm(n){for(const r in n)if(vm.call(n,r))return!0;return!1}const kv=()=>Object.create(null),Rr=(n,r)=>Mr(n,r,kv);function Mr(n,r,s=()=>({}),l=0){if(n===r)return n;if(l>500)return r;const a=r,c=cp(n)&&cp(a);if(!c&&!(Dl(n)&&Dl(a)))return a;const h=c?n:ap(n);if(!h)return a;const f=c?a:ap(a);if(!f)return a;const p=h.length,m=f.length,w=c?new Array(m):s();let y=0;for(let x=0;x"u")return!0;const s=r.prototype;return!(!up(s)||!s.hasOwnProperty("isPrototypeOf"))}function up(n){return Object.prototype.toString.call(n)==="[object Object]"}function cp(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;la||!ar(n[h],r[h],s)))return!1;return a===c}return!1}const Sv=/[\x00-\x1f\x7f"<>`{}]/g;function bv(n){return n.replace(Sv,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function dp(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 bv(r)}const _v=["http:","https:","mailto:","tel:"];function zl(n,r){if(!n)return!1;try{const s=new URL(n);return!r.has(s.protocol)}catch{return!1}}function Ii(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+=dp(n.slice(s,a.index))+a[0],s=r.lastIndex;l=l+dp(s?n.slice(s):n);let c=!1;return l.startsWith("//")&&(c=!0,l="/"+l.replace(/^\/+/,"")),{path:l,handledProtocolRelativeURL:c}}function Cv(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function Ev(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let s=0;s{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,wm=5;function km(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!X.parse&&X.caseSensitive===V&&X.prefix===F&&X.suffix===G));if(Q)L=Q;else{const X=jv(A,y,V,F,G);L=X,X.parent=a,X.depth=c;let Z;A===1?Z=a.dynamic??(a.dynamic=[]):A===3?Z=a.optional??(a.optional=[]):Z=a.wildcard??(a.wildcard=[]),Z.push(X),Z.length===2&&(h==null||h.push(Z))}break}}a=L}if(b&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const R=ks(y);R.kind=wm,R.parent=a,c++,R.depth=c,a.pathless??(a.pathless=[]),a.pathless.push(R),a=R}const _=(s.path||!s.children)&&!s.isRoot;if(_&&y.endsWith("/")){const R=ks(y);R.kind=or,R.parent=a,c++,R.depth=c,a.index=R,a=R}a.parse=b??null,a.priority=((w=x==null?void 0:x.params)==null?void 0:w.priority)??0,_&&!a.route&&(a.route=s,a.fullPath=y)}if(s.children)for(const y of s.children)Vl(n,r,y,p,a,c,h,f)}function Sm(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 jv(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 Pv(n,r){const s=ks("/"),l=new Uint16Array(6),a=[];for(const c of n)Vl(!1,l,c,1,s,0,a);for(const c of a)c.sort(Sm);r.masksTree=s,r.flatCache=Fl(1e3)}function Nv(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 Rv(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("/"),Vl(r,new Uint16Array(6),{from:n},1,h,0),a.singleCache.set(c,h)),Fc(l,h,s)}function Lv(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=_m(c.route)),r.matchCache.set(l,c),c}function Mv(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Tv(n,r=!1,s){const l=ks(n.fullPath),a=new Uint16Array(6),c=[],h={},f={};let p=0;Vl(r,a,n,1,l,0,c,m=>{if(s==null||s(m,p),m.id in h&&zc(),h[m.id]=m,p!==0&&m.path){const w=Mv(m.fullPath);(!f[w]||m.fullPath.endsWith("/"))&&(f[w]=m)}p++});for(const m of c)m.sort(Sm);return{processedTree:{segmentTree:l,singleCache:Fl(1e3),matchCache:Fl(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:f}}function Fc(n,r,s=!1){const l=n.split("/"),a=Dv(n,l,r,s);if(!a)return null;const[c]=bm(n,l,a);return{route:a.node.route,rawParams:c}}function bm(n,r,s){var w,y,x,k;const l=Iv(s.node);let a=null;const c=Object.create(null);let h=((w=s.extract)==null?void 0:w.part)??0,f=((y=s.extract)==null?void 0:y.node)??0,p=((x=s.extract)==null?void 0:x.path)??0,m=((k=s.extract)==null?void 0:k.segment)??0;for(;f=0;F--){const G=y.wildcard[F],{prefix:V,suffix:O}=G;if(!(V&&(z||!(G.caseSensitive?M:A??(A=M.toLowerCase())).startsWith(V)))){if(O){if(z)continue;const Q=r.slice(x).join("/"),X=Q.slice(-O.length);if((G.caseSensitive?X:X.toLowerCase())!==O||Q.length-O.length=0;G--){const V=y.optional[G];f.push({node:V,index:x,skipped:F,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L})}if(!z)for(let G=y.optional.length-1;G>=0;G--){const V=y.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)=0;F--){const G=y.dynamic[F],{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)=0;F--){const G=y.pathless[F];f.push({node:G,index:x,skipped:k,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L})}}if(m)return m;if(l&&p){let w=p.index;for(let x=0;xn.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 Nl(n){return Rl(n.filter(r=>r!==void 0).join("/"))}function Rl(n){return n.replace(/\/{2,}/g,"/")}function Cm(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 Em(n){return _n(Cm(n))}function Ol(n,r){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${r}/`?n.slice(0,-1):n}function Fv(n,r,s){return Ol(n,s)===Ol(r,s)}function Ov({base:n,to:r,trailingSlash:s="never",cache:l}){if(r.includes("//")&&(r=Rl(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 m=l.get(c);if(m)return m}let h;if(a)h=n.split("/");else{for(n.includes("//")&&(n=Rl(n)),h=n.split("/");h.length>1&&qi(h)==="";)h.pop();const m=r.split("/");for(let w=0,y=m.length;w1?h.pop():h=[""]:x==="."||h.push(x)}}h.length>1&&(qi(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));const f=h.join("/"),p=(a?Rl(f):f)||"/";return c&&l&&l.set(c,p),p}function Av(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 Hu(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=>pp(a,s)).join("/"):pp(l,s)}function hp({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,m="";for(;fn.state.__TSR_key||n.href;function Wv(n){const r=n.getAttribute(mp);if(r)return`[${mp}="${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 El=!1;const Ll="window";function yc(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function gp(n){const r=new Set;for(const s of n){if(s===Ll)continue;const l=yc(s);l&&r.add(l)}return r}function Qv(n,r){const s=n.options.scrollRestoration,l=n._scroll;s&&(l.restoring=!0);const a=n.options.getScrollRestorationKey||Hv,c=new Set,h=f=>{const p=Yn[f]||(Yn[f]={});for(const m of c)m===document?p[Ll]={scrollX,scrollY}:m.isConnected&&(p[Wv(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};s&&!l.restoration&&(l.restoration=!0,El=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{El||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())),Vv()})),!l.reset&&(l.reset=!0,n.subscribe("onRendered",f=>{var b;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,w=l.next,y=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 _=Yn[S];if(_){let R=Yn[k];for(const L in _){if(L===Ll){if(w)continue}else{const z=yc(L);if(!z||w&&m&&(x??(x=gp(m)),x.has(z)))continue}R||(R=Yn[k]={}),R[L]??(R[L]=_[L])}}}El=!0;try{const _=f.toLocation.hash,R=f.toLocation.state.__hashScrollIntoViewOptions??!0;let L=!1;if(w){!_&&m&&(x??(x=gp(m)));const z=_&&R&&y,M=l.restoring?Yn[k]:void 0;if(M)for(const A in M){const{scrollX:F,scrollY:G}=M[A];if(A===Ll){if(z)continue;scrollTo({top:G,left:F,behavior:p}),L=!0}else{const V=yc(A);V&&(V.scrollLeft=F,V.scrollTop=G,x==null||x.delete(V))}}if(!_){const A={top:0,left:0,behavior:p};if(L||scrollTo(A),x)for(const F of x)F.scrollTo(A)}}!L&&_&&R&&((b=document.getElementById(_))==null||b.scrollIntoView(R))}finally{El=!1}}))}function Kv(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 Wu(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function Gv(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]=Wu(a):Array.isArray(c)?c.push(Wu(a)):s[l]=[c,Wu(a)]}return s}const qv=/^(?:\s|["[{\d-]|fa|nu|tr)/,Zv=Xv(JSON.parse),Yv=Jv(JSON.stringify,JSON.parse);function Xv(n){return r=>{r[0]==="?"&&(r=r.substring(1));const s=Gv(r);for(const l in s){const a=s[l];if(typeof a=="string")try{s[l]=n(a)}catch{}}return s}}function Jv(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&&!qv.test(a))return a;try{return r(a),n(a)}catch{}}return a}return a=>{const c=Kv(a,l);return c?`?${c}`:""}}const bs="__root__";function jm(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 Pm(n){return n instanceof Response&&!!n.options}function ex(n){return{input:({url:r})=>{for(const s of n)r=vc(s,r);return r},output:({url:r})=>{for(let s=n.length-1;s>=0;s--)r=Nm(n[s],r);return r}}}function tx(n){const r=Em(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=Nl(["/",r,c.pathname]),c)}}function vc(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 Nm(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 nx(n,r){const{createMutableStore:s,createReadonlyStore:l,batch:a}=r,c=new Map,h=s("idle"),f=s(n),p=s(void 0),m=s([]),w=l(()=>m.get().map(b=>c.get(b).get())),y=l(()=>({status:h.get(),isLoading:h.get()==="pending",matches:w.get(),location:f.get(),resolvedLocation:p.get()}));function x(b){let _=c.get(b);return _||(_=s(void 0),c.set(b,_)),_}const k={status:h,location:f,resolvedLocation:p,ids:m,matches:w,byRoute:c,__store:y,getMatchStore:x,setMatches:S};function S(b){const _=m.get(),R=b.map(L=>L.routeId);a(()=>{Ev(_,R)||m.set(R);for(const L of _)R.includes(L)||c.get(L).set(()=>{});for(const L of b){const z=x(L.routeId);z.get()!==L&&z.set(L)}})}return k}var ur="__TSR_index",yp="popstate",vp="beforeunload";function rx(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 y,x;if((f==null?void 0:f.ignoreBlocker)??!1){h();return}const m=((y=n.getBlockers)==null?void 0:y.call(n))??[],w=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&w)for(const k of m){const S=Al(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 m=r.state[ur];f=xp(m+1,f),c({task:()=>{n.pushState(h,f),l({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:f})},replace:(h,f,p)=>{const m=r.state[ur];f=xp(m,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,y;const m=((w=n.getBlockers)==null?void 0:w.call(n))??[];(y=n.setBlockers)==null||y.call(n,m.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 xp(n,r){r||(r={});const s=Oc();return{...r,key:s,__TSR_key:s,[ur]:n}}function sx(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=(()=>Al(`${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=Oc();r.history.replaceState({[ur]:0,key:O,__TSR_key:O},"")}let m=p(),w,y=!1,x=!1,k=!1,S=!1;const b=()=>m;let _;const R=()=>{_&&(F._ignoreSubscribers=!0,(_[2]?r.history.pushState:r.history.replaceState)(_[1],"",_[0]),F._ignoreSubscribers=!1,_=void 0,w=void 0)},L=(O,Q,X)=>{const Z=f(Q),ae=!!_;ae||(w=m),m=Al(Q,X),_=[Z,X,(_==null?void 0:_[2])||O],ae||queueMicrotask(()=>R())},z=O=>{m=p(),F.notify({type:O})},M=async()=>{if(x){x=!1;return}const O=p(),Q=O.state[ur]-m.state[ur],X=Q===1,Z=Q===-1,ae=!X&&!Z||y;y=!1;const H=ae?"GO":Z?"BACK":"FORWARD",te=ae?{type:"GO",index:Q}:{type:Z?"BACK":"FORWARD"};if(k)k=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const he of ye)if(await he.blockerFn({currentLocation:m,nextLocation:O,action:H})){x=!0,r.history.go(1),F.notify(te);return}}}m=p(),F.notify(te)},A=O=>{if(S){S=!1;return}let Q=!1;const X=c();if(typeof document<"u"&&X.length)for(const Z of X){const ae=Z.enableBeforeUnload??!0;if(ae===!0){Q=!0;break}if(typeof ae=="function"&&ae()===!0){Q=!0;break}}if(Q)return O.preventDefault(),O.returnValue=""},F=rx({getLocation:b,getLength:()=>r.history.length,pushState:(O,Q)=>L(!0,O,Q),replaceState:(O,Q)=>L(!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=>{y=!0,r.history.go(O)},createHref:O=>f(O),flush:R,destroy:()=>{r.history.pushState=s,r.history.replaceState=l,r.removeEventListener(vp,A,{capture:!0}),r.removeEventListener(yp,M)},onBlocked:()=>{w&&m!==w&&(m=w)},getBlockers:c,setBlockers:h,notifyOnIndexChange:!1});return r.addEventListener(vp,A,{capture:!0}),r.addEventListener(yp,M),r.history.pushState=function(...O){const Q=s.apply(r.history,O);return F._ignoreSubscribers||z("PUSH"),Q},r.history.replaceState=function(...O){const Q=l.apply(r.history,O);return F._ignoreSubscribers||z("REPLACE"),Q},F}function ix(n){let r=n.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function Al(n,r){const s=ix(n),l=s.indexOf("#"),a=s.indexOf("?"),c=Oc();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 Oc(){return(Math.random()+1).toString(36).substring(7)}function wp(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 Hl(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 kp({key:n,__TSR_key:r,__TSR_index:s,__hashScrollIntoViewOptions:l,...a}){return a}function ox(n,r,s,l){var a,c,h,f;for(const p of r){if(l&&n._tx!==l)return;s.some(m=>m.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(m=>m.routeId===p.routeId)?"onStay":"onEnter"])==null||f.call(h,p)}}var lx=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??yv??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Av(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=sx()),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 m;this.resolvePathCache=Fl(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=nx(this.latestLocation,m),Qv(this)}const f=this.options.basepath??"/",p=this.options.rewrite;if(c||a!==f||h!==p){this.basepath=f;const m=[],w=Em(f);w&&w!=="/"&&m.push(tx({basepath:f})),p&&m.push(p),this.rewrite=m.length===0?void 0:m.length===1?m[0]:ex(m),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=Tv(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});return this.options.routeMasks&&Pv(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:m,hash:w,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(m),L=this.options.stringifySearch(R);return{href:p+L+w,publicHref:p+L+w,pathname:Ii(p).path,external:!1,searchStr:L,search:Rr(l==null?void 0:l.search,R),hash:Ii(w.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}}const k=new URL(y,this.origin),S=vc(this.rewrite,k),b=this.options.parseSearch(S.search),_=this.options.stringifySearch(b);return S.search=_,{href:S.href.replace(S.origin,""),publicHref:y,pathname:Ii(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:_,search:Rr(l==null?void 0:l.search,b),hash:Ii(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)=>Ov({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=Lv(_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=Al(c.href,{});c={...c,to:vc(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],m=f[2],w=f[3],y=this.resolvePathWithBase(p,c.to?`${c.to}`:".");let x=Sp(c.params,w);const k=this.routesByPath[_n(y)];let S;if(k)S=this.getRouteBranch(k);else if(y.includes("$"))S=[];else{const[X,Z,ae]=this.getMatchedRoutes(y);S=X,this.options.notFoundRoute&&(!ae||ae.path!=="/"&&Z["**"])&&(S=[...S,this.options.notFoundRoute])}if(S.length&&xm(x))for(const X of S){const Z=((O=X.options.params)==null?void 0:O.stringify)??X.options.stringifyParams;if(Z){x===w&&(x=Object.assign(Object.create(null),x));try{Object.assign(x,Z(x))}catch{}}}const b=s.leaveParams?y:Ii(hp({path:y,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=m;if(s._includeValidateSearch&&((Q=this.options.search)!=null&&Q.strict)){const X={};S.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(X,Ml(Z.options.validateSearch,{...X,..._}))}catch{}}),_=X}_=ux(_,c,S,s._includeValidateSearch),_=Rr(m,_);const R=this.options.stringifySearch(_),L=c.hash===!0?h.hash:c.hash?Bs(c.hash,h.hash):void 0,z=L?`#${L}`:"";let M=c.state===!0?h.state:c.state?Bs(c.state,h.state):{};c.state&&(M=Mr(h.state,M));const A=`${b}${R}${z}`;let F,G,V=!1;if(this.rewrite){const X=new URL(A,this.origin),Z=Nm(this.rewrite,X);F=X.href.replace(X.origin,""),Z.origin!==this.origin?(G=Z.href,V=!0):G=Z.pathname+Z.search+Z.hash}else F=Cv(A),G=F;return{publicHref:G,href:F,pathname:b,search:_,searchStr:R,state:M,hash:L??"",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=Nv(a.pathname,this.processedTree);if(c){const h=Object.assign(Object.create(null),c.rawParams),{from:f,params:p,...m}=c.route,w=Sp(p,h);a.maskedLocation=l({from:s.from,...m,params:w})}}return a},this.commitLocation=async({viewTransition:s,ignoreBlocker:l,...a})=>{let c;const h=_n(this.latestLocation.href)===_n(a.href)&&ar(kp(a.state),kp(this.latestLocation.state)),f=this._commitPromise;let p;const m=new Promise(w=>{p=w});if(m.resolve=()=>{p(),f==null||f.resolve()},this._commitPromise=m,h)this.load();else{let{maskedLocation:w,hashScrollIntoView:y,...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=y??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 m=this.commitLocation({...p,viewTransition:c,replace:s,resetScroll:l,hashScrollIntoView:a,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:l,href:a,publicHref:c,...h})=>{var p,m;let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!l&&(l=!0),l){if(s!==void 0||!a){const y=this.buildLocation({to:s,...h});a=a??y.publicHref,c=c??y.publicHref}const w=!f&&c?c:a;if(zl(w,this.protocolAllowlist))return;if(!h.ignoreBlocker){const y=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const x of y)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 vx(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(),m=typeof l.types=="function"?l.types(Hl(f,p)):l.types;if(m===!1)return s();h={update:s,types:m}}else h=s;return document.startViewTransition(h).updateCallbackDone}return s()},this.invalidate=s=>{var m,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(),...((m=this._tx)==null?void 0:m[3])??[]].filter(y=>!a||a(y)).map(y=>y.id)),f=[];for(const[y,x]of c??[])x.some(k=>h.has(k.id))&&(c.delete(y),f.push(y));const p=y=>{if(h.has(y.id)){const x=this.routesById[y.routeId],k={...y,invalid:!0,...(s!=null&&s.forcePending||y.status==="error"||y.status==="notFound")&&wp(x)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,k}return y};this._committed=l.map(p);for(const[y,x]of this._cache)h.has(y)&&(x.invalid=!0,s!=null&&s.forcePending&&(x.status="pending"));for(const y of h)(w=this._flights)==null||w.delete(y);for(const y of f)y.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&&zl(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 m;const l=this._cache,a=this._preloads,c=s==null?void 0:s.filter,h=[],f=[];for(const[w,y]of l)(!c||c(y))&&(f.push(w),h.push(y));const p=[];for(const[w,y]of a??[])(!c||y.some(c))&&(p.push(w),h.push(...y));for(const w of f)l.delete(w);for(const w of p)a.delete(w);for(const w of h){const y=w._flight;w._flight=void 0,y&&!--y[2]&&(((m=this._flights)==null?void 0:m.get(w.id))===y&&this._flights.delete(w.id),p.push(y[1]))}for(const w of p)w.abort()},this.loadRouteChunk=_s,this.preloadRoute=s=>xx(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=Rv(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??Yv,parseSearch:n.parseSearch??Zv,protocolAllowlist:n.protocolAllowlist??_v}),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=_m(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?cx(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,w=(S,b)=>{const _=m[b];return(_==null?void 0:_.routeId)===S.id?_:S===this.options.notFoundRoute?m.find(R=>R.routeId===S.id):void 0};let y;for(let S=0;S{const k=x(p.preSearchFilters?p.preSearchFilters.reduce((S,b)=>b(S),y):y);return p.postSearchFilters?p.postSearchFilters.reduce((S,b)=>b(S),k):k};a.push(w)}const m=p.validateSearch;if(l&&m){const w=({search:y,next:x,meta:k})=>{const S=x(y);try{const b=Ml(m,S);if(k&&b)for(const _ in b)_ in S||(k.defaulted||(k.defaulted=new Map)).set(_,b[_]);return{...S,...b}}catch{}return S};a.push(w)}}const c=(f,p,m)=>{if(f>=a.length){if(!r.search)return{};if(r.search===!0)return p;const y=Bs(r.search,p);return m&&(m.explicit=y),y}const w=(y,x)=>{if(x){const k=m||{};return{search:c(f+1,y,k),meta:k}}return c(f+1,y,m)};return a[f]({search:p,next:w,meta:m})};return c(0,n)}function cx(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 Sp(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,Bs(n,s))}function bp(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 xc(n,r){var s,l;return(l=(s=n.options[r])==null?void 0:s.preload)==null?void 0:l.call(s)}function dx(n,r){const s=xc(n,"component");let l=xc(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?xc(n,r):dx(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 Ac(n){const r=n.findIndex(s=>s.status!=="success"||s._notFound)+1;return r&&r{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 Yi(n,r,s){return Pm(n)?[Nt,n]:$s(n)?(n.routeId||(n.routeId=s),[Wl,n]):r?(typeof(n==null?void 0:n.then)=="function"&&(n=new Error("A Promise was thrown",{cause:n})),[En,n]):[un,n]}function Uc(n,r){var l,a;let s=Yi(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=Yi(c,!0,n.id)}return s}function $i(n,r,s,l,a){return a[0].signal.aborted?cr:Vc(n,r,s,Uc(s,l),a)}async function fx(n,r,s,l,a,c){var w,y;const[h,f]=r,p=s[0].signal,m=!!s[3];for(let x=s[6]??0;xn.navigate({...M,_fromLocation:h}),buildLocation:n.buildLocation,cause:m?"preload":k.cause,abortController:s[0],preload:m,matches:f,routeId:S.id};try{const M=k._ctx||(k._ctx=S.options.context?S.options.context({..._,deps:k.loaderDeps,context:b})||{}:void 0);k.context={...b,...M}}catch(M){return Cn(n,k),[x,$i(n,r,S,M,s)]}if(p.aborted)return[x,cr];const R=k.paramsError??k.searchError;if(R!==void 0)return Cn(n,k),[x,$i(n,r,S,R,s)];const L=S.options.beforeLoad;if(!L)continue;const z=k.status;x>=c&&(k.status="pending",(y=s[7])==null||y.call(s));try{Xi(n,k,"beforeLoad",s[0]);const M=await Vr(L({..._,search:k.search,context:k.context,...n.options.additionalContext}),p);if(p.aborted)return[x,cr];const A=Vc(n,r,S,Yi(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,$i(n,r,S,M,s)]}finally{k.status=z,Xi(n,k,!1,s[0])}}a()}function Bc(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=Bc(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=Bc(n,h,f);p&&a.push(p)}}for(const h of a)h.abort()}function $c(n){for(const r of n){const s=r._flight;s&&s[2]++}}function Xi(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 Rm(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 _p(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 m=s._flight;Xi(n,s,"loader",f);try{if(!m){const w=new AbortController;m=[Promise.resolve().then(()=>a(Rm(n,r,s,l,w,c,!!h[3]))).then(y=>Yi(y,!1,l.id),y=>Yi(y,!0,l.id)).then(y=>{var x;return y[0]!==un&&((x=n._flights)==null?void 0:x.get(s.id))===m&&(n._flights.delete(s.id),m[2]||w.abort()),y[0]===En&&m[2]?Uc(l,y[1]):y}),w,1],(n._flights??(n._flights=new Map)).set(s.id,m)}return s._flight=m,s.abortController=m[1],Vc(n,r,l,await Vr(m[0],p),h)}catch(w){if(w!==p||!p.aborted)throw w;return Cn(n,s),cr}finally{Xi(n,s,!1,f)}}function Cp(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 hx(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 Ep(n,r){return r[0]===En||r[0]===Wl?{...n,status:r[0]===En?"error":"notFound",error:r[1],_flight:void 0}:n}function px(n,r,s,l,a,c,h){var Z,ae;const f=r[1][s],p=Hr(n,f),m=!!c[3],w=n._cache.get(f.id);let y,x=!1,k;try{if(f.status==="success"&&(y=p.options.shouldReload,typeof y=="function"&&(y=y(Rm(n,r,f,p,c[0],a,m))),c[0].signal.aborted&&(k=cr)),!k)if(f.status!=="success")x=!0;else{const H=m||f.preload?p.options.preloadStaleTime??n.options.defaultPreloadStaleTime??3e4:p.options.staleTime??n.options.defaultStaleTime??0;x=!!(f.invalid||y||y===void 0&&Date.now()-f.updatedAt>=H&&(c[5]||f.cause==="enter"||c[2].some(te=>te.routeId===f.routeId&&te.id!==f.id)))}}catch(H){f.invalid=!0,Cn(n,f),k=$i(n,r,p,H,c)}const S=p.options.loader,b=typeof S=="function",_=b?S:S==null?void 0:S.handler,R=!m||p.options.preload!==!1;let L=R&&S?(Z=n._flights)==null?void 0:Z.get(f.id):void 0;L===f._flight||k?L=void 0:L&&!x&&!m&&y===void 0?x=!0:x||(L=void 0);const z=!!(S&&x&&f.status==="success"&&!m&&!c[4]&&((b?void 0:S.staleReloadMode)??n.options.defaultStaleReloadMode)!=="blocking"),M=x&&R,A=M&&!z&&(f.status!=="success"||!!S),F=s>=h?c[7]:void 0,G=p.lazyFn&&p._lazy!==!0?F:void 0;if(M&&!S&&(f.invalid=!1,f.updatedAt=Date.now()),L&&L[2]++,A){const H=f._flight;f._flight=L,(ae=Bc(n,f,H))==null||ae.abort(),s>=h&&(f.status="pending"),F==null||F()}M||(f.isFetching=!1);const V=(k?Promise.resolve(k):A?_p(n,r,f,p,_,a,c):Promise.resolve([un,f.loaderData])).then(H=>(A&&(Cp(f,H,m),H[0]===un&&(S&&!c[0].signal.aborted&&hx(n,f,w),s>=h&&(f.status="pending"))),H)),O=Vr(Promise.resolve().then(()=>_s(p,void 0,G)),c[0].signal).then(()=>{},H=>r[1].some((te,ye)=>ye<=s&&(te.status==="error"||te.status==="notFound"||te._notFound))?void 0:[s,$i(n,r,p,H,c)]).then(H=>V.then(te=>(A&&!H&&te[0]===un&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",F==null||F()),H)));if(l.push([s,V,O]),!z)return V.then(H=>Ep(f,H));const Q={...f,status:"pending",preload:!1,_flight:L};f.invalid=!1,f.isFetching="loader";const X=_p(n,r,Q,p,_,a,c).then(H=>(f.isFetching=!1,Cp(Q,H,!1),H));return(r[2]??(r[2]=[])).push([s,X,O,Q]),X.then(H=>Ep(Q,H))}async function wc(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 m=_s(p,!1);m&&await Vr(m,l)}catch(m){if(m===l&&l.aborted)throw m}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 jp(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(m=>{if(m[0]===Nt)throw[p[0],m]})})))}})))}catch(c){return c}return r??a}function Vc(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]:Uc(s,p),c=!0}}return l}async function Lm(n,r,s,l,a,c){const h=r[1];let f=await a,p=!1;const m=h.findIndex(k=>k._notFound),w=k=>k[1][0]===Wl?wc(n,h,k,l.signal):k[0];let y=m<0?h.length:m;if(((f==null?void 0:f[1][0])??0)>=Nt)y=0;else if(f){y=f[2]??(f[2]=await w(f));for(const k of s){if(k[0]>=y)break;const S=await k[1];if(S[0]!==un&&S[0]=y)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):m;if(x>=0){const k=f==null?void 0:f[1],S=k==null?void 0:k[0],b=h[x],_=k==null?void 0:k[1],R=()=>{k&&(b._notFound=void 0,S===En?b.status="error":(_.routeId=b.routeId,b.routeId===n.routeTree.id?(b.status="success",b._notFound=!0):b.status="notFound"),b.error=_,b.isFetching=!1)};R(),k||c==null||c();const L=Hr(n,b);try{await Vr(k?Promise.resolve().then(()=>_s(L,S===En?"errorComponent":"notFoundComponent")):Promise.all([_s(L),_s(L,"notFoundComponent")]),l.signal)}catch(z){if(z===l.signal&&l.signal.aborted)return $r(n,r),cr}k?p&&(l.abort(),await Promise.all([...s.map(z=>z[1]),...s.map(z=>z[2]),...(r[2]??[]).map(z=>z[1])]),$r(n,r),St(n,h),R()):b.status="success"}return r}async function Mm(n,r,s,l=0,a=r[1].length){var h,f;const c=r[1];for(let p=l;pL._notFound);if(n.options.notFoundMode!=="root"&&m>=0){const L=await wc(n,s,void 0,c,m);s[m]._notFound=void 0,s[L]._notFound=!0,m=L}let w=m<0?s.length:m+1,y=0;for(;y{for(let L=k;L=Nt&&(w=0);b()}if(!c.aborted&&!l[3]){const L=[];for(const[z,M]of n._flights??[])M[2]||(n._flights.delete(z),L.push(M[1]));for(const z of L)z.abort()}const R=Lm(n,a,x,l[0],jp(x,_,a[2]),l[7]);(f=a[2])!=null&&f.length&&(a[3]=jp(a[2],void 0,void 0,R.then(L=>Zi(L)?0:Ac(s).length,()=>0))),h=await R}catch(p){if($r(n,a),p===c&&c.aborted)return cr;throw p}return Zi(h)?h:Mm(n,h,c,l[6]===s.length?l[6]:0)}function kc(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;f0){a[3]=setTimeout(()=>kc(n,r),L);return}a[2]=0}const _=s.map(L=>({...L,_flight:void 0}));_[f].status="pending";const R=a[4]=n.startTransition(()=>n.stores.setMatches(_),_).then(L=>(L&&n._pending===a&&a[4]===R&&!a[2]&&(a[2]=Date.now()+S),L));return}}function Di(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 Pp(n,r){const s=n._pending;if(!s)return;clearTimeout(s[3]);const l=s[2]-Date.now();if(!s[4]||l<=0||!Ac(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 Im(n,r){n._committed=r,n.stores.setMatches(r)}function mx(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=Ac(s).length,f=new Map;{const p=Date.now();for(const m of[...a,...c.values()]){if(m.status!=="success"||s.some((y,x)=>y.id===m.id&&(x=(m.preload?w.options.preloadGcTime??n.options.defaultPreloadGcTime??3e5:w.options.gcTime??n.options.defaultGcTime??3e5)||f.set(m.id,c.get(m.id)===m?m:{...m,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],n._cache=f,Im(n,s),St(n,[...c.values(),...a],[...s,...f.values()]),ox(n,a,s,r)}async function jl(n,r){let s=n._tx;for(;s&&s!==r;){if(await s[5],n._tx===s)return;s=n._tx}}function Dm(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 gx(n,r,s,l,a){const c=s.map(p=>({...p}));$c(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 Lm(n,h,l,r[0],a)}catch(p){throw St(n,c),p}if(Zi(f)){St(n,c),f[0]===Nt&&n._tx===r&&n._committed===s&&await Dm(n,r,f);return}if(await Mm(n,f,r[0].signal),n._tx!==r||n._committed!==s){St(n,c);return}for(const p of c){const m=n._cache.get(p.id);m!=null&&m._flight&&m._flight===p._flight&&(n._cache.delete(p.id),Cn(n,m))}Im(n,c),St(n,s,c)}async function yx(n,r,s,l,a,c){const h=await Tm(n,r[2],r[3],[r[0],r[1],n._committed,void 0,a,s,c,l]);if(Zi(h)){const y=h[0]===Nt&&n._tx===r;if((!y||h[1].options.reloadDocument)&&Di(n,r),St(n,r[3]),r[3]=[],!y)return;if(n._tx!==r){Di(n,r);return}await Dm(n,r,h);return}const f=h[1];if(n._tx===r&&await Pp(n,r),n._tx!==r){Di(n,r),St(n,f),$r(n,h);return}const p=r[2],m=Hl(p,n.stores.resolvedLocation.get()),w=h[2];await n.startViewTransition(async()=>{var k;if(n._tx===r&&await Pp(n,r),n._tx!==r){Di(n,r),St(n,f),$r(n,h);return}const y=()=>{Di(n,r),mx(n,r,f,c),n._tx===r&&(n.emit({type:"onLoad",...m}),n._tx===r&&n.emit({type:"onBeforeRouteMount",...m}))},x=await n.startTransition(y,f);if(n._tx!==r){$r(n,h);return}w!=null&&w.length&&gx(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",...m}),x&&n._tx===r&&n.emit({type:"onRendered",...m})}),n._tx===r&&((k=n._commitPromise)==null||k.resolve(),n._commitPromise=void 0)})}async function vx(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,m=p==null?void 0:p[0](),w=new AbortController,y=n._preflight;if(n._preflight=w,m||p==null||p[1](),y==null||y.abort(),!w.signal.aborted){const A=Hl(c,l);n.emit({type:"onBeforeNavigate",...A}),w.signal.aborted||n.emit({type:"onBeforeLoad",...A})}if(w.signal.aborted){await jl(n,s);return}const x=a.href===c.href;let k=w;const S=n.matchRoutes(c,{_controller:w});$c(S);const b=m?p[1](S):void 0;if(b?k=m:m==null||m.abort(),w.signal.aborted){St(n,S),await jl(n,s);return}n._preflight=void 0;let _;const R=()=>yx(n,z,x,()=>kc(n,z),r==null?void 0:r.sync,b),L=r!=null&&r.sync?new Promise(A=>_=A):Promise.resolve().then(R).then(),z=[k,f,c,S,Date.now(),L];if(n._tx=z,s){for(const A of n.stores.matches.get()){if(n._tx!==z)break;A.isFetching&&Xi(n,A,!1)}s[0].abort(),St(n,s[3],z[3],!0)}if(n._tx!==z){St(n,z[3]),z[3]=[],_==null||_(),await jl(n,z);return}n.batch(()=>{n.stores.status.set("pending"),n.stores.location.set(c)}),(b||!n._committed.length&&((M=S[0])==null?void 0:M.status)!=="success"&&!S.some(A=>A._notFound))&&kc(n,z),_==null||_(R()),await L,await jl(n,z)}async function xx(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}),$c(h),f=(n._preloads??(n._preloads=new Map)).set(c,h),p=await Tm(n,s,h,[c,l,a,!0])}finally{f&&(f=f.delete(c),St(n,h)),c.abort()}if(!Zi(p))return p[1];if(!f||p.length<3)return;s=p[2]}catch(m){$s(m)||console.error(m);return}}}const wx="Error preloading route! ☝️";var zm=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,m;this.originalIndex=r.originalIndex;const s=this.options,l=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),l?this._path=bs:this.parentRoute||zc();let a=l?bs:s==null?void 0:s.path;a&&a!=="/"&&(a=Cm(a));const c=(s==null?void 0:s.id)||a;let h=l?bs:Nl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),h!=="__root__"&&(h=Nl(["/",h]));const f=h==="__root__"?"/":Nl([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=>jm({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.")}},kx=class extends zm{constructor(n){super(n)}},Hc=class extends W.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?W.createElement(this.props.errorComponent??Sx,{error:n,reset:this.reset}):this.props.children}};function Sx({error:n}){const[r,s]=W.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.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"})]}),g.jsx("div",{style:{height:".25rem"}}),r?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?g.jsx("code",{children:n.message}):null})}):null]})}function bx({children:n,fallback:r=null}){return g.jsx(Gt.Fragment,{children:Fm()?n:r})}function Fm(){return Gt.useSyncExternalStore(_x,()=>!0,()=>!1)}function _x(){return()=>{}}var Om=W.createContext(null);function qt(n){return W.useContext(Om)}var Ql=W.createContext(void 0),Cx=W.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 Ex({update:n,notify:r,unwatched:s}){return{link:l,unlink:a,propagate:c,checkDirty:h,shallowPropagate:f};function l(m,w,y){const x=w.depsTail;if(x!==void 0&&x.dep===m)return;const k=x!==void 0?x.nextDep:w.deps;if(k!==void 0&&k.dep===m){k.version=y,w.depsTail=k;return}const S=m.subsTail;if(S!==void 0&&S.version===y&&S.sub===w)return;const b=w.depsTail=m.subsTail={version:y,dep:m,sub:w,prevDep:x,nextDep:k,prevSub:S,nextSub:void 0};k!==void 0&&(k.prevDep=b),x!==void 0?x.nextDep=b:w.deps=b,S!==void 0?S.nextSub=b:m.subs=b}function a(m,w=m.sub){const y=m.dep,x=m.prevDep,k=m.nextDep,S=m.nextSub,b=m.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=b:y.subsTail=b,b!==void 0?b.nextSub=S:(y.subs=S)===void 0&&s(y),k}function c(m){let w=m.nextSub,y;e:do{const x=m.sub;let k=x.flags;if(k&60?k&12?k&4?!(k&48)&&p(m,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 b=(m=S).nextSub;b!==void 0&&(y={value:w,prev:y},w=b);continue}}if((m=w)!==void 0){w=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){w=m.nextSub;continue e}break}while(!0)}function h(m,w){let y,x=0,k=!1;e:do{const S=m.dep,b=S.flags;if(w.flags&16)k=!0;else if((b&17)===17){if(n(S)){const _=S.subs;_.nextSub!==void 0&&f(_),k=!0}}else if((b&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=S.deps,w=S,++x;continue}if(!k){const _=m.nextDep;if(_!==void 0){m=_;continue}}for(;x--;){const _=w.subs,R=_.nextSub!==void 0;if(R?(m=y.value,y=y.prev):m=_,k){if(n(w)){R&&f(_),w=m.sub;continue}k=!1}else w.flags&=-33;w=m.sub;const L=m.nextDep;if(L!==void 0){m=L;continue e}}return k}while(!0)}function f(m){do{const w=m.sub,y=w.flags;(y&48)===32&&(w.flags=y|16,(y&6)===2&&r(w))}while((m=m.nextSub)!==void 0)}function p(m,w){let y=w.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function jx(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 Sc=[];let Tl=0;const{link:Np,unlink:Px,propagate:Nx,checkDirty:Am,shallowPropagate:Rp}=Ex({update(n){return n._update()},notify(n){Sc[bc++]=n,n.flags&=~Ue.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ue.Mutable|Ue.Dirty,Bl(n))}});let Pl=0,bc=0,rn,_c=0;function Rx(n){try{++_c,n()}finally{--_c||Um()}}function Bl(n){const r=n.depsTail;let s=r!==void 0?r.nextDep:n.deps;for(;s!==void 0;)s=Px(s,n)}function Um(){if(!(_c>0)){for(;Pl{var m;a.get(),f.current?(m=h.next)==null||m.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,++Tl,a.depsTail=void 0;else if(c===void 0)return!1;s&&(a.flags=Ue.Mutable|Ue.RecursedCheck);try{const p=a._snapshot,m=typeof c=="function"?c(p):c===void 0&&s?l(p):c;return p===void 0||!f(p,m)?(a._snapshot=m,!0):!1}finally{rn=h,s&&(a.flags&=~Ue.RecursedCheck),Bl(a)}}};return s?(a.flags=Ue.Mutable|Ue.Dirty,a.get=function(){const c=a.flags;if(c&Ue.Dirty||c&Ue.Pending&&Am(a.deps,a)){if(a._update()){const h=a.subs;h!==void 0&&Rp(h)}}else c&Ue.Pending&&(a.flags=c&~Ue.Pending);return rn!==void 0&&Np(a,rn,Tl),a._snapshot}):a.set=function(c){if(a._update(c)){const h=a.subs;h!==void 0&&(Nx(h),Rp(h),Um())}},a}function Lx(n){const r=()=>{const l=rn;rn=s,++Tl,s.depsTail=void 0,s.flags=Ue.Watching|Ue.RecursedCheck;try{return n()}finally{rn=l,s.flags&=~Ue.RecursedCheck,Bl(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&&Am(this.deps,this)?r():this.flags=Ue.Watching},stop(){this.flags=Ue.None,this.depsTail=void 0,Bl(this)}};return r(),s}var Qu={exports:{}},Ku={},Gu={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 Mp;function Mx(){if(Mp)return qu;Mp=1;var n=io();function r(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&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(y,x){var k=x(),S=l({inst:{value:k,getSnapshot:x}}),b=S[0].inst,_=S[1];return c(function(){b.value=k,b.getSnapshot=x,p(b)&&_({inst:b})},[y,k,x]),a(function(){return p(b)&&_({inst:b}),y(function(){p(b)&&_({inst:b})})},[y]),h(k),k}function p(y){var x=y.getSnapshot;y=y.value;try{var k=x();return!s(y,k)}catch{return!0}}function m(y,x){return x()}var w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return qu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:w,qu}var Tp;function Tx(){return Tp||(Tp=1,Gu.exports=Mx()),Gu.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 Ip;function Ix(){if(Ip)return Ku;Ip=1;var n=io(),r=Tx();function s(m,w){return m===w&&(m!==0||1/m===1/w)||m!==m&&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 Ku.useSyncExternalStoreWithSelector=function(m,w,y,x,k){var S=c(null);if(S.current===null){var b={hasValue:!1,value:null};S.current=b}else b=S.current;S=f(function(){function R(F){if(!L){if(L=!0,z=F,F=x(F),k!==void 0&&b.hasValue){var G=b.value;if(k(G,F))return M=G}return M=F}if(G=M,l(z,F))return G;var V=x(F);return k!==void 0&&k(G,V)?(z=F,G):(z=F,M=V)}var L=!1,z,M,A=y===void 0?null:y;return[function(){return R(w())},A===null?void 0:function(){return R(A())}]},[w,y,x,k]);var _=a(m,S[0],S[1]);return h(function(){b.hasValue=!0,b.value=_},[_]),p(_),_},Ku}var Dp;function Dx(){return Dp||(Dp=1,Qu.exports=Ix()),Qu.exports}var zx=Dx();function Fx(n,r){return n===r}function jn(n,r,s=Fx){const l=W.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:f}=n.subscribe(h);return f},[n]),a=W.useCallback(()=>n==null?void 0:n.get(),[n]);return zx.useSyncExternalStoreWithSelector(l,a,a,r,s)}var zp={};function Bm(n,r){const s=W.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=W.useContext(n.from?Cx:Ql),l=n.from??s,a=r.stores.getMatchStore(l),c=Bm(n,r),h=jn(a,f=>f?c(f):zp);if(h!==zp)return h;(n.shouldThrow??!0)&&zc()}function $m(n){return Wr({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.loaderData):r.loaderData})}function Vm(n){const{select:r,...s}=n;return Wr({...s,select:l=>r?r(l.loaderDeps):l.loaderDeps})}function Hm(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 Wm(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 lo(n){const r=qt();return W.useCallback(s=>r.navigate({...s,from:s.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,r])}function Qm(n){return Wr({...n,select:r=>n.select?n.select(r.context):r.context})}function Zu(n){const r=W.useRef(n);return ar(r.current,n,{ignoreUndefined:!1})||(r.current=n),r.current}function Ox(n,r){return n[0]===r[0]&&n[1]===r[1]&&n[2]===r[2]}function Ax(n,r,s){if(n!=null&&n.external)return zl(n.href,s)?void 0:n.href;if(!Qx(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),zl(r,s)?void 0:r}catch{}}function Ux(n,r,s,l,a,c){if(c)return!1;if(s!=null&&s.exact){if(!Fv(n.pathname,r.pathname,l))return!1}else{const h=Ol(n.pathname,l),f=Ol(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 Bx(n,r){const s=qt(),l=xv(r),{activeProps:a,inactiveProps:c,activeOptions:h,to:f,preload:p,preloadDelay:m,preloadIntentProximity:w,hashScrollIntoView:y,replace:x,startTransition:k,resetScroll:S,viewTransition:b,children:_,target:R,disabled:L,style:z,className:M,onClick:A,onBlur:F,onFocus:G,onMouseEnter:V,onMouseLeave:O,onTouchStart:Q,ignoreBlocker:X,params:Z,search:ae,hash:H,state:te,mask:ye,reloadDocument:he,unsafeRelative:Y,from:J,_fromLocation:ee,...P}=n,U=Fm(),pe=Zu(n.search),ge=Zu(n.params),Se=Zu(h),ve=W.useMemo(()=>n,[s,n.from,n._fromLocation,n.hash,n.to,pe,ge,n.state,n.mask,n.unsafeRelative]),Re=W.useCallback(Ke=>{const Mt=s.buildLocation({_fromLocation:Ke,...ve}),Yt=Wx(Mt.maskedLocation?Mt.maskedLocation.publicHref:Mt.publicHref,Mt.maskedLocation?Mt.maskedLocation.external:Mt.external,s.history,L),Gs=Ax(Yt,f,s.protocolAllowlist);return[Yt==null?void 0:Yt.href,Gs,Ux(Ke,Mt,Se,s.basepath,U,Gs!==void 0)]},[Se,L,U,ve,s,f]),[Ee,Le,tt]=jn(s.stores.location,Re,Ox),cn=tt?Bs(a,{})??$x:Yu,fr=tt?Yu:Bs(c,{})??Yu,hr=[M,cn.className,fr.className].filter(Boolean).join(" "),Qr=(z||cn.style||fr.style)&&{...z,...cn.style,...fr.style},Ks=W.useRef(!1),Zt=n.reloadDocument||Le||L?!1:p??s.options.defaultPreload,pr=m??s.options.defaultPreloadDelay??0,dn=W.useCallback(()=>{s.preloadRoute(ve).catch(Ke=>{console.warn(Ke),console.warn(wx)})},[s,ve]),mr=W.useCallback(Ke=>{if(!Ke){Xu(l);return}if(!(Ke.isIntersecting??Zt==="intent")){Ke.isIntersecting===!1&&Xu(l);return}if(!pr){dn();return}Vi.has(l)||Vi.set(l,setTimeout(()=>{Vi.delete(l),dn()},pr))},[dn,l,Zt,pr]);vv(l,mr,Zt!=="viewport"),W.useEffect(()=>{Ks.current||Zt==="render"&&(dn(),Ks.current=!0)},[dn,Zt]);const gr=Ke=>{const Mt=Ke.currentTarget.getAttribute("target"),Yt=R!==void 0?R:Mt;!L&&!(Ke.metaKey||Ke.altKey||Ke.ctrlKey||Ke.shiftKey)&&!Ke.defaultPrevented&&(!Yt||Yt==="_self")&&Ke.button===0&&(Ke.preventDefault(),s.navigate({...ve,replace:x,resetScroll:S,hashScrollIntoView:y,startTransition:k,viewTransition:b,ignoreBlocker:X}))};if(Le)return{...P,ref:l,href:Le,..._&&{children:_},...R&&{target:R},...L&&{disabled:L},...z&&{style:z},...M&&{className:M},...A&&{onClick:A},...F&&{onBlur:F},...G&&{onFocus:G},...V&&{onMouseEnter:V},...O&&{onMouseLeave:O},...Q&&{onTouchStart:Q}};const Pn=()=>{Zt==="intent"&&dn()},Kr=()=>{Zt==="intent"&&Xu(l)};return{...P,...cn,...fr,href:Ee,ref:l,onClick:vs([A,gr]),onBlur:vs([F,Kr]),onFocus:vs([G,mr]),onMouseEnter:vs([V,mr]),onMouseLeave:vs([O,Kr]),onTouchStart:vs([Q,Pn]),disabled:!!L,target:R,...Qr&&{style:Qr},...hr&&{className:hr},...L&&Vx,...tt&&Hx}}var Yu={},$x={className:"active"},Vx={role:"link","aria-disabled":!0},Hx={"data-status":"active","aria-current":"page"},Vi=new WeakMap,Xu=n=>{clearTimeout(Vi.get(n)),Vi.delete(n)},vs=n=>r=>{for(const s of n)if(s){if(r.defaultPrevented)return;s(r)}};function Wx(n,r,s,l){if(!l)return r?{href:n,external:!0}:{href:s.createHref(n)||"/",external:!1}}function Qx(n){if(typeof n!="string")return!1;const r=n.charCodeAt(0);return r===47?n.charCodeAt(1)!==47:r===46}var Kl=W.forwardRef((n,r)=>{const{_asChild:s,...l}=n,{type:a,...c}=Bx(l,r),h=typeof l.children=="function"?l.children({isActive:c["data-status"]==="active"}):l.children;if(!s){const{disabled:f,...p}=c;return W.createElement("a",p,h)}return W.createElement(s,c,h)}),Kx=class extends zm{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=>Qm({...r,from:this.id}),this.useSearch=r=>Wm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Hm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Vm({...r,from:this.id}),this.useLoaderData=r=>$m({...r,from:this.id}),this.useNavigate=()=>lo({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>g.jsx(Kl,{ref:s,from:this.fullPath,...r}))}};function ao(n){return new Kx(n)}var Gx=class extends kx{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=>Qm({...r,from:this.id}),this.useSearch=r=>Wm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Hm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Vm({...r,from:this.id}),this.useLoaderData=r=>$m({...r,from:this.id}),this.useNavigate=()=>lo({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>g.jsx(Kl,{ref:s,from:this.fullPath,...r}))}};function qx(n){return new Gx(n)}function Zx(n){const r=qt(),s=`not-found-${jn(r.stores.location,l=>l.pathname)}-${jn(r.stores.status,l=>l)}`;return g.jsx(Hc,{getResetKey:()=>s,onCatch:(l,a)=>{var c;if($s(l))(c=n.onCatch)==null||c.call(n,l,a);else throw l},errorComponent:({error:l})=>{var a;if($s(l))return(a=n.fallback)==null?void 0:a.call(n,l);throw l},children:n.children})}function Yx(){return g.jsx("p",{children:"Not Found"})}function ws(n){return g.jsx(g.Fragment,{children:n.children})}function Km(n,r,s){return r.options.notFoundComponent?g.jsx(r.options.notFoundComponent,{...s}):n.options.defaultNotFoundComponent?g.jsx(n.options.defaultNotFoundComponent,{...s}):g.jsx(Yx,{})}function Gl(n,r){const s=(r==null?void 0:r.options.pendingComponent)??n.options.defaultPendingComponent;return s?g.jsx(s,{}):null}var Xx=(n,r)=>n[0]===r[0]&&n[1]===r[1],Gm=(n,r,s)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||s===!1||s==="data-only"||!n.ssr,qm=W.memo(function({routeId:r}){const s=qt();return g.jsx(Jx,{router:s,match:jn(s.stores.getMatchStore(r),l=>l)})});function Jx({router:n,match:r}){var y,x;const s=n.routesById[r.routeId],l=Gl(n,s),a=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??((y=n.options.notFoundRoute)==null?void 0:y.options.component):s.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",p=Gm(n,s,r.ssr)&&(s.options.wrapInSuspense??l??(((x=s.options.errorComponent)==null?void 0:x.preload)||f))?W.Suspense:ws,m=a?Hc:ws,w=h?Zx:ws;return g.jsxs(s.isRoot?s.options.shellComponent??ws:ws,{children:[g.jsx(Ql.Provider,{value:r.routeId,children:g.jsx(p,{fallback:l,children:g.jsx(m,{getResetKey:()=>r,errorComponent:a,onCatch:(k,S)=>{if($s(k))throw k.routeId??(k.routeId=r.routeId),k;c==null||c(k,S)},children:g.jsx(w,{fallback:k=>{if(k.routeId??(k.routeId=r.routeId),k.routeId!==r.routeId)throw k;return W.createElement(h,k)},children:f?g.jsx(bx,{fallback:l,children:g.jsx(Fp,{match:r})}):g.jsx(Fp,{match:r})})})})}),null]})}var Fp=W.memo(function({match:r}){const s=qt(),l=r.routeId,a=s.routesById[l],c=W.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=W.useMemo(()=>{const f=a.options.component??s.options.defaultComponent;return f?g.jsx(f,{},c):g.jsx(Zm,{})},[c,a.options.component,s.options.defaultComponent]);if(r.status==="pending"){if(s.ssr&&!Gm(s,a,r.ssr))return h;if(s._tx)throw s._tx[5];return Gl(s,a)}if(r.status==="notFound")return Km(s,a,r.error);if(r.status==="error")throw r.error;return h}),Zm=W.memo(function(){const r=qt(),s=W.useContext(Ql);let l,a,c;{const f=r.stores.getMatchStore(s);[l,a]=jn(f,p=>[!!p._notFound,p.error],Xx),c=jn(r.stores.ids,p=>p[p.indexOf(s)+1])}if(l)return Km(r,r.routesById[s],a);if(!c)return null;const h=g.jsx(qm,{routeId:c});return s===bs?g.jsx(W.Suspense,{fallback:Gl(r),children:h}):h});function Ym(n,r){const s=n[1];n.length=0,s==null||s(r)}function e1({t:n}){const r=qt(),s=r._rendered??(r._rendered=[]);return r.startTransition=(l,a)=>new Promise(c=>{Ym(s,!1),s.push(a,c),n(r),W.startTransition(l)}),ym(()=>{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",...Hl(h,h)})}):r._tx||r.load({sync:!0}).catch(console.error),l},[r,r.history]),null}function t1(){const n=qt(),r=n.routesById[bs],s=Gl(n,r),l=n.ssr?ws:W.Suspense,a=g.jsxs(g.Fragment,{children:[g.jsx(e1,{t:W.useState()[1]}),g.jsx(l,{fallback:s,children:g.jsx(n1,{})})]});return n.options.InnerWrap?g.jsx(n.options.InnerWrap,{children:a}):a}function n1(){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;ym(()=>{r[0]===s&&Ym(r,!0)},[r,s]);const c=a?g.jsx(qm,{routeId:a}):null;return g.jsx(Ql.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?c:g.jsx(Hc,{getResetKey:()=>l,onCatch:void 0,children:c})})}var r1=n=>({createMutableStore:Lp,createReadonlyStore:Lp,batch:Rx}),s1=n=>new i1(n),i1=class extends lx{constructor(n){super(n,r1)}};function o1({router:n,children:r,...s}){xm(s)&&n.update({...n.options,...s,context:{...n.options.context,...s.context}});const l=g.jsx(Om.Provider,{value:n,children:r});return n.options.Wrap?g.jsx(n.options.Wrap,{children:l}):l}function l1({router:n,...r}){return g.jsx(o1,{router:n,...r,children:g.jsx(t1,{})})}function Op(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,Bm(n,s))}const a1="modulepreload",u1=function(n){return"/"+n},Ap={},Lt=function(r,s,l){let a=Promise.resolve();if(s&&s.length>0){let h=function(m){return Promise.all(m.map(w=>Promise.resolve(w).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};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(m=>{if(m=u1(m),m in Ap)return;Ap[m]=!0;const w=m.endsWith(".css"),y=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const x=document.createElement("link");if(x.rel=w?"stylesheet":a1,w||(x.as="script"),x.crossOrigin="",x.href=m,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 ${m}`)))})}))}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 c1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xm=(...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 d1={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 f1=W.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:h,...f},p)=>W.createElement("svg",{ref:p,...d1,width:r,height:r,stroke:n,strokeWidth:l?Number(s)*24/Number(r):s,className:Xm("lucide",a),...f},[...h.map(([m,w])=>W.createElement(m,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 ke=(n,r)=>{const s=W.forwardRef(({className:l,...a},c)=>W.createElement(f1,{ref:c,iconNode:r,className:Xm(`lucide-${c1(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 h1=ke("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 p1=ke("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 Cc=ke("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 Jm=ke("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 m1=ke("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 g1=ke("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 y1=ke("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 Hi=ke("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 v1=ke("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 eg=ke("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 x1=ke("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 w1=ke("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 k1=ke("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 S1=ke("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 b1=ke("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 _1=ke("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 C1=ke("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 E1=ke("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 Wc=ke("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 j1=ke("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 P1=ke("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 N1=ke("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 R1=ke("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 Qc=ke("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 L1=ke("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 M1=ke("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 Kc=ke("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 T1=ke("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 tg=ke("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 Gc=ke("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 I1=ke("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 D1=ke("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 z1=ke("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 $l=ke("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 F1=ke("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 qc=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ji=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:P1,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:R1,group:"Operativ"},{id:"auftraege",pfad:"/auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Wc,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:Cc,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:E1,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:N1,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Kc,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:z1,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:eg,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:Jm,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Cc,group:"Wartung"}];function ng(n){return[...Ji].sort((r,s)=>s.pfad.length-r.pfad.length).find(r=>n===r.pfad||n.startsWith(r.pfad+"/"))}const Up=n=>{let r;const s=new Set,l=(m,w)=>{const y=typeof m=="function"?m(r):m;if(!Object.is(y,r)){const x=r;r=w??(typeof y!="object"||y===null)?y:Object.assign({},r,y),s.forEach(k=>k(r,x))}},a=()=>r,f={setState:l,getState:a,getInitialState:()=>p,subscribe:m=>(s.add(m),()=>s.delete(m))},p=r=n(l,a,f);return f},O1=(n=>n?Up(n):Up),A1=n=>n;function U1(n,r=A1){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 B1=n=>{const r=O1(n),s=l=>U1(r,l);return Object.assign(s,r),s},$1=(n=>B1);function V1(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 Ec=n=>r=>{try{const s=n(r);return s instanceof Promise?s:{then(l){return Ec(l)(s)},catch(l){return this}}}catch(s){return{then(l){return this},catch(l){return Ec(l)(s)}}}},H1=(n,r)=>(s,l,a)=>{let c={storage:V1(()=>window.localStorage),partialize:_=>_,version:0,merge:(_,R)=>({...R,..._}),...r},h=!1,f=0;const p=new Set,m=new Set;let w=c.storage;if(!w)return n((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),s(..._)},l,a);const y=()=>{const _=c.partialize({...l()});return w.setItem(c.name,{state:_,version:c.version})},x=a.setState;a.setState=(_,R)=>(x(_,R),y());const k=n((..._)=>(s(..._),y()),l,a);a.getInitialState=()=>k;let S;const b=()=>{var _,R;if(!w)return;const L=++f;h=!1,p.forEach(M=>{var A;return M((A=l())!=null?A:k)});const z=((R=c.onRehydrateStorage)==null?void 0:R.call(c,(_=l())!=null?_:k))||void 0;return Ec(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(F=>[!0,F]):[!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(L!==f)return;const[F,G]=M;if(S=c.merge(G,(A=l())!=null?A:k),s(S,!0),F)return y()}).then(()=>{L===f&&(z==null||z(l(),void 0),S=l(),h=!0,m.forEach(M=>M(S)))}).catch(M=>{L===f&&(z==null||z(void 0,M))})};return a.persist={setOptions:_=>{c={...c,..._},_.storage&&(w=_.storage)},clearStorage:()=>{++f,w==null||w.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>b(),hasHydrated:()=>h,onHydrate:_=>(p.add(_),()=>{p.delete(_)}),onFinishHydration:_=>(m.add(_),()=>{m.delete(_)})},c.skipHydration||b(),S||k},W1=H1;let Q1=0;const Rt=$1()(W1(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${++Q1}`,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)??{}}}}})),K1=()=>Rt(n=>n.ui.expertenmodus),G1=()=>Rt(n=>n.ui.schieneEingeklappt),q1=()=>Rt(n=>n.ui.paletteOffen),Z1=()=>Rt(n=>n.strom.lage),Y1=()=>Rt(n=>n.meldungen),Bp=(n,r)=>Rt.getState().melden(n,r),Ju=n=>Rt.getState().stromLage(n),X1=()=>Rt.getState().stromEreignis();function rg(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{const r=nw(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:h=>{const f=h.split(Zc);return f[0]===""&&f.length!==1&&f.shift(),sg(f,r)||tw(h)},getConflictingClassGroupIds:(h,f)=>{const p=s[h]||[];return f&&l[h]?[...p,...l[h]]:p}}},sg=(n,r)=>{var h;if(n.length===0)return r.classGroupId;const s=n[0],l=r.nextPart.get(s),a=l?sg(n.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const c=n.join(Zc);return(h=r.validators.find(({validator:f})=>f(c)))==null?void 0:h.classGroupId},$p=/^\[(.+)\]$/,tw=n=>{if($p.test(n)){const r=$p.exec(n)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},nw=n=>{const{theme:r,prefix:s}=n,l={nextPart:new Map,validators:[]};return sw(Object.entries(n.classGroups),s).forEach(([c,h])=>{jc(h,l,c,r)}),l},jc=(n,r,s,l)=>{n.forEach(a=>{if(typeof a=="string"){const c=a===""?r:Vp(r,a);c.classGroupId=s;return}if(typeof a=="function"){if(rw(a)){jc(a(l),r,s,l);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([c,h])=>{jc(h,Vp(r,c),s,l)})})},Vp=(n,r)=>{let s=n;return r.split(Zc).forEach(l=>{s.nextPart.has(l)||s.nextPart.set(l,{nextPart:new Map,validators:[]}),s=s.nextPart.get(l)}),s},rw=n=>n.isThemeGetter,sw=(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,iw=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)}}},ig="!",ow=n=>{const{separator:r,experimentalParseClassName:s}=n,l=r.length===1,a=r[0],c=r.length,h=f=>{const p=[];let m=0,w=0,y;for(let _=0;_w?y-w:void 0;return{modifiers:p,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:b}};return s?f=>s({className:f,parseClassName:h}):h},lw=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},aw=n=>({cache:iw(n.cacheSize),parseClassName:ow(n),...ew(n)}),uw=/\s+/,cw=(n,r)=>{const{parseClassName:s,getClassGroupId:l,getConflictingClassGroupIds:a}=r,c=[],h=n.trim().split(uw);let f="";for(let p=h.length-1;p>=0;p-=1){const m=h[p],{modifiers:w,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:k}=s(m);let S=!!k,b=l(S?x.substring(0,k):x);if(!b){if(!S){f=m+(f.length>0?" "+f:f);continue}if(b=l(x),!b){f=m+(f.length>0?" "+f:f);continue}S=!1}const _=lw(w).join(":"),R=y?_+ig:_,L=R+b;if(c.includes(L))continue;c.push(L);const z=a(b,S);for(let M=0;M0?" "+f:f)}return f};function dw(){let n=0,r,s,l="";for(;n{if(typeof n=="string")return n;let r,s="";for(let l=0;ly(w),n());return s=aw(m),l=s.cache.get,a=s.cache.set,c=f,f(p)}function f(p){const m=l(p);if(m)return m;const w=cw(p,s);return a(p,w),w}return function(){return c(dw.apply(null,arguments))}}const Oe=n=>{const r=s=>s[n]||[];return r.isThemeGetter=!0,r},lg=/^\[(?:([a-z-]+):)?(.+)\]$/i,hw=/^\d+\/\d+$/,pw=new Set(["px","full","screen"]),mw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gw=/\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$/,yw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wn=n=>Cs(n)||pw.has(n)||hw.test(n),Gn=n=>Hs(n,"length",jw),Cs=n=>!!n&&!Number.isNaN(Number(n)),ec=n=>Hs(n,"number",Cs),zi=n=>!!n&&Number.isInteger(Number(n)),ww=n=>n.endsWith("%")&&Cs(n.slice(0,-1)),me=n=>lg.test(n),qn=n=>mw.test(n),kw=new Set(["length","size","percentage"]),Sw=n=>Hs(n,kw,ag),bw=n=>Hs(n,"position",ag),_w=new Set(["image","url"]),Cw=n=>Hs(n,_w,Nw),Ew=n=>Hs(n,"",Pw),Fi=()=>!0,Hs=(n,r,s)=>{const l=lg.exec(n);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):s(l[2]):!1},jw=n=>gw.test(n)&&!yw.test(n),ag=()=>!1,Pw=n=>vw.test(n),Nw=n=>xw.test(n),Rw=()=>{const n=Oe("colors"),r=Oe("spacing"),s=Oe("blur"),l=Oe("brightness"),a=Oe("borderColor"),c=Oe("borderRadius"),h=Oe("borderSpacing"),f=Oe("borderWidth"),p=Oe("contrast"),m=Oe("grayscale"),w=Oe("hueRotate"),y=Oe("invert"),x=Oe("gap"),k=Oe("gradientColorStops"),S=Oe("gradientColorStopPositions"),b=Oe("inset"),_=Oe("margin"),R=Oe("opacity"),L=Oe("padding"),z=Oe("saturate"),M=Oe("scale"),A=Oe("sepia"),F=Oe("skew"),G=Oe("space"),V=Oe("translate"),O=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",me,r],Z=()=>[me,r],ae=()=>["",wn,Gn],H=()=>["auto",Cs,me],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ye=()=>["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"],Y=()=>["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:[Fi],spacing:[wn,Gn],blur:["none","",qn,me],brightness:P(),borderColor:[n],borderRadius:["none","","full",qn,me],borderSpacing:Z(),borderWidth:ae(),contrast:P(),grayscale:J(),hueRotate:P(),invert:J(),gap:Z(),gradientColorStops:[n],gradientColorStopPositions:[ww,Gn],inset:X(),margin:X(),opacity:P(),padding:Z(),saturate:P(),scale:P(),sepia:J(),skew:P(),space:Z(),translate:Z()},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:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zi,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",zi,me]}],"grid-cols":[{"grid-cols":[Fi]}],"col-start-end":[{col:["auto",{span:["full",zi,me]},me]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Fi]}],"row-start-end":[{row:["auto",{span:[zi,me]},me]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"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",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"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",ec]}],"font-family":[{font:[Fi]}],"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,ec]}],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":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"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:Z()}],"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":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),bw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Cw]}],"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":[R]}],"border-style":[{border:[...ye(),"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":[R]}],"divide-style":[{divide:ye()}],"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:["",...ye()]}],"outline-offset":[{"outline-offset":[wn,me]}],"outline-w":[{outline:[wn,Gn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[wn,Gn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",qn,Ew]}],"shadow-color":[{shadow:[Fi]}],opacity:[{opacity:[R]}],"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:[m]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[y]}],saturate:[{saturate:[z]}],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":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[z]}],"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:[zi,me]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"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":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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,ec]}],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"]}}},Lw=fw(Rw);function Me(...n){return Lw(J1(n))}function Jk(n){return n?n.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function Mw(){const n=K1(),r=Rt(s=>s.expertenmodus);return g.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:[g.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:[g.jsx(D1,{className:"h-3.5 w-3.5"})," Einfach"]}),g.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:[g.jsx(I1,{className:"h-3.5 w-3.5"})," Experte"]})]})}let Es=[],js=[];const Pc=new Set,ug=()=>Pc.forEach(n=>n());function Yc(n){return Pc.add(n),()=>{Pc.delete(n)}}function cg(n){Es=[...Es,n].slice(-120),ug()}function dg(n){js=[...js,n].slice(-120),ug()}let fg=null;const hg=()=>W.useSyncExternalStore(Yc,()=>Es),pg=()=>W.useSyncExternalStore(Yc,()=>js),mg=()=>W.useSyncExternalStore(Yc,()=>fg);let Oi=null;function Tw(n){const r=Date.now();if(fg=n,cg({t:r,cpu:n.cpu??0,ram:n.ram??0,gpu:n.gpu,disk:n.disk}),Oi){const s=Math.max((r-Oi.t)/1e3,.001);dg({t:r,prompt:Math.max(0,(n.tok_p-Oi.p)/s),completion:Math.max(0,(n.tok_c-Oi.c)/s)})}Oi={p:n.tok_p,c:n.tok_c,t:r}}function Iw(){const{data:n,dataUpdatedAt:r}=uo(),{data:s,dataUpdatedAt:l}=Jc(),a=W.useRef(null);W.useEffect(()=>{var h,f,p,m;if(!n)return;const c=Date.now();Es.length&&c-Es[Es.length-1].t<1e3||cg({t:c,cpu:((h=n.cpu)==null?void 0:h.percent)??0,ram:((f=n.ram)==null?void 0:f.percent)??0,gpu:((p=n.gpu)==null?void 0:p.busy_percent)??null,disk:((m=n.disk)==null?void 0:m.percent)??null})},[r]),W.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);(!js.length||c-js[js.length-1].t>=1e3)&&dg({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])}let Bi=!1;const gg=()=>Bi;function Dw(){const n=Dc();W.useEffect(()=>{const r=new EventSource("/api/stream");let s=!1;return r.onopen=()=>{Bi=!0,Ju("live"),s&&Bp("erfolg","Verbindung zur Zentrale ist wieder da."),s=!0,n.invalidateQueries()},r.onerror=()=>{Bi&&(Bi=!1,Ju("nachlauf"),Bp("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]});X1()}catch{}}),r.addEventListener("metrik",l=>{try{Tw(JSON.parse(l.data))}catch{}}),()=>{Bi=!1,Ju("getrennt"),r.close()}},[n])}class zw extends Error{constructor(s,l,a){super(a||`${s} ${l}`);wl(this,"status");wl(this,"detail");this.name="ApiError",this.status=s,this.detail=a}}async function Fw(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 Pe(n,r){const s=await fetch(n,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!s.ok)throw new zw(s.status,s.statusText,await Fw(s));return s.json()}const eS=(n,r,s=!1,l=!0)=>Pe("/api/groups",{method:"PUT",body:JSON.stringify({group:n,members:r,swap:s,persist:l})}),tS=n=>Pe("/api/routing/policy",{method:"PUT",body:JSON.stringify(n)}),Te={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],agentAktivitaet:["agent-aktivitaet"],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"]},ct={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Ws=n=>()=>gg()?n*5:n,yg=n=>()=>gg()?6e4:n,Ow=(n=ct.schnell)=>De({queryKey:Te.auftragsbuch,queryFn:()=>Pe("/api/auftragsbuch"),refetchInterval:Ws(n)}),Aw=(n=ct.gemuetlich)=>De({queryKey:Te.ideen,queryFn:()=>Pe("/api/ideen"),refetchInterval:Ws(n)}),nS=(n,r=!1)=>De({queryKey:["ideen-log",n],queryFn:()=>Pe(`/api/ideen/${n}/log`),enabled:r,refetchInterval:4e3,staleTime:0}),rS=(n=150,r=ct.gemuetlich)=>De({queryKey:[...Te.chronik,n],queryFn:()=>Pe(`/api/chronik?limit=${n}`),refetchInterval:Ws(r),select:s=>s.items??[]}),sS=()=>De({queryKey:Te.wissen,queryFn:()=>Pe("/api/wissen")}),iS=(n=ct.traege,r=!0)=>De({queryKey:Te.zeitmaschine,queryFn:()=>Pe("/api/zeitmaschine"),refetchInterval:n,enabled:r}),Uw=(n=12,r=ct.schnell)=>De({queryKey:Te.voiceTrace,queryFn:()=>Pe(`/api/voice/trace?limit=${n}`),refetchInterval:r,select:s=>s.turns??[]}),oS=(n=!0)=>De({queryKey:Te.memoryGraph,queryFn:()=>Pe("/api/wissen/graph"),enabled:n,staleTime:60*1e3}),Xc=()=>De({queryKey:Te.health,queryFn:()=>Pe("/api/health"),refetchInterval:ct.normal}),uo=(n=ct.graph)=>De({queryKey:Te.systemStatus,queryFn:()=>Pe("/api/system/status"),refetchInterval:yg(n)}),vg=(n,r=!0)=>De({queryKey:["metrics-history",n],queryFn:()=>Pe(`/api/system/history?minutes=${n}`),enabled:r,refetchInterval:6e4}),xg=(n=ct.normal)=>De({queryKey:Te.services,queryFn:()=>Pe("/api/system/services"),refetchInterval:n}),wg=(n=ct.schnell)=>De({queryKey:Te.models,queryFn:()=>Pe("/api/models"),refetchInterval:Ws(n)}),lS=(n=ct.normal)=>De({queryKey:Te.groups,queryFn:()=>Pe("/api/groups"),refetchInterval:n}),Bw=(n=ct.normal)=>De({queryKey:Te.routing,queryFn:()=>Pe("/api/routing"),refetchInterval:n}),aS=()=>De({queryKey:Te.routingPolicy,queryFn:()=>Pe("/api/routing/policy")}),uS=(n=3e3,r=!0)=>De({queryKey:Te.jobs,queryFn:()=>Pe("/api/jobs"),refetchInterval:Ws(n),enabled:r,select:s=>s.jobs??[]}),Jc=(n=ct.graph)=>De({queryKey:Te.tokenStats,queryFn:()=>Pe("/api/system/token-stats"),refetchInterval:yg(n)}),$w=(n=ct.normal)=>De({queryKey:Te.agentStatus,queryFn:()=>Pe("/api/agent/status"),refetchInterval:n}),cS=(n=ct.gemuetlich)=>De({queryKey:Te.agentAktivitaet,queryFn:()=>Pe("/api/agent/aktivitaet?limit=80"),refetchInterval:Ws(n)}),dS=(n=ct.traege)=>De({queryKey:Te.hermesBrain,queryFn:()=>Pe("/api/agent/brain"),refetchInterval:n}),Vw=(n=ct.traege)=>De({queryKey:Te.updates,queryFn:()=>Pe("/api/maintenance/updates"),refetchInterval:n}),fS=()=>De({queryKey:Te.discover,queryFn:()=>Pe("/api/discover")}),hS=n=>De({queryKey:Te.drafts(n),queryFn:()=>Pe(`/api/models/drafts?target=${encodeURIComponent(n??"")}`),enabled:!!n}),pS=n=>De({queryKey:Te.connect(n),queryFn:()=>Pe(n?`/api/connect?${n}`:"/api/connect")}),Hw=()=>De({queryKey:Te.connectHealth,queryFn:()=>Pe("/api/connect/health"),refetchInterval:15e3});function mS(n,...r){for(const s of r)n.invalidateQueries({queryKey:s})}function an(n){return(n/1024**3).toFixed(1)}function gS(n){return n?n>1024**3?`${(n/1024**3).toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`:""}function yS(n){if(!n)return"—";const r=n/1024**3;return r>=1?`${r.toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`}function vS(n){if(!n)return"";const r=Math.floor(n/60);return r>0?`${r} min`:`${n} s`}function xS(n){return n?`${Math.round(n/1024)}k`:"—"}function wS(n){return n?new Date(n*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Ww(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 Hp({werte:n,farbe:r,breite:s=56,hoehe:l=14}){if(n.length<2)return g.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 g.jsx("svg",{width:s,height:l,viewBox:`0 0 ${s} ${l}`,"aria-hidden":"true",className:"shrink-0",children:g.jsx("path",{d:h,fill:"none",stroke:r,strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round"})})}function xs({children:n,titel:r,className:s}){return g.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 Qw(){var G,V,O,Q,X,Z,ae,H,te,ye;const{data:n,isError:r}=Xc(),{data:s}=uo(),{data:l}=Bw(),{data:a}=Jc(),c=hg(),h=pg(),f=Z1(),p=!r&&!!(n!=null&&n.engine_reachable),m=p&&(n!=null&&n.brain?n.brain.ready:!0),w=((G=n==null?void 0:n.brain)==null?void 0:G.role)??((O=(V=l==null?void 0:l.lanes)==null?void 0:V[0])==null?void 0:O.name)??null,y=mg(),x=(y==null?void 0:y.cpu)??((Q=s==null?void 0:s.cpu)==null?void 0:Q.percent)??0,k=(y==null?void 0:y.gpu)??((X=s==null?void 0:s.gpu)==null?void 0:X.busy_percent)??null,S=(y==null?void 0:y.ram)??((Z=s==null?void 0:s.ram)==null?void 0:Z.percent)??0,b=(y==null?void 0:y.ram_used)??((ae=s==null?void 0:s.ram)==null?void 0:ae.used),_=(y==null?void 0:y.ram_total)??((H=s==null?void 0:s.ram)==null?void 0:H.total),R=Math.max((y==null?void 0:y.temp_cpu)??((te=s==null?void 0:s.temp)==null?void 0:te.cpu)??0,(y==null?void 0:y.temp_gpu)??((ye=s==null?void 0:s.temp)==null?void 0:ye.gpu)??0),L=h.length?h[h.length-1].completion:0,z=Ww((y==null?void 0:y.uptime_s)??(s==null?void 0:s.uptime_s)),M=r?"getrennt":f==="live"?"live":"nachlauf",F={live:{punkt:"bg-emerald-500",text:"Live",titel:"Ereignisstrom steht — Änderungen erscheinen sofort."},nachlauf:{punkt:"bg-amber-500",text:"Nachlauf",titel:"Kein Ereignisstrom — die Zahlen stimmen, sie kommen im Takt statt sofort."},getrennt:{punkt:"bg-red-500",text:"Getrennt",titel:"Die Zentrale antwortet nicht — die Zahlen sind veraltet."}}[M];return g.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:[g.jsxs(Kl,{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:[g.jsxs("span",{className:"flex items-center gap-1.5",title:p?"Motor (Engine) läuft":"Motor (Engine) läuft nicht",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",p?"bg-emerald-500":"bg-red-500"),"aria-hidden":"true"}),g.jsx("span",{className:p?"text-muted-foreground":"font-semibold text-red-400",children:"Motor"})]}),g.jsxs("span",{className:"flex items-center gap-1.5",title:m?"Lucys Hirn ist bereit":"Lucys Hirn ist nicht bereit",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",m?"bg-emerald-500":"bg-amber-500"),"aria-hidden":"true"}),g.jsx("span",{className:m?"text-muted-foreground":"font-semibold text-amber-400",children:"Hirn"})]})]}),g.jsxs(xs,{titel:"Aktive Rolle und aktueller Ausgabe-Durchsatz",children:[g.jsx("span",{className:"font-semibold text-primary",children:w??"—"}),g.jsx("span",{className:"tabular-nums text-muted-foreground",children:L>0?`${L.toFixed(0)} t/s`:"leerlauf"}),g.jsx(Hp,{werte:h.map(he=>he.completion),farbe:"hsl(172 72% 50%)"})]}),g.jsxs(xs,{titel:b!=null&&_!=null?`Geteilter Speicher (Unified Memory): ${an(b)} von ${an(_)} GB belegt`:"Speicher",children:[g.jsx("span",{className:"text-muted-foreground",children:"Speicher"}),g.jsx("div",{className:"h-2 w-24 overflow-hidden rounded-sm border border-border/50 bg-background/60","aria-hidden":"true",children:g.jsx("div",{className:Me("h-full transition-[width] duration-500",S>90?"bg-red-500":S>75?"bg-amber-500":"bg-primary"),style:{width:`${Math.min(100,S)}%`}})}),g.jsx("span",{className:"tabular-nums text-foreground",children:b!=null&&_!=null?`${an(b)}/${an(_)} GB`:"—"})]}),g.jsxs(xs,{titel:"Auslastung von Prozessor und Grafikeinheit",children:[g.jsx("span",{className:"text-muted-foreground",children:"CPU"}),g.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(x)," %"]}),g.jsx(Hp,{werte:c.map(he=>he.cpu),farbe:"hsl(199 89% 58%)"}),k!=null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"ml-1 text-muted-foreground",children:"GPU"}),g.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(k)," %"]})]})]}),R>0&&g.jsxs(xs,{titel:"Höchste gemessene Temperatur (Prozessor oder Grafikeinheit)",children:[g.jsx("span",{className:"text-muted-foreground",children:"Temp"}),g.jsxs("span",{className:Me("tabular-nums",R>=85?"font-semibold text-amber-400":"text-foreground"),children:[Math.round(R)," °C"]})]}),z&&g.jsxs(xs,{titel:"Betriebszeit seit dem letzten Neustart der Box",children:[g.jsx("span",{className:"text-muted-foreground",children:"Läuft seit"}),g.jsx("span",{className:"tabular-nums text-foreground",children:z})]}),a&&g.jsx(xs,{titel:"Seit Beginn verarbeitete Token und die damit gesparten Cloud-Kosten",children:g.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[a.total_tokens.toLocaleString("de-DE")," Token · ",a.saved_eur.toFixed(0)," € gespart"]})}),g.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 px-3",title:F.titel,children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",F.punkt,M==="live"&&"animate-pulse"),"aria-hidden":"true"}),g.jsx("span",{className:"text-muted-foreground",children:F.text})]})]})}const Kw=6e3,Gw={info:{rand:"border-sky-500/40",farbe:"text-sky-300",Icon:j1},erfolg:{rand:"border-emerald-500/40",farbe:"text-emerald-300",Icon:v1},warnung:{rand:"border-amber-500/40",farbe:"text-amber-300",Icon:$l},fehler:{rand:"border-red-500/40",farbe:"text-red-300",Icon:x1}};function qw(){const n=Y1(),r=Rt(s=>s.meldungWeg);return W.useEffect(()=>{const s=n.filter(l=>l.art!=="fehler").map(l=>window.setTimeout(()=>r(l.id),Math.max(1e3,Kw-(Date.now()-l.seit))));return()=>s.forEach(window.clearTimeout)},[n,r]),g.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}=Gw[s.art];return g.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:[g.jsx(c,{className:Me("mt-0.5 h-4 w-4 shrink-0",a),"aria-hidden":"true"}),g.jsx("p",{className:"flex-1 text-xs leading-relaxed text-foreground",children:s.text}),g.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:g.jsx(qc,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},s.id)})})}const Zw=W.lazy(()=>Lt(()=>import("./SystemDrawer-BqYzprU9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(n=>({default:n.SystemDrawer}))),Yw=W.lazy(()=>Lt(()=>import("./CommandPalette-FxofQTPj.js"),__vite__mapDeps([9,10])).then(n=>({default:n.CommandPalette})));function Xw(){return g.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:g.jsx(Qc,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const Jw=/Mac|iPhone|iPad/.test(navigator.platform);function ek(){Iw(),Dw();const n=lo(),r=Op({select:b=>b.location.pathname}),s=Op({select:b=>b.location.search.system}),l=G1(),a=Rt(b=>b.schieneUmschalten),c=q1(),h=Rt(b=>b.palette),[f,p]=W.useState(!1),[m,w]=W.useState(!1);W.useEffect(()=>{c&&w(!0)},[c]),W.useEffect(()=>{const b=_=>{(_.metaKey||_.ctrlKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),h(!Rt.getState().ui.paletteOffen))};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]);const y=W.useCallback(b=>{n({to:".",search:_=>({..._,system:b}),replace:!0})},[n]),{data:x,isError:k}=Xc();W.useEffect(()=>{document.documentElement.classList.add("dark")},[]),W.useEffect(()=>{p(!1)},[r]);const S=ng(r);return g.jsxs("div",{className:"flex h-full relative",children:[g.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(", ")}}),g.jsx(qw,{}),g.jsxs(W.Suspense,{fallback:null,children:[m&&g.jsx(Yw,{}),s&&g.jsx(Zw,{open:!0,onClose:()=>y(void 0),defaultTab:s==="logs"?"logs":"maintenance"})]}),g.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:g.jsx(Wp,{collapsed:l,onToggleCollapse:a,pfad:r,health:x,backendDown:k})}),g.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:[g.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>p(!1)}),g.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:g.jsx(Wp,{collapsed:!1,onClose:()=>p(!1),pfad:r,health:x,backendDown:k})})]}),g.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[g.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:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.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:g.jsx(L1,{className:"h-5 w-5","aria-hidden":"true"})}),g.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:S==null?void 0:S.hint})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[g.jsx(Mw,{}),g.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"}),g.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:[g.jsx(w1,{className:"h-3.5 w-3.5"}),g.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),g.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:Jw?"⌘K":"Strg+K"})]})]})]}),g.jsx("main",{className:"flex-1 overflow-y-auto scrollbar-thin",children:g.jsx("div",{className:"mx-auto w-full max-w-[1600px] p-4 md:p-6",children:g.jsx(W.Suspense,{fallback:g.jsx(Xw,{}),children:g.jsx(Zm,{})})})}),g.jsx(Qw,{})]})]})}function Wp({collapsed:n,onToggleCollapse:r,onClose:s,pfad:l,health:a,backendDown:c}){var p,m,w,y,x;const h=ng(l),{data:f}=uo();return g.jsxs(g.Fragment,{children:[g.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:[g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[g.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&g.jsxs("div",{className:"leading-tight",children:[g.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),g.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r&&g.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?g.jsx(Hi,{className:"h-4 w-4","aria-hidden":"true"}):g.jsx(y1,{className:"h-4 w-4","aria-hidden":"true"})}),s&&g.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:g.jsx(qc,{className:"h-4 w-4","aria-hidden":"true"})})]}),g.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let k=null;return Ji.map(S=>{const b=S.group!==k;k=S.group;const _=(h==null?void 0:h.id)===S.id;return g.jsxs("div",{className:"space-y-1",children:[b&&(n?k!==Ji[0].group&&g.jsx("div",{className:"my-3 border-t border-border/30"}):g.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})),g.jsxs(Kl,{to:S.pfad,onClick:s,"aria-current":_?"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",_?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:[g.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&g.jsx("span",{className:"truncate",children:S.label})]})]},S.id)})})()}),g.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?g.jsx("div",{className:"flex justify-center",children:g.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"})}):g.jsxs("div",{className:"space-y-2 text-left",children:[c?g.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),g.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),g.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&g.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),g.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",g.jsx("span",{className:"truncate",children:"Backend offline"})]}),(f==null?void 0:f.versions)&&g.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[g.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:[g.jsx("strong",{children:"MC2:"})," ",f.versions.mc2?`${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""}`:"—"]}),g.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})`:((m=f.versions.engine)==null?void 0:m.version_text)||"unbekannt",children:[g.jsx("strong",{children:"Engine:"})," ",((w=f.versions.engine)==null?void 0:w.type)==="git"?`${f.versions.engine.hash}${f.versions.engine.dirty?"*":""}`:((x=(y=f.versions.engine)==null?void 0:y.version_text)==null?void 0:x.split(" ").pop())||"—"]}),g.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:[g.jsx("strong",{children:"Hermes Agent:"})," ",f.versions.hermes_agent?`${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function co({titel:n,text:r,fehler:s,onErneut:l}){const a=s instanceof Error?s.stack||s.message:s?String(s):null;return g.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-6",children:g.jsxs("div",{className:"mc-card max-w-lg space-y-4 p-6",children:[g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx($l,{className:"h-5 w-5 shrink-0 text-amber-400","aria-hidden":"true"}),g.jsx("h1",{className:"font-space text-lg font-bold tracking-tight",children:n})]}),g.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:r}),g.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[l&&g.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:[g.jsx(T1,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Erneut versuchen"]}),g.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&&g.jsxs("details",{className:"pt-1",children:[g.jsx("summary",{className:"cursor-pointer text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70 hover:text-foreground",children:"Technische Einzelheiten"}),g.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 tk(){var V,O,Q,X,Z,ae;const{data:n,isError:r}=Xc(),{data:s,isError:l}=xg(),{data:a}=wg(),{data:c}=uo(),h=r||l,f=!!n&&!!s,p=H=>{var te;return(te=s==null?void 0:s.services.find(ye=>ye.unit===H))==null?void 0:te.ok},m=H=>!!(s!=null&&s.services.some(te=>te.unit===H)),w=n==null?void 0:n.engine_reachable,y=(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(H=>H.role==="hermes"))==null?void 0:Q.name)||"",k=[];h&&k.push({id:"mc2",label:"Steuerpult (MC2)",icon:tg,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 H={id:"brain",label:"Lucys Hirn",icon:m1,critical:!0};return f?w===!1?{...H,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}}:y===!1?{...H,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:x?{kind:"loadModel",model:x,label:"Hirn aufwecken"}:void 0}:{...H,status:"ok",detail:"Wach und ansprechbar."}:{...H,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const H={id:"vision",label:"Lucys Augen",icon:S1,critical:!1};if(!f||!a)return{...H,status:"loading",detail:"Wird geprüft …"};const te=a.models.find(he=>he.role==="vision");return te?(a.running??[]).includes(te.name)?{...H,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...H,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"}}:{...H,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),k.push((()=>{const H={id:"memory",label:"Lucys Gedächtnis",icon:p1,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...H,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 H={id:"gateway",label:"Verbindung (Gateway)",icon:Kc,critical:!0},te=n?n.gateway_reachable:p("mc2-gateway");if(!f||te===void 0)return{...H,status:"loading",detail:"Wird geprüft …"};const ye=m("mc2-gateway")?"mc2-gateway":"mission-control-2";return te?{...H,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...H,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:ye,label:"Gateway neu starten"}}})()),k.push((()=>{const H={id:"steward",label:"Wächter (Steward)",icon:Gc,critical:!1};return f?m("mc2-steward")?p("mc2-steward")?{...H,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...H,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"}}:{...H,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...H,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const H={id:"agent",label:"Lucys Agent (Hermes)",icon:Cc,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...H,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),k.push((()=>{const H={id:"voice",label:"Lucys Stimme",icon:M1,critical:!1},te=p("voice-service");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Lucy kann hören und sprechen."}:{...H,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,b=((Z=c==null?void 0:c.ram)==null?void 0:Z.used)??0,_=((ae=c==null?void 0:c.ram)==null?void 0:ae.percent)??(S>0?Math.min(100,b/S*100):0),R=1024**3,L=S?_>=93?{status:"full",usedGb:b/R,totalGb:S/R,pct:_,text:"Speicher fast voll — Lucy könnte langsamer werden."}:_>=85?{status:"warn",usedGb:b/R,totalGb:S/R,pct:_,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:b/R,totalGb:S/R,pct:_,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},z=k.some(H=>H.status==="loading"),M=k.filter(H=>H.critical&&H.status==="down"),A=k.filter(H=>H.status==="warn"||!H.critical&&H.status==="down"),F=L.status==="full";return{verdict:z&&!M.length?"loading":M.length?"problem":A.length||F?"warn":"gut",checks:k,memory:L,problems:M,warns:A,unreachable:h}}function nk({type:n,title:r,message:s,defaultValue:l,autoValue:a,autoLabel:c,onConfirm:h,onCancel:f}){const p=W.useRef(null);return g.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:g.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:[g.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[g.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:r}),g.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:g.jsx(qc,{className:"h-4 w-4","aria-hidden":"true"})})]}),g.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"&&g.jsxs("div",{className:"flex gap-2",children:[g.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:m=>{var w;m.key==="Enter"&&h((w=p.current)==null?void 0:w.value)}}),a!==void 0&&g.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"})]}),g.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(n==="confirm"||n==="prompt")&&g.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"}),g.jsx("button",{onClick:()=>{var w;const m=n==="prompt"?(w=p.current)==null?void 0:w.value:void 0;h(m)},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 rk(){const[n,r]=W.useState(null),s=W.useCallback(()=>r(null),[]),l=W.useCallback((f,p,m)=>{r({type:"alert",title:f,message:p,onConfirm:()=>{r(null),m==null||m()}})},[]),a=W.useCallback((f,p,m,w)=>{r({type:"confirm",title:f,message:p,onConfirm:()=>{r(null),m()},onCancel:()=>{r(null),w==null||w()}})},[]),c=W.useCallback((f,p,m,w,y,x)=>{r({type:"prompt",title:f,message:p,defaultValue:m,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:k=>{r(null),w(k)},onCancel:()=>{r(null),y==null||y()}})},[]),h=n?g.jsx(nk,{...n}):null;return{showAlert:l,showConfirm:a,showPrompt:c,close:s,dialogElement:h}}const sk={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},ik={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 Ai({icon:n,title:r,value:s,unit:l,tone:a="muted",hint:c,onClick:h}){return g.jsxs("button",{onClick:h,className:Me("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",ik[a]),children:[g.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[g.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:g.jsx(n,{className:"h-5 w-5"})}),g.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",sk[a]),title:c})]}),g.jsxs("div",{className:"flex items-baseline gap-1.5",children:[g.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:s}),l&&g.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]}),g.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[g.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:r}),g.jsx(Hi,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),c&&g.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:c})]})}function ok(){const{data:n,error:r}=uo(),s=mg(),l=hg();return{sys:W.useMemo(()=>{var c,h;return!n||!s?n:{...n,cpu:{...n.cpu,percent:s.cpu??n.cpu.percent},ram:{...n.ram,percent:s.ram??n.ram.percent,used:s.ram_used??n.ram.used,total:s.ram_total??n.ram.total},gpu:n.gpu?{...n.gpu,busy_percent:s.gpu??n.gpu.busy_percent}:n.gpu,disk:n.disk?{...n.disk,percent:s.disk??n.disk.percent}:n.disk,temp:{cpu:s.temp_cpu??((c=n.temp)==null?void 0:c.cpu),gpu:s.temp_gpu??((h=n.temp)==null?void 0:h.gpu)},uptime_s:s.uptime_s??n.uptime_s}},[n,s]),hist:l,error:r}}const lk=W.lazy(()=>Lt(()=>import("./LiveAreaChartImpl-DDkrCKJU.js"),__vite__mapDeps([11,12,10])));function kg(n){return g.jsx(W.Suspense,{fallback:g.jsx(ak,{height:n.height??176}),children:g.jsx(lk,{...n})})}function ak({height:n}){return g.jsx("div",{style:{height:n},className:"flex w-full items-end","aria-hidden":"true",children:g.jsx("div",{className:"h-px w-full bg-border/40"})})}const Sg={"1h":60,"24h":1440},Qp={live:"Live","1h":"1 h","24h":"24 h"};function bg({value:n,onChange:r}){return g.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Qp).map(s=>g.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:Qp[s]},s))})}const uk=[{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 ck(){var w,y,x,k;const{sys:n,hist:r}=ok(),[s,l]=W.useState("live"),a=vg(s==="live"?60:Sg[s],s!=="live"),c=W.useMemo(()=>{var S;return s==="live"?r:(((S=a.data)==null?void 0:S.points)??[]).map(b=>({t:b.t*1e3,cpu:b.cpu,ram:b.ram,gpu:b.gpu,disk:b.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=uk.filter(S=>S.key!=="gpu"||h),p={cpu:(w=n==null?void 0:n.cpu)==null?void 0:w.percent,ram:(y=n==null?void 0:n.ram)==null?void 0:y.percent,gpu:h?n.gpu.busy_percent:null,disk:(x=n==null?void 0:n.disk)==null?void 0:x.percent},m={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 g.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[g.jsx(k1,{className:"h-4.5 w-4.5 text-primary"}),g.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s==="live"&&g.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[g.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),g.jsx("div",{className:"ml-auto",children:g.jsx(bg,{value:s,onChange:l})})]}),n?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:f.map(S=>g.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),g.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),g.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[S.key]??0),"%"]}),m[S.key]&&g.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:m[S.key]})]},S.key))}),s!=="live"&&c.length===0&&g.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)&&g.jsx(kg,{data:c,series:f,unit:"%",yMode:"percent",height:176,showTime:!0})]}):g.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)&&g.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&&g.jsxs("span",{children:["CPU Temp: ",n.temp.cpu," °C"]}),n.temp.gpu!=null&&g.jsxs("span",{children:["GPU Temp: ",n.temp.gpu," °C"]})]})]})}const Vs=[{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"}],Wi=n=>n==null?"–":`${(n/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function dk(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 Nc(n){return Vs.reduce((r,s)=>r+(n[s.key]??0),0)}function fk(n){let r=null;for(const s of Vs){const l=n[s.key];l!=null&&(r==null||l>r.ms)&&(r={label:s.label,color:s.color,ms:l})}return r}function hk({t:n,scale:r}){const s=Vs.map(l=>`${l.label} ${Wi(n[l.key])}`).join(" · ");return g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:dk(n.ts)}),g.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:s,children:[g.jsx("div",{className:"absolute inset-0 flex",children:Vs.map(l=>{const a=n[l.key];return!a||a<=0?null:g.jsx("div",{style:{width:`${a/r*100}%`,background:l.color},className:"h-full first:rounded-l-sm"},l.key)})}),n.error&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),g.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:n.error?"–":Wi(Nc(n))})]})}function pk(){const{data:n}=Uw(12),r=n??[],s=Math.max(1,...r.map(c=>Nc(c))),l=r[0],a=l?fk(l):null;return g.jsxs("div",{className:"mc-card p-5",children:[g.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(b1,{className:"h-4.5 w-4.5 text-primary"}),g.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),g.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[g.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l?g.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[g.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${l.error?"text-rose-400":"text-foreground"}`,children:l.error?"Fehler":Wi(Nc(l))}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!l.error&&a&&g.jsxs(g.Fragment,{children:[" · Täter: ",g.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",Wi(a.ms)]})]})]}):g.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),l&&!l.error&&g.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Vs.filter(c=>l[c.key]!=null).map(c=>`${c.label} ${Wi(l[c.key])}`).join(" · ")})]}),g.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Vs.map(c=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:c.color}}),g.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c.label})]},c.key))})]}),r.length>0?g.jsx("div",{className:"space-y-1.5",children:r.map(c=>g.jsx(hk,{t:c,scale:s},c.id))}):g.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."}),g.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 Kp=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function mk(){const{data:n}=Jc(),r=pg(),[s,l]=W.useState("live"),a=vg(s==="live"?60:Sg[s],s!=="live"),c=W.useMemo(()=>{var w;if(s==="live")return r;const p=((w=a.data)==null?void 0:w.points)??[],m=[];for(let y=1;yg.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),g.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),g.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?g.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?g.jsx(kg,{data:c,series:Kp,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):g.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),g.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 ed(){const n=lo();return r=>n({to:".",search:s=>({...s,system:r})})}function gk({onNavigate:n}){var te,ye,he,Y;const r=ed(),{data:s}=wg(),{data:l}=xg(),{data:a}=Vw(),{data:c}=$w(),{data:h}=Hw(),{data:f}=Ow(),{data:p}=Aw(),m=tk(),{showAlert:w,dialogElement:y}=rk(),x=Dc(),[k,S]=W.useState({});async function b(J,ee){S(P=>({...P,[J]:!0}));try{if(ee.kind==="loadModel")await Pe(`/api/models/${encodeURIComponent(ee.model)}/load`,{method:"POST"});else{const P=await Pe("/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:Te.health}),x.invalidateQueries({queryKey:Te.services}),x.invalidateQueries({queryKey:Te.models})}catch(P){w("Reparatur fehlgeschlagen",String((P==null?void 0:P.message)||P))}finally{S(P=>({...P,[J]:!1}))}}const _=((te=s==null?void 0:s.running)==null?void 0:te.length)??0,R=(l==null?void 0:l.services.filter(J=>J.ok).length)??0,L=(l==null?void 0:l.services.length)??0,z=L-R,M=(a?(a.os>0?1:0)+(a.engine>0?1:0)+(a.swap>0?1:0)+(a.models>0?1:0):0)+(((ye=a==null?void 0:a.components)==null?void 0:ye.filter(J=>J.update===!0).length)??0),A=f!=null&&f.available?f.open_count:0,F=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?(Y=Q.name.split("/").pop())==null?void 0:Y.replace(/\.gguf$/i,""):"",Z=l==null?void 0:l.services.filter(J=>!J.ok).map(J=>J.name).join(", "),ae=a?[a.os>0&&"OS",a.engine>0&&"Engine",a.swap>0&&"Swap",a.models>0&&"Modelle"].filter(Boolean):[],H=ae.length>0?ae.join(" + "):"";return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{children:[g.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"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[g.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[g.jsx(yk,{verdict:m.verdict,memory:m.memory,warns:m.warns,problems:m.problems}),g.jsxs("section",{children:[g.jsx(tc,{children:"Leistung"}),g.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:g.jsx(ck,{})}),g.jsx("div",{className:"mt-4",children:g.jsx(pk,{})}),g.jsx("div",{className:"mt-4",children:g.jsx(mk,{})})]}),g.jsxs("section",{children:[g.jsx(tc,{children:"Bereiche"}),g.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[g.jsx(Ai,{icon:Wc,title:"Auftragsbuch",value:f!=null&&f.available?A:"—",unit:A===1?"Vorschlag":"Vorschläge",tone:f?F>0||A>0?"warn":"ok":"loading",hint:F>0?`${F} Karte${F===1?"":"n"} wartet auf deine Antwort`:A>0?`${A} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>n("auftraege")}),g.jsx(Ai,{icon:Jm,title:"Modelle",value:_,unit:"warm",tone:_>0?"ok":"muted",hint:X?`Hirn: ${X}`:"Kein Hermes-Modell geladen",onClick:()=>n("models")}),g.jsx(Ai,{icon:tg,title:"Dienste",value:l?`${R}/${L}`:"…",unit:"laufen",tone:l?z>0?"warn":"ok":"loading",hint:Z?`Ausfall: ${Z}`:"Alle Dienste online",onClick:()=>r("wartung")}),g.jsx(Ai,{icon:Gc,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: ${H}`:"Alles auf dem neuesten Stand",onClick:()=>r("wartung")}),g.jsx(Ai,{icon:Kc,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")})]})]})]}),g.jsxs("div",{className:"space-y-6",children:[g.jsx(vk,{problems:m.problems,pendingCount:M,openAuftraege:A,blockedIdeen:F,busy:k,onRepair:b,onNavigate:n}),g.jsxs("section",{children:[g.jsx(tc,{children:"Werkzeuge & Diagnose"}),g.jsx(xk,{agent:c,svcErrors:z,onNavigate:n})]})]})]}),y]})}function tc({children:n}){return g.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:n})}function yk({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:Qc,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:C1,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:$l,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:$l,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],m={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[r.status];return g.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:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:g.jsx(f,{className:Me("h-6 w-6",h.iconCls)})}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:h.title}),g.jsx("p",{className:"text-xs text-muted-foreground",children:h.sub})]})]}),g.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[g.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[g.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[g.jsx(_1,{className:"h-3.5 w-3.5"})," Speicher"]}),g.jsx("span",{className:Me("font-mono font-bold",p),children:r.status==="unknown"?"—":`${r.usedGb.toFixed(1)} / ${r.totalGb.toFixed(1)} GB`})]}),g.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:g.jsx("div",{className:Me("h-full rounded-full transition-all duration-500",m),style:{width:`${r.pct}%`}})})]})]})}function vk({problems:n,pendingCount:r,openAuftraege:s,blockedIdeen:l,busy:a,onRepair:c,onNavigate:h}){const f=ed(),p=r>0,m=s>0,w=l>0,y=n.length===0&&!p&&!m&&!w;return g.jsx("div",{className:"h-full flex flex-col justify-between",children:y?g.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[g.jsx(g1,{className:"h-5 w-5 shrink-0 text-emerald-400"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):g.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[n.map(x=>g.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:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[g.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:g.jsx(x.icon,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-sm font-bold text-foreground",children:x.label}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:x.detail})]})]}),x.repair&&g.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]?g.jsx(Qc,{className:"h-3.5 w-3.5 animate-spin"}):g.jsx(F1,{className:"h-3.5 w-3.5"}),x.repair.label]})]},x.id)),w&&g.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:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(eg,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Karte",l===1?"":"n"," braucht deine Antwort"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),g.jsx(Hi,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),m&&g.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:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(Wc,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[s," Vorschl",s===1?"ag":"äge"," im Auftragsbuch"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),g.jsx(Hi,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),p&&g.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:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(Gc,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Update",r===1?"":"s"," bereit"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),g.jsx(Hi,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function xk({agent:n,svcErrors:r,onNavigate:s}){const l=ed(),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 g.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:g.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 g.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:[g.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:c.label}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.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}),g.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full",f)})]})]},h)})})})}const wk=W.lazy(()=>Lt(()=>import("./ModelsView-Dn4Ryn0Z.js"),__vite__mapDeps([13,14,15,16,3,8,17,18])).then(n=>({default:n.ModelsView}))),kk=W.lazy(()=>Lt(()=>import("./ConnectView-BdqWBHRP.js"),__vite__mapDeps([19,5,17])).then(n=>({default:n.ConnectView}))),Sk=W.lazy(()=>Lt(()=>import("./AgentView-CW6l1s2v.js"),__vite__mapDeps([20,21,6,7,4])).then(n=>({default:n.AgentView}))),bk=W.lazy(()=>Lt(()=>import("./KonsoleView-CsAZfGsS.js"),__vite__mapDeps([22,7,1])).then(n=>({default:n.KonsoleView}))),_k=W.lazy(()=>Lt(()=>import("./GuideView-Coe5WKp_.js"),__vite__mapDeps([23,16,18,4])).then(n=>({default:n.GuideView}))),Ck=W.lazy(()=>Lt(()=>import("./AuftragsbuchView-CwIgN4P-.js"),__vite__mapDeps([24,21,1,5,6,17,25])).then(n=>({default:n.AuftragsbuchView}))),Ek=W.lazy(()=>Lt(()=>import("./IdeenAnsicht-Crw42hu2.js"),__vite__mapDeps([26,21,15,25,1,2,18,17,6])).then(n=>({default:n.IdeenView}))),jk=W.lazy(()=>Lt(()=>import("./SkillsView-BPwq8_ZP.js"),__vite__mapDeps([27,14])).then(n=>({default:n.SkillsView}))),Pk=W.lazy(()=>Lt(()=>import("./ChronikView-DfFt5COR.js"),[]).then(n=>({default:n.ChronikView}))),Nk=W.lazy(()=>Lt(()=>import("./WissenView-Cm8edL44.js"),__vite__mapDeps([28,12,1,3,2])).then(n=>({default:n.WissenView}))),Rk=n=>{const r=n.system;return r==="wartung"||r==="logs"?{system:r}:{}},Qs=qx({component:ek,validateSearch:Rk,notFoundComponent:()=>g.jsx(co,{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."})}),Lk=ao({getParentRoute:()=>Qs,path:"/",beforeLoad:()=>{throw jm({to:"/cockpit"})}});function dr(n,r){return ao({getParentRoute:()=>Qs,path:n,component:r,errorComponent:({error:s,reset:l})=>g.jsx(co,{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 Mk(){const n=lo();return g.jsx(gk,{onNavigate:r=>{const s=Ji.find(l=>l.id===r);s&&n({to:s.pfad})}})}const Tk=dr("/cockpit",()=>g.jsx(Mk,{})),Ik=dr("/auftraege",()=>g.jsx(Ck,{})),Dk=dr("/skills",()=>g.jsx(jk,{})),zk=dr("/chronik",()=>g.jsx(Pk,{})),Fk=dr("/verbinden",()=>g.jsx(kk,{})),Ok=dr("/konsole",()=>g.jsx(bk,{})),Ak=dr("/anleitung",()=>g.jsx(_k,{})),Uk=dr("/agent",()=>g.jsx(Sk,{})),Bk=ao({getParentRoute:()=>Qs,path:"/ideen",validateSearch:n=>typeof n.offen=="string"&&n.offen?{offen:n.offen}:{},component:()=>g.jsx(Ek,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),$k=ao({getParentRoute:()=>Qs,path:"/wissen",validateSearch:n=>typeof n.datei=="string"&&n.datei?{datei:n.datei}:{},component:()=>g.jsx(Nk,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Vk=ao({getParentRoute:()=>Qs,path:"/modelle",validateSearch:n=>{const r=n.reiter;return r==="werkbank"||r==="routing"||r==="discover"?{reiter:r}:{}},component:()=>g.jsx(wk,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Hk=Qs.addChildren([Lk,Tk,Bk,Ik,Dk,zk,$k,Fk,Ok,Ak,Vk,Uk]),Wk=s1({routeTree:Hk,scrollRestoration:!0,defaultPreload:!1});class Qk extends Gt.Component{constructor(){super(...arguments);wl(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?g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:g.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[g.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),g.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),g.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 Kk=Object.fromEntries(Ji.map(n=>[n.id,n.pfad]));function Gk(){const n=window.location.hash.replace(/^#\/?/,"");if(!n)return;const r=Kk[n];r&&window.history.replaceState(null,"",r+window.location.search)}const nc="mc_neuladen_wegen_version";function qk(){window.addEventListener("vite:preloadError",n=>{sessionStorage.getItem(nc)||(n.preventDefault(),sessionStorage.setItem(nc,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(nc),5e3)})}Gk();qk();const Zk=new sv({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});M0.createRoot(document.getElementById("root")).render(g.jsx(Gt.StrictMode,{children:g.jsx(Qk,{children:g.jsx(iv,{client:Zk,children:g.jsx(l1,{router:Wk})})})}));export{R1 as $,Wm as A,m1 as B,g1 as C,pS as D,S1 as E,Hw as F,Hi as G,_1 as H,j1 as I,v1 as J,x1 as K,Qc as L,cS as M,h1 as N,$w as O,Jk as P,Cc as Q,T1 as R,z1 as S,$l as T,Bp as U,mS as V,F1 as W,qc as X,tg as Y,Jm as Z,Kc as _,aS as a,b1 as a0,D1 as a1,Ow as a2,Aw as a3,wS as a4,Wc as a5,nS as a6,eg as a7,oo as a8,sc as a9,Qi as aa,tv as ab,st as ac,kt as ad,am as ae,De as af,uS as ag,vS as ah,rS as ai,E1 as aj,Gc as ak,C1 as al,iS as am,Gt as an,sm as ao,sS as ap,oS as aq,N1 as ar,xg as as,Xk as at,Ji as au,J1 as av,zx as aw,io as ax,N0 as ay,Me as b,ke as c,tS as d,p1 as e,wg as f,lS as g,uo as h,dS as i,g as j,rk as k,yS as l,hS as m,Pe as n,an as o,K1 as p,Te as q,W as r,eS as s,k1 as t,Dc as u,xS as v,fS as w,Vw as x,gS as y,lo as z};