diff --git a/frontend/dist/assets/GraphView-C2Rr5maK.js b/frontend/dist/assets/GraphView-BmXGA8o_.js similarity index 99% rename from frontend/dist/assets/GraphView-C2Rr5maK.js rename to frontend/dist/assets/GraphView-BmXGA8o_.js index 8b69b4b..1946660 100644 --- a/frontend/dist/assets/GraphView-C2Rr5maK.js +++ b/frontend/dist/assets/GraphView-BmXGA8o_.js @@ -1,4 +1,4 @@ -import{r as K,a as Hv,g as Hr,R as Um,c as q2,j as Ne,l as Z2,S as K2,b as Vx,T as $2}from"./index-DuvhfsJu.js";/** +import{r as K,a as Hv,g as Hr,R as Um,c as q2,j as Ne,l as Z2,S as K2,b as Vx,T as $2}from"./index-D7EBqqTV.js";/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT diff --git a/frontend/dist/assets/index-D7EBqqTV.js b/frontend/dist/assets/index-D7EBqqTV.js new file mode 100644 index 0000000..b882a71 --- /dev/null +++ b/frontend/dist/assets/index-D7EBqqTV.js @@ -0,0 +1,488 @@ +var rM=Object.defineProperty;var M1=e=>{throw TypeError(e)};var nM=(e,t,r)=>t in e?rM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Gl=(e,t,r)=>nM(e,typeof t!="symbol"?t+"":t,r),Rm=(e,t,r)=>t.has(e)||M1("Cannot "+r);var L=(e,t,r)=>(Rm(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?M1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Rm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Fe=(e,t,r)=>(Rm(e,t,"access private method"),r);var xd=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function iM(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function ay(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $m={exports:{}},Vl={},Lm={exports:{}},Le={};/** + * @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 I1;function aM(){if(I1)return Le;I1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(D,T,te){this.props=D,this.context=T,this.refs=k,this.updater=te||b}S.prototype.isReactComponent={},S.prototype.setState=function(D,T){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,T,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=S.prototype;function P(D,T,te){this.props=D,this.context=T,this.refs=k,this.updater=te||b}var O=P.prototype=new N;O.constructor=P,j(O,S.prototype),O.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,C={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function W(D,T,te){var ie,re={},ce=null,me=null;if(T!=null)for(ie in T.ref!==void 0&&(me=T.ref),T.key!==void 0&&(ce=""+T.key),T)_.call(T,ie)&&!I.hasOwnProperty(ie)&&(re[ie]=T[ie]);var Oe=arguments.length-2;if(Oe===1)re.children=te;else if(1>>1,T=F[D];if(0>>1;Da(re,Q))cea(me,re)?(F[D]=me,F[ce]=Q,D=ce):(F[D]=re,F[ie]=Q,D=ie);else if(cea(me,Q))F[D]=me,F[ce]=Q,D=ce;else break e}}return Z}function a(F,Z){var Q=F.sortIndex-Z.sortIndex;return Q!==0?Q:F.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],h=[],p=1,g=null,x=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(F){for(var Z=r(h);Z!==null;){if(Z.callback===null)n(h);else if(Z.startTime<=F)n(h),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=r(h)}}function A(F){if(k=!1,O(F),!j)if(r(f)!==null)j=!0,we(_);else{var Z=r(h);Z!==null&&pe(A,Z.startTime-F)}}function _(F,Z){j=!1,k&&(k=!1,N(W),W=-1),b=!0;var Q=x;try{for(O(Z),g=r(f);g!==null&&(!(g.expirationTime>Z)||F&&!Y());){var D=g.callback;if(typeof D=="function"){g.callback=null,x=g.priorityLevel;var T=D(g.expirationTime<=Z);Z=e.unstable_now(),typeof T=="function"?g.callback=T:g===r(f)&&n(f),O(Z)}else n(f);g=r(f)}if(g!==null)var te=!0;else{var ie=r(h);ie!==null&&pe(A,ie.startTime-Z),te=!1}return te}finally{g=null,x=Q,b=!1}}var C=!1,I=null,W=-1,U=5,G=-1;function Y(){return!(e.unstable_now()-GF||125D?(F.sortIndex=Q,t(h,F),r(f)===null&&F===r(h)&&(k?(N(W),W=-1):k=!0,pe(A,Q-D))):(F.sortIndex=T,t(f,F),j||b||(j=!0,we(_))),F},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(F){var Z=x;return function(){var Q=x;x=Z;try{return F.apply(this,arguments)}finally{x=Q}}}})(Bm)),Bm}var L1;function uM(){return L1||(L1=1,Fm.exports=lM()),Fm.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 z1;function cM(){if(z1)return gr;z1=1;var e=Bs(),t=uM();function r(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},g={};function x(i){return f.call(g,i)?!0:f.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function b(i,s,d,m){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,s,d,m){if(s===null||typeof s>"u"||b(i,s,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,d,m,y,w,E){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=E}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(i,2,!1,i,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(i){S[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function P(i){return i[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(i){var s=i.replace(N,P);S[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,P);S[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,P);S[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,s,d,m){var y=S.hasOwnProperty(s)?S[s]:null;(y!==null?y.type!==0:m||!(2M||y[E]!==w[M]){var R=` +`+y[E].replace(" at new "," at ");return i.displayName&&R.includes("")&&(R=R.replace("",i.displayName)),R}while(1<=E&&0<=M);break}}}finally{te=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function re(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=ie(i.type,!1),i;case 11:return i=ie(i.type.render,!1),i;case 1:return i=ie(i.type,!0),i;default:return""}}function ce(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case I:return"Fragment";case C:return"Portal";case U:return"Profiler";case W:return"StrictMode";case ue:return"Suspense";case J:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case G:return(i._context.displayName||"Context")+".Provider";case $:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:ce(i.type)||"Memo";case we:s=i._payload,i=i._init;try{return ce(i(s))}catch{}}return null}function me(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(s);case 8:return s===W?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Oe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ee(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ke(i){var s=ee(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return y.call(this)},set:function(E){m=""+E,w.call(this,E)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(E){m=""+E},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function _e(i){i._valueTracker||(i._valueTracker=ke(i))}function oe(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),m="";return i&&(m=ee(i)?i.checked?"true":"false":i.value),i=m,i!==d?(s.setValue(i),!0):!1}function Xe(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function X(i,s){var d=s.checked;return Q({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function fe(i,s){var d=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;d=Oe(s.value!=null?s.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function tt(i,s){s=s.checked,s!=null&&O(i,"checked",s,!1)}function jr(i,s){tt(i,s);var d=Oe(s.value),m=s.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ma(i,s.type,d):s.hasOwnProperty("defaultValue")&&ma(i,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function pa(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function ma(i,s,d){(s!=="number"||Xe(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Bn=Array.isArray;function Un(i,s,d,m){if(i=i.options,s){s={};for(var y=0;y"+s.valueOf().toString()+"",s=ga.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function ji(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var ki={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},cc=["Webkit","ms","Moz","O"];Object.keys(ki).forEach(function(i){cc.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ki[s]=ki[i]})});function ol(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ki.hasOwnProperty(i)&&ki[i]?(""+s).trim():s+"px"}function sl(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var m=d.indexOf("--")===0,y=ol(d,s[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,y):i[d]=y}}var B=Q({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 he(i,s){if(s){if(B[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Pe(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 ze=null;function Ve(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Ze=null,gt=null;function va(i){if(i=_l(i)){if(typeof qt!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Tc(s),qt(i.stateNode,i.type,s))}}function ll(i){Ze?gt?gt.push(i):gt=[i]:Ze=i}function dc(){if(Ze){var i=Ze,s=gt;if(gt=Ze=null,va(i),s)for(i=0;i>>=0,i===0?32:31-(y_(i)/x_|0)|0}var gc=64,vc=4194304;function hl(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function yc(i,s){var d=i.pendingLanes;if(d===0)return 0;var m=0,y=i.suspendedLanes,w=i.pingedLanes,E=d&268435455;if(E!==0){var M=E&~y;M!==0?m=hl(M):(w&=E,w!==0&&(m=hl(w)))}else E=d&~y,E!==0?m=hl(E):w!==0&&(m=hl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&y)===0&&(y=m&-m,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0d;d++)s.push(i);return s}function pl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zr(s),i[s]=d}function k_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0=jl),Nx=" ",Ex=!1;function Px(i,s){switch(i){case"keyup":return X_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ax(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function J_(i,s){switch(i){case"compositionend":return Ax(s);case"keypress":return s.which!==32?null:(Ex=!0,Nx);case"textInput":return i=s.data,i===Nx&&Ex?null:i;default:return null}}function e5(i,s){if(No)return i==="compositionend"||!gp&&Px(i,s)?(i=xx(),kc=cp=Ai=null,No=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:d,offset:s-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Dx(d)}}function $x(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?$x(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Lx(){for(var i=window,s=Xe();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Xe(i.document)}return s}function xp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function u5(i){var s=Lx(),d=i.focusedElem,m=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&$x(d.ownerDocument.documentElement,d)){if(m!==null&&xp(d)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var y=d.textContent.length,w=Math.min(m.start,y);m=m.end===void 0?w:Math.min(m.end,y),!i.extend&&w>m&&(y=m,m=w,w=y),y=Rx(d,w);var E=Rx(d,m);y&&E&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==E.node||i.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Eo=null,bp=null,El=null,wp=!1;function zx(i,s,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;wp||Eo==null||Eo!==Xe(m)||(m=Eo,"selectionStart"in m&&xp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),El&&Nl(El,m)||(El=m,m=_c(bp,"onSelect"),0_o||(i.current=Ip[_o],Ip[_o]=null,_o--)}function Je(i,s){_o++,Ip[_o]=i.current,i.current=s}var Mi={},Qt=_i(Mi),dr=_i(!1),ba=Mi;function Mo(i,s){var d=i.type.contextTypes;if(!d)return Mi;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in d)y[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=y),y}function fr(i){return i=i.childContextTypes,i!=null}function Dc(){nt(dr),nt(Qt)}function eb(i,s,d){if(Qt.current!==Mi)throw Error(r(168));Je(Qt,s),Je(dr,d)}function tb(i,s,d){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var y in m)if(!(y in s))throw Error(r(108,me(i)||"Unknown",y));return Q({},d,m)}function Rc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Mi,ba=Qt.current,Je(Qt,i),Je(dr,dr.current),!0}function rb(i,s,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=tb(i,s,ba),m.__reactInternalMemoizedMergedChildContext=i,nt(dr),nt(Qt),Je(Qt,i)):nt(dr),Je(dr,d)}var Hn=null,$c=!1,Tp=!1;function nb(i){Hn===null?Hn=[i]:Hn.push(i)}function w5(i){$c=!0,nb(i)}function Ii(){if(!Tp&&Hn!==null){Tp=!0;var i=0,s=Qe;try{var d=Hn;for(Qe=1;i>=E,y-=E,Kn=1<<32-Zr(s)+y|d<Re?(_t=Te,Te=null):_t=Te.sibling;var Ke=ne(H,Te,K[Re],le);if(Ke===null){Te===null&&(Te=_t);break}i&&Te&&Ke.alternate===null&&s(H,Te),z=w(Ke,z,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke,Te=_t}if(Re===K.length)return d(H,Te),st&&ja(H,Re),Ee;if(Te===null){for(;ReRe?(_t=Te,Te=null):_t=Te.sibling;var Ui=ne(H,Te,Ke.value,le);if(Ui===null){Te===null&&(Te=_t);break}i&&Te&&Ui.alternate===null&&s(H,Te),z=w(Ui,z,Re),Ie===null?Ee=Ui:Ie.sibling=Ui,Ie=Ui,Te=_t}if(Ke.done)return d(H,Te),st&&ja(H,Re),Ee;if(Te===null){for(;!Ke.done;Re++,Ke=K.next())Ke=se(H,Ke.value,le),Ke!==null&&(z=w(Ke,z,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke);return st&&ja(H,Re),Ee}for(Te=m(H,Te);!Ke.done;Re++,Ke=K.next())Ke=ve(Te,H,Re,Ke.value,le),Ke!==null&&(i&&Ke.alternate!==null&&Te.delete(Ke.key===null?Re:Ke.key),z=w(Ke,z,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke);return i&&Te.forEach(function(tM){return s(H,tM)}),st&&ja(H,Re),Ee}function yt(H,z,K,le){if(typeof K=="object"&&K!==null&&K.type===I&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case _:e:{for(var Ee=K.key,Ie=z;Ie!==null;){if(Ie.key===Ee){if(Ee=K.type,Ee===I){if(Ie.tag===7){d(H,Ie.sibling),z=y(Ie,K.props.children),z.return=H,H=z;break e}}else if(Ie.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===we&&ub(Ee)===Ie.type){d(H,Ie.sibling),z=y(Ie,K.props),z.ref=Ml(H,Ie,K),z.return=H,H=z;break e}d(H,Ie);break}else s(H,Ie);Ie=Ie.sibling}K.type===I?(z=Oa(K.props.children,H.mode,le,K.key),z.return=H,H=z):(le=dd(K.type,K.key,K.props,null,H.mode,le),le.ref=Ml(H,z,K),le.return=H,H=le)}return E(H);case C:e:{for(Ie=K.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===K.containerInfo&&z.stateNode.implementation===K.implementation){d(H,z.sibling),z=y(z,K.children||[]),z.return=H,H=z;break e}else{d(H,z);break}else s(H,z);z=z.sibling}z=_m(K,H.mode,le),z.return=H,H=z}return E(H);case we:return Ie=K._init,yt(H,z,Ie(K._payload),le)}if(Bn(K))return je(H,z,K,le);if(Z(K))return Se(H,z,K,le);Bc(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,z!==null&&z.tag===6?(d(H,z.sibling),z=y(z,K),z.return=H,H=z):(d(H,z),z=Om(K,H.mode,le),z.return=H,H=z),E(H)):d(H,z)}return yt}var Ro=cb(!0),db=cb(!1),Uc=_i(null),Wc=null,$o=null,Fp=null;function Bp(){Fp=$o=Wc=null}function Up(i){var s=Uc.current;nt(Uc),i._currentValue=s}function Wp(i,s,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===d)break;i=i.return}}function Lo(i,s){Wc=i,Fp=$o=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(hr=!0),i.firstContext=null)}function Rr(i){var s=i._currentValue;if(Fp!==i)if(i={context:i,memoizedValue:s,next:null},$o===null){if(Wc===null)throw Error(r(308));$o=i,Wc.dependencies={lanes:0,firstContext:i}}else $o=$o.next=i;return s}var ka=null;function Hp(i){ka===null?ka=[i]:ka.push(i)}function fb(i,s,d,m){var y=s.interleaved;return y===null?(d.next=d,Hp(s)):(d.next=y.next,y.next=d),s.interleaved=d,Vn(i,m)}function Vn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Ti=!1;function Kp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hb(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(He&2)!==0){var y=m.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),m.pending=s,Vn(i,d)}return y=m.interleaved,y===null?(s.next=s,Hp(m)):(s.next=y.next,y.next=s),m.interleaved=s,Vn(i,d)}function Hc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,ap(i,d)}}function pb(i,s){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var y=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var E={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?y=w=E:w=w.next=E,d=d.next}while(d!==null);w===null?y=w=s:w=w.next=s}else y=w=s;d={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Kc(i,s,d,m){var y=i.updateQueue;Ti=!1;var w=y.firstBaseUpdate,E=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var R=M,q=R.next;R.next=null,E===null?w=q:E.next=q,E=R;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,M=ae.lastBaseUpdate,M!==E&&(M===null?ae.firstBaseUpdate=q:M.next=q,ae.lastBaseUpdate=R))}if(w!==null){var se=y.baseState;E=0,ae=q=R=null,M=w;do{var ne=M.lane,ve=M.eventTime;if((m&ne)===ne){ae!==null&&(ae=ae.next={eventTime:ve,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var je=i,Se=M;switch(ne=s,ve=d,Se.tag){case 1:if(je=Se.payload,typeof je=="function"){se=je.call(ve,se,ne);break e}se=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Se.payload,ne=typeof je=="function"?je.call(ve,se,ne):je,ne==null)break e;se=Q({},se,ne);break e;case 2:Ti=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,ne=y.effects,ne===null?y.effects=[M]:ne.push(M))}else ve={eventTime:ve,lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ae===null?(q=ae=ve,R=se):ae=ae.next=ve,E|=ne;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);if(ae===null&&(R=se),y.baseState=R,y.firstBaseUpdate=q,y.lastBaseUpdate=ae,s=y.shared.interleaved,s!==null){y=s;do E|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Ea|=E,i.lanes=E,i.memoizedState=se}}function mb(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;sd?d:4,i(!0);var m=Yp.transition;Yp.transition={};try{i(!1),s()}finally{Qe=d,Yp.transition=m}}function Tb(){return $r().memoizedState}function N5(i,s,d){var m=zi(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Db(i))Rb(s,d);else if(d=fb(i,s,d,m),d!==null){var y=ir();an(d,i,m,y),$b(d,s,m)}}function E5(i,s,d){var m=zi(i),y={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Db(i))Rb(s,y);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var E=s.lastRenderedState,M=w(E,d);if(y.hasEagerState=!0,y.eagerState=M,Jr(M,E)){var R=s.interleaved;R===null?(y.next=y,Hp(s)):(y.next=R.next,R.next=y),s.interleaved=y;return}}catch{}finally{}d=fb(i,s,y,m),d!==null&&(y=ir(),an(d,i,m,y),$b(d,s,m))}}function Db(i){var s=i.alternate;return i===dt||s!==null&&s===dt}function Rb(i,s){Rl=qc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function $b(i,s,d){if((d&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,ap(i,d)}}var Xc={readContext:Rr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},P5={readContext:Rr,useCallback:function(i,s){return yn().memoizedState=[i,s===void 0?null:s],i},useContext:Rr,useEffect:Eb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Qc(4194308,4,Cb.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Qc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Qc(4,2,i,s)},useMemo:function(i,s){var d=yn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var m=yn();return s=d!==void 0?d(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=N5.bind(null,dt,i),[m.memoizedState,i]},useRef:function(i){var s=yn();return i={current:i},s.memoizedState=i},useState:Sb,useDebugValue:nm,useDeferredValue:function(i){return yn().memoizedState=i},useTransition:function(){var i=Sb(!1),s=i[0];return i=S5.bind(null,i[1]),yn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var m=dt,y=yn();if(st){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Ot===null)throw Error(r(349));(Na&30)!==0||xb(m,s,d)}y.memoizedState=d;var w={value:d,getSnapshot:s};return y.queue=w,Eb(wb.bind(null,m,w,i),[i]),m.flags|=2048,zl(9,bb.bind(null,m,w,d,s),void 0,null),d},useId:function(){var i=yn(),s=Ot.identifierPrefix;if(st){var d=Gn,m=Kn;d=(m&~(1<<32-Zr(m)-1)).toString(32)+d,s=":"+s+"R"+d,d=$l++,0<\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=E.createElement(d,{is:m.is}):(i=E.createElement(d),d==="select"&&(E=i,m.multiple?E.multiple=!0:m.size&&(E.size=m.size))):i=E.createElementNS(i,d),i[gn]=s,i[Ol]=m,n1(i,s,!1,!1),s.stateNode=i;e:{switch(E=Pe(d,m),d){case"dialog":rt("cancel",i),rt("close",i),y=m;break;case"iframe":case"object":case"embed":rt("load",i),y=m;break;case"video":case"audio":for(y=0;yWo&&(s.flags|=128,m=!0,Fl(w,!1),s.lanes=4194304)}else{if(!m)if(i=Gc(E),i!==null){if(s.flags|=128,m=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Fl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!E.alternate&&!st)return Xt(s),null}else 2*vt()-w.renderingStartTime>Wo&&d!==1073741824&&(s.flags|=128,m=!0,Fl(w,!1),s.lanes=4194304);w.isBackwards?(E.sibling=s.child,s.child=E):(d=w.last,d!==null?d.sibling=E:s.child=E,w.last=E)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=vt(),s.sibling=null,d=ct.current,Je(ct,m?d&1|2:d&1),s):(Xt(s),null);case 22:case 23:return Pm(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Er&1073741824)!==0&&(Xt(s),s.subtreeFlags&6&&(s.flags|=8192)):Xt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function D5(i,s){switch(Rp(s),s.tag){case 1:return fr(s.type)&&Dc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zo(),nt(dr),nt(Qt),Qp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Vp(s),null;case 13:if(nt(ct),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Do()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return nt(ct),null;case 4:return zo(),null;case 10:return Up(s.type._context),null;case 22:case 23:return Pm(),null;case 24:return null;default:return null}}var td=!1,Zt=!1,R5=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Bo(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){ft(i,s,m)}else d.current=null}function mm(i,s,d){try{d()}catch(m){ft(i,s,m)}}var o1=!1;function $5(i,s){if(Pp=wc,i=Lx(),xp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var E=0,M=-1,R=-1,q=0,ae=0,se=i,ne=null;t:for(;;){for(var ve;se!==d||y!==0&&se.nodeType!==3||(M=E+y),se!==w||m!==0&&se.nodeType!==3||(R=E+m),se.nodeType===3&&(E+=se.nodeValue.length),(ve=se.firstChild)!==null;)ne=se,se=ve;for(;;){if(se===i)break t;if(ne===d&&++q===y&&(M=E),ne===w&&++ae===m&&(R=E),(ve=se.nextSibling)!==null)break;se=ne,ne=se.parentNode}se=ve}d=M===-1||R===-1?null:{start:M,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Ap={focusedElem:i,selectionRange:d},wc=!1,xe=s;xe!==null;)if(s=xe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,xe=i;else for(;xe!==null;){s=xe;try{var je=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(je!==null){var Se=je.memoizedProps,yt=je.memoizedState,H=s.stateNode,z=H.getSnapshotBeforeUpdate(s.elementType===s.type?Se:tn(s.type,Se),yt);H.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var K=s.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){ft(s,s.return,le)}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}return je=o1,o1=!1,je}function Bl(i,s,d){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var y=m=m.next;do{if((y.tag&i)===i){var w=y.destroy;y.destroy=void 0,w!==void 0&&mm(s,d,w)}y=y.next}while(y!==m)}}function rd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==s)}}function gm(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function s1(i){var s=i.alternate;s!==null&&(i.alternate=null,s1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[gn],delete s[Ol],delete s[Mp],delete s[x5],delete s[b5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function l1(i){return i.tag===5||i.tag===3||i.tag===4}function u1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||l1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function vm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Ic));else if(m!==4&&(i=i.child,i!==null))for(vm(i,s,d),i=i.sibling;i!==null;)vm(i,s,d),i=i.sibling}function ym(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(ym(i,s,d),i=i.sibling;i!==null;)ym(i,s,d),i=i.sibling}var Lt=null,rn=!1;function Ri(i,s,d){for(d=d.child;d!==null;)c1(i,s,d),d=d.sibling}function c1(i,s,d){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(mc,d)}catch{}switch(d.tag){case 5:Zt||Bo(d,s);case 6:var m=Lt,y=rn;Lt=null,Ri(i,s,d),Lt=m,rn=y,Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Lt.removeChild(d.stateNode));break;case 18:Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?_p(i.parentNode,d):i.nodeType===1&&_p(i,d),xl(i)):_p(Lt,d.stateNode));break;case 4:m=Lt,y=rn,Lt=d.stateNode.containerInfo,rn=!0,Ri(i,s,d),Lt=m,rn=y;break;case 0:case 11:case 14:case 15:if(!Zt&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){y=m=m.next;do{var w=y,E=w.destroy;w=w.tag,E!==void 0&&((w&2)!==0||(w&4)!==0)&&mm(d,s,E),y=y.next}while(y!==m)}Ri(i,s,d);break;case 1:if(!Zt&&(Bo(d,s),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(M){ft(d,s,M)}Ri(i,s,d);break;case 21:Ri(i,s,d);break;case 22:d.mode&1?(Zt=(m=Zt)||d.memoizedState!==null,Ri(i,s,d),Zt=m):Ri(i,s,d);break;default:Ri(i,s,d)}}function d1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new R5),s.forEach(function(m){var y=G5.bind(null,i,m);d.has(m)||(d.add(m),m.then(y,y))})}}function nn(i,s){var d=s.deletions;if(d!==null)for(var m=0;my&&(y=E),m&=~w}if(m=y,m=vt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*z5(m/1960))-m,10i?16:i,Li===null)var m=!1;else{if(i=Li,Li=null,sd=0,(He&6)!==0)throw Error(r(331));var y=He;for(He|=4,xe=i.current;xe!==null;){var w=xe,E=w.child;if((xe.flags&16)!==0){var M=w.deletions;if(M!==null){for(var R=0;Rvt()-wm?Aa(i,0):bm|=d),mr(i,s)}function S1(i,s){s===0&&((i.mode&1)===0?s=1:(s=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var d=ir();i=Vn(i,s),i!==null&&(pl(i,s,d),mr(i,d))}function K5(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),S1(i,d)}function G5(i,s){var d=0;switch(i.tag){case 13:var m=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(s),S1(i,d)}var N1;N1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||dr.current)hr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return hr=!1,I5(i,s,d);hr=(i.flags&131072)!==0}else hr=!1,st&&(s.flags&1048576)!==0&&ib(s,zc,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;ed(i,s),i=s.pendingProps;var y=Mo(s,Qt.current);Lo(s,d),y=Zp(null,s,m,i,y,d);var w=Jp();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,fr(m)?(w=!0,Rc(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Kp(s),y.updater=Zc,s.stateNode=y,y._reactInternals=s,am(s,m,i,d),s=um(null,s,m,!0,w,d)):(s.tag=0,st&&w&&Dp(s),nr(null,s,y,d),s=s.child),s;case 16:m=s.elementType;e:{switch(ed(i,s),i=s.pendingProps,y=m._init,m=y(m._payload),s.type=m,y=s.tag=q5(m),i=tn(m,i),y){case 0:s=lm(null,s,m,i,d);break e;case 1:s=Xb(null,s,m,i,d);break e;case 11:s=Gb(null,s,m,i,d);break e;case 14:s=Vb(null,s,m,tn(m.type,i),d);break e}throw Error(r(306,m,""))}return s;case 0:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:tn(m,y),lm(i,s,m,y,d);case 1:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:tn(m,y),Xb(i,s,m,y,d);case 3:e:{if(Zb(s),i===null)throw Error(r(387));m=s.pendingProps,w=s.memoizedState,y=w.element,hb(i,s),Kc(s,m,null,d);var E=s.memoizedState;if(m=E.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=Fo(Error(r(423)),s),s=Jb(i,s,m,d,y);break e}else if(m!==y){y=Fo(Error(r(424)),s),s=Jb(i,s,m,d,y);break e}else for(Nr=Oi(s.stateNode.containerInfo.firstChild),Sr=s,st=!0,en=null,d=db(s,null,m,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Do(),m===y){s=Qn(i,s,d);break e}nr(i,s,m,d)}s=s.child}return s;case 5:return gb(s),i===null&&Lp(s),m=s.type,y=s.pendingProps,w=i!==null?i.memoizedProps:null,E=y.children,Cp(m,y)?E=null:w!==null&&Cp(m,w)&&(s.flags|=32),Yb(i,s),nr(i,s,E,d),s.child;case 6:return i===null&&Lp(s),null;case 13:return e1(i,s,d);case 4:return Gp(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=Ro(s,null,m,d):nr(i,s,m,d),s.child;case 11:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:tn(m,y),Gb(i,s,m,y,d);case 7:return nr(i,s,s.pendingProps,d),s.child;case 8:return nr(i,s,s.pendingProps.children,d),s.child;case 12:return nr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(m=s.type._context,y=s.pendingProps,w=s.memoizedProps,E=y.value,Je(Uc,m._currentValue),m._currentValue=E,w!==null)if(Jr(w.value,E)){if(w.children===y.children&&!dr.current){s=Qn(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){E=w.child;for(var R=M.firstContext;R!==null;){if(R.context===m){if(w.tag===1){R=qn(-1,d&-d),R.tag=2;var q=w.updateQueue;if(q!==null){q=q.shared;var ae=q.pending;ae===null?R.next=R:(R.next=ae.next,ae.next=R),q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),Wp(w.return,d,s),M.lanes|=d;break}R=R.next}}else if(w.tag===10)E=w.type===s.type?null:w.child;else if(w.tag===18){if(E=w.return,E===null)throw Error(r(341));E.lanes|=d,M=E.alternate,M!==null&&(M.lanes|=d),Wp(E,d,s),E=w.sibling}else E=w.child;if(E!==null)E.return=w;else for(E=w;E!==null;){if(E===s){E=null;break}if(w=E.sibling,w!==null){w.return=E.return,E=w;break}E=E.return}w=E}nr(i,s,y.children,d),s=s.child}return s;case 9:return y=s.type,m=s.pendingProps.children,Lo(s,d),y=Rr(y),m=m(y),s.flags|=1,nr(i,s,m,d),s.child;case 14:return m=s.type,y=tn(m,s.pendingProps),y=tn(m.type,y),Vb(i,s,m,y,d);case 15:return qb(i,s,s.type,s.pendingProps,d);case 17:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:tn(m,y),ed(i,s),s.tag=1,fr(m)?(i=!0,Rc(s)):i=!1,Lo(s,d),zb(s,m,y),am(s,m,y,d),um(null,s,m,!0,i,d);case 19:return r1(i,s,d);case 22:return Qb(i,s,d)}throw Error(r(156,s.tag))};function E1(i,s){return ax(i,s)}function V5(i,s,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(i,s,d,m){return new V5(i,s,d,m)}function Cm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function q5(i){if(typeof i=="function")return Cm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===$)return 11;if(i===ge)return 14}return 2}function Bi(i,s){var d=i.alternate;return d===null?(d=zr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function dd(i,s,d,m,y,w){var E=2;if(m=i,typeof i=="function")Cm(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case I:return Oa(d.children,y,w,s);case W:E=8,y|=8;break;case U:return i=zr(12,d,s,y|2),i.elementType=U,i.lanes=w,i;case ue:return i=zr(13,d,s,y),i.elementType=ue,i.lanes=w,i;case J:return i=zr(19,d,s,y),i.elementType=J,i.lanes=w,i;case pe:return fd(d,y,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case G:E=10;break e;case Y:E=9;break e;case $:E=11;break e;case ge:E=14;break e;case we:E=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=zr(E,d,s,y),s.elementType=i,s.type=m,s.lanes=w,s}function Oa(i,s,d,m){return i=zr(7,i,m,s),i.lanes=d,i}function fd(i,s,d,m){return i=zr(22,i,m,s),i.elementType=pe,i.lanes=d,i.stateNode={isHidden:!1},i}function Om(i,s,d){return i=zr(6,i,null,s),i.lanes=d,i}function _m(i,s,d){return s=zr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function Q5(i,s,d,m,y){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ip(0),this.expirationTimes=ip(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ip(0),this.identifierPrefix=m,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Mm(i,s,d,m,y,w,E,M,R){return i=new Q5(i,s,d,M,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=zr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kp(w),i}function Y5(i,s,d){var m=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zm.exports=cM(),zm.exports}var B1;function dM(){if(B1)return bd;B1=1;var e=FN();return bd.createRoot=e.createRoot,bd.hydrateRoot=e.hydrateRoot,bd}var fM=dM();const hM=ay(fM);var Gu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ka,Xi,ps,CN,pM=(CN=class extends Gu{constructor(){super();De(this,Ka);De(this,Xi);De(this,ps);ye(this,ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,Xi)||this.setEventListener(L(this,ps))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Xi))==null||t.call(this),ye(this,Xi,void 0))}setEventListener(t){var r;ye(this,ps,t),(r=L(this,Xi))==null||r.call(this),ye(this,Xi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Ka)!==t&&(ye(this,Ka,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Ka)=="boolean"?L(this,Ka):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ka=new WeakMap,Xi=new WeakMap,ps=new WeakMap,CN),oy=new pM,mM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zi,iy,ON,gM=(ON=class{constructor(){De(this,Zi,mM);De(this,iy,!1)}setTimeoutProvider(e){ye(this,Zi,e)}setTimeout(e,t){return L(this,Zi).setTimeout(e,t)}clearTimeout(e){L(this,Zi).clearTimeout(e)}setInterval(e,t){return L(this,Zi).setInterval(e,t)}clearInterval(e){L(this,Zi).clearInterval(e)}},Zi=new WeakMap,iy=new WeakMap,ON),za=new gM;function vM(e){setTimeout(e,0)}var yM=typeof window>"u"||"Deno"in globalThis;function yr(){}function xM(e,t){return typeof e=="function"?e(t):e}function Dg(e){return typeof e=="number"&&e>=0&&e!==1/0}function BN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oa(e,t){return typeof e=="function"?e(t):e}function Ar(e,t){return typeof e=="function"?e(t):e}function U1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==sy(u,t.options))return!1}else if(!gu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function W1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(o))return!1}else if(!gu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function sy(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>$g(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function gu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>gu(e[r],t[r])):!1}var bM=Object.prototype.hasOwnProperty;function UN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=H1(e)&&H1(t);if(!n&&!($g(e)&&$g(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),l=u.length,f=n?new Array(l):{};let h=0;for(let p=0;p{za.setTimeout(t,e)})}function Lg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?UN(e,t):t}function jM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function kM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ly=Symbol();function WN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ly?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function HN(e,t){return typeof e=="function"?e(...t):!!e}function SM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var vu=(()=>{let e=()=>yM;return{isServer(){return e()},setIsServer(t){e=t}}})();function zg(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var NM=vM;function EM(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=NM;const o=l=>{t?e.push(l):a(()=>{r(l)})},u=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||u()}return f},batchCalls:l=>(...f)=>{o(()=>{l(...f)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Wt=EM(),ms,Ji,gs,_N,PM=(_N=class extends Gu{constructor(){super();De(this,ms,!0);De(this,Ji);De(this,gs);ye(this,gs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,Ji)||this.setEventListener(L(this,gs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Ji))==null||t.call(this),ye(this,Ji,void 0))}setEventListener(t){var r;ye(this,gs,t),(r=L(this,Ji))==null||r.call(this),ye(this,Ji,t(this.setOnline.bind(this)))}setOnline(t){L(this,ms)!==t&&(ye(this,ms,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ms)}},ms=new WeakMap,Ji=new WeakMap,gs=new WeakMap,_N),of=new PM;function AM(e){return Math.min(1e3*2**e,3e4)}function KN(e){return(e??"online")==="online"?of.isOnline():!0}var Fg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function GN(e){let t=!1,r=0,n;const a=zg(),o=()=>a.status!=="pending",u=k=>{var S;if(!o()){const N=new Fg(k);x(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>oy.isFocused()&&(e.networkMode==="always"||of.isOnline())&&e.canRun(),p=()=>KN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),a.resolve(k))},x=k=>{o()||(n==null||n(),a.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var C;if(o())return;const P=e.retry??(vu.isServer()?0:3),O=e.retryDelay??AM,A=typeof O=="function"?O(r,N):O,_=P===!0||typeof P=="number"&&rh()?void 0:b()).then(()=>{t?x(N):j()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?j():b().then(j),a)}}var Ga,MN,VN=(MN=class{constructor(){De(this,Ga)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dg(this.gcTime)&&ye(this,Ga,za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,Ga)!==void 0&&(za.clearTimeout(L(this,Ga)),ye(this,Ga,void 0))}},Ga=new WeakMap,MN);function CM(e){return{onFetch:(t,r)=>{var p,g,x,b,j;const n=t.options,a=(x=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=O=>{SM(O,()=>t.signal,()=>k=!0)},N=WN(t.options,t.fetchOptions),P=async(O,A,_)=>{if(k)return Promise.reject(t.signal.reason);if(A==null&&O.pages.length)return Promise.resolve(O);const I=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:A,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),W=await N(I),{maxPages:U}=t.options,G=_?kM:jM;return{pages:G(O.pages,W,U),pageParams:G(O.pageParams,A,U)}};if(a&&o.length){const O=a==="backward",A=O?OM:G1,_={pages:o,pageParams:u},C=A(n,_);l=await P(_,C,O)}else{const O=e??o.length;do{const A=f===0?u[0]??n.initialPageParam:G1(n,l);if(f>0&&A==null)break;l=await P(l,A),f++}while(f{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function G1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function OM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var vs,Va,ys,Ur,qa,Mt,Bu,Qa,Pr,qN,Zn,IN,_M=(IN=class extends VN{constructor(t){super();De(this,Pr);De(this,vs);De(this,Va);De(this,ys);De(this,Ur);De(this,qa);De(this,Mt);De(this,Bu);De(this,Qa);ye(this,Qa,!1),ye(this,Bu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,qa,t.client),ye(this,Ur,L(this,qa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Va,q1(this.options)),this.state=t.state??L(this,Va),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,vs)}get promise(){var t;return(t=L(this,Mt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Bu),...t},t!=null&&t._type&&ye(this,vs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=q1(this.options);r.data!==void 0&&(this.setState(V1(r.data,r.dataUpdatedAt)),ye(this,Va,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Ur).remove(this)}setData(t,r){const n=Lg(this.state.data,t,this.options);return Fe(this,Pr,Zn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Fe(this,Pr,Zn).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Mt))==null?void 0:n.promise;return(a=L(this,Mt))==null||a.cancel(t),r?r.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Va)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ar(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ly||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>oa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!BN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,Mt)&&(L(this,Qa)||Fe(this,Pr,qN).call(this)?L(this,Mt).cancel({revert:!0}):L(this,Mt).cancelRetry()),this.scheduleGc()),L(this,Ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,Pr,Zn).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,g,x,b,j,k,S,N,P,O;if(this.state.fetchStatus!=="idle"&&((h=L(this,Mt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Mt))return L(this,Mt).continueRetry(),L(this,Mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(_=>_.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ye(this,Qa,!0),n.signal)})},o=()=>{const A=WN(this.options,r),C=(()=>{const I={client:L(this,qa),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return ye(this,Qa,!1),this.options.persister?this.options.persister(A,C,this):A(C)},l=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,qa),state:this.state,fetchFn:o};return a(A),A})(),f=L(this,vs)==="infinite"?CM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),ye(this,ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&Fe(this,Pr,Zn).call(this,{type:"fetch",meta:(g=l.fetchOptions)==null?void 0:g.meta}),ye(this,Mt,GN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof Fg&&A.revert&&this.setState({...L(this,ys),fetchStatus:"idle"}),n.abort()},onFail:(A,_)=>{Fe(this,Pr,Zn).call(this,{type:"failed",failureCount:A,error:_})},onPause:()=>{Fe(this,Pr,Zn).call(this,{type:"pause"})},onContinue:()=>{Fe(this,Pr,Zn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await L(this,Mt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(x=L(this,Ur).config).onSuccess)==null||b.call(x,A,this),(k=(j=L(this,Ur).config).onSettled)==null||k.call(j,A,this.state.error,this),A}catch(A){if(A instanceof Fg){if(A.silent)return L(this,Mt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Fe(this,Pr,Zn).call(this,{type:"error",error:A}),(N=(S=L(this,Ur).config).onError)==null||N.call(S,A,this),(O=(P=L(this,Ur).config).onSettled)==null||O.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},vs=new WeakMap,Va=new WeakMap,ys=new WeakMap,Ur=new WeakMap,qa=new WeakMap,Mt=new WeakMap,Bu=new WeakMap,Qa=new WeakMap,Pr=new WeakSet,qN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Zn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...QN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...V1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ys,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Ur).notify({query:this,type:"updated",action:t})})},IN);function QN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function V1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function q1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var vr,Ue,Uu,ar,Ya,xs,ei,ea,Wu,bs,ws,Xa,Za,ta,js,qe,su,Bg,Ug,Wg,Hg,Kg,Gg,Vg,YN,TN,MM=(TN=class extends Gu{constructor(t,r){super();De(this,qe);De(this,vr);De(this,Ue);De(this,Uu);De(this,ar);De(this,Ya);De(this,xs);De(this,ei);De(this,ea);De(this,Wu);De(this,bs);De(this,ws);De(this,Xa);De(this,Za);De(this,ta);De(this,js,new Set);this.options=r,ye(this,vr,t),ye(this,ea,null),ye(this,ei,zg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ue).addObserver(this),Q1(L(this,Ue),this.options)?Fe(this,qe,su).call(this):this.updateResult(),Fe(this,qe,Hg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qg(L(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qg(L(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,qe,Kg).call(this),Fe(this,qe,Gg).call(this),L(this,Ue).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ue);if(this.options=L(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ar(this.options.enabled,L(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,qe,Vg).call(this),L(this,Ue).setOptions(this.options),r._defaulted&&!Rg(this.options,r)&&L(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ue),observer:this});const a=this.hasListeners();a&&Y1(L(this,Ue),n,this.options,r)&&Fe(this,qe,su).call(this),this.updateResult(),a&&(L(this,Ue)!==n||Ar(this.options.enabled,L(this,Ue))!==Ar(r.enabled,L(this,Ue))||oa(this.options.staleTime,L(this,Ue))!==oa(r.staleTime,L(this,Ue)))&&Fe(this,qe,Bg).call(this);const o=Fe(this,qe,Ug).call(this);a&&(L(this,Ue)!==n||Ar(this.options.enabled,L(this,Ue))!==Ar(r.enabled,L(this,Ue))||o!==L(this,ta))&&Fe(this,qe,Wg).call(this,o)}getOptimisticResult(t){const r=L(this,vr).getQueryCache().build(L(this,vr),t),n=this.createResult(r,t);return TM(this,n)&&(ye(this,ar,n),ye(this,xs,this.options),ye(this,Ya,L(this,Ue).state)),n}getCurrentResult(){return L(this,ar)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ei).status==="pending"&&L(this,ei).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,js).add(t)}getCurrentQuery(){return L(this,Ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,vr).defaultQueryOptions(t),n=L(this,vr).getQueryCache().build(L(this,vr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Fe(this,qe,su).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,ar)))}createResult(t,r){var U;const n=L(this,Ue),a=this.options,o=L(this,ar),u=L(this,Ya),l=L(this,xs),h=t!==n?t.state:L(this,Uu),{state:p}=t;let g={...p},x=!1,b;if(r._optimisticResults){const G=this.hasListeners(),Y=!G&&Q1(t,r),$=G&&Y1(t,n,r,a);(Y||$)&&(g={...g,...QN(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let G;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(G=o.data,N=!0):G=typeof r.placeholderData=="function"?r.placeholderData((U=L(this,ws))==null?void 0:U.state.data,L(this,ws)):r.placeholderData,G!==void 0&&(S="success",b=Lg(o==null?void 0:o.data,G,r),x=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,Wu))b=L(this,bs);else try{ye(this,Wu,r.select),b=r.select(b),b=Lg(o==null?void 0:o.data,b,r),ye(this,bs,b),ye(this,ea,null)}catch(G){ye(this,ea,G)}L(this,ea)&&(j=L(this,ea),b=L(this,bs),k=Date.now(),S="error");const P=g.fetchStatus==="fetching",O=S==="pending",A=S==="error",_=O&&P,C=b!==void 0,W={status:S,fetchStatus:g.fetchStatus,isPending:O,isSuccess:S==="success",isError:A,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!O,isLoadingError:A&&!C,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&C,isStale:uy(t,r),refetch:this.refetch,promise:L(this,ei),isEnabled:Ar(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=W.data!==void 0,Y=W.status==="error"&&!G,$=ge=>{Y?ge.reject(W.error):G&&ge.resolve(W.data)},ue=()=>{const ge=ye(this,ei,W.promise=zg());$(ge)},J=L(this,ei);switch(J.status){case"pending":t.queryHash===n.queryHash&&$(J);break;case"fulfilled":(Y||W.data!==J.value)&&ue();break;case"rejected":(!Y||W.error!==J.reason)&&ue();break}}return W}updateResult(){const t=L(this,ar),r=this.createResult(L(this,Ue),this.options);if(ye(this,Ya,L(this,Ue).state),ye(this,xs,this.options),L(this,Ya).data!==void 0&&ye(this,ws,L(this,Ue)),Rg(r,t))return;ye(this,ar,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,js).size)return!0;const u=new Set(o??L(this,js));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,ar)).some(l=>{const f=l;return L(this,ar)[f]!==t[f]&&u.has(f)})};Fe(this,qe,YN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,qe,Hg).call(this)}},vr=new WeakMap,Ue=new WeakMap,Uu=new WeakMap,ar=new WeakMap,Ya=new WeakMap,xs=new WeakMap,ei=new WeakMap,ea=new WeakMap,Wu=new WeakMap,bs=new WeakMap,ws=new WeakMap,Xa=new WeakMap,Za=new WeakMap,ta=new WeakMap,js=new WeakMap,qe=new WeakSet,su=function(t){Fe(this,qe,Vg).call(this);let r=L(this,Ue).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(yr)),r},Bg=function(){Fe(this,qe,Kg).call(this);const t=oa(this.options.staleTime,L(this,Ue));if(vu.isServer()||L(this,ar).isStale||!Dg(t))return;const n=BN(L(this,ar).dataUpdatedAt,t)+1;ye(this,Xa,za.setTimeout(()=>{L(this,ar).isStale||this.updateResult()},n))},Ug=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ue)):this.options.refetchInterval)??!1},Wg=function(t){Fe(this,qe,Gg).call(this),ye(this,ta,t),!(vu.isServer()||Ar(this.options.enabled,L(this,Ue))===!1||!Dg(L(this,ta))||L(this,ta)===0)&&ye(this,Za,za.setInterval(()=>{(this.options.refetchIntervalInBackground||oy.isFocused())&&Fe(this,qe,su).call(this)},L(this,ta)))},Hg=function(){Fe(this,qe,Bg).call(this),Fe(this,qe,Wg).call(this,Fe(this,qe,Ug).call(this))},Kg=function(){L(this,Xa)!==void 0&&(za.clearTimeout(L(this,Xa)),ye(this,Xa,void 0))},Gg=function(){L(this,Za)!==void 0&&(za.clearInterval(L(this,Za)),ye(this,Za,void 0))},Vg=function(){const t=L(this,vr).getQueryCache().build(L(this,vr),this.options);if(t===L(this,Ue))return;const r=L(this,Ue);ye(this,Ue,t),ye(this,Uu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},YN=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,ar))}),L(this,vr).getQueryCache().notify({query:L(this,Ue),type:"observerResultsUpdated"})})},TN);function IM(e,t){return Ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ar(t.retryOnMount,e)===!1)}function Q1(e,t){return IM(e,t)||e.state.data!==void 0&&qg(e,t,t.refetchOnMount)}function qg(e,t,r){if(Ar(t.enabled,e)!==!1&&oa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&uy(e,t)}return!1}function Y1(e,t,r,n){return(e!==t||Ar(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&uy(e,r)}function uy(e,t){return Ar(t.enabled,e)!==!1&&e.isStaleByTime(oa(t.staleTime,e))}function TM(e,t){return!Rg(e.getCurrentResult(),t)}var Hu,Sn,Jt,Ja,Nn,Gi,DN,DM=(DN=class extends VN{constructor(t){super();De(this,Nn);De(this,Hu);De(this,Sn);De(this,Jt);De(this,Ja);ye(this,Hu,t.client),this.mutationId=t.mutationId,ye(this,Jt,t.mutationCache),ye(this,Sn,[]),this.state=t.state||RM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Sn).includes(t)||(L(this,Sn).push(t),this.clearGcTimeout(),L(this,Jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Sn,L(this,Sn).filter(r=>r!==t)),this.scheduleGc(),L(this,Jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():L(this,Jt).remove(this))}continue(){var t;return((t=L(this,Ja))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,l,f,h,p,g,x,b,j,k,S,N,P,O,A,_,C,I;const r=()=>{Fe(this,Nn,Gi).call(this,{type:"continue"})},n={client:L(this,Hu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,Ja,GN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(W,U)=>{Fe(this,Nn,Gi).call(this,{type:"failed",failureCount:W,error:U})},onPause:()=>{Fe(this,Nn,Gi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Jt).canRun(this)}));const a=this.state.status==="pending",o=!L(this,Ja).canStart();try{if(a)r();else{Fe(this,Nn,Gi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,Jt).config.onMutate&&await L(this,Jt).config.onMutate(t,this,n);const U=await((l=(u=this.options).onMutate)==null?void 0:l.call(u,t,n));U!==this.state.context&&Fe(this,Nn,Gi).call(this,{type:"pending",context:U,variables:t,isPaused:o})}const W=await L(this,Ja).start();return await((h=(f=L(this,Jt).config).onSuccess)==null?void 0:h.call(f,W,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,W,t,this.state.context,n)),await((b=(x=L(this,Jt).config).onSettled)==null?void 0:b.call(x,W,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,W,null,t,this.state.context,n)),Fe(this,Nn,Gi).call(this,{type:"success",data:W}),W}catch(W){try{await((N=(S=L(this,Jt).config).onError)==null?void 0:N.call(S,W,t,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((O=(P=this.options).onError)==null?void 0:O.call(P,W,t,this.state.context,n))}catch(U){Promise.reject(U)}try{await((_=(A=L(this,Jt).config).onSettled)==null?void 0:_.call(A,void 0,W,this.state.variables,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((I=(C=this.options).onSettled)==null?void 0:I.call(C,void 0,W,t,this.state.context,n))}catch(U){Promise.reject(U)}throw Fe(this,Nn,Gi).call(this,{type:"error",error:W}),W}finally{L(this,Jt).runNext(this)}}},Hu=new WeakMap,Sn=new WeakMap,Jt=new WeakMap,Ja=new WeakMap,Nn=new WeakSet,Gi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Wt.batch(()=>{L(this,Sn).forEach(n=>{n.onMutationUpdate(t)}),L(this,Jt).notify({mutation:this,type:"updated",action:t})})},DN);function RM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ti,sn,Ku,RN,$M=(RN=class extends Gu{constructor(t={}){super();De(this,ti);De(this,sn);De(this,Ku);this.config=t,ye(this,ti,new Set),ye(this,sn,new Map),ye(this,Ku,0)}build(t,r,n){const a=new DM({client:t,mutationCache:this,mutationId:++xd(this,Ku)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,ti).add(t);const r=wd(t);if(typeof r=="string"){const n=L(this,sn).get(r);n?n.push(t):L(this,sn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,ti).delete(t)){const r=wd(t);if(typeof r=="string"){const n=L(this,sn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,sn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=wd(t);if(typeof r=="string"){const n=L(this,sn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=wd(t);if(typeof r=="string"){const a=(n=L(this,sn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{L(this,ti).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,ti).clear(),L(this,sn).clear()})}getAll(){return Array.from(L(this,ti))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>W1(r,n))}findAll(t={}){return this.getAll().filter(r=>W1(t,r))}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Wt.batch(()=>Promise.all(t.map(r=>r.continue().catch(yr))))}},ti=new WeakMap,sn=new WeakMap,Ku=new WeakMap,RN);function wd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var En,$N,LM=($N=class extends Gu{constructor(t={}){super();De(this,En);this.config=t,ye(this,En,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??sy(a,r);let u=this.get(o);return u||(u=new _M({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,En).has(t.queryHash)||(L(this,En).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,En).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,En).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,En).get(t)}getAll(){return[...L(this,En).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>U1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>U1(t,n)):r}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},En=new WeakMap,$N),ht,ra,na,ks,Ss,ia,Ns,Es,LN,zM=(LN=class{constructor(e={}){De(this,ht);De(this,ra);De(this,na);De(this,ks);De(this,Ss);De(this,ia);De(this,Ns);De(this,Es);ye(this,ht,e.queryCache||new LM),ye(this,ra,e.mutationCache||new $M),ye(this,na,e.defaultOptions||{}),ye(this,ks,new Map),ye(this,Ss,new Map),ye(this,ia,0)}mount(){xd(this,ia)._++,L(this,ia)===1&&(ye(this,Ns,oy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),ye(this,Es,of.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var e,t;xd(this,ia)._--,L(this,ia)===0&&((e=L(this,Ns))==null||e.call(this),ye(this,Ns,void 0),(t=L(this,Es))==null||t.call(this),ye(this,Es,void 0))}isFetching(e){return L(this,ht).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,ra).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,ht).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,ht).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(oa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,ht).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,ht).get(n.queryHash),o=a==null?void 0:a.state.data,u=xM(t,o);if(u!==void 0)return L(this,ht).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Wt.batch(()=>L(this,ht).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,ht).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,ht);Wt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,ht);return Wt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Wt.batch(()=>L(this,ht).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(yr).catch(yr)}invalidateQueries(e,t={}){return Wt.batch(()=>(L(this,ht).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Wt.batch(()=>L(this,ht).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(yr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(yr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,ht).build(this,t);return r.isStaleByTime(oa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return of.isOnline()?L(this,ra).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,ra)}getDefaultOptions(){return L(this,na)}setDefaultOptions(e){ye(this,na,e)}setQueryDefaults(e,t){L(this,ks).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,ks).values()],r={};return t.forEach(n=>{gu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Ss).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ss).values()],r={};return t.forEach(n=>{gu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,na).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sy(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ly&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,na).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,ra).clear()}},ht=new WeakMap,ra=new WeakMap,na=new WeakMap,ks=new WeakMap,Ss=new WeakMap,ia=new WeakMap,Ns=new WeakMap,Es=new WeakMap,LN),XN=v.createContext(void 0),po=e=>{const t=v.useContext(XN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},FM=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(XN.Provider,{value:e,children:t})),ZN=v.createContext(!1),BM=()=>v.useContext(ZN);ZN.Provider;function UM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WM=v.createContext(UM()),HM=()=>v.useContext(WM),KM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?HN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},GM=e=>{v.useEffect(()=>{e.clearReset()},[e])},VM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||HN(r,[e.error,n])),qM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},QM=(e,t)=>e.isLoading&&e.isFetching&&!t,YM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,X1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function XM(e,t,r){var b,j,k,S;const n=BM(),a=HM(),o=po(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const l=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,qM(u),KM(u,a,l),GM(a);const h=!o.getQueryCache().get(u.queryHash),[p]=v.useState(()=>new t(o,u)),g=p.getOptimisticResult(u),x=!n&&f;if(v.useSyncExternalStore(v.useCallback(N=>{const P=x?p.subscribe(Wt.batchCalls(N)):yr;return p.updateResult(),P},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(u)},[u,p]),YM(u,g))throw X1(u,p,a);if(VM({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!vu.isServer()&&QM(g,n)){const N=h?X1(u,p,a):l==null?void 0:l.promise;N==null||N.catch(yr).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function ur(e,t){return XM(e,MM)}/** + * @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 ZM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).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 JM={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 eI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...l},f)=>v.createElement("svg",{ref:f,...JM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:JN("lucide",a),...l},[...u.map(([h,p])=>v.createElement(h,p)),...Array.isArray(o)?o:[o]]));/** + * @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 Ae=(e,t)=>{const r=v.forwardRef(({className:n,...a},o)=>v.createElement(eI,{ref:o,iconNode:t,className:JN(`lucide-${ZM(e)}`,n),...a}));return r.displayName=`${e}`,r};/** + * @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 yu=Ae("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 Z1=Ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @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 e2=Ae("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** + * @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 Ps=Ae("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 tI=Ae("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 As=Ae("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 An=Ae("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 rI=Ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @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 nI=Ae("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 t2=Ae("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 iI=Ae("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @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 aI=Ae("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 oI=Ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @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 Qg=Ae("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** + * @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 sI=Ae("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 Yg=Ae("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @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 lI=Ae("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** + * @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 r2=Ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @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 _n=Ae("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 no=Ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @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 xu=Ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @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=Ae("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @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 Xg=Ae("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 uI=Ae("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** + * @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 cI=Ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @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 Um=Ae("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 dI=Ae("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 fI=Ae("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @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 bu=Ae("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @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=Ae("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 pI=Ae("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** + * @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 mI=Ae("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** + * @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 gI=Ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @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 vI=Ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @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 yI=Ae("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 Qd=Ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @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 xI=Ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @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 du=Ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @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 bI=Ae("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @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 wI=Ae("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + * @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 cy=Ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @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 n2=Ae("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 jI=Ae("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** + * @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 kI=Ae("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 wu=Ae("Shield",[["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"}]]);/** + * @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 jd=Ae("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 i2=Ae("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 a2=Ae("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @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 SI=Ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @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 sf=Ae("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @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 Zg=Ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @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 Cs=Ae("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 NI=Ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @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 EI=Ae("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** + * @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 ju=Ae("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 oi=Ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @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 ls=Ae("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Jg=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:hI},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:tI},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:As},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:yI},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Ps},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:i2},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:aI}];var ew=1,PI=.9,AI=.8,CI=.17,Wm=.1,Hm=.999,OI=.9999,_I=.99,MI=/[\\\/_+.#"@\[\(\{&]/,II=/[\\\/_+.#"@\[\(\{&]/g,TI=/[\s-]/,o2=/[\s-]/g;function ev(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?ew:_I;var l=`${a},${o}`;if(u[l]!==void 0)return u[l];for(var f=n.charAt(o),h=r.indexOf(f,a),p=0,g,x,b,j;h>=0;)g=ev(e,t,r,n,h+1,o+1,u),g>p&&(h===a?g*=ew:MI.test(e.charAt(h-1))?(g*=AI,b=e.slice(a,h-1).match(II),b&&a>0&&(g*=Math.pow(Hm,b.length))):TI.test(e.charAt(h-1))?(g*=PI,j=e.slice(a,h-1).match(o2),j&&a>0&&(g*=Math.pow(Hm,j.length))):(g*=CI,a>0&&(g*=Math.pow(Hm,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=OI)),(gg&&(g=x*Wm)),g>p&&(p=g),h=r.indexOf(f,h+1);return u[l]=p,p}function tw(e){return e.toLowerCase().replace(o2," ")}function DI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,ev(e,t,tw(e),tw(t),0,0,{})}function sa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function rw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Os(...e){return t=>{let r=!1;const n=e.map(a=>{const o=rw(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a{var N;const{scope:x,children:b,...j}=g,k=((N=x==null?void 0:x[e])==null?void 0:N[f])||l,S=v.useMemo(()=>j,Object.values(j));return c.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function p(g,x){var k;const b=((k=x==null?void 0:x[e])==null?void 0:k[f])||l,j=v.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,p]}const a=()=>{const o=r.map(u=>v.createContext(u));return function(l){const f=(l==null?void 0:l[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,$I(a,...t)]}function $I(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((l,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...l,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var ku=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},LI=nh[" useId ".trim().toString()]||(()=>{}),zI=0;function si(e){const[t,r]=v.useState(LI());return ku(()=>{r(n=>n??String(zI++))},[e]),t?`radix-${t}`:""}var FI=nh[" useInsertionEffect ".trim().toString()]||ku;function BI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=UI({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const g=p.current;g!==l&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const h=v.useCallback(p=>{var g;if(l){const x=WI(p)?p(e):p;x!==e&&((g=u.current)==null||g.call(u,x))}else o(p)},[l,e,o,u]);return[f,h]}function UI({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),a=v.useRef(r),o=v.useRef(t);return FI(()=>{o.current=t},[t]),v.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function WI(e){return typeof e=="function"}var ih=FN();function s2(e){const t=v.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,l=!1;const f=[];nw(a)&&typeof kd=="function"&&(a=kd(a._payload)),v.Children.forEach(a,x=>{var b;if(qI(x)){l=!0;const j=x;let k="child"in j.props?j.props.child:j.props.children;nw(k)&&typeof kd=="function"&&(k=kd(k._payload)),u=KI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(x)}),u?u=v.cloneElement(u,void 0,f):!l&&v.Children.count(a)===1&&v.isValidElement(a)&&(u=a);const h=u?VI(u):void 0,p=mo(n,h);if(!u){if(a||a===0)throw new Error(l?ZI(e):XI(e));return a}const g=GI(o,u.props??{});return u.type!==v.Fragment&&(g.ref=n?p:h),v.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var HI=Symbol.for("radix.slottable"),KI=(e,t)=>{if("child"in e.props){const r=e.props.child;return v.isValidElement(r)?v.cloneElement(r,void 0,e.props.children(r.props.children)):null}return v.isValidElement(t)?t:null};function GI(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...l)=>{const f=o(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function VI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function qI(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HI}var QI=Symbol.for("react.lazy");function nw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QI&&"_payload"in e&&YI(e._payload)}function YI(e){return typeof e=="object"&&e!==null&&"then"in e}var XI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ZI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=nh[" use ".trim().toString()],JI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gt=JI.reduce((e,t)=>{const r=s2(`Primitive.${t}`),n=v.forwardRef((a,o)=>{const{asChild:u,...l}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function eT(e,t){e&&ih.flushSync(()=>e.dispatchEvent(t))}function Su(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function tT(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e);v.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var rT="DismissableLayer",tv="dismissableLayer.update",nT="dismissableLayer.pointerDownOutside",iT="dismissableLayer.focusOutside",iw,dy=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),l2=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:l,onDismiss:f,...h}=e,p=v.useContext(dy),[g,x]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=v.useState({}),k=mo(t,U=>x(U)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(N),O=g?S.indexOf(g):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=P,C=v.useRef(!1),I=lT(U=>{const G=U.target;if(!(G instanceof Node))return;const Y=[...p.branches].some($=>$.contains(G));!_||Y||(o==null||o(U),l==null||l(U),U.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:p.dismissableSurfaces}),W=uT(U=>{if(n&&C.current)return;const G=U.target;[...p.branches].some($=>$.contains(G))||(u==null||u(U),l==null||l(U),U.defaultPrevented||f==null||f())},b);return tT(U=>{O===p.layers.size-1&&(a==null||a(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},b),v.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(iw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),aw(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(g),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=iw))}},[g,b,r,p]),v.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),aw())},[g,p]),v.useEffect(()=>{const U=()=>j({});return document.addEventListener(tv,U),()=>document.removeEventListener(tv,U)},[]),c.jsx(Gt.div,{...h,ref:k,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:sa(e.onFocusCapture,W.onFocusCapture),onBlurCapture:sa(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:sa(e.onPointerDownCapture,I.onPointerDownCapture)})});l2.displayName=rT;var aT="DismissableLayerBranch",oT=v.forwardRef((e,t)=>{const r=v.useContext(dy),n=v.useRef(null),a=mo(t,n);return v.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Gt.div,{...e,ref:a})});oT.displayName=aT;function sT(){const e=v.useContext(dy),[t,r]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function lT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=Su(e),l=v.useRef(!1),f=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function x(){return Array.from(h.current.values()).some(Boolean)}function b(P){if(!f.current)return;const O=P.target;O instanceof Node&&[...o].some(_=>_.contains(O))||h.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function j(P){f.current&&h.current.set(P.type,!1)}const k=P=>{if(P.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=x();g(),_||u2(nT,u,A,{discrete:!0})};const A={originalEvent:P};f.current=!0,a.current=n&&P.button===0,h.current.clear(),!n||P.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),g();l.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const P of S)r.addEventListener(P,b,!0),r.addEventListener(P,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",p.current);for(const P of S)r.removeEventListener(P,b,!0),r.removeEventListener(P,j)}},[r,u,n,a,o]),{onPointerDownCapture:()=>l.current=!0}}function uT(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e),n=v.useRef(!1);return v.useEffect(()=>{const a=o=>{o.target&&!n.current&&u2(iT,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function aw(){const e=new CustomEvent(tv);document.dispatchEvent(e)}function u2(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?eT(a,o):a.dispatchEvent(o)}var Km="focusScope.autoFocusOnMount",Gm="focusScope.autoFocusOnUnmount",ow={bubbles:!1,cancelable:!0},cT="FocusScope",c2=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[l,f]=v.useState(null),h=Su(a),p=Su(o),g=v.useRef(null),x=mo(t,k=>f(k)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let k=function(O){if(b.paused||!l)return;const A=O.target;l.contains(A)?g.current=A:Vi(g.current,{select:!0})},S=function(O){if(b.paused||!l)return;const A=O.relatedTarget;A!==null&&(l.contains(A)||Vi(g.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&Vi(l)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const P=new MutationObserver(N);return l&&P.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),P.disconnect()}}},[n,l,b.paused]),v.useEffect(()=>{if(l){lw.add(b);const k=document.activeElement;if(!l.contains(k)){const N=new CustomEvent(Km,ow);l.addEventListener(Km,h),l.dispatchEvent(N),N.defaultPrevented||(dT(gT(d2(l)),{select:!0}),document.activeElement===k&&Vi(l))}return()=>{l.removeEventListener(Km,h),setTimeout(()=>{const N=new CustomEvent(Gm,ow);l.addEventListener(Gm,p),l.dispatchEvent(N),N.defaultPrevented||Vi(k??document.body,{select:!0}),l.removeEventListener(Gm,p),lw.remove(b)},0)}}},[l,h,p,b]);const j=v.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const P=k.currentTarget,[O,A]=fT(P);O&&A?!k.shiftKey&&N===A?(k.preventDefault(),r&&Vi(O,{select:!0})):k.shiftKey&&N===O&&(k.preventDefault(),r&&Vi(A,{select:!0})):N===P&&k.preventDefault()}},[r,n,b.paused]);return c.jsx(Gt.div,{tabIndex:-1,...u,ref:x,onKeyDown:j})});c2.displayName=cT;function dT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Vi(n,{select:t}),document.activeElement!==r)return}function fT(e){const t=d2(e),r=sw(t,e),n=sw(t.reverse(),e);return[r,n]}function d2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function sw(e,t){for(const r of e)if(!hT(r,{upTo:t}))return r}function hT(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function pT(e){return e instanceof HTMLInputElement&&"select"in e}function Vi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&pT(e)&&t&&e.select()}}var lw=mT();function mT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=uw(e,t),e.unshift(t)},remove(t){var r;e=uw(e,t),(r=e[0])==null||r.resume()}}}function uw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gT(e){return e.filter(t=>t.tagName!=="A")}var vT="Portal",f2=v.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,o]=v.useState(!1);ku(()=>o(!0),[]);const u=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?ih.createPortal(c.jsx(Gt.div,{...n,ref:t}),u):null});f2.displayName=vT;function yT(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var ah=e=>{const{present:t,children:r}=e,n=xT(t),a=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=bT(n.ref,wT(a));return typeof r=="function"||n.isPresent?v.cloneElement(a,{ref:o}):null};ah.displayName="Presence";function xT(e){const[t,r]=v.useState(),n=v.useRef(null),a=v.useRef(e),o=v.useRef("none"),u=e?"mounted":"unmounted",[l,f]=yT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Sd(n.current);o.current=l==="mounted"?h:"none"},[l]),ku(()=>{const h=n.current,p=a.current;if(p!==e){const x=o.current,b=Sd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&x!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),ku(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,g=b=>{const k=Sd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=b=>{b.target===t&&(o.current=Sd(n.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function cw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bT(...e){const t=v.useRef(e);return t.current=e,v.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const l=cw(u,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let u=0;u{bn||(bn={start:dw(),end:dw()});const{start:e,end:t}=bn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Nd++,()=>{Nd===1&&(bn==null||bn.start.remove(),bn==null||bn.end.remove(),bn=null),Nd=Math.max(0,Nd-1)}},[])}function dw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pn=function(){return Pn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return zT;var t=FT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},UT=g2(),us="data-scroll-locked",WT=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,l=e.gap;return r===void 0&&(r="margin"),` + .`.concat(ST,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(l,"px ").concat(n,`; + } + body[`).concat(us,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(u,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Yd,` { + right: `).concat(l,"px ").concat(n,`; + } + + .`).concat(Xd,` { + margin-right: `).concat(l,"px ").concat(n,`; + } + + .`).concat(Yd," .").concat(Yd,` { + right: 0 `).concat(n,`; + } + + .`).concat(Xd," .").concat(Xd,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(us,`] { + `).concat(NT,": ").concat(l,`px; + } +`)},hw=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},HT=function(){v.useEffect(function(){return document.body.setAttribute(us,(hw()+1).toString()),function(){var e=hw()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},KT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;HT();var o=v.useMemo(function(){return BT(a)},[a]);return v.createElement(UT,{styles:WT(o,!t,a,r?"":"!important")})},rv=!1;if(typeof window<"u")try{var Ed=Object.defineProperty({},"passive",{get:function(){return rv=!0,!0}});window.addEventListener("test",Ed,Ed),window.removeEventListener("test",Ed,Ed)}catch{rv=!1}var Ko=rv?{passive:!1}:!1,GT=function(e){return e.tagName==="TEXTAREA"},v2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!GT(e)&&r[t]==="visible")},VT=function(e){return v2(e,"overflowY")},qT=function(e){return v2(e,"overflowX")},pw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=y2(e,n);if(a){var o=x2(e,n),u=o[1],l=o[2];if(u>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},QT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},YT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},y2=function(e,t){return e==="v"?VT(t):qT(t)},x2=function(e,t){return e==="v"?QT(t):YT(t)},XT=function(e,t){return e==="h"&&t==="rtl"?-1:1},ZT=function(e,t,r,n,a){var o=XT(e,window.getComputedStyle(t).direction),u=o*n,l=r.target,f=t.contains(l),h=!1,p=u>0,g=0,x=0;do{if(!l)break;var b=x2(e,l),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&y2(e,l)&&(g+=N,x+=j);var P=l.parentNode;l=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(g)<1||!p&&Math.abs(x)<1)&&(h=!0),h},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mw=function(e){return[e.deltaX,e.deltaY]},gw=function(e){return e&&"current"in e?e.current:e},JT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e3=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},t3=0,Go=[];function r3(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),a=v.useState(t3++)[0],o=v.useState(g2)[0],u=v.useRef(e);v.useEffect(function(){u.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=kT([e.lockRef.current],(e.shards||[]).map(gw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=Pd(k),P=r.current,O="deltaX"in k?k.deltaX:P[0]-N[0],A="deltaY"in k?k.deltaY:P[1]-N[1],_,C=k.target,I=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in k&&I==="h"&&C.type==="range")return!1;var W=window.getSelection(),U=W&&W.anchorNode,G=U?U===C||U.contains(C):!1;if(G)return!1;var Y=pw(I,C);if(!Y)return!0;if(Y?_=I:(_=I==="v"?"h":"v",Y=pw(I,C)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(O||A)&&(n.current=_),!_)return!0;var $=n.current||_;return ZT($,S,k,$==="h"?O:A)},[]),f=v.useCallback(function(k){var S=k;if(!(!Go.length||Go[Go.length-1]!==o)){var N="deltaY"in S?mw(S):Pd(S),P=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&JT(_.delta,N)})[0];if(P&&P.should){S.cancelable&&S.preventDefault();return}if(!P){var O=(u.current.shards||[]).map(gw).filter(Boolean).filter(function(_){return _.contains(S.target)}),A=O.length>0?l(S,O[0]):!u.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),h=v.useCallback(function(k,S,N,P){var O={name:k,delta:S,target:N,should:P,shadowParent:n3(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),p=v.useCallback(function(k){r.current=Pd(k),n.current=void 0},[]),g=v.useCallback(function(k){h(k.type,mw(k),k.target,l(k,e.lockRef.current))},[]),x=v.useCallback(function(k){h(k.type,Pd(k),k.target,l(k,e.lockRef.current))},[]);v.useEffect(function(){return Go.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:x}),document.addEventListener("wheel",f,Ko),document.addEventListener("touchmove",f,Ko),document.addEventListener("touchstart",p,Ko),function(){Go=Go.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Ko),document.removeEventListener("touchmove",f,Ko),document.removeEventListener("touchstart",p,Ko)}},[]);var b=e.removeScrollBar,j=e.inert;return v.createElement(v.Fragment,null,j?v.createElement(o,{styles:e3(a)}):null,b?v.createElement(KT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function n3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const i3=MT(m2,r3);var b2=v.forwardRef(function(e,t){return v.createElement(oh,Pn({},e,{ref:t,sideCar:i3}))});b2.classNames=oh.classNames;var a3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vo=new WeakMap,Ad=new WeakMap,Cd={},Ym=0,w2=function(e){return e&&(e.host||w2(e.parentNode))},o3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=w2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},s3=function(e,t,r,n){var a=o3(t,Array.isArray(e)?e:[e]);Cd[r]||(Cd[r]=new WeakMap);var o=Cd[r],u=[],l=new Set,f=new Set(a),h=function(g){!g||l.has(g)||(l.add(g),h(g.parentNode))};a.forEach(h);var p=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(x){if(l.has(x))p(x);else try{var b=x.getAttribute(n),j=b!==null&&b!=="false",k=(Vo.get(x)||0)+1,S=(o.get(x)||0)+1;Vo.set(x,k),o.set(x,S),u.push(x),k===1&&j&&Ad.set(x,!0),S===1&&x.setAttribute(r,"true"),j||x.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(t),l.clear(),Ym++,function(){u.forEach(function(g){var x=Vo.get(g)-1,b=o.get(g)-1;Vo.set(g,x),o.set(g,b),x||(Ad.has(g)||g.removeAttribute(n),Ad.delete(g)),b||g.removeAttribute(r)}),Ym--,Ym||(Vo=new WeakMap,Vo=new WeakMap,Ad=new WeakMap,Cd={})}},l3=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=a3(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),s3(n,a,r,"aria-hidden")):function(){return null}},sh="Dialog",[j2]=RI(sh),[u3,hn]=j2(sh),k2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,l=v.useRef(null),f=v.useRef(null),[h,p]=BI({prop:n,defaultProp:a??!1,onChange:o,caller:sh});return c.jsx(u3,{scope:t,triggerRef:l,contentRef:f,contentId:si(),titleId:si(),descriptionId:si(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(g=>!g),[p]),modal:u,children:r})};k2.displayName=sh;var S2="DialogTrigger",c3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(S2,r),o=mo(t,a.triggerRef);return c.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":hy(a.open),...n,ref:o,onClick:sa(e.onClick,a.onOpenToggle)})});c3.displayName=S2;var fy="DialogPortal",[d3,N2]=j2(fy,{forceMount:void 0}),E2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=hn(fy,t);return c.jsx(d3,{scope:t,forceMount:r,children:v.Children.map(n,u=>c.jsx(ah,{present:r||o.open,children:c.jsx(f2,{asChild:!0,container:a,children:u})}))})};E2.displayName=fy;var lf="DialogOverlay",P2=v.forwardRef((e,t)=>{const r=N2(lf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(lf,e.__scopeDialog);return o.modal?c.jsx(ah,{present:n||o.open,children:c.jsx(h3,{...a,ref:t})}):null});P2.displayName=lf;var f3=s2("DialogOverlay.RemoveScroll"),h3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(lf,r),o=sT(),u=mo(t,o);return c.jsx(b2,{as:f3,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Gt.div,{"data-state":hy(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),_s="DialogContent",A2=v.forwardRef((e,t)=>{const r=N2(_s,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(_s,e.__scopeDialog);return c.jsx(ah,{present:n||o.open,children:o.modal?c.jsx(p3,{...a,ref:t}):c.jsx(m3,{...a,ref:t})})});A2.displayName=_s;var p3=v.forwardRef((e,t)=>{const r=hn(_s,e.__scopeDialog),n=v.useRef(null),a=mo(t,r.contentRef,n);return v.useEffect(()=>{const o=n.current;if(o)return l3(o)},[]),c.jsx(C2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:sa(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:sa(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&o.preventDefault()}),onFocusOutside:sa(e.onFocusOutside,o=>o.preventDefault())})}),m3=v.forwardRef((e,t)=>{const r=hn(_s,e.__scopeDialog),n=v.useRef(!1),a=v.useRef(!1);return c.jsx(C2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),C2=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,l=hn(_s,r);return jT(),c.jsx(c.Fragment,{children:c.jsx(c2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:c.jsx(l2,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":hy(l.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),O2="DialogTitle",g3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(O2,r);return c.jsx(Gt.h2,{id:a.titleId,...n,ref:t})});g3.displayName=O2;var _2="DialogDescription",v3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(_2,r);return c.jsx(Gt.p,{id:a.descriptionId,...n,ref:t})});v3.displayName=_2;var M2="DialogClose",y3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(M2,r);return c.jsx(Gt.button,{type:"button",...n,ref:t,onClick:sa(e.onClick,()=>a.onOpenChange(!1))})});y3.displayName=M2;function hy(e){return e?"open":"closed"}var ql='[cmdk-group=""]',Xm='[cmdk-group-items=""]',x3='[cmdk-group-heading=""]',I2='[cmdk-item=""]',vw=`${I2}:not([aria-disabled="true"])`,nv="cmdk-item-select",ns="data-value",b3=(e,t,r)=>DI(e,t,r),T2=v.createContext(void 0),Vu=()=>v.useContext(T2),D2=v.createContext(void 0),py=()=>v.useContext(D2),R2=v.createContext(void 0),$2=v.forwardRef((e,t)=>{let r=is(()=>{var T,te;return{search:"",value:(te=(T=e.value)!=null?T:e.defaultValue)!=null?te:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=is(()=>new Set),a=is(()=>new Map),o=is(()=>new Map),u=is(()=>new Set),l=L2(e),{label:f,children:h,value:p,onValueChange:g,filter:x,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,P=si(),O=si(),A=si(),_=v.useRef(null),C=_3();io(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,I.emit()}},[p]),io(()=>{C(6,ue)},[]);let I=v.useMemo(()=>({subscribe:T=>(u.current.add(T),()=>u.current.delete(T)),snapshot:()=>r.current,setState:(T,te,ie)=>{var re,ce,me,Oe;if(!Object.is(r.current[T],te)){if(r.current[T]=te,T==="search")$(),G(),C(1,Y);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(A);ee?ee.focus():(re=document.getElementById(P))==null||re.focus()}if(C(7,()=>{var ee;r.current.selectedItemId=(ee=J())==null?void 0:ee.id,I.emit()}),ie||C(5,ue),((ce=l.current)==null?void 0:ce.value)!==void 0){let ee=te??"";(Oe=(me=l.current).onValueChange)==null||Oe.call(me,ee);return}}I.emit()}},emit:()=>{u.current.forEach(T=>T())}}),[]),W=v.useMemo(()=>({value:(T,te,ie)=>{var re;te!==((re=o.current.get(T))==null?void 0:re.value)&&(o.current.set(T,{value:te,keywords:ie}),r.current.filtered.items.set(T,U(te,ie)),C(2,()=>{G(),I.emit()}))},item:(T,te)=>(n.current.add(T),te&&(a.current.has(te)?a.current.get(te).add(T):a.current.set(te,new Set([T]))),C(3,()=>{$(),G(),r.current.value||Y(),I.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let ie=J();C(4,()=>{$(),(ie==null?void 0:ie.getAttribute("id"))===T&&Y(),I.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:P,inputId:A,labelId:O,listInnerRef:_}),[]);function U(T,te){var ie,re;let ce=(re=(ie=l.current)==null?void 0:ie.filter)!=null?re:b3;return T?ce(T,r.current.search,te):0}function G(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,te=[];r.current.filtered.groups.forEach(re=>{let ce=a.current.get(re),me=0;ce.forEach(Oe=>{let ee=T.get(Oe);me=Math.max(ee,me)}),te.push([re,me])});let ie=_.current;ge().sort((re,ce)=>{var me,Oe;let ee=re.getAttribute("id"),ke=ce.getAttribute("id");return((me=T.get(ke))!=null?me:0)-((Oe=T.get(ee))!=null?Oe:0)}).forEach(re=>{let ce=re.closest(Xm);ce?ce.appendChild(re.parentElement===ce?re:re.closest(`${Xm} > *`)):ie.appendChild(re.parentElement===ie?re:re.closest(`${Xm} > *`))}),te.sort((re,ce)=>ce[1]-re[1]).forEach(re=>{var ce;let me=(ce=_.current)==null?void 0:ce.querySelector(`${ql}[${ns}="${encodeURIComponent(re[0])}"]`);me==null||me.parentElement.appendChild(me)})}function Y(){let T=ge().find(ie=>ie.getAttribute("aria-disabled")!=="true"),te=T==null?void 0:T.getAttribute(ns);I.setState("value",te||void 0)}function $(){var T,te,ie,re;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let me of n.current){let Oe=(te=(T=o.current.get(me))==null?void 0:T.value)!=null?te:"",ee=(re=(ie=o.current.get(me))==null?void 0:ie.keywords)!=null?re:[],ke=U(Oe,ee);r.current.filtered.items.set(me,ke),ke>0&&ce++}for(let[me,Oe]of a.current)for(let ee of Oe)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(me);break}r.current.filtered.count=ce}function ue(){var T,te,ie;let re=J();re&&(((T=re.parentElement)==null?void 0:T.firstChild)===re&&((ie=(te=re.closest(ql))==null?void 0:te.querySelector(x3))==null||ie.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function J(){var T;return(T=_.current)==null?void 0:T.querySelector(`${I2}[aria-selected="true"]`)}function ge(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(vw))||[])}function we(T){let te=ge()[T];te&&I.setState("value",te.getAttribute(ns))}function pe(T){var te;let ie=J(),re=ge(),ce=re.findIndex(Oe=>Oe===ie),me=re[ce+T];(te=l.current)!=null&&te.loop&&(me=ce+T<0?re[re.length-1]:ce+T===re.length?re[0]:re[ce+T]),me&&I.setState("value",me.getAttribute(ns))}function F(T){let te=J(),ie=te==null?void 0:te.closest(ql),re;for(;ie&&!re;)ie=T>0?C3(ie,ql):O3(ie,ql),re=ie==null?void 0:ie.querySelector(vw);re?I.setState("value",re.getAttribute(ns)):pe(T)}let Z=()=>we(ge().length-1),Q=T=>{T.preventDefault(),T.metaKey?Z():T.altKey?F(1):pe(1)},D=T=>{T.preventDefault(),T.metaKey?we(0):T.altKey?F(-1):pe(-1)};return v.createElement(Gt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var te;(te=N.onKeyDown)==null||te.call(N,T);let ie=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||ie))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&Q(T);break}case"ArrowDown":{Q(T);break}case"p":case"k":{S&&T.ctrlKey&&D(T);break}case"ArrowUp":{D(T);break}case"Home":{T.preventDefault(),we(0);break}case"End":{T.preventDefault(),Z();break}case"Enter":{T.preventDefault();let re=J();if(re){let ce=new Event(nv);re.dispatchEvent(ce)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:I3},f),lh(e,T=>v.createElement(D2.Provider,{value:I},v.createElement(T2.Provider,{value:W},T))))}),w3=v.forwardRef((e,t)=>{var r,n;let a=si(),o=v.useRef(null),u=v.useContext(R2),l=Vu(),f=L2(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;io(()=>{if(!h)return l.item(a,u==null?void 0:u.id)},[h]);let p=z2(a,o,[e.value,e.children,o],e.keywords),g=py(),x=ca(C=>C.value&&C.value===p.current),b=ca(C=>h||l.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);v.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(nv,j),()=>C.removeEventListener(nv,j)},[b,e.onSelect,e.disabled]);function j(){var C,I;k(),(I=(C=f.current).onSelect)==null||I.call(C,p.current)}function k(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:P,forceMount:O,keywords:A,..._}=e;return v.createElement(Gt.div,{ref:Os(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!x,"data-disabled":!!S,"data-selected":!!x,onPointerMove:S||l.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),j3=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=si(),l=v.useRef(null),f=v.useRef(null),h=si(),p=Vu(),g=ca(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);io(()=>p.group(u),[]),z2(u,l,[e.value,e.heading,f]);let x=v.useMemo(()=>({id:u,forceMount:a}),[a]);return v.createElement(Gt.div,{ref:Os(l,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&v.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),lh(e,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(R2.Provider,{value:x},b))))}),k3=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=v.useRef(null),o=ca(u=>!u.search);return!r&&!o?null:v.createElement(Gt.div,{ref:Os(a,t),...n,"cmdk-separator":"",role:"separator"})}),S3=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=py(),u=ca(h=>h.search),l=ca(h=>h.selectedItemId),f=Vu();return v.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),v.createElement(Gt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":l,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),N3=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=v.useRef(null),u=v.useRef(null),l=ca(h=>h.selectedItemId),f=Vu();return v.useEffect(()=>{if(u.current&&o.current){let h=u.current,p=o.current,g,x=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(g),x.unobserve(h)}}},[]),v.createElement(Gt.div,{ref:Os(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},lh(e,h=>v.createElement("div",{ref:Os(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),E3=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...l}=e;return v.createElement(k2,{open:r,onOpenChange:n},v.createElement(E2,{container:u},v.createElement(P2,{"cmdk-overlay":"",className:a}),v.createElement(A2,{"aria-label":e.label,"cmdk-dialog":"",className:o},v.createElement($2,{ref:t,...l}))))}),P3=v.forwardRef((e,t)=>ca(r=>r.filtered.count===0)?v.createElement(Gt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),A3=v.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return v.createElement(Gt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},lh(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),qo=Object.assign($2,{List:N3,Item:w3,Input:S3,Group:j3,Separator:k3,Dialog:E3,Empty:P3,Loading:A3});function C3(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function O3(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function L2(e){let t=v.useRef(e);return io(()=>{t.current=e}),t}var io=typeof window>"u"?v.useEffect:v.useLayoutEffect;function is(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function ca(e){let t=py(),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function z2(e,t,r,n=[]){let a=v.useRef(),o=Vu();return io(()=>{var u;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,l,f),(u=t.current)==null||u.setAttribute(ns,l),a.current=l}),a}var _3=()=>{let[e,t]=v.useState(),r=is(()=>new Map);return io(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function M3(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lh({asChild:e,children:t},r){return e&&v.isValidElement(t)?v.cloneElement(M3(t),{ref:t.ref},r(t.props.children)):r(t)}var I3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function T3({onNavigate:e}){const[t,r]=v.useState(!1);return v.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),c.jsx(qo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>r(!1),children:c.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[c.jsx(qo.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),c.jsxs(qo.List,{className:"max-h-80 overflow-y-auto p-2",children:[c.jsx(qo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),c.jsx(qo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Jg.map(n=>c.jsxs(qo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[c.jsx(n.icon,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:n.label}),c.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function Me(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:o});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const wt={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},D3=(e=!0)=>ur({queryKey:wt.memoryGraph,queryFn:()=>Me("/api/memory/graph"),enabled:e}),R3=()=>ur({queryKey:wt.health,queryFn:()=>Me("/api/health"),refetchInterval:1e4}),uh=(e=5e3)=>ur({queryKey:wt.systemStatus,queryFn:()=>Me("/api/system/status"),refetchInterval:e}),$3=(e=3e3)=>ur({queryKey:wt.services,queryFn:()=>Me("/api/system/services"),refetchInterval:e}),go=(e=4e3)=>ur({queryKey:wt.models,queryFn:()=>Me("/api/models"),refetchInterval:e}),L3=(e=4e3)=>ur({queryKey:wt.routing,queryFn:()=>Me("/api/routing"),refetchInterval:e}),z3=(e=2e3)=>ur({queryKey:wt.jobs,queryFn:()=>Me("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),my=(e=3e3)=>ur({queryKey:wt.tokenStats,queryFn:()=>Me("/api/system/token-stats"),refetchInterval:e}),gy=(e=5e3)=>ur({queryKey:wt.agentStatus,queryFn:()=>Me("/api/agent/status"),refetchInterval:e}),F3=(e=6e4)=>ur({queryKey:wt.hermesBrain,queryFn:()=>Me("/api/agent/brain"),refetchInterval:e}),vy=e=>ur({queryKey:wt.updates,queryFn:()=>Me("/api/maintenance/updates"),refetchInterval:e}),B3=()=>ur({queryKey:wt.discover,queryFn:()=>Me("/api/discover")}),U3=e=>ur({queryKey:wt.drafts(e),queryFn:()=>Me(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),F2=e=>ur({queryKey:wt.connect(e),queryFn:()=>Me(e?`/api/connect?${e}`:"/api/connect")}),iv=e=>ur({queryKey:wt.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),Me(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function Qo(e){return(e/1024**3).toFixed(1)}function av(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Br(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function W3(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function yw(e){return e?`${Math.round(e/1024)}k`:"—"}function B2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=G3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const l=u.split(yy);return l[0]===""&&l.length!==1&&l.shift(),U2(l,t)||K3(u)},getConflictingClassGroupIds:(u,l)=>{const f=r[u]||[];return l&&n[u]?[...f,...n[u]]:f}}},U2=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?U2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(yy);return(u=t.validators.find(({validator:l})=>l(o)))==null?void 0:u.classGroupId},xw=/^\[(.+)\]$/,K3=e=>{if(xw.test(e)){const t=xw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},G3=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return q3(Object.entries(e.classGroups),r).forEach(([o,u])=>{ov(u,n,o,t)}),n},ov=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:bw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(V3(a)){ov(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{ov(u,bw(t,o),r,n)})})},bw=(e,t)=>{let r=e;return t.split(yy).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},V3=e=>e.isThemeGetter,q3=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,l])=>[t+u,l])):o);return[r,a]}):e,Q3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},W2="!",Y3=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=l=>{const f=[];let h=0,p=0,g;for(let S=0;Sp?g-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?l=>r({className:l,parseClassName:u}):u},X3=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Z3=e=>({cache:Q3(e.cacheSize),parseClassName:Y3(e),...H3(e)}),J3=/\s+/,e4=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(J3);let l="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:p,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?x.substring(0,b):x);if(!k){if(!j){l=h+(l.length>0?" "+l:l);continue}if(k=n(x),!k){l=h+(l.length>0?" "+l:l);continue}j=!1}const S=X3(p).join(":"),N=g?S+W2:S,P=N+k;if(o.includes(P))continue;o.push(P);const O=a(k,j);for(let A=0;A0?" "+l:l)}return l};function t4(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;ng(p),e());return r=Z3(h),n=r.cache.get,a=r.cache.set,o=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=e4(f,r);return a(f,p),p}return function(){return o(t4.apply(null,arguments))}}const it=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},K2=/^\[(?:([a-z-]+):)?(.+)\]$/i,n4=/^\d+\/\d+$/,i4=new Set(["px","full","screen"]),a4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o4=/\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$/,s4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xn=e=>cs(e)||i4.has(e)||n4.test(e),Wi=e=>Us(e,"length",v4),cs=e=>!!e&&!Number.isNaN(Number(e)),Zm=e=>Us(e,"number",cs),Ql=e=>!!e&&Number.isInteger(Number(e)),c4=e=>e.endsWith("%")&&cs(e.slice(0,-1)),$e=e=>K2.test(e),Hi=e=>a4.test(e),d4=new Set(["length","size","percentage"]),f4=e=>Us(e,d4,G2),h4=e=>Us(e,"position",G2),p4=new Set(["image","url"]),m4=e=>Us(e,p4,x4),g4=e=>Us(e,"",y4),Yl=()=>!0,Us=(e,t,r)=>{const n=K2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},v4=e=>o4.test(e)&&!s4.test(e),G2=()=>!1,y4=e=>l4.test(e),x4=e=>u4.test(e),b4=()=>{const e=it("colors"),t=it("spacing"),r=it("blur"),n=it("brightness"),a=it("borderColor"),o=it("borderRadius"),u=it("borderSpacing"),l=it("borderWidth"),f=it("contrast"),h=it("grayscale"),p=it("hueRotate"),g=it("invert"),x=it("gap"),b=it("gradientColorStops"),j=it("gradientColorStopPositions"),k=it("inset"),S=it("margin"),N=it("opacity"),P=it("padding"),O=it("saturate"),A=it("scale"),_=it("sepia"),C=it("skew"),I=it("space"),W=it("translate"),U=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],$=()=>[$e,t],ue=()=>["",Xn,Wi],J=()=>["auto",cs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],we=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",$e],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[cs,$e];return{cacheSize:500,separator:":",theme:{colors:[Yl],spacing:[Xn,Wi],blur:["none","",Hi,$e],brightness:D(),borderColor:[e],borderRadius:["none","","full",Hi,$e],borderSpacing:$(),borderWidth:ue(),contrast:D(),grayscale:Z(),hueRotate:D(),invert:Z(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[c4,Wi],inset:Y(),margin:Y(),opacity:D(),padding:$(),saturate:D(),scale:D(),sepia:Z(),skew:D(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Hi]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...ge(),$e]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ql,$e]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Ql,$e]}],"grid-cols":[{"grid-cols":[Yl]}],"col-start-end":[{col:["auto",{span:["full",Ql,$e]},$e]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Yl]}],"row-start-end":[{row:["auto",{span:[Ql,$e]},$e]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Hi]},Hi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hi,Wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zm]}],"font-family":[{font:[Yl]}],"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",$e]}],"line-clamp":[{"line-clamp":["none",cs,Zm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xn,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xn,Wi]}],"underline-offset":[{"underline-offset":["auto",Xn,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),h4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",f4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},m4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...we(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:we()}],"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:["",...we()]}],"outline-offset":[{"outline-offset":[Xn,$e]}],"outline-w":[{outline:[Xn,Wi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Xn,Wi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hi,g4]}],"shadow-color":[{shadow:[Yl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Hi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[O]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Ql,$e]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xn,Wi,Zm]}],stroke:[{stroke:[e,"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"]}}},w4=r4(b4);function de(...e){return w4(et(e))}function Ms(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const V2=["fast","heavy","coder","vision","scout"],j4={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},xy=e=>e&&j4[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function k4({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return c.jsxs("span",{className:de("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function ww(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function S4(){const{data:e}=go(2e3),{data:t}=my(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),o=v.useRef(null),[u,l]=v.useState(!1);return v.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(o.current!==null&&f>o.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return o.current=f,()=>clearTimeout(h)}o.current=f},[t==null?void 0:t.total_tokens]),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),c.jsxs("span",{className:de("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",u?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[u?c.jsx(ls,{className:"h-3 w-3 animate-pulse"}):c.jsx(gI,{className:"h-3 w-3"}),u?"Inferenz aktiv":"Idle"]})]}),a.length===0?c.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):c.jsx("div",{className:"grid gap-2",children:a.map(f=>{var h;return c.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.role&&c.jsx("span",{className:de("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",xy(f.role)),children:f.role}),c.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),c.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Br(f.size_bytes)," im Unified-RAM"]})]}),c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[c.jsx("span",{className:de("h-1.5 w-1.5 rounded-full bg-emerald-500",u&&"animate-pulse")})," warm"]})]},f.name)})})]})}let sv=[],lv=[];const uv=new Set,q2=()=>uv.forEach(e=>e());function Q2(e){return uv.add(e),()=>{uv.delete(e)}}function N4(e){sv=[...sv,e].slice(-40),q2()}function E4(e){lv=[...lv,e].slice(-40),q2()}const P4=()=>v.useSyncExternalStore(Q2,()=>sv),A4=()=>v.useSyncExternalStore(Q2,()=>lv);function C4(){const{data:e,dataUpdatedAt:t}=uh(3e3),{data:r,dataUpdatedAt:n}=my(3e3),a=v.useRef(null);v.useEffect(()=>{var o,u,l,f;e&&N4({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((l=e.gpu)==null?void 0:l.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),v.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,l=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);E4({t:o,prompt:Math.max(0,(u-a.current.p)/f),completion:Math.max(0,(l-a.current.c)/f)})}a.current={p:u,c:l,t:o}},[n])}function O4(){const{data:e,error:t}=uh(3e3),r=P4();return{sys:e,hist:r,error:t}}var _4=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function by(e){if(typeof e!="string")return!1;var t=_4;return t.includes(e)}var M4=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],I4=new Set(M4);function Y2(e){return typeof e!="string"?!1:I4.has(e)}function X2(e){return typeof e=="string"&&e.startsWith("data-")}function dn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Y2(r)||X2(r))&&(t[r]=e[r]);return t}function ch(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return dn(t)}return typeof e=="object"&&!Array.isArray(e)?dn(e):null}function Gr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Y2(r)||X2(r)||by(r))&&(t[r]=e[r]);return t}function T4(e){return e==null?null:v.isValidElement(e)?Gr(e.props):typeof e=="object"&&!Array.isArray(e)?Gr(e):null}var D4=["children","width","height","viewBox","className","style","title","desc"];function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,l=e.style,f=e.title,h=e.desc,p=R4(e,D4),g=o||{width:n,height:a,x:0,y:0},x=et("recharts-surface",u);return v.createElement("svg",cv({},Gr(p),{className:x,width:n,height:a,style:l,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),v.createElement("title",null,f),v.createElement("desc",null,h),r)}),L4=["children","className"];function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,a=z4(e,L4),o=et("recharts-layer",n);return v.createElement("g",dv({className:o},Gr(a),{ref:t}),r)}),B4=v.createContext(null);function pt(e){return function(){return e}}const fv=Math.PI,hv=2*fv,Ra=1e-6,U4=hv-Ra;function J2(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return J2;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;aRa)if(!(Math.abs(g*f-h*p)>Ra)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=a-l,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),P=Math.sqrt(x),O=o*Math.tan((fv-Math.acos((k+x-S)/(2*N*P)))/2),A=O/P,_=O/N;Math.abs(A-1)>Ra&&this._append`L${t+A*p},${r+A*g}`,this._append`A${o},${o},0,0,${+(g*b>p*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,g=1^u,x=u?a-o:o-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ra||Math.abs(this._y1-p)>Ra)&&this._append`L${h},${p}`,n&&(x<0&&(x=x%hv+hv),x>U4?this._append`A${n},${n},0,1,${g},${t-l},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:x>Ra&&this._append`A${n},${n},0,${+(x>=fv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function eE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new H4(t)}function wy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tE(e){this._context=e}tE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function dh(e){return new tE(e)}function rE(e){return e[0]}function nE(e){return e[1]}function iE(e,t){var r=pt(!0),n=null,a=dh,o=null,u=eE(l);e=typeof e=="function"?e:e===void 0?rE:pt(e),t=typeof t=="function"?t:t===void 0?nE:pt(t);function l(f){var h,p=(f=wy(f)).length,g,x=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=p;++h)!(h=b;--j)l.point(O[j],A[j]);l.lineEnd(),l.areaEnd()}N&&(O[x]=+e(S,x,g),A[x]=+t(S,x,g),l.point(n?+n(S,x,g):O[x],r?+r(S,x,g):A[x]))}if(P)return l=null,P+""||null}function p(){return iE().defined(a).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:pt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:pt(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:pt(!!g),h):a},h.curve=function(g){return arguments.length?(u=g,o!=null&&(l=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=l=null:l=u(o=g),h):o},h}class aE{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function K4(e){return new aE(e,!0)}function G4(e){return new aE(e,!1)}function uf(){}function cf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function oE(e){this._context=e}oE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V4(e){return new oE(e)}function sE(e){this._context=e}sE.prototype={areaStart:uf,areaEnd:uf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:cf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function q4(e){return new sE(e)}function lE(e){this._context=e}lE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:cf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Q4(e){return new lE(e)}function uE(e){this._context=e}uE.prototype={areaStart:uf,areaEnd:uf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Y4(e){return new uE(e)}function jw(e){return e<0?-1:1}function kw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),l=(o*a+u*n)/(n+a);return(jw(o)+jw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function Sw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Jm(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,a+l*t,o-l,u-l*r,o,u)}function df(e){this._context=e}df.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jm(this,this._t0,Sw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Jm(this,Sw(this,r=kw(this,e,t)),r);break;default:Jm(this,this._t0,r=kw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function cE(e){this._context=new dE(e)}(cE.prototype=Object.create(df.prototype)).point=function(e,t){df.prototype.point.call(this,t,e)};function dE(e){this._context=e}dE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function X4(e){return new df(e)}function Z4(e){return new cE(e)}function fE(e){this._context=e}fE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Nw(e),a=Nw(t),o=0,u=1;u=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function eD(e){return new fh(e,.5)}function tD(e){return new fh(e,0)}function rD(e){return new fh(e,1)}function ao(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,l=o.length;r=0;)r[t]=t;return r}function nD(e,t){return e[t]}function iD(e){const t=[];return t.key=e,t}function aD(){var e=pt([]),t=pv,r=ao,n=nD;function a(o){var u=Array.from(e.apply(this,arguments),iD),l,f=u.length,h=-1,p;for(const g of o)for(l=0,++h;l0){for(var r,n,a=0,o=e[0].length,u;a0){for(var r=0,n=e[t[0]],a,o=n.length;r0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n1&&arguments[1]!==void 0?arguments[1]:cD,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var l=r[u-1];return typeof l=="string"?a+l+o:l!==void 0?a+aa(l)+o:a+o},"")}var Wr=e=>e===0?0:e>0?1:-1,Tn=e=>typeof e=="number"&&e!=+e,oo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Tn(e),Dn=e=>Ne(e)||typeof e=="string",dD=0,Nu=e=>{var t=++dD;return"".concat(e||"").concat(t)},da=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var o;if(oo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Tn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},mE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):vo(n,t))===r)}var Kt=e=>e===null||typeof e>"u",Sy=e=>Kt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function xr(e){return e!=null}function Ws(){}var vE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ny=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{by(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},fD=(e,t,r)=>n=>(e(t,r,n),null),hD=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];by(a)&&typeof o=="function"&&(n||(n={}),n[a]=fD(o,t,r))}),n};function Ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pD(e){for(var t=1;t(u[l]===void 0&&n[l]!==void 0&&(u[l]=n[l]),u),r);return o}function yD(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function Ey(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const kD="[object RegExp]",xE="[object String]",bE="[object Number]",wE="[object Boolean]",jE="[object Arguments]",SD="[object Symbol]",ND="[object Date]",ED="[object Map]",PD="[object Set]",AD="[object Array]",CD="[object ArrayBuffer]",OD="[object Object]",_D="[object DataView]",MD="[object Uint8Array]",ID="[object Uint8ClampedArray]",TD="[object Uint16Array]",DD="[object Uint32Array]",RD="[object Int8Array]",$D="[object Int16Array]",LD="[object Int32Array]",zD="[object Float32Array]",FD="[object Float64Array]",Pw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function BD(e){return typeof Pw.Buffer<"u"&&Pw.Buffer.isBuffer(e)}function UD(e,t){return Fa(e,void 0,e,new Map,t)}function Fa(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(gv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let l=0;l{}):vv(e,t,function n(a,o,u,l,f,h){const p=r(a,o,u,l,f,h);return p!==void 0?!!p:vv(a,o,n,h,!1)},new Map,!0)}function vv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return KD(e,t,r,n);case"function":return Object.keys(t).length>0?vv(e,{...t},r,n,a):Zd(e,t);default:return kE(e)&&a?typeof t=="string"?t==="":!0:Zd(e,t)}}function KD(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return NE(e,t,r,n);if(t instanceof Map)return GD(e,t,r,n);if(t instanceof Set)return VD(e,t,r,n);const a=Object.keys(t);if(e==null||gv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function qD(e){return e=HD(e),t=>EE(t,e)}function QD(e,t){return UD(e,(r,n,a,o)=>{if(typeof e=="object"){if(Ey(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),on(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case bE:case xE:case wE:{const u=new e.constructor(e==null?void 0:e.valueOf());return on(u,e),u}case jE:{const u={};return on(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function YD(e){return QD(e)}const XD=/^(?:0|[1-9]\d*)$/;function PE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function AE(e){return e!=null&&typeof e!="function"&&rR(e.length)}function nR(e){return typeof e=="object"&&e!==null}function iR(e){return nR(e)&&AE(e)}function Aw(e,t=yE){return iR(e)?yD(Array.from(e),xD(tR(t),1)):[]}function aR(e,t,r){return t===!0?Aw(e,r):typeof t=="function"?Aw(e,t):e}var eg={exports:{}},tg={},rg={exports:{}},ng={};/** + * @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 Cw;function oR(){if(Cw)return ng;Cw=1;var e=Bs();function t(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function l(g,x){var b=x(),j=n({inst:{value:b,getSnapshot:x}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=x,f(k)&&S({inst:k})},[g,b,x]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var x=g.getSnapshot;g=g.value;try{var b=x();return!r(g,b)}catch{return!0}}function h(g,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return ng.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ng}var Ow;function sR(){return Ow||(Ow=1,rg.exports=oR()),rg.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 _w;function lR(){if(_w)return tg;_w=1;var e=Bs(),t=sR();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return tg.useSyncExternalStoreWithSelector=function(h,p,g,x,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=l(function(){function N(C){if(!P){if(P=!0,O=C,C=x(C),b!==void 0&&k.hasValue){var I=k.value;if(b(I,C))return A=I}return A=C}if(I=A,n(O,C))return I;var W=x(C);return b!==void 0&&b(I,W)?(O=C,I):(O=C,A=W)}var P=!1,O,A,_=g===void 0?null:g;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,g,x,b]);var S=a(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},tg}var Mw;function uR(){return Mw||(Mw=1,eg.exports=lR()),eg.exports}var cR=uR(),Py=v.createContext(null),dR=e=>e,jt=()=>{var e=v.useContext(Py);return e?e.store.dispatch:dR},Jd=()=>{},fR=()=>Jd,hR=(e,t)=>e===t;function Ce(e){var t=v.useContext(Py),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Jd,[t,e]);return cR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:fR,t?t.store.getState:Jd,t?t.store.getState:Jd,r,hR)}function pR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Iw=e=>Array.isArray(e)?e:[e];function gR(e){const t=Array.isArray(e[0])?e[0]:e;return mR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function vR(e,t){const r=[],{length:n}=e;for(let a=0;atypeof WeakRef>"u"?yR:WeakRef,CE=xR(),bR=0,Tw=1;function _d(){return{s:bR,v:void 0,o:null,p:null}}function wR(e){return e instanceof CE?e.deref():e}function OE(e,t={}){let r=_d();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let l=r;const{length:f}=arguments;for(let g=0,x=f;g{r=_d(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function jR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),pR(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:x=[],argsMemoize:b=OE,argsMemoizeOptions:j=[]}=p,k=Iw(x),S=Iw(j),N=gR(a),P=g(function(){return o++,h.apply(null,arguments)},...k),O=b(function(){u++;const _=vR(N,arguments);return l=P.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:P,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var V=jR(OE);function kR(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let l=0;l{if(e!==t){const n=Dw(e),a=Dw(t);if(n===a&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function _E(e){return typeof e=="symbol"||e instanceof Symbol}const NR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ER=/^\w*$/;function PR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||_E(e)?!0:typeof e=="string"&&(ER.test(e)||!NR.test(e))||t!=null}function AR(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;pf==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,u=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||PR(l)?l:{key:l,path:ky(l)}));return e.map(l=>({original:l,criteria:u.map(f=>o(f,l))})).slice().sort((l,f)=>{for(let h=0;hl.original)}function hh(e,...t){const r=t.length;return r>1&&yv(e,t[0],t[1])?t=[]:r>2&&yv(t[0],t[1],t[2])&&(t=[t[0]]),AR(e,kR(t),["asc"])}var ME=e=>e.legend.settings,CR=e=>e.legend.size,OR=e=>e.legend.payload;V([OR,ME],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?hh(n,r):n});function _R(e,t){return DR(e)||TR(e,t)||IR(e,t)||MR()}function MR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IR(e,t){if(e){if(typeof e=="string")return Rw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rw(e,t):void 0}}function Rw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rMd||Math.abs(e.left-t.left)>Md||Math.abs(e.top-t.top)>Md||Math.abs(e.width-t.width)>Md}function Lw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function RR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=v.useState({height:0,left:0,top:0,width:0}),r=_R(t,2),n=r[0],a=r[1],o=v.useRef(null),u=v.useRef(n);u.current=n;var l=v.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Lw(f);if($w(h,u.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var g=Lw(f);$w(g,u.current)&&a(g)});p.observe(f),o.current=p}}},[...e]);return v.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,l]}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $R=typeof Symbol=="function"&&Symbol.observable||"@@observable",zw=$R,ig=()=>Math.random().toString(36).substring(7).split("").join("."),LR={INIT:`@@redux/INIT${ig()}`,REPLACE:`@@redux/REPLACE${ig()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ig()}`},ff=LR;function Ay(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function IE(e,t,r){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ft(1));return r(IE)(e,t)}let n=e,a=t,o=new Map,u=o,l=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function p(){if(f)throw new Error(Ft(3));return a}function g(S){if(typeof S!="function")throw new Error(Ft(4));if(f)throw new Error(Ft(5));let N=!0;h();const P=l++;return u.set(P,S),function(){if(N){if(f)throw new Error(Ft(6));N=!1,h(),u.delete(P),o=null}}}function x(S){if(!Ay(S))throw new Error(Ft(7));if(typeof S.type>"u")throw new Error(Ft(8));if(typeof S.type!="string")throw new Error(Ft(17));if(f)throw new Error(Ft(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(P=>{P()}),S}function b(S){if(typeof S!="function")throw new Error(Ft(10));n=S,x({type:ff.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ft(11));function P(){const A=N;A.next&&A.next(p())}return P(),{unsubscribe:S(P)}},[zw](){return this}}}return x({type:ff.INIT}),{dispatch:x,subscribe:g,getState:p,replaceReducer:b,[zw]:j}}function zR(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ff.INIT})>"u")throw new Error(Ft(12));if(typeof r(void 0,{type:ff.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function TE(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw l&&l.type,new Error(Ft(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function hf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function FR(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Ft(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},l=e.map(f=>f(u));return o=hf(...l)(a.dispatch),{...a,dispatch:o}}}function DE(e){return Ay(e)&&"type"in e&&typeof e.type=="string"}var RE=Symbol.for("immer-nothing"),Fw=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Or=Object,Is=Or.getPrototypeOf,pf="constructor",ph="prototype",xv="configurable",mf="enumerable",ef="writable",Eu="value",ci=e=>!!e&&!!e[lr];function fn(e){var t;return e?$E(e)||gh(e)||!!e[Fw]||!!((t=e[pf])!=null&&t[Fw])||vh(e)||yh(e):!1}var BR=Or[ph][pf].toString(),Bw=new WeakMap;function $E(e){if(!e||!Cy(e))return!1;const t=Is(e);if(t===null||t===Or[ph])return!0;const r=Or.hasOwnProperty.call(t,pf)&&t[pf];if(r===Object)return!0;if(!as(r))return!1;let n=Bw.get(r);return n===void 0&&(n=Function.toString.call(r),Bw.set(r,n)),n===BR}function mh(e,t,r=!0){qu(e)===0?(r?Reflect.ownKeys(e):Or.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function qu(e){const t=e[lr];return t?t.type_:gh(e)?1:vh(e)?2:yh(e)?3:0}var Uw=(e,t,r=qu(e))=>r===2?e.has(t):Or[ph].hasOwnProperty.call(e,t),bv=(e,t,r=qu(e))=>r===2?e.get(t):e[t],gf=(e,t,r,n=qu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function UR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var gh=Array.isArray,vh=e=>e instanceof Map,yh=e=>e instanceof Set,Cy=e=>typeof e=="object",as=e=>typeof e=="function",ag=e=>typeof e=="boolean";function WR(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Jn=e=>e.copy_||e.base_,Oy=e=>e.modified_?e.copy_:e.base_;function wv(e,t){if(vh(e))return new Map(e);if(yh(e))return new Set(e);if(gh(e))return Array[ph].slice.call(e);const r=$E(e);if(t===!0||t==="class_only"&&!r){const n=Or.getOwnPropertyDescriptors(e);delete n[lr];let a=Reflect.ownKeys(n);for(let o=0;o1&&Or.defineProperties(e,{set:Id,add:Id,clear:Id,delete:Id}),Or.freeze(e),t&&mh(e,(r,n)=>{_y(n,!0)},!1)),e}function HR(){ln(2)}var Id={[Eu]:HR};function xh(e){return e===null||!Cy(e)?!0:Or.isFrozen(e)}var vf="MapSet",jv="Patches",Ww="ArrayMethods",LE={};function so(e){const t=LE[e];return t||ln(0,e),t}var Hw=e=>!!LE[e],Pu,zE=()=>Pu,KR=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hw(vf)?so(vf):void 0,arrayMethodsPlugin_:Hw(Ww)?so(Ww):void 0});function Kw(e,t){t&&(e.patchPlugin_=so(jv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kv(e){Sv(e),e.drafts_.forEach(GR),e.drafts_=null}function Sv(e){e===Pu&&(Pu=e.parent_)}var Gw=e=>Pu=KR(Pu,e);function GR(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[lr].modified_&&(kv(t),ln(4)),fn(e)&&(e=qw(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[lr].base_,e,t)}else e=qw(t,r);return VR(t,e,!0),kv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==RE?e:void 0}function qw(e,t){if(xh(t))return t;const r=t[lr];if(!r)return yf(t,e.handledSet_,e);if(!bh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);UE(r,e)}return r.copy_}function VR(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_y(t,r)}function FE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bh=(e,t)=>e.scope_===t,qR=[];function BE(e,t,r,n){const a=Jn(e),o=e.type_;if(n!==void 0&&bv(a,n,o)===t){gf(a,n,r,o);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;mh(a,(f,h)=>{if(ci(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const u=e.draftLocations_.get(t)??qR;for(const l of u)gf(a,l,r,o)}function QR(e,t,r){e.callbacks_.push(function(a){var l;const o=t;if(!o||!bh(o,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(o);const u=Oy(o);BE(e,o.draft_??o,u,r),UE(o,a)})}function UE(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}FE(e)}}function YR(e,t,r){const{scope_:n}=e;if(ci(r)){const a=r[lr];bh(a,n)&&a.callbacks_.push(function(){tf(e);const u=Oy(a);BE(e,r,u,t)})}else fn(r)&&e.callbacks_.push(function(){const o=Jn(e);e.type_===3?o.has(r)&&yf(r,n.handledSet_,n):bv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&yf(bv(e.copy_,t,e.type_),n.handledSet_,n)})}function yf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ci(e)||t.has(e)||!fn(e)||xh(e)||(t.add(e),mh(e,(n,a)=>{if(ci(a)){const o=a[lr];if(bh(o,r)){const u=Oy(o);gf(e,n,u,e.type_),FE(o)}}else fn(a)&&yf(a,t,r)})),e}function XR(e,t){const r=gh(e),n={type_:r?1:0,scope_:t?t.scope_:zE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=xf;r&&(a=[n],o=Au);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,[l,n]}var xf={get(e,t){if(t===lr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Jn(e);if(!Uw(a,t,e.type_))return ZR(e,a,t);const o=a[t];if(e.finalized_||!fn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&WR(t))return o;if(o===og(e.base_,t)){tf(e);const u=e.type_===1?+t:t,l=Ev(e.scope_,o,e,u);return e.copy_[u]=l}return o},has(e,t){return t in Jn(e)},ownKeys(e){return Reflect.ownKeys(Jn(e))},set(e,t,r){const n=WE(Jn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=og(Jn(e),t),o=a==null?void 0:a[lr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(UR(r,a)&&(r!==void 0||Uw(e.base_,t,e.type_)))return!0;tf(e),Nv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),YR(e,t,r)),!0},deleteProperty(e,t){return tf(e),og(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Nv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Jn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ef]:!0,[xv]:e.type_!==1||t!=="length",[mf]:n[mf],[Eu]:r[t]}},defineProperty(){ln(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){ln(12)}},Au={};for(let e in xf){let t=xf[e];Au[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Au.deleteProperty=function(e,t){return Au.set.call(this,e,t,void 0)};Au.set=function(e,t,r){return xf.set.call(this,e[0],t,r,e[0])};function og(e,t){const r=e[lr];return(r?Jn(r):e)[t]}function ZR(e,t,r){var a;const n=WE(t,r);return n?Eu in n?n[Eu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function WE(e,t){if(!(t in e))return;let r=Is(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Is(r)}}function Nv(e){e.modified_||(e.modified_=!0,e.parent_&&Nv(e.parent_))}function tf(e){e.copy_||(e.assigned_=new Map,e.copy_=wv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var JR=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(as(r)&&!as(n)){const u=n;n=r;const l=this;return function(h=u,...p){return l.produce(h,g=>n.call(this,g,...p))}}as(n)||ln(6),a!==void 0&&!as(a)&&ln(7);let o;if(fn(r)){const u=Gw(this),l=Ev(u,r,void 0);let f=!0;try{o=n(l),f=!1}finally{f?kv(u):Sv(u)}return Kw(u,a),Vw(o,u)}else if(!r||!Cy(r)){if(o=n(r),o===void 0&&(o=r),o===RE&&(o=void 0),this.autoFreeze_&&_y(o,!0),a){const u=[],l=[];so(jv).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:l}),a(u,l)}return o}else ln(1,r)},this.produceWithPatches=(r,n)=>{if(as(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,o;return[this.produce(r,n,(l,f)=>{a=l,o=f}),a,o]},ag(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ag(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ag(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){fn(t)||ln(8),ci(t)&&(t=Hr(t));const r=Gw(this),n=Ev(r,t,void 0);return n[lr].isManual_=!0,Sv(r),n}finishDraft(t,r){const n=t&&t[lr];(!n||!n.isManual_)&&ln(9);const{scope_:a}=n;return Kw(a,r),Vw(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=so(jv).applyPatches_;return ci(t)?a(t,r):this.produce(t,o=>a(o,r))}};function Ev(e,t,r,n){const[a,o]=vh(t)?so(vf).proxyMap_(t,r):yh(t)?so(vf).proxySet_(t,r):XR(t,r);return((r==null?void 0:r.scope_)??zE()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?QR(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Hr(e){return ci(e)||ln(10,e),HE(e)}function HE(e){if(!fn(e)||xh(e))return e;const t=e[lr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=wv(e,!0);return mh(r,(a,o)=>{gf(r,a,HE(o))},n),t&&(t.finalized_=!1),r}var e$=new JR,KE=e$.produce;function GE(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var t$=GE(),r$=GE,n$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?hf:hf.apply(null,arguments)};function Mr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(_r(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>DE(n)&&n.type===e,r}var VE=class lu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,lu.prototype)}static get[Symbol.species](){return lu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new lu(...t[0].concat(this)):new lu(...t.concat(this))}};function Qw(e){return fn(e)?KE(e,()=>{}):e}function Td(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function i$(e){return typeof e=="boolean"}var a$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new VE;return r&&(i$(r)?u.push(t$):u.push(r$(r.extraArgument))),u},qE="RTK_autoBatch",at=()=>e=>({payload:e,meta:{[qE]:!0}}),Yw=e=>t=>{setTimeout(t,e)},o$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},QE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?o$(window.requestAnimationFrame,100):Yw(10):e.type==="callback"?e.queueNotification:Yw(e.timeout),h=()=>{u=!1,o&&(o=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>a&&p(),x=n.subscribe(g);return l.add(p),()=>{x(),l.delete(p)}},dispatch(p){var g;try{return a=!((g=p==null?void 0:p.meta)!=null&&g[qE]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},s$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new VE(e);return n&&a.push(QE(typeof n=="object"?n:void 0)),a};function l$(e){const t=a$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(Ay(r))l=TE(r);else throw new Error(_r(1));let f;typeof n=="function"?f=n(t):f=t();let h=hf;a&&(h=n$({trace:!1,...typeof a=="object"&&a}));const p=FR(...f),g=s$(p);let x=typeof u=="function"?u(g):g();const b=h(...x);return IE(l,o,b)}function YE(e){const t={},r=[];let n;const a={addCase(o,u){const l=typeof o=="string"?o:o.type;if(!l)throw new Error(_r(28));if(l in t)throw new Error(_r(29));return t[l]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function u$(e){return typeof e=="function"}function c$(e,t){let[r,n,a]=YE(t),o;if(u$(e))o=()=>Qw(e());else{const l=Qw(e);o=()=>l}function u(l=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,g)=>{if(g)if(ci(p)){const b=g(p,f);return b===void 0?p:b}else{if(fn(p))return KE(p,x=>g(x,f));{const x=g(p,f);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},l)}return u.getInitialState=o,u}var d$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",f$=(e=21)=>{let t="",r=e;for(;r--;)t+=d$[Math.random()*64|0];return t},h$=Symbol.for("rtk-slice-createasyncthunk");function p$(e,t){return`${e}/${t}`}function m$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[h$];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(_r(11));const l=(typeof a.reducers=="function"?a.reducers(v$()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,_){const C=typeof A=="string"?A:A.type;if(!C)throw new Error(_r(12));if(C in h.sliceCaseReducersByType)throw new Error(_r(13));return h.sliceCaseReducersByType[C]=_,p},addMatcher(A,_){return h.sliceMatchers.push({matcher:A,reducer:_}),p},exposeAction(A,_){return h.actionCreators[A]=_,p},exposeCaseReducer(A,_){return h.sliceCaseReducersByName[A]=_,p}};f.forEach(A=>{const _=l[A],C={reducerName:A,type:p$(o,A),createNotation:typeof a.reducers=="function"};x$(_)?w$(C,_,p,t):y$(C,_,p)});function g(){const[A={},_=[],C=void 0]=typeof a.extraReducers=="function"?YE(a.extraReducers):[a.extraReducers],I={...A,...h.sliceCaseReducersByType};return c$(a.initialState,W=>{for(let U in I)W.addCase(U,I[U]);for(let U of h.sliceMatchers)W.addMatcher(U.matcher,U.reducer);for(let U of _)W.addMatcher(U.matcher,U.reducer);C&&W.addDefaultCase(C)})}const x=A=>A,b=new Map,j=new WeakMap;let k;function S(A,_){return k||(k=g()),k(A,_)}function N(){return k||(k=g()),k.getInitialState()}function P(A,_=!1){function C(W){let U=W[A];return typeof U>"u"&&_&&(U=Td(j,C,N)),U}function I(W=x){const U=Td(b,_,()=>new WeakMap);return Td(U,W,()=>{const G={};for(const[Y,$]of Object.entries(a.selectors??{}))G[Y]=g$($,W,()=>Td(j,W,N),_);return G})}return{reducerPath:A,getSelectors:I,get selectors(){return I(C)},selectSlice:C}}const O={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...P(u),injectInto(A,{reducerPath:_,...C}={}){const I=_??u;return A.inject({reducerPath:I,reducer:S},C),{...O,...P(I,!0)}}};return O}}function g$(e,t,r,n){function a(o,...u){let l=t(o);return typeof l>"u"&&n&&(l=r()),e(l,...u)}return a.unwrapped=e,a}var rr=m$();function v$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function y$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!b$(n))throw new Error(_r(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Mr(e,u):Mr(e))}function x$(e){return e._reducerDefinitionType==="asyncThunk"}function b$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function w$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(_r(18));const{payloadCreator:o,fulfilled:u,pending:l,rejected:f,settled:h,options:p}=r,g=a(e,o,p);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Dd,pending:l||Dd,rejected:f||Dd,settled:h||Dd})}function Dd(){}var j$="task",XE="listener",ZE="completed",My="cancelled",k$=`task-${My}`,S$=`task-${ZE}`,Pv=`${XE}-${My}`,N$=`${XE}-${ZE}`,wh=class{constructor(e){Gl(this,"code");Gl(this,"name","TaskAbortError");Gl(this,"message");this.code=e,this.message=`${j$} ${My} (reason: ${e})`}},Iy=(e,t)=>{if(typeof e!="function")throw new TypeError(_r(32))},bf=()=>{},JE=(e,t=bf)=>(e.catch(t),e),eP=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),eo=e=>{if(e.aborted)throw new wh(e.reason)};function tP(e,t){let r=bf;return new Promise((n,a)=>{const o=()=>a(new wh(e.reason));if(e.aborted){o();return}r=eP(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=bf})}var E$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof wh?"cancelled":"rejected",error:r}}finally{t==null||t()}},wf=e=>t=>JE(tP(e,t).then(r=>(eo(e),r))),rP=e=>{const t=wf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ds}=Object,Xw={},jh="listenerMiddleware",P$=(e,t)=>{const r=n=>eP(e,()=>n.abort(e.reason));return(n,a)=>{Iy(n);const o=new AbortController;r(o);const u=E$(async()=>{eo(e),eo(o.signal);const l=await n({pause:wf(o.signal),delay:rP(o.signal),signal:o.signal});return eo(o.signal),l},()=>o.abort(S$));return a!=null&&a.autoJoin&&t.push(u.catch(bf)),{result:wf(e)(u),cancel(){o.abort(k$)}}}},A$=(e,t)=>{const r=async(n,a)=>{eo(t);let o=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,x)=>{x.unsubscribe(),f([g,x.getState(),x.getOriginalState()])}});o=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await tP(t,Promise.race(l));return eo(t),f}finally{o()}};return((n,a)=>JE(r(n,a)))},nP=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Mr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(_r(21));return Iy(o),{predicate:a,type:t,effect:o}},iP=ds(e=>{const{type:t,predicate:r,effect:n}=nP(e);return{id:f$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(_r(22))}}},{withTypes:()=>iP}),Zw=(e,t)=>{const{type:r,effect:n,predicate:a}=nP(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Av=e=>{e.pending.forEach(t=>{t.abort(Pv)})},C$=(e,t)=>()=>{for(const r of t.keys())Av(r);e.clear()},Jw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},aP=ds(Mr(`${jh}/add`),{withTypes:()=>aP}),O$=Mr(`${jh}/removeAll`),oP=ds(Mr(`${jh}/remove`),{withTypes:()=>oP}),_$=(...e)=>{console.error(`${jh}/error`,...e)},Qu=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},a=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=_$}=e;Iy(u);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Av(b)}),f=(b=>{const j=Zw(t,b)??iP(b);return l(j)});ds(f,{withTypes:()=>f});const h=b=>{const j=Zw(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Av(j)),!!j};ds(h,{withTypes:()=>h});const p=async(b,j,k,S)=>{const N=new AbortController,P=A$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ds({},k,{getOriginalState:S,condition:(A,_)=>P(A,_).then(Boolean),take:P,delay:rP(N.signal),pause:wf(N.signal),extra:o,signal:N.signal,fork:P$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,_,C)=>{A!==N&&(A.abort(Pv),C.delete(A))})},cancel:()=>{N.abort(Pv),b.pending.delete(N)},throwIfCancelled:()=>{eo(N.signal)}})))}catch(A){A instanceof wh||Jw(u,A,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(N$),a(b),b.pending.delete(N)}},g=C$(t,r);return{middleware:b=>j=>k=>{if(!DE(k))return j(k);if(aP.match(k))return f(k.payload);if(O$.match(k)){g();return}if(oP.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===Xw)throw new Error(_r(23));return S};let P;try{if(P=j(k),t.size>0){const O=b.getState(),A=Array.from(t.values());for(const _ of A){let C=!1;try{C=_.predicate(k,O,S)}catch(I){C=!1,Jw(u,I,{raisedBy:"predicate"})}C&&p(_,k,b,N)}}}finally{S=Xw}return P},startListening:f,stopListening:h,clearListeners:g}};function _r(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var M$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},sP=rr({name:"chartLayout",initialState:M$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),kh=sP.actions,I$=kh.setMargin,T$=kh.setLayout,D$=kh.setChartSize,R$=kh.setScale,$$=sP.reducer;function lP(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function Rn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ej(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function os(e){for(var t=1;t{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&u==="middle")&&o!=="center"&&Ne(e[o]))return os(os({},e),{},{[o]:e[o]+(n||0)});if((l==="horizontal"||l==="vertical"&&o==="center")&&u!=="middle"&&Ne(e[u]))return os(os({},e),{},{[u]:e[u]+(a||0)})}return e},zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",uP=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,o,u=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate));return a||u.push(t),o||u.push(r),u},cP=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,g=e.ticks,x=e.niceTicks,b=e.axisType;if(!u)return null;var j=l==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=a==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Wr(o[0]-o[1])*2*k:k,g||x){var S=(g||x||[]).map((N,P)=>{var O=n?n.indexOf(N):N,A=u.map(O);return Be(A)?{coordinate:A+k,value:N,offset:k,index:P}:null}).filter(xr);return S}return f&&h?h.map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+k,value:N,index:P,offset:k}:null}).filter(xr):u.ticks&&p!=null?u.ticks(p).map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+k,value:N,index:P,offset:k}:null}).filter(xr):u.domain().map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+k,value:n?n[N]:N,index:P,offset:k}:null}).filter(xr)},U$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(h[0]=o,o+=x,h[1]=o):(h[0]=u,u+=x,h[1]=u)}}}},W$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},H$={sign:U$,expand:oD,none:ao,silhouette:sD,wiggle:lD,positive:W$},K$=(e,t,r)=>{var n,a=(n=H$[r])!==null&&n!==void 0?n:ao,o=aD().keys(t).value((l,f)=>Number(Tt(l,f,0))).order(pv).offset(a),u=o(e);return u.forEach((l,f)=>{l.forEach((h,p)=>{var g=Tt(e[p],t[f],0);Array.isArray(g)&&g.length===2&&Ne(g[0])&&Ne(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function G$(e){return e==null?void 0:String(e)}function tj(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(a[t.dataKey])){var l=gE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Tt(a,Kt(u)?t.dataKey:u),h=t.scale.map(f);return Ne(h)?h:null}var V$=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},q$=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Q$=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return q$(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,l=u.reduce((f,h)=>{var p=lP(h,t,r),g=V$(p);return!Be(g[0])||!Be(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},rj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=hh(t,p=>p.coordinate),o=1/0,u=1,l=a.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},X$=(e,t)=>t==="centric"?e.angle:e.radius,pi=e=>e.layout.width,mi=e=>e.layout.height,Z$=e=>e.layout.scale,fP=e=>e.layout.margin,Sh=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),J$="data-recharts-item-index",eL="data-recharts-item-id",Yu=60;function aj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;te.brush.height;function aL(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function oL(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function sL(e){var t=Sh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function lL(e){var t=Sh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=V([pi,mi,fP,iL,aL,oL,sL,lL,ME,CR],(e,t,r,n,a,o,u,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+l},x=Rd(Rd({},g),p),b=x.bottom;x.bottom+=n,x=B$(x,f,h);var j=e-x.left-x.right,k=t-x.top-x.bottom;return Rd(Rd({brushBottom:b},x),{},{width:Math.max(j,0),height:Math.max(k,0)})}),uL=V(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),hP=V(pi,mi,(e,t)=>({x:0,y:0,width:e,height:t})),cL=v.createContext(null),wr=()=>v.useContext(cL)!=null,Eh=e=>e.brush,Ph=V([Eh,Vt,fP],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ne(e.width)?e.width:t.width}));function dL(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{l&&f(),b()};let p=null;const g=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},x=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{x(),a=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=p==null;g(),u&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function fL(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let l,f=null;const h=dL(function(...x){l=e.apply(this,x),f=null},t,{edges:u}),p=function(...x){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(l=e.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,x),l)},g=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=g,p}function hL(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return fL(e,t,{leading:n,maxWait:t,trailing:a})}var kf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;oa[u++]))}},Cn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},pP=(e,t,r)=>{var n=r.width,a=n===void 0?Cn.width:n,o=r.height,u=o===void 0?Cn.height:o,l=r.aspect,f=r.maxHeight,h=oo(a)?e:Number(a),p=oo(u)?t:Number(u);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},pL={width:0,height:0,overflow:"visible"},mL={width:0,overflowX:"visible"},gL={height:0,overflowY:"visible"},vL={},yL=e=>{var t=e.width,r=e.height,n=oo(t),a=oo(r);return n&&a?pL:n?mL:a?gL:vL};function xL(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=Cn.width,o=Cn.height):a===void 0?a=n&&n>0?void 0:Cn.width:o===void 0&&(o=n&&n>0?void 0:Cn.height),{width:a,height:o}}var bL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return _L(a)?v.createElement(mP.Provider,{value:a},t):null}var Ty=()=>v.useContext(mP),ML=v.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?Cn.initialDimension:n,o=e.width,u=e.height,l=e.minWidth,f=l===void 0?Cn.minWidth:l,h=e.minHeight,p=e.maxHeight,g=e.children,x=e.debounce,b=x===void 0?Cn.debounce:x,j=e.id,k=e.className,S=e.onResize,N=e.style,P=N===void 0?{}:N,O=CL(e,bL),A=v.useRef(null),_=v.useRef();_.current=S,v.useImperativeHandle(t,()=>A.current);var C=v.useState({containerWidth:a.width,containerHeight:a.height}),I=SL(C,2),W=I[0],U=I[1],G=v.useCallback((we,pe)=>{U(F=>{var Z=Math.round(we),Q=Math.round(pe);return F.containerWidth===Z&&F.containerHeight===Q?F:{containerWidth:Z,containerHeight:Q}})},[]);v.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return Ws;var we=D=>{var T,te=D[0];if(te!=null){var ie=te.contentRect,re=ie.width,ce=ie.height;G(re,ce),(T=_.current)===null||T===void 0||T.call(_,re,ce)}};b>0&&(we=hL(we,b,{trailing:!0,leading:!1}));var pe=new ResizeObserver(we),F=A.current.getBoundingClientRect(),Z=F.width,Q=F.height;return G(Z,Q),pe.observe(A.current),()=>{pe.disconnect()}},[G,b]);var Y=W.containerWidth,$=W.containerHeight;kf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ue=pP(Y,$,{width:o,height:u,aspect:r,maxHeight:p}),J=ue.calculatedWidth,ge=ue.calculatedHeight;return kf(Y<0||$<0||J!=null&&J>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,J,ge,o,u,f,h,r),v.createElement("div",Sf({id:j?"".concat(j):void 0,className:et("recharts-responsive-container",k),style:sj(sj({},P),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:p}),ref:A},O),v.createElement("div",{style:yL({width:o,height:u})},v.createElement(gP,{width:J,height:ge},g)))}),IL=v.forwardRef((e,t)=>{var r=Ty();if(Rn(r.width)&&Rn(r.height))return e.children;var n=xL({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=pP(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),l=u.calculatedWidth,f=u.calculatedHeight;return Ne(l)&&Ne(f)?v.createElement(gP,{width:l,height:f},e.children):v.createElement(ML,Sf({},e,{width:a,height:o,ref:t}))});function Dy(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Ah=()=>{var e,t=wr(),r=Ce(uL),n=Ce(Ph),a=(e=Ce(Eh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},TL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},vP=()=>{var e;return(e=Ce(Vt))!==null&&e!==void 0?e:TL},yP=()=>Ce(pi),xP=()=>Ce(mi),ut=e=>e.layout.layoutType,Hs=()=>Ce(ut),Ry=()=>{var e=Hs();if(e==="horizontal"||e==="vertical")return e},bP=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},DL=()=>{var e=Hs();return e!==void 0},Xu=e=>{var t=jt(),r=wr(),n=e.width,a=e.height,o=Ty(),u=n,l=a;return o&&(u=o.width>0?o.width:n,l=o.height>0?o.height:a),v.useEffect(()=>{!r&&Rn(u)&&Rn(l)&&t(D$({width:u,height:l}))},[t,r,u,l]),null},wP=Symbol.for("immer-nothing"),uj=Symbol.for("immer-draftable"),Ir=Symbol.for("immer-state");function un(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cu=Object.getPrototypeOf;function Ts(e){return!!e&&!!e[Ir]}function lo(e){var t;return e?jP(e)||Array.isArray(e)||!!e[uj]||!!((t=e.constructor)!=null&&t[uj])||Zu(e)||Oh(e):!1}var RL=Object.prototype.constructor.toString(),cj=new WeakMap;function jP(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=cj.get(r);return n===void 0&&(n=Function.toString.call(r),cj.set(r,n)),n===RL}function Nf(e,t,r=!0){Ch(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Ch(e){const t=e[Ir];return t?t.type_:Array.isArray(e)?1:Zu(e)?2:Oh(e)?3:0}function Cv(e,t){return Ch(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kP(e,t,r){const n=Ch(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function $L(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zu(e){return e instanceof Map}function Oh(e){return e instanceof Set}function $a(e){return e.copy_||e.base_}function Ov(e,t){if(Zu(e))return new Map(e);if(Oh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=jP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ir];let a=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:$d,add:$d,clear:$d,delete:$d}),Object.freeze(e),t&&Object.values(e).forEach(r=>$y(r,!0))),e}function LL(){un(2)}var $d={value:LL};function _h(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var zL={};function uo(e){const t=zL[e];return t||un(0,e),t}var Ou;function SP(){return Ou}function FL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function dj(e,t){t&&(uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _v(e){Mv(e),e.drafts_.forEach(BL),e.drafts_=null}function Mv(e){e===Ou&&(Ou=e.parent_)}function fj(e){return Ou=FL(Ou,e)}function BL(e){const t=e[Ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ir].modified_&&(_v(t),un(4)),lo(e)&&(e=Ef(t,e),t.parent_||Pf(t,e)),t.patches_&&uo("Patches").generateReplacementPatches_(r[Ir].base_,e,t.patches_,t.inversePatches_)):e=Ef(t,r,[]),_v(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wP?e:void 0}function Ef(e,t,r){if(_h(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Ir];if(!a)return Nf(t,(o,u)=>pj(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Pf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,l=!1;a.type_===3&&(u=new Set(o),o.clear(),l=!0),Nf(u,(f,h)=>pj(e,a,o,f,h,r,l),n),Pf(e,o,!1),r&&e.patches_&&uo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function pj(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const l=_h(a);if(!(l&&!u)){if(Ts(a)){const f=o&&t&&t.type_!==3&&!Cv(t.assigned_,n)?o.concat(n):void 0,h=Ef(e,a,f);if(kP(r,n,h),Ts(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(lo(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;Ef(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Zu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Pf(e,a)}}}function Pf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$y(t,r)}function UL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:SP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Ly;r&&(a=[n],o=_u);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,l}var Ly={get(e,t){if(t===Ir)return e;const r=$a(e);if(!Cv(r,t))return WL(e,r,t);const n=r[t];return e.finalized_||!lo(n)?n:n===sg(e.base_,t)?(lg(e),e.copy_[t]=Tv(n,e)):n},has(e,t){return t in $a(e)},ownKeys(e){return Reflect.ownKeys($a(e))},set(e,t,r){const n=NP($a(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=sg($a(e),t),o=a==null?void 0:a[Ir];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if($L(r,a)&&(r!==void 0||Cv(e.base_,t)))return!0;lg(e),Iv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return sg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lg(e),Iv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=$a(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){un(11)},getPrototypeOf(e){return Cu(e.base_)},setPrototypeOf(){un(12)}},_u={};Nf(Ly,(e,t)=>{_u[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});_u.deleteProperty=function(e,t){return _u.set.call(this,e,t,void 0)};_u.set=function(e,t,r){return Ly.set.call(this,e[0],t,r,e[0])};function sg(e,t){const r=e[Ir];return(r?$a(r):e)[t]}function WL(e,t,r){var a;const n=NP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function NP(e,t){if(!(t in e))return;let r=Cu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Cu(r)}}function Iv(e){e.modified_||(e.modified_=!0,e.parent_&&Iv(e.parent_))}function lg(e){e.copy_||(e.copy_=Ov(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var HL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&un(6),n!==void 0&&typeof n!="function"&&un(7);let a;if(lo(t)){const o=fj(this),u=Tv(t,void 0);let l=!0;try{a=r(u),l=!1}finally{l?_v(o):Mv(o)}return dj(o,n),hj(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===wP&&(a=void 0),this.autoFreeze_&&$y(a,!0),n){const o=[],u=[];uo("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else un(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,f=>t(f,...l));let n,a;return[this.produce(t,r,(u,l)=>{n=u,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){lo(e)||un(8),Ts(e)&&(e=KL(e));const t=fj(this),r=Tv(e,void 0);return r[Ir].isManual_=!0,Mv(t),r}finishDraft(e,t){const r=e&&e[Ir];(!r||!r.isManual_)&&un(9);const{scope_:n}=r;return dj(n,t),hj(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=uo("Patches").applyPatches_;return Ts(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Tv(e,t){const r=Zu(e)?uo("MapSet").proxyMap_(e,t):Oh(e)?uo("MapSet").proxySet_(e,t):UL(e,t);return(t?t.scope_:SP()).drafts_.push(r),r}function KL(e){return Ts(e)||un(10,e),EP(e)}function EP(e){if(!lo(e)||_h(e))return e;const t=e[Ir];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ov(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ov(e,!0);return Nf(r,(a,o)=>{kP(r,a,EP(o))},n),t&&(t.finalized_=!1),r}var GL=new HL;GL.produce;var VL={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},PP=rr({name:"legend",initialState:VL,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:at()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:at()},removeLegendPayload:{reducer(e,t){var r=Hr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:at()}}}),Ju=PP.actions;Ju.setLegendSize;Ju.setLegendSettings;var qL=Ju.addLegendPayload,QL=Ju.replaceLegendPayload,YL=Ju.removeLegendPayload,XL=PP.reducer,ug={exports:{}},cg={};/** + * @license React + * use-sync-external-store-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 mj;function ZL(){if(mj)return cg;mj=1;var e=Bs();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,l=e.useDebugValue;return cg.useSyncExternalStoreWithSelector=function(f,h,p,g,x){var b=a(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=u(function(){function S(_){if(!N){if(N=!0,P=_,_=g(_),x!==void 0&&j.hasValue){var C=j.value;if(x(C,_))return O=C}return O=_}if(C=O,r(P,_))return C;var I=g(_);return x!==void 0&&x(C,I)?(P=_,C):(P=_,O=I)}var N=!1,P,O,A=p===void 0?null:p;return[function(){return S(h())},A===null?void 0:function(){return S(A())}]},[h,p,g,x]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),l(k),k},cg}var gj;function JL(){return gj||(gj=1,ug.exports=ZL()),ug.exports}JL();function ez(e){e()}function tz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ez(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var vj={notify(){},get:()=>[]};function rz(e,t){let r,n=vj,a=0,o=!1;function u(k){p();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function l(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function p(){a++,r||(r=e.subscribe(f),n=tz())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=vj)}function x(){o||(o=!0,p())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>n};return j}var nz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iz=nz(),az=()=>typeof navigator<"u"&&navigator.product==="ReactNative",oz=az(),sz=()=>iz||oz?v.useLayoutEffect:v.useEffect,lz=sz();function yj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function uz(e,t){if(yj(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a{const f=rz(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=v.useMemo(()=>a.getState(),[a]);lz(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const l=r||dz;return v.createElement(l.Provider,{value:o},t)}var hz=fz,pz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function mz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Mh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(pz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!uz(e[n],t[n]))return!1}else if(!mz(e[n],t[n]))return!1;return!0}function Dv(){return Dv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Yo.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?Yo.labelStyle:o,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,g=e.labelClassName,x=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?Yo.accessibilityLayer:j,S=()=>{if(l&&l.length){var W={padding:0,margin:0},U=Nz(l,h),G=U.map((Y,$)=>{if(!Y||Y.type==="none")return null;var ue=Y.formatter||f||Sz,J=Y.value,ge=Y.name,we=J,pe=ge;if(ue){var F=ue(J,ge,Y,$,l);if(Array.isArray(F)){var Z=xz(F,2);we=Z[0],pe=Z[1]}else if(F!=null)we=F;else return null}var Q=Xl(Xl({},Yo.itemStyle),{},{color:Y.color||Yo.itemStyle.color},a);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:Q},Dn(pe)?v.createElement("span",{className:"recharts-tooltip-item-name"},pe):null,Dn(pe)?v.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,v.createElement("span",{className:"recharts-tooltip-item-value"},we),v.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:W},G)}return null},N=Xl(Xl({},Yo.contentStyle),n),P=Xl({margin:0},u),O=!Kt(x),A=O?x:"",_=et("recharts-default-tooltip",p),C=et("recharts-tooltip-label",g);O&&b&&l!==void 0&&l!==null&&(A=b(x,l));var I=k?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",Dv({className:_,style:N},I),v.createElement("p",{className:C,style:P},v.isValidElement(A)?A:"".concat(A)),S())},Zl="recharts-tooltip-wrapper",Pz={visibility:"hidden"};function Az(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return et(Zl,{["".concat(Zl,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(Zl,"-left")]:Ne(r)&&t&&Ne(t.x)&&r=t.y,["".concat(Zl,"-top")]:Ne(n)&&t&&Ne(t.y)&&n0?a:0),g=r[n]+a;if(t[n])return u[n]?p:g;var x=f[n];if(x==null)return 0;if(u[n]){var b=p,j=x;return bS?Math.max(p,x):Math.max(g,x)}function Cz(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Oz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,g,x;return l.height>0&&l.width>0&&r?(g=wj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),x=wj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=Cz({translateX:g,translateY:x,useTranslate3d:f})):p=Pz,{cssProperties:p,cssClasses:Az({translateX:g,translateY:x,coordinate:r})}}var _z=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ec={isSsr:_z()};function Mz(e,t){return Rz(e)||Dz(e,t)||Tz(e,t)||Iz()}function Iz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tz(e,t){if(e){if(typeof e=="string")return jj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jj(e,t):void 0}}function jj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rec.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=Mz(e,2),r=t[0],n=t[1];return v.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function kj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=Fz(f,2),p=h[0],g=h[1];v.useEffect(()=>{var N=P=>{if(P.key==="Escape"){var O,A,_,C;g({dismissed:!0,dismissedAtCoordinate:{x:(O=(A=e.coordinate)===null||A===void 0?void 0:A.x)!==null&&O!==void 0?O:0,y:(_=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==p.dismissedAtCoordinate.y)&&g(Xo(Xo({},p),{},{dismissed:!1}));var x=Oz({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=x.cssClasses,j=x.cssProperties,k=e.hasPortalFromProps?{}:Xo(Xo({transition:Kz({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=Xo(Xo({},k),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var Vz=v.memo(Gz),CP=()=>{var e;return(e=Ce(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;tBe(e.x)&&Be(e.y),Aj=e=>e.base!=null&&Af(e.base)&&Af(e),Jl=e=>e.x,eu=e=>e.y,Xz=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Sy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Pj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Pj[r]||dh},Cj={connectNulls:!1,type:"linear"},Zz=e=>{var t=e.type,r=t===void 0?Cj.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,l=e.connectNulls,f=l===void 0?Cj.connectNulls:l,h=Xz(r,u),p=f?a.filter(Af):a;if(Array.isArray(o)){var g,x=a.map((N,P)=>Ej(Ej({},N),{},{base:o[P]}));u==="vertical"?g=Od().y(eu).x1(Jl).x0(N=>N.base.x):g=Od().x(Jl).y1(eu).y0(N=>N.base.y);var b=g.defined(Aj).curve(h),j=f?x.filter(Aj):x;return b(j)}var k;u==="vertical"&&Ne(o)?k=Od().y(eu).x1(Jl).x0(o):Ne(o)?k=Od().x(Jl).y1(eu).y0(o):k=iE().x(Jl).y(eu);var S=k.defined(Af).curve(h);return S(p)},rf=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=Hs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},l=r&&r.length?Zz(u):n;return v.createElement("path",Rv({},dn(e),Ny(e),{className:et("recharts-curve",t),d:l===null?void 0:l,ref:a}))},Jz=["x","y","top","left","width","height","className"];function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),s6=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,g=e.height,x=g===void 0?0:g,b=e.className,j=i6(e,Jz),k=e6({x:r,y:a,top:u,left:f,width:p,height:x},j);return!Ne(r)||!Ne(a)||!Ne(p)||!Ne(x)||!Ne(u)||!Ne(f)?null:v.createElement("path",$v({},Gr(k),{className:et("recharts-cross",b),d:o6(r,a,p,x,u,f)}))};function l6(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Cf=1e-4,OP=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],_P=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),_j=(e,t)=>r=>{var n=OP(e,t);return _P(n,r)},u6=(e,t)=>r=>{var n=OP(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return _P(a,r)},c6=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},d6=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=_j(e,r),o=_j(t,n),u=u6(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,x=0;x<8;++x){var b=a(g)-p,j=u(g);if(Math.abs(b-p)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,l=u===void 0?16.67:u,f=1,h=[0],p=0,g=0,x=1e4,b=0;b{var P,O,A;if(N<=0)return 0;if(N>=1)return f;var _=N*S,C=Math.floor(_),I=_-C;return((P=h[C])!==null&&P!==void 0?P:0)+(((O=h[C+1])!==null&&O!==void 0?O:0)-((A=h[C])!==null&&A!==void 0?A:0))*I}},p6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Mj(e);case"spring":return h6();default:if(e.split("(")[0]==="cubic-bezier")return Mj(e)}return typeof e=="function"?e:null},m6=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},MP=v.createContext(m6);MP.Provider;function g6(e){var t=v.useContext(MP);return v.useMemo(()=>e??t,[e,t])}function v6(e,t,r){return(t=y6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y6(e){var t=x6(e,"string");return typeof t=="symbol"?t:t+""}function x6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ij="init",Tj="pending",Dj="active",b6="completed";function hg(e){return Math.max(0,e)}class w6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;v6(this,"state",Ij),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=hg(t.animationDuration),this.animationBegin=hg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Ij)return this.state=Tj,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Tj){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Dj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):hg(this.animationBegin-r)}if(this.getState()===Dj){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=b6}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class j6 extends w6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ni(this.getFrom(),this.getTo(),this.getProgress()))}}class k6{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function S6(e,t){return A6(e)||P6(e,t)||E6(e,t)||N6()}function N6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E6(e,t){if(e){if(typeof e=="string")return Rj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rj(e,t):void 0}}function Rj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},$j=0,pg=1;function IP(e){var t=Qr(e,C6),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,g=AP(),x=n==="auto"?!ec.isSsr&&!g:n,b=g6(t.animationController),j=v.useState(x?$j:pg),k=S6(j,2),S=k[0],N=k[1];return v.useEffect(()=>{x||N(pg)},[x]),v.useEffect(()=>{var P=p6(u);if(!x||!a||P==null)return Ws;var O=new k6,A=new j6({animationId:r,easing:P,animationDuration:o,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:$j,to:pg});return b(O,A,N)},[b,r,x,a,o,u,l,h,f]),p(Number(S))}function TP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Nu(t)),n=v.useRef(e);return n.current!==e&&(r.current=Nu(t),n.current=e),r.current}var O6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),_6=(e,t,r)=>e.map(n=>"".concat(O6(n)," ").concat(t,"ms ").concat(r)).join(","),M6=["radius"],I6=["radius"],Lj,zj,Fj,Bj,Uj,Wj,Hj,Kj,Gj,Vj;function qj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=aa(r),u=aa(n),l=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,p=u>=0&&o>=0||u<0&&o<0?1:0,g;if(l>0&&Array.isArray(a)){for(var x=[0,0,0,0],b=0,j=4;bl?l:S}g=Bt(Lj||(Lj=wn(["M",",",""])),e,t+f*x[0]),x[0]>0&&(g+=Bt(zj||(zj=wn(["A ",",",",0,0,",",",",",""])),x[0],x[0],p,e+h*x[0],t)),g+=Bt(Fj||(Fj=wn(["L ",",",""])),e+r-h*x[1],t),x[1]>0&&(g+=Bt(Bj||(Bj=wn(["A ",",",",0,0,",`, + `,",",""])),x[1],x[1],p,e+r,t+f*x[1])),g+=Bt(Uj||(Uj=wn(["L ",",",""])),e+r,t+n-f*x[2]),x[2]>0&&(g+=Bt(Wj||(Wj=wn(["A ",",",",0,0,",`, + `,",",""])),x[2],x[2],p,e+r-h*x[2],t+n)),g+=Bt(Hj||(Hj=wn(["L ",",",""])),e+h*x[3],t+n),x[3]>0&&(g+=Bt(Kj||(Kj=wn(["A ",",",",0,0,",`, + `,",",""])),x[3],x[3],p,e,t+n-f*x[3])),g+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);g=Bt(Gj||(Gj=wn(["M ",",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else g=Bt(Vj||(Vj=wn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},Jj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},W6=e=>{var t=Qr(e,Jj),r=v.useRef(null),n=v.useState(-1),a=L6(n,2),o=a[0],u=a[1];v.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var F=r.current.getTotalLength();F&&u(F)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,g=t.radius,x=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,P=v.useRef(h),O=v.useRef(p),A=v.useRef(l),_=v.useRef(f),C=v.useMemo(()=>({x:l,y:f,width:h,height:p,radius:g}),[l,f,h,p,g]),I=TP(C,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var W=et("recharts-rectangle",x);if(!N){var U=Gr(t);U.radius;var G=Yj(U,M6);return v.createElement("path",Of({},G,{x:aa(l),y:aa(f),width:aa(h),height:aa(p),radius:typeof g=="number"?g:void 0,className:W,d:Zj(l,f,h,p,g)}))}var Y=P.current,$=O.current,ue=A.current,J=_.current,ge="0px ".concat(o===-1?1:o,"px"),we="".concat(o,"px ").concat(o,"px"),pe=_6(["strokeDasharray"],j,typeof b=="string"?b:Jj.animationEasing);return v.createElement(IP,{animationId:I,key:I,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},F=>{var Z=ni(Y,h,F),Q=ni($,p,F),D=ni(ue,l,F),T=ni(J,f,F);r.current&&(P.current=Z,O.current=Q,A.current=D,_.current=T);var te;S?F>0?te={transition:pe,strokeDasharray:we}:te={strokeDasharray:ge}:te={strokeDasharray:we};var ie=Gr(t);ie.radius;var re=Yj(ie,I6);return v.createElement("path",Of({},re,{radius:typeof g=="number"?g:void 0,className:W,d:Zj(D,T,Z,Q,g),ref:r,style:Qj(Qj({},te),t.style)}))})};function ek(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tk(e){for(var t=1;te*180/Math.PI,Ht=(e,t,r,n)=>({x:e+Math.cos(-_f*n)*r,y:t+Math.sin(-_f*n)*r}),q6=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Q6=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},Y6=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=Q6({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var l=(r-a)/u,f=Math.acos(l);return n>o&&(f=2*Math.PI-f),{radius:u,angle:V6(f),angleInRadian:f}},X6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},Z6=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},J6=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=Y6({x:r,y:n},t),o=a.radius,u=a.angle,l=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=X6(t),p=h.startAngle,g=h.endAngle,x=u,b;if(p<=g){for(;x>g;)x-=360;for(;x=p&&x<=g}else{for(;x>p;)x-=360;for(;x=g&&x<=p}return b?tk(tk({},t),{},{radius:o,angle:Z6(x,t)}):null};function DP(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Ht(t,r,n,a),l=Ht(t,r,n,o);return{points:[u,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var rk,nk,ik,ak,ok,sk,lk;function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Wr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Ld=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(u?1:-1)+n,p=Math.asin(l/h)/_f,g=f?a:a+o*p,x=Ht(t,r,h,g),b=Ht(t,r,n,g),j=f?a-o*p:a,k=Ht(t,r,h*Math.cos(p*_f),j);return{center:x,circleTangency:b,lineTangency:k,theta:p}},RP=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,l=eF(o,u),f=o+l,h=Ht(t,r,a,o),p=Ht(t,r,a,f),g=Bt(rk||(rk=Ba(["M ",",",` + A `,",",`,0, + `,",",`, + `,",",` + `])),h.x,h.y,a,a,+(Math.abs(l)>180),+(o>f),p.x,p.y);if(n>0){var x=Ht(t,r,n,o),b=Ht(t,r,n,f);g+=Bt(nk||(nk=Ba(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(o<=f),x.x,x.y)}else g+=Bt(ik||(ik=Ba(["L ",","," Z"])),t,r);return g},tF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=Wr(h-f),g=Ld({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:l}),x=g.circleTangency,b=g.lineTangency,j=g.theta,k=Ld({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:l}),S=k.circleTangency,N=k.lineTangency,P=k.theta,O=l?Math.abs(f-h):Math.abs(f-h)-j-P;if(O<0)return u?Bt(ak||(ak=Ba(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),b.x,b.y,o,o,o*2,o,o,-o*2):RP({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var A=Bt(ok||(ok=Ba(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),b.x,b.y,o,o,+(p<0),x.x,x.y,a,a,+(O>180),+(p<0),S.x,S.y,o,o,+(p<0),N.x,N.y);if(n>0){var _=Ld({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),C=_.circleTangency,I=_.lineTangency,W=_.theta,U=Ld({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),G=U.circleTangency,Y=U.lineTangency,$=U.theta,ue=l?Math.abs(f-h):Math.abs(f-h)-W-$;if(ue<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=Bt(sk||(sk=Ba(["L",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(p<0),G.x,G.y,n,n,+(ue>180),+(p>0),C.x,C.y,o,o,+(p<0),I.x,I.y)}else A+=Bt(lk||(lk=Ba(["L",",","Z"])),t,r);return A},rF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},nF=e=>{var t=Qr(e,rF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,g=t.className;if(o0&&Math.abs(h-p)<360?k=tF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):k=RP({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),v.createElement("path",Lv({},Gr(t),{className:x,d:k}))};function iF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(vE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,l=t.angle,f=Ht(n,a,o,l),h=Ht(n,a,u,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return DP(t)}}function aF(e){return _E(e)?NaN:Number(e)}function mg(e){return e?(e=aF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function $P(e,t,r){r&&typeof r!="number"&&yv(e,t,r)&&(t=r=void 0),e=mg(e),t===void 0?(t=e,e=0):t=mg(t),r=r===void 0?ee.chartData,zy=V([pn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ih=(e,t,r,n)=>n?zy(e):pn(e),oF=(e,t,r)=>r?zy(e):pn(e),sF=V([Ih],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});V([zy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var lF=V([pn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Fy(e,t){return fF(e)||dF(e,t)||cF(e,t)||uF()}function uF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cF(e,t){if(e){if(typeof e=="string")return uk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uk(e,t):void 0}}function uk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return li(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Ye(li(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return bt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Cr))throw Error(qr+"NaN");if(r.s<1)throw Error(qr+(r.s?"NaN":"-Infinity"));return r.eq(Cr)?new n(0):(lt=!1,t=li(Mu(r,o),Mu(e,o),o),lt=!0,Ye(t,a))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?UP(t,e):FP(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(qr+"NaN");return r.s?(lt=!1,t=li(r,e,0,1).times(e),lt=!0,r.minus(t)):Ye(new n(r),a)};be.naturalExponential=be.exp=function(){return BP(this)};be.naturalLogarithm=be.ln=function(){return Mu(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FP(t,e):UP(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(to+e);if(t=bt(a)+1,n=a.d.length-1,r=n*ot+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,a,o,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(qr+"NaN")}for(e=bt(l),lt=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=On(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Gs((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(li(l,o,u+2)).times(.5),On(o.d).slice(0,u)===(t=On(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Ye(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;u+=4}return lt=!0,Ye(n,r)};be.times=be.mul=function(e){var t,r,n,a,o,u,l,f,h,p=this,g=p.constructor,x=p.d,b=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,f=x.length,h=b.length,f=0;){for(t=0,a=f+n;a>n;)l=o[a]+b[n]*x[a-n-1]+t,o[a--]=l%It|0,t=l/It|0;o[a]=(o[a]+t)%It|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,lt?Ye(e,g.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:($n(e,0,Ks),t===void 0?t=n.rounding:$n(t,0,8),Ye(r,e+bt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=co(n,!0):($n(e,0,Ks),t===void 0?t=a.rounding:$n(t,0,8),n=Ye(new a(n),e+1,t),r=co(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?co(a):($n(e,0,Ks),t===void 0?t=o.rounding:$n(t,0,8),n=Ye(new o(a),e+bt(a)+1,t),r=co(n.abs(),!1,e+bt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),bt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,a,o,u,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Cr);if(l=new f(l),!l.s){if(e.s<1)throw Error(qr+"Infinity");return l}if(l.eq(Cr))return l;if(n=f.precision,e.eq(Cr))return Ye(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=l.s,u){if((r=p<0?-p:p)<=zP){for(a=new f(Cr),t=Math.ceil(n/ot+4),lt=!1;r%2&&(a=a.times(l),fk(a.d,t)),r=Gs(r/2),r!==0;)l=l.times(l),fk(l.d,t);return lt=!0,e.s<0?new f(Cr).div(a):Ye(a,n)}}else if(o<0)throw Error(qr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,lt=!1,a=e.times(Mu(l,n+h)),lt=!0,a=BP(a),a.s=o,a};be.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=bt(a),n=co(a,r<=o.toExpNeg||r>=o.toExpPos)):($n(e,1,Ks),t===void 0?t=o.rounding:$n(t,0,8),a=Ye(new o(a),e,t),r=bt(a),n=co(a,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):($n(e,1,Ks),t===void 0?t=n.rounding:$n(t,0,8)),Ye(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),r=e.constructor;return co(e,t<=r.toExpNeg||t>=r.toExpPos)};function FP(e,t){var r,n,a,o,u,l,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),lt?Ye(t,g):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,l=h.length):(n=h,a=u,l=f.length),u=Math.ceil(g/ot),l=u>l?u+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=h.length,l-o<0&&(o=l,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/It|0,f[o]%=It;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,lt?Ye(t,g):t}function $n(e,t,r){if(e!==~~e||er)throw Error(to+e)}function On(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;tu?1:-1;else for(l=f=0;la[l]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]1;)n.shift()}return function(n,a,o,u){var l,f,h,p,g,x,b,j,k,S,N,P,O,A,_,C,I,W,U=n.constructor,G=n.s==a.s?1:-1,Y=n.d,$=a.d;if(!n.s)return new U(n);if(!a.s)throw Error(qr+"Division by zero");for(f=n.e-a.e,I=$.length,_=Y.length,b=new U(G),j=b.d=[],h=0;$[h]==(Y[h]||0);)++h;if($[h]>(Y[h]||0)&&--f,o==null?P=o=U.precision:u?P=o+(bt(n)-bt(a))+1:P=o,P<0)return new U(0);if(P=P/ot+2|0,h=0,I==1)for(p=0,$=$[0],P++;(h<_||p)&&P--;h++)O=p*It+(Y[h]||0),j[h]=O/$|0,p=O%$|0;else{for(p=It/($[0]+1)|0,p>1&&($=e($,p),Y=e(Y,p),I=$.length,_=Y.length),A=I,k=Y.slice(0,I),S=k.length;S=It/2&&++C;do p=0,l=t($,k,I,S),l<0?(N=k[0],I!=S&&(N=N*It+(k[1]||0)),p=N/C|0,p>1?(p>=It&&(p=It-1),g=e($,p),x=g.length,S=k.length,l=t(g,k,x,S),l==1&&(p--,r(g,I16)throw Error(By+bt(e));if(!e.s)return new p(Cr);for(lt=!1,l=g,u=new p(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(La(2,h))/Math.LN10*2+5|0,l+=n,r=a=o=new p(Cr),p.precision=l;;){if(a=Ye(a.times(e),l),r=r.times(++f),u=o.plus(li(a,r,l)),On(u.d).slice(0,l)===On(o.d).slice(0,l)){for(;h--;)o=Ye(o.times(o),l);return p.precision=g,t==null?(lt=!0,Ye(o,g)):o}o=u}}function bt(e){for(var t=e.e*ot,r=e.d[0];r>=10;r/=10)t++;return t}function gg(e,t,r){if(t>e.LN10.sd())throw lt=!0,r&&(e.precision=r),Error(qr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function qi(e){for(var t="";e--;)t+="0";return t}function Mu(e,t){var r,n,a,o,u,l,f,h,p,g=1,x=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(qr+(b.s?"NaN":"-Infinity"));if(b.eq(Cr))return new k(0);if(t==null?(lt=!1,h=S):h=t,b.eq(10))return t==null&&(lt=!0),gg(k,h);if(h+=x,k.precision=h,r=On(j),n=r.charAt(0),o=bt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=On(b.d),n=r.charAt(0),g++;o=bt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=gg(k,h+2,S).times(o+""),b=Mu(new k(n+"."+r.slice(1)),h-x).plus(f),k.precision=S,t==null?(lt=!0,Ye(b,S)):b;for(l=u=b=li(b.minus(Cr),b.plus(Cr),h),p=Ye(b.times(b),h),a=3;;){if(u=Ye(u.times(p),h),f=l.plus(li(u,new k(a),h)),On(f.d).slice(0,h)===On(l.d).slice(0,h))return l=l.times(2),o!==0&&(l=l.plus(gg(k,h+2,S).times(o+""))),l=li(l,new k(g),h),k.precision=S,t==null?(lt=!0,Ye(l,S)):l;l=f,a+=2}}function dk(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Gs(r/ot),e.d=[],n=(r+1)%ot,r<0&&(n+=ot),nMf||e.e<-Mf))throw Error(By+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,a,o,u,l,f,h,p,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=ot,a=t,h=g[p=0];else{if(p=Math.ceil((n+1)/ot),o=g.length,p>=o)return e;for(h=o=g[p],u=1;o>=10;o/=10)u++;n%=ot,a=n-ot+u}if(r!==void 0&&(o=La(10,u-a-1),l=h/o%10|0,f=t<0||g[p+1]!==void 0||h%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/La(10,u-a):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=bt(e),g.length=1,t=t-o-1,g[0]=La(10,(ot-t%ot)%ot),e.e=Gs(-t/ot)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,o=1,p--):(g.length=p+1,o=La(10,ot-n),g[p]=a>0?(h/La(10,u-a)%La(10,a)|0)*o:0),f)for(;;)if(p==0){(g[0]+=o)==It&&(g[0]=1,++e.e);break}else{if(g[p]+=o,g[p]!=It)break;g[p--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(lt&&(e.e>Mf||e.e<-Mf))throw Error(By+bt(e));return e}function UP(e,t){var r,n,a,o,u,l,f,h,p,g,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),lt?Ye(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(p=u<0,p?(r=f,u=-u,l=g.length):(r=g,n=h,l=f.length),a=Math.max(Math.ceil(b/ot),l)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=g.length,p=a0;--a)f[l++]=0;for(a=g.length;a>u;){if(f[--a]0?o=o.charAt(0)+"."+o.slice(1)+qi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+qi(-a-1)+o,r&&(n=r-u)>0&&(o+=qi(n))):a>=u?(o+=qi(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+qi(n))):((n=a+1)0&&(a+1===u&&(o+="."),o+=qi(n))),e.s<0?"-"+o:o}function fk(e,t){if(e.length>t)return e.length=t,!0}function WP(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(to+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return dk(u,o.toString())}else if(typeof o!="string")throw Error(to+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,mF.test(o))dk(u,o);else throw Error(to+o)}if(a.prototype=be,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=WP,a.config=a.set=gF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(to+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(to+r+": "+n);return this}var Uy=WP(pF);Cr=new Uy(1);const We=Uy;function HP(e){var t;return e===0?t=1:t=Math.floor(new We(e).abs().log(10).toNumber())+1,t}function KP(e,t,r){for(var n=new We(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Iu(e,t){return bF(e)||xF(e,t)||yF(e,t)||vF()}function vF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yF(e,t){if(e){if(typeof e=="string")return hk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hk(e,t):void 0}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Iu(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},Wy=(e,t,r)=>{if(e.lte(0))return new We(0);var n=HP(e.toNumber()),a=new We(10).pow(n),o=e.div(a),u=n!==1?.05:.1,l=new We(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=l.mul(a);return t?new We(f.toNumber()):new We(Math.ceil(f.toNumber()))},VP=(e,t,r)=>{var n;if(e.lte(0))return new We(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new We(o).abs().log(10).toNumber()),l=new We(10).pow(u),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new We(10).pow(p))}var g=(n=a[h])!==null&&n!==void 0?n:1,x=new We(g).mul(l);return t?x:new We(Math.ceil(x.toNumber()))},wF=(e,t,r)=>{var n=new We(1),a=new We(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new We(10).pow(HP(e)-1),a=new We(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new We(Math.floor(e)))}else e===0?a=new We(Math.floor((t-1)/2)):r||(a=new We(Math.floor(e)));for(var u=Math.floor((t-1)/2),l=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Wy;if(!Number.isFinite((r-t)/(n-1)))return{step:new We(0),tickMin:new We(0),tickMax:new We(0)};var l=u(new We(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new We(0):(f=new We(t).add(r).div(2),f=f.sub(new We(f).mod(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new We(r).sub(f).div(l).toNumber()),g=h+p+1;return g>n?qP(t,r,n,a,o+1,u):(g0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:l,tickMin:f.sub(new We(h).mul(l)),tickMax:f.add(new We(p).mul(l))})},pk=function(t){var r=Iu(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=GP([n,a]),p=Iu(h,2),g=p[0],x=p[1];if(g===-1/0||x===1/0){var b=x===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),x];return n>a?b.reverse():b}if(g===x)return wF(g,o,u);var j=l==="snap125"?VP:Wy,k=qP(g,x,f,u,0,j),S=k.step,N=k.tickMin,P=k.tickMax,O=KP(N,P.add(new We(.1).mul(S)),S);return n>a?O.reverse():O},mk=function(t,r){var n=Iu(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=GP([a,o]),h=Iu(f,2),p=h[0],g=h[1];if(p===-1/0||g===1/0)return[a,o];if(p===g)return[p];var x=l==="snap125"?VP:Wy,b=Math.max(r,2),j=x(new We(g).sub(p).div(b-1),u,0),k=[...KP(new We(p),new We(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),a>o?k.reverse():k},jF=e=>e.rootProps.barCategoryGap,Th=e=>e.rootProps.stackOffset,QP=e=>e.rootProps.reverseStackOrder,Hy=e=>e.options.chartName,Ky=e=>e.rootProps.syncId,YP=e=>e.rootProps.syncMethod,Gy=e=>e.options.eventEmitter,kF=e=>e.rootProps.baseValue,or={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_a={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},jn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Dh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Rh(e,t,r){if(r!=="auto")return r;if(e!=null)return zn(e,t)?"category":"number"}function gk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function If(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Vy=V([PF,bP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Rh(t,"angleAxis",vk.type))!==null&&r!==void 0?r:"category";return If(If({},vk),{},{type:n})}),AF=(e,t)=>e.polarAxis.radiusAxis[t],qy=V([AF,bP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Rh(t,"radiusAxis",yk.type))!==null&&r!==void 0?r:"category";return If(If({},yk),{},{type:n})}),$h=e=>e.polarOptions,Qy=V([pi,mi,Vt],q6),XP=V([$h,Qy],(e,t)=>{if(e!=null)return da(e.innerRadius,t,0)}),ZP=V([$h,Qy],(e,t)=>{if(e!=null)return da(e.outerRadius,t,t*.8)}),CF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},JP=V([$h],CF);V([Vy,JP],Dh);var eA=V([Qy,XP,ZP],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([qy,eA],Dh);var tA=V([ut,$h,XP,ZP,pi,mi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:da(u,a,a/2),cy:da(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Dt=(e,t)=>t,Lh=(e,t,r)=>r;function Yy(e){return e==null?void 0:e.id}function rA(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var g=Yy(f);p.forEach((x,b)=>{var j=u==null||o?b:String(Tt(x,u,null)),k=Tt(x,f.dataKey,0),S;l.has(j)?S=l.get(j):S={},Object.assign(S,{[g]:k}),l.set(j,S)})}}),Array.from(l.values())}function Xy(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var zh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Fh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function OF(e,t){if(e.length===t.length){for(var r=0;r{var t=ut(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Vs=e=>e.tooltip.settings.axisId;function Zy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],l=a[1];return u<=l?o>=u&&o<=l:o>=l&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var l=e(o);if(l!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var _F=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Mn(t)){for(var r,n,a=0;an)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function la(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function MF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Jy(e){let t,r,n;e.length!==2?(t=la,r=(l,f)=>la(e(l),f),n=(l,f)=>e(l)-f):(t=e===la||e===MF?e:IF,r=e,n=e);function a(l,f,h=0,p=l.length){if(h>>1;r(l[g],f)<0?h=g+1:p=g}while(h>>1;r(l[g],f)<=0?h=g+1:p=g}while(hh&&n(l[g-1],f)>-n(l[g],f)?g-1:g}return{left:a,center:u,right:o}}function IF(){return 0}function nA(e){return e===null?NaN:+e}function*TF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const DF=Jy(la),tc=DF.right;Jy(nA).center;class xk extends Map{constructor(t,r=LF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(bk(this,t))}has(t){return super.has(bk(this,t))}set(t,r){return super.set(RF(this,t),r)}delete(t){return super.delete($F(this,t))}}function bk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function RF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function $F({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function LF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zF(e=la){if(e===la)return iA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const FF=Math.sqrt(50),BF=Math.sqrt(10),UF=Math.sqrt(2);function Tf(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=FF?10:o>=BF?5:o>=UF?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/u,l=Math.round(e*h),f=Math.round(t*h),l/ht&&--f,h=-h):(h=Math.pow(10,a)*u,l=Math.round(e/h),f=Math.round(t/h),l*ht&&--f),f0))return[];if(e===t)return[e];const n=t=a))return[];const l=o-a+1,f=new Array(l);if(n)if(u<0)for(let h=0;h=n)&&(r=n);return r}function jk(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aA(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?iA:zF(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),x=.5*Math.sqrt(p*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+x)),j=Math.min(n,Math.floor(t+(f-h)*g/f+x));aA(e,t,b,j,a)}const o=e[t];let u=r,l=n;for(tu(e,r,t),a(e[n],o)>0&&tu(e,r,n);u0;)--l}a(e[r],o)===0?tu(e,r,l):(++l,tu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function tu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function WF(e,t,r){if(e=Float64Array.from(TF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return jk(e);if(t>=1)return wk(e);var n,a=(n-1)*t,o=Math.floor(a),u=wk(aA(e,o).subarray(0,o+1)),l=jk(e.subarray(o+1));return u+(l-u)*(a-o)}}function HF(e,t,r=nA){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return u+(l-u)*(a-o)}}function KF(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?zd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?zd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qF.exec(e))?new br(t[1],t[2],t[3],1):(t=QF.exec(e))?new br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=YF.exec(e))?zd(t[1],t[2],t[3],t[4]):(t=XF.exec(e))?zd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZF.exec(e))?Ck(t[1],t[2]/100,t[3]/100,1):(t=JF.exec(e))?Ck(t[1],t[2]/100,t[3]/100,t[4]):kk.hasOwnProperty(e)?Ek(kk[e]):e==="transparent"?new br(NaN,NaN,NaN,0):null}function Ek(e){return new br(e>>16&255,e>>8&255,e&255,1)}function zd(e,t,r,n){return n<=0&&(e=t=r=NaN),new br(e,t,r,n)}function r8(e){return e instanceof rc||(e=Ru(e)),e?(e=e.rgb(),new br(e.r,e.g,e.b,e.opacity)):new br}function Wv(e,t,r,n){return arguments.length===1?r8(e):new br(e,t,r,n??1)}function br(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}r0(br,Wv,sA(rc,{brighter(e){return e=e==null?Df:Math.pow(Df,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new br(ro(this.r),ro(this.g),ro(this.b),Rf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pk,formatHex:Pk,formatHex8:n8,formatRgb:Ak,toString:Ak}));function Pk(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}`}function n8(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}${Ua((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ak(){const e=Rf(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function Rf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ua(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function Ck(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new cn(e,t,r,n)}function lA(e){if(e instanceof cn)return new cn(e.h,e.s,e.l,e.opacity);if(e instanceof rc||(e=Ru(e)),!e)return new cn;if(e instanceof cn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,l=o-a,f=(o+a)/2;return l?(t===o?u=(r-n)/l+(r0&&f<1?0:u,new cn(u,l,f,e.opacity)}function i8(e,t,r,n){return arguments.length===1?lA(e):new cn(e,t,r,n??1)}function cn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}r0(cn,i8,sA(rc,{brighter(e){return e=e==null?Df:Math.pow(Df,e),new cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new cn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new br(vg(e>=240?e-240:e+120,a,n),vg(e,a,n),vg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new cn(Ok(this.h),Fd(this.s),Fd(this.l),Rf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rf(this.opacity);return`${e===1?"hsl(":"hsla("}${Ok(this.h)}, ${Fd(this.s)*100}%, ${Fd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ok(e){return e=(e||0)%360,e<0?e+360:e}function Fd(e){return Math.max(0,Math.min(1,e||0))}function vg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const n0=e=>()=>e;function a8(e,t){return function(r){return e+r*t}}function o8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function s8(e){return(e=+e)==1?uA:function(t,r){return r-t?o8(t,r,e):n0(isNaN(t)?r:t)}}function uA(e,t){var r=t-e;return r?a8(e,r):n0(isNaN(e)?t:e)}const _k=(function e(t){var r=s8(t);function n(a,o){var u=r((a=Wv(a)).r,(o=Wv(o)).r),l=r(a.g,o.g),f=r(a.b,o.b),h=uA(a.opacity,o.opacity);return function(p){return a.r=u(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function l8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;ar&&(o=t.slice(r,o),l[u]?l[u]+=o:l[++u]=o),(n=n[0])===(a=a[0])?l[u]?l[u]+=a:l[++u]=a:(l[++u]=null,f.push({i:u,x:$f(n,a)})),r=yg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function x8(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a2?b8:x8,f=h=null,g}function g(x){return x==null||isNaN(x=+x)?o:(f||(f=l(e.map(n),t,r)))(n(u(x)))}return g.invert=function(x){return u(a((h||(h=l(t,e.map(n),$f)))(x)))},g.domain=function(x){return arguments.length?(e=Array.from(x,Lf),p()):e.slice()},g.range=function(x){return arguments.length?(t=Array.from(x),p()):t.slice()},g.rangeRound=function(x){return t=Array.from(x),r=i0,p()},g.clamp=function(x){return arguments.length?(u=x?!0:sr,p()):u!==sr},g.interpolate=function(x){return arguments.length?(r=x,p()):r},g.unknown=function(x){return arguments.length?(o=x,g):o},function(x,b){return n=x,a=b,p()}}function a0(){return Bh()(sr,sr)}function w8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function zf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ds(e){return e=zf(Math.abs(e)),e?e[1]:NaN}function j8(e,t){return function(r,n){for(var a=r.length,o=[],u=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return o.reverse().join(t)}}function k8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var S8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $u(e){if(!(t=S8.exec(e)))throw new Error("invalid format: "+e);var t;return new o0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$u.prototype=o0.prototype;function o0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}o0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function N8(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Ff;function E8(e,t){var r=zf(e,t);if(!r)return Ff=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Ff=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+zf(e,Math.max(0,t+o-1))[0]}function Ik(e,t){var r=zf(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Tk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:w8,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ik(e*100,t),r:Ik,s:E8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Dk(e){return e}var Rk=Array.prototype.map,$k=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function P8(e){var t=e.grouping===void 0||e.thousands===void 0?Dk:j8(Rk.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Dk:k8(Rk.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,x){g=$u(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,P=g.width,O=g.comma,A=g.precision,_=g.trim,C=g.type;C==="n"?(O=!0,C="g"):Tk[C]||(A===void 0&&(A=12),_=!0,C="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var I=(x&&x.prefix!==void 0?x.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),W=(S==="$"?n:/[%p]/.test(C)?u:"")+(x&&x.suffix!==void 0?x.suffix:""),U=Tk[C],G=/[defgprs%]/.test(C);A=A===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function Y($){var ue=I,J=W,ge,we,pe;if(C==="c")J=U($)+J,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?f:U(Math.abs($),A),_&&($=N8($)),F&&+$==0&&k!=="+"&&(F=!1),ue=(F?k==="("?k:l:k==="-"||k==="("?"":k)+ue,J=(C==="s"&&!isNaN($)&&Ff!==void 0?$k[8+Ff/3]:"")+J+(F&&k==="("?")":""),G){for(ge=-1,we=$.length;++gepe||pe>57){J=(pe===46?a+$.slice(ge+1):$.slice(ge))+J,$=$.slice(0,ge);break}}}O&&!N&&($=t($,1/0));var Z=ue.length+$.length+J.length,Q=Z>1)+ue+$+J+Q.slice(Z);break;default:$=Q+ue+$+J;break}return o($)}return Y.toString=function(){return g+""},Y}function p(g,x){var b=Math.max(-8,Math.min(8,Math.floor(Ds(x)/3)))*3,j=Math.pow(10,-b),k=h((g=$u(g),g.type="f",g),{suffix:$k[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:p}}var Bd,s0,cA;A8({thousands:",",grouping:[3],currency:["$",""]});function A8(e){return Bd=P8(e),s0=Bd.format,cA=Bd.formatPrefix,Bd}function C8(e){return Math.max(0,-Ds(Math.abs(e)))}function O8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ds(t)/3)))*3-Ds(Math.abs(e)))}function _8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ds(t)-Ds(e))+1}function dA(e,t,r,n){var a=Bv(e,t,r),o;switch(n=$u(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=O8(a,u))&&(n.precision=o),cA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=_8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=C8(a))&&(n.precision=o-(n.type==="%")*2);break}}return s0(n)}function fa(e){var t=e.domain;return e.ticks=function(r){var n=t();return zv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return dA(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],l=n[o],f,h,p=10;for(l0;){if(h=Fv(u,l,r),h===f)return n[a]=u,n[o]=l,t(n);if(h>0)u=Math.floor(u/h)*h,l=Math.ceil(l/h)*h;else if(h<0)u=Math.ceil(u*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function fA(){var e=a0();return e.copy=function(){return nc(e,fA())},Yr.apply(e,arguments),fa(e)}function hA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Lf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return hA(e).unknown(t)},e=arguments.length?Array.from(e,Lf):[0,1],fa(r)}function pA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return oMath.pow(e,t)}function R8(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Fk(e){return(t,r)=>-e(-t,r)}function l0(e){const t=e(Lk,zk),r=t.domain;let n=10,a,o;function u(){return a=R8(n),o=D8(n),r()[0]<0?(a=Fk(a),o=Fk(o),e(M8,I8)):e(Lk,zk),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const g=p0){for(;x<=b;++x)for(j=1;jp)break;N.push(k)}}else for(;x<=b;++x)for(j=n-1;j>=1;--j)if(k=x>0?j/o(-x):j*o(x),!(kp)break;N.push(k)}N.length*2{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=$u(f)).precision==null&&(f.trim=!0),f=s0(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let g=p/o(Math.round(a(p)));return g*nr(pA(r(),{floor:l=>o(Math.floor(a(l))),ceil:l=>o(Math.ceil(a(l)))})),t}function mA(){const e=l0(Bh()).domain([1,10]);return e.copy=()=>nc(e,mA()).base(e.base()),Yr.apply(e,arguments),e}function Bk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Uk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function u0(e){var t=1,r=e(Bk(t),Uk(t));return r.constant=function(n){return arguments.length?e(Bk(t=+n),Uk(t)):t},fa(r)}function gA(){var e=u0(Bh());return e.copy=function(){return nc(e,gA()).constant(e.constant())},Yr.apply(e,arguments)}function Wk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function L8(e){return e<0?-e*e:e*e}function c0(e){var t=e(sr,sr),r=1;function n(){return r===1?e(sr,sr):r===.5?e($8,L8):e(Wk(r),Wk(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},fa(t)}function d0(){var e=c0(Bh());return e.copy=function(){return nc(e,d0()).exponent(e.exponent())},Yr.apply(e,arguments),e}function z8(){return d0.apply(null,arguments).exponent(.5)}function Hk(e){return Math.sign(e)*e*e}function F8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vA(){var e=a0(),t=[0,1],r=!1,n;function a(o){var u=F8(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(Hk(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Lf)).map(Hk)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return vA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Yr.apply(a,arguments),fa(a)}function yA(){var e=[],t=[],r=[],n;function a(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return xA().domain([e,t]).range(a).unknown(o)},Yr.apply(fa(u),arguments)}function bA(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[tc(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return bA().domain(e).range(t).unknown(r)},Yr.apply(a,arguments)}const xg=new Date,bg=new Date;function Pt(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const u=a(o),l=a.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,l)=>{const f=[];if(o=a.ceil(o),l=l==null?1:Math.floor(l),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,l),e(o);while(hPt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!o(u););else for(;--l>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(xg.setTime(+o),bg.setTime(+u),e(xg),e(bg),Math.floor(r(xg,bg))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Bf=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Bf);Bf.range;const ii=1e3,Kr=ii*60,ai=Kr*60,di=ai*24,f0=di*7,Kk=di*30,wg=di*365,Wa=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ii)},(e,t)=>(t-e)/ii,e=>e.getUTCSeconds());Wa.range;const h0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getMinutes());h0.range;const p0=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getUTCMinutes());p0.range;const m0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii-e.getMinutes()*Kr)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getHours());m0.range;const g0=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCHours());g0.range;const ic=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kr)/di,e=>e.getDate()-1);ic.range;const Uh=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>e.getUTCDate()-1);Uh.range;const wA=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>Math.floor(e/di));wA.range;function yo(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Kr)/f0)}const Wh=yo(0),Uf=yo(1),B8=yo(2),U8=yo(3),Rs=yo(4),W8=yo(5),H8=yo(6);Wh.range;Uf.range;B8.range;U8.range;Rs.range;W8.range;H8.range;function xo(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/f0)}const Hh=xo(0),Wf=xo(1),K8=xo(2),G8=xo(3),$s=xo(4),V8=xo(5),q8=xo(6);Hh.range;Wf.range;K8.range;G8.range;$s.range;V8.range;q8.range;const v0=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());v0.range;const y0=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());y0.range;const fi=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());fi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});fi.range;const hi=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});hi.range;function jA(e,t,r,n,a,o){const u=[[Wa,1,ii],[Wa,5,5*ii],[Wa,15,15*ii],[Wa,30,30*ii],[o,1,Kr],[o,5,5*Kr],[o,15,15*Kr],[o,30,30*Kr],[a,1,ai],[a,3,3*ai],[a,6,6*ai],[a,12,12*ai],[n,1,di],[n,2,2*di],[r,1,f0],[t,1,Kk],[t,3,3*Kk],[e,1,wg]];function l(h,p,g){const x=pS).right(u,x);if(b===u.length)return e.every(Bv(h/wg,p/wg,g));if(b===0)return Bf.every(Math.max(Bv(h,p,g),1));const[j,k]=u[x/u[b-1][2]53)return null;"w"in oe||(oe.w=1),"Z"in oe?(X=kg(ru(oe.y,0,1)),fe=X.getUTCDay(),X=fe>4||fe===0?Wf.ceil(X):Wf(X),X=Uh.offset(X,(oe.V-1)*7),oe.y=X.getUTCFullYear(),oe.m=X.getUTCMonth(),oe.d=X.getUTCDate()+(oe.w+6)%7):(X=jg(ru(oe.y,0,1)),fe=X.getDay(),X=fe>4||fe===0?Uf.ceil(X):Uf(X),X=ic.offset(X,(oe.V-1)*7),oe.y=X.getFullYear(),oe.m=X.getMonth(),oe.d=X.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),fe="Z"in oe?kg(ru(oe.y,0,1)).getUTCDay():jg(ru(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(fe+5)%7:oe.w+oe.U*7-(fe+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,kg(oe)):jg(oe)}}function W(ee,ke,_e,oe){for(var Xe=0,X=ke.length,fe=_e.length,tt,jr;Xe=fe)return-1;if(tt=ke.charCodeAt(Xe++),tt===37){if(tt=ke.charAt(Xe++),jr=_[tt in Gk?ke.charAt(Xe++):tt],!jr||(oe=jr(ee,_e,oe))<0)return-1}else if(tt!=_e.charCodeAt(oe++))return-1}return oe}function U(ee,ke,_e){var oe=h.exec(ke.slice(_e));return oe?(ee.p=p.get(oe[0].toLowerCase()),_e+oe[0].length):-1}function G(ee,ke,_e){var oe=b.exec(ke.slice(_e));return oe?(ee.w=j.get(oe[0].toLowerCase()),_e+oe[0].length):-1}function Y(ee,ke,_e){var oe=g.exec(ke.slice(_e));return oe?(ee.w=x.get(oe[0].toLowerCase()),_e+oe[0].length):-1}function $(ee,ke,_e){var oe=N.exec(ke.slice(_e));return oe?(ee.m=P.get(oe[0].toLowerCase()),_e+oe[0].length):-1}function ue(ee,ke,_e){var oe=k.exec(ke.slice(_e));return oe?(ee.m=S.get(oe[0].toLowerCase()),_e+oe[0].length):-1}function J(ee,ke,_e){return W(ee,t,ke,_e)}function ge(ee,ke,_e){return W(ee,r,ke,_e)}function we(ee,ke,_e){return W(ee,n,ke,_e)}function pe(ee){return u[ee.getDay()]}function F(ee){return o[ee.getDay()]}function Z(ee){return f[ee.getMonth()]}function Q(ee){return l[ee.getMonth()]}function D(ee){return a[+(ee.getHours()>=12)]}function T(ee){return 1+~~(ee.getMonth()/3)}function te(ee){return u[ee.getUTCDay()]}function ie(ee){return o[ee.getUTCDay()]}function re(ee){return f[ee.getUTCMonth()]}function ce(ee){return l[ee.getUTCMonth()]}function me(ee){return a[+(ee.getUTCHours()>=12)]}function Oe(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var ke=C(ee+="",O);return ke.toString=function(){return ee},ke},parse:function(ee){var ke=I(ee+="",!1);return ke.toString=function(){return ee},ke},utcFormat:function(ee){var ke=C(ee+="",A);return ke.toString=function(){return ee},ke},utcParse:function(ee){var ke=I(ee+="",!0);return ke.toString=function(){return ee},ke}}}var Gk={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,eB=/^%/,tB=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o[t.toLowerCase(),r]))}function nB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function iB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function aB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function oB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function sB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Vk(e,t,r){var n=$t.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function qk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function lB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function uB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function cB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Qk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function dB(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Yk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function fB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function hB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function pB(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function mB(e,t,r){var n=$t.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function gB(e,t,r){var n=eB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function vB(e,t,r){var n=$t.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function yB(e,t,r){var n=$t.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Xk(e,t){return Ge(e.getDate(),t,2)}function xB(e,t){return Ge(e.getHours(),t,2)}function bB(e,t){return Ge(e.getHours()%12||12,t,2)}function wB(e,t){return Ge(1+ic.count(fi(e),e),t,3)}function kA(e,t){return Ge(e.getMilliseconds(),t,3)}function jB(e,t){return kA(e,t)+"000"}function kB(e,t){return Ge(e.getMonth()+1,t,2)}function SB(e,t){return Ge(e.getMinutes(),t,2)}function NB(e,t){return Ge(e.getSeconds(),t,2)}function EB(e){var t=e.getDay();return t===0?7:t}function PB(e,t){return Ge(Wh.count(fi(e)-1,e),t,2)}function SA(e){var t=e.getDay();return t>=4||t===0?Rs(e):Rs.ceil(e)}function AB(e,t){return e=SA(e),Ge(Rs.count(fi(e),e)+(fi(e).getDay()===4),t,2)}function CB(e){return e.getDay()}function OB(e,t){return Ge(Uf.count(fi(e)-1,e),t,2)}function _B(e,t){return Ge(e.getFullYear()%100,t,2)}function MB(e,t){return e=SA(e),Ge(e.getFullYear()%100,t,2)}function IB(e,t){return Ge(e.getFullYear()%1e4,t,4)}function TB(e,t){var r=e.getDay();return e=r>=4||r===0?Rs(e):Rs.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function DB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function Zk(e,t){return Ge(e.getUTCDate(),t,2)}function RB(e,t){return Ge(e.getUTCHours(),t,2)}function $B(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function LB(e,t){return Ge(1+Uh.count(hi(e),e),t,3)}function NA(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function zB(e,t){return NA(e,t)+"000"}function FB(e,t){return Ge(e.getUTCMonth()+1,t,2)}function BB(e,t){return Ge(e.getUTCMinutes(),t,2)}function UB(e,t){return Ge(e.getUTCSeconds(),t,2)}function WB(e){var t=e.getUTCDay();return t===0?7:t}function HB(e,t){return Ge(Hh.count(hi(e)-1,e),t,2)}function EA(e){var t=e.getUTCDay();return t>=4||t===0?$s(e):$s.ceil(e)}function KB(e,t){return e=EA(e),Ge($s.count(hi(e),e)+(hi(e).getUTCDay()===4),t,2)}function GB(e){return e.getUTCDay()}function VB(e,t){return Ge(Wf.count(hi(e)-1,e),t,2)}function qB(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function QB(e,t){return e=EA(e),Ge(e.getUTCFullYear()%100,t,2)}function YB(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function XB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?$s(e):$s.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function ZB(){return"+0000"}function Jk(){return"%"}function eS(e){return+e}function tS(e){return Math.floor(+e/1e3)}var Zo,PA,AA;JB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function JB(e){return Zo=J8(e),PA=Zo.format,Zo.parse,AA=Zo.utcFormat,Zo.utcParse,Zo}function e9(e){return new Date(e)}function t9(e){return e instanceof Date?+e:+new Date(+e)}function x0(e,t,r,n,a,o,u,l,f,h){var p=a0(),g=p.invert,x=p.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),P=h("%b %d"),O=h("%B"),A=h("%Y");function _(C){return(f(C)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>WF(e,o/n))},r.copy=function(){return MA(t).domain(e)},gi.apply(r,arguments)}function Gh(){var e=0,t=.5,r=1,n=1,a,o,u,l,f,h=sr,p,g=!1,x;function b(k){return isNaN(k=+k)?x:(k=.5+((k=+p(k))-o)*(n*k{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return l9(n)?n:"point"}};function u9(e,t){for(var r=0,n=e.length,a=e[0]t)?r=o+1:n=o}return r}function LA(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,l,f=u9(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function c9(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):LA(e,void 0)}function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],vi=(e,t)=>{var r=FA(e,t);return r??Nt},Et={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Gv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Yu},BA=(e,t)=>e.cartesianAxis.yAxis[t],yi=(e,t)=>{var r=BA(e,t);return r??Et},y9={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},k0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??y9},cr=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return yi(e,r);case"zAxis":return k0(e,r);case"angleAxis":return Vy(e,r);case"radiusAxis":return qy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},x9=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return yi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ac=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return yi(e,r);case"angleAxis":return Vy(e,r);case"radiusAxis":return qy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},UA=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function WA(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var HA=e=>e.graphicalItems.cartesianItems,b9=V([Dt,Lh],WA),KA=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Qs=V([HA,cr,b9],KA,{memoizeOptions:{resultEqualityCheck:Fh}}),GA=V([Qs],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Xy)),VA=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),w9=V([Qs],VA),qA=e=>e.map(t=>t.data).filter(Boolean).flat(1),j9=V([Qs],e=>e.some(t=>!t.data)),QA=V([Qs],qA,{memoizeOptions:{resultEqualityCheck:Fh}}),YA=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},S0=V([QA,Ih],YA),k9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Tt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Tt(a,n)}))):e.map(n=>({value:n})),XA=(e,t,r,n,a,o)=>{var u=n.chartData,l=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,p=k9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=l.slice(f,h+1),x=g.map(b=>({value:Tt(b,t.dataKey)})).filter(b=>b.value!=null);return[...x,...p]}return p},oc=V([S0,cr,Qs,Ih,j9,QA],XA);function hs(e){if(Dn(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function aS(e){if(Array.isArray(e)){var t=[hs(e[0]),hs(e[1])];return Mn(t)?t:void 0}var r=hs(e);if(r!=null)return[r,r]}function Ln(e){return e.map(hs).filter(xr)}function S9(e,t){var r=hs(e),n=hs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var N9=V([oc],e=>e==null?void 0:e.map(t=>t.value).sort(S9));function ZA(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function E9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Tn(t))n=t;else if(Array.isArray(t)){var a=Ln(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Ln(r.flatMap(o=>{var u=Tt(e,o.dataKey),l,f;if(Array.isArray(u)){var h=zA(u,2);l=h[0],f=h[1]}else l=f=u;if(!(!Be(l)||!Be(f)))return[n-l,n+f]}))}var At=e=>{var t=Rt(e),r=Vs(e);return ac(e,t,r)},Ls=V([At],e=>e==null?void 0:e.dataKey),P9=V([GA,Ih,At],rA),JA=(e,t,r,n)=>{var a={},o=t.reduce((u,l)=>{if(l.stackId==null)return u;var f=u[l.stackId];return f==null&&(f=[]),f.push(l),u[l.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var l=zA(u,2),f=l[0],h=l[1],p=n?[...h].reverse():h,g=p.map(Yy);return[f,{stackedData:K$(e,g,r),graphicalItems:p}]}))},eC=V([P9,GA,Th,QP],JA),tC=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return Q$(e,a,o)},A9=V([cr],e=>e.allowDataOverflow),N0=e=>{var t;if(e==null||!("domain"in e))return Gv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Ln(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Gv},rC=V([cr],N0),nC=V([rC,A9],LP),C9=V([eC,pn,Dt,nC],tC,{memoizeOptions:{resultEqualityCheck:zh}}),E0=e=>e.errorBars,O9=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>ZA(r,n)),Kf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,g=h.data!=null?[...h.data]:u,x=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>ZA(o,b));g.forEach(b=>{var j,k=Tt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=E9(b,k,x);if(S.length>=2){var N=Math.min(...S),P=Math.max(...S);(l==null||Nf)&&(f=P)}var O=aS(k);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=aS(Tt(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(l)&&Be(f))return[l,f]},_9=V([S0,cr,w9,E0,Dt,sF],iC,{memoizeOptions:{resultEqualityCheck:zh}});function M9(e){var t=e.value;if(Dn(t)||t instanceof Date)return t}var I9=(e,t,r)=>{var n=e.map(M9).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&mE(n))?$P(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},aC=e=>e.referenceElements.dots,Ys=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),T9=V([aC,Dt,Lh],Ys),oC=e=>e.referenceElements.areas,D9=V([oC,Dt,Lh],Ys),sC=e=>e.referenceElements.lines,R9=V([sC,Dt,Lh],Ys),lC=(e,t)=>{if(e!=null){var r=Ln(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},$9=V(T9,Dt,lC),uC=(e,t)=>{if(e!=null){var r=Ln(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},L9=V([D9,Dt],uC);function z9(e){var t;if(e.x!=null)return Ln([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Ln(r)}function F9(e){var t;if(e.y!=null)return Ln([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Ln(r)}var cC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?z9(n):F9(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},B9=V([R9,Dt],cC),U9=V($9,B9,L9,(e,t,r)=>Kf(e,r,t)),dC=(e,t,r,n,a,o,u,l)=>{if(r!=null)return r;var f=u==="vertical"&&l==="xAxis"||u==="horizontal"&&l==="yAxis",h=f?Kf(n,o,a):Kf(o,a);return hF(t,h,e.allowDataOverflow)},W9=V([cr,rC,nC,C9,_9,U9,ut,Dt],dC,{memoizeOptions:{resultEqualityCheck:zh}}),H9=[0,1],fC=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var l=e.dataKey,f=e.type,h=zn(t,o);if(h&&l==null){var p;return $P(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?I9(n,e,h):a==="expand"&&!h?H9:u}},P0=V([cr,ut,S0,oc,Th,Dt,W9],fC),Xs=V([cr,UA,Hy],$A),hC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=N0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Mn(e)){if(o)return pk(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return mk(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Mn(e))return pk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Mn(e))return mk(e,t.tickCount,t.allowDecimals,"adaptive")}}},A0=V([P0,ac,Xs],hC),pC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Mn(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,l),Math.max(f,h)]}return t},K9=V([cr,P0,A0,Dt],pC),G9=V(oc,cr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Ln(e.map(g=>g.value))).sort((g,x)=>g-x),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var l=0;la,(e,t,r,n,a)=>{if(!Be(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=da(r,e*o),l=e*o/2;return l-u-(l-u)/o*u}return 0}),V9=(e,t,r)=>{var n=vi(e,t);return n==null||typeof n.padding!="string"?0:mC(e,"xAxis",t,r,n.padding)},q9=(e,t,r)=>{var n=yi(e,t);return n==null||typeof n.padding!="string"?0:mC(e,"yAxis",t,r,n.padding)},Q9=V(vi,V9,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),Y9=V(yi,q9,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),gC=V([Vt,Q9,Ph,Eh,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),vC=V([Vt,ut,Y9,Ph,Eh,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),sc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return gC(e,r,n);case"yAxis":return vC(e,r,n);case"zAxis":return(a=k0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return JP(e);case"radiusAxis":return eA(e,r);default:return}},yC=V([cr,sc],Dh),X9=V([Xs,K9],_F),C0=V([cr,Xs,X9,yC],j0),xC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=zn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(l=>l.value)}},O0=V([ut,oc,ac,Dt],xC),Vh=V([C0],Zy);V([C0],c9);V([C0,N9],LA);V([Qs,E0,Dt],O9);function bC(e,t){return e.idt.id?1:0}var qh=(e,t)=>t,Qh=(e,t,r)=>r,Z9=V(Sh,qh,Qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(bC)),J9=V(Nh,qh,Qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(bC)),wC=(e,t)=>({width:e.width,height:t.height}),eU=(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}},tU=V(Vt,vi,wC),rU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},nU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},iU=V(mi,Vt,Z9,qh,Qh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=wC(t,l);u==null&&(u=rU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[l.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),aU=V(pi,Vt,J9,qh,Qh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=eU(t,l);u==null&&(u=nU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[l.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),oU=(e,t)=>{var r=vi(e,t);if(r!=null)return iU(e,r.orientation,r.mirror)},sU=V([Vt,vi,oU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),lU=(e,t)=>{var r=yi(e,t);if(r!=null)return aU(e,r.orientation,r.mirror)},uU=V([Vt,yi,lU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),cU=V(Vt,yi,(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}}),jC=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,l=zn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(u&&l&&o==="category"&&a&&mE(h))return f}},_0=V([ut,oc,cr,Dt],jC),oS=V([ut,x9,Xs,Vh,_0,O0,sc,A0,Dt],(e,t,r,n,a,o,u,l,f)=>{if(t!=null){var h=zn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:l,range:u,realScaleType:r,scale:n}}}),dU=(e,t,r,n,a,o,u,l,f)=>{if(!(t==null||n==null)){var h=zn(e,f),p=t.type,g=t.ticks,x=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=p==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Wr(o[0]-o[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var P=u?u.indexOf(S):S,O=n.map(P);return Be(O)?{index:N,coordinate:O+j,value:S,offset:j}:null}).filter(xr):h&&l?l.map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+j,value:S,index:N,offset:j}:null}).filter(xr):n.ticks?n.ticks(x).map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+j,value:S,index:N,offset:j}:null}).filter(xr):n.domain().map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(xr)}},kC=V([ut,ac,Xs,Vh,A0,sc,_0,O0,Dt],dU),fU=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=zn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Wr(n[0]-n[1])*2*h:h,l&&o?o.map((p,g)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(xr):r.ticks?r.ticks(f).map((p,g)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(xr):r.domain().map((p,g)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:a?a[p]:p,index:g,offset:h}:null}).filter(xr)}},SC=V([ut,ac,Vh,sc,_0,O0,Dt],fU),NC=V(cr,Vh,(e,t)=>{if(!(e==null||t==null))return Hf(Hf({},e),{},{scale:t})}),hU=V([cr,Xs,P0,yC],j0),pU=V([hU],Zy);V((e,t,r)=>k0(e,r),pU,(e,t)=>{if(!(e==null||t==null))return Hf(Hf({},e),{},{scale:t})});var mU=V([ut,Sh,Nh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),gU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([gU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);ue.options.defaultTooltipEventType,PC=e=>e.options.validateTooltipEventTypes;function AC(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function lc(e,t){var r=EC(e),n=PC(e);return AC(t,r,n)}function vU(e){return Ce(t=>lc(t,e))}var CC=(e,t)=>{var r,n=Number(t);if(!(Tn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},yU=e=>e.tooltip.settings,Yi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},xU={itemInteraction:{click:Yi,hover:Yi},axisInteraction:{click:Yi,hover:Yi},keyboardInteraction:Yi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},OC=rr({name:"tooltip",initialState:xU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:at()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:at()},removeTooltipEntrySettings:{reducer(e,t){var r=Hr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:at()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Xr=OC.actions,bU=Xr.addTooltipEntrySettings,wU=Xr.replaceTooltipEntrySettings,jU=Xr.removeTooltipEntrySettings,kU=Xr.setTooltipSettingsState,SU=Xr.setActiveMouseOverItemIndex;Xr.mouseLeaveItem;var _C=Xr.mouseLeaveChart;Xr.setActiveClickItemIndex;var MC=Xr.setMouseOverAxisIndex,NU=Xr.setMouseClickAxisIndex,uu=Xr.setSyncInteraction,Gf=Xr.setKeyboardInteraction,EU=OC.reducer;function sS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ud(e){for(var t=1;t{if(t==null)return Yi;var a=OU(e,t,r);if(a==null)return Yi;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(_U(a)){if(o)return Ud(Ud({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Ud(Ud({},Yi),{},{coordinate:a.coordinate})};function MU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function IU(e,t){var r=MU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function TU(e,t,r){if(r==null||t==null)return!0;var n=Tt(e,t);return n==null||!Mn(r)?!0:IU(n,r)}var fu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!Be(o))return a;var u=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(u,Math.min(o,l)),h=t[f];return h==null||TU(h,r,n)?String(f):null},TC=(e,t,r,n,a,o,u)=>{if(o!=null){var l=u[0],f=l==null?void 0:l.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},DC=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var l;return((l=u.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},RC=e=>e.options.tooltipPayloadSearcher,Zs=e=>e.tooltip;function lS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uS(e){for(var t=1;te(t)}function cS(e){if(typeof e=="string")return e}function BU(e){if(!(e==null||typeof e!="object")){var t="name"in e?LU(e.name):void 0,r="unit"in e?zU(e.unit):void 0,n="dataKey"in e?FU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?cS(e.color):void 0,u="fill"in e?cS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function UU(e,t){return e??t}var $C=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,g=[];return e.reduce((x,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=UU(k,l),P=Array.isArray(N)?lP(N,h,p):N,O=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,A=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(P)&&!Array.isArray(P[0])&&u==="axis"?_=gE(P,n,a):_=o(P,t,f,A),Array.isArray(_))_.forEach(I=>{var W,U,G=BU(I),Y=G==null?void 0:G.name,$=G==null?void 0:G.dataKey,ue=G==null?void 0:G.payload,J=uS(uS({},S),{},{name:Y,unit:G==null?void 0:G.unit,color:(W=G==null?void 0:G.color)!==null&&W!==void 0?W:S==null?void 0:S.color,fill:(U=G==null?void 0:G.fill)!==null&&U!==void 0?U:S==null?void 0:S.fill});x.push(ij({tooltipEntrySettings:J,dataKey:$,payload:ue,value:Tt(ue,$),name:Y==null?void 0:String(Y)}))});else{var C;x.push(ij({tooltipEntrySettings:S,dataKey:O,payload:_,value:Tt(_,O),name:(C=Tt(_,A))!==null&&C!==void 0?C:S==null?void 0:S.name}))}return x},g)}},M0=V([At,UA,Hy],$A),WU=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),HU=V([Rt,Vs],WA),bo=V([WU,At,HU],KA,{memoizeOptions:{resultEqualityCheck:Fh}}),KU=V([bo],e=>e.filter(Xy)),LC=V([bo],qA,{memoizeOptions:{resultEqualityCheck:Fh}}),GU=V([bo],e=>e.some(t=>!t.data)),fo=V([LC,pn],YA),VU=V([KU,pn,At],rA),I0=V([fo,At,bo,pn,GU,LC],XA),zC=V([At],N0),qU=V([At],e=>e.allowDataOverflow),FC=V([zC,qU],LP),QU=V([bo],e=>e.filter(Xy)),YU=V([VU,QU,Th,QP],JA),XU=V([YU,pn,Rt,FC],tC),ZU=V([bo],VA),JU=V([fo,At,ZU,E0,Rt,lF],iC,{memoizeOptions:{resultEqualityCheck:zh}}),e7=V([aC,Rt,Vs],Ys),t7=V([e7,Rt],lC),r7=V([oC,Rt,Vs],Ys),n7=V([r7,Rt],uC),i7=V([sC,Rt,Vs],Ys),a7=V([i7,Rt],cC),o7=V([t7,a7,n7],Kf),s7=V([At,zC,FC,XU,JU,o7,ut,Rt],dC),zs=V([At,ut,fo,I0,Th,Rt,s7],fC),l7=V([zs,At,M0],hC),u7=V([At,zs,l7,Rt],pC),BC=e=>{var t=Rt(e),r=Vs(e),n=!1;return sc(e,t,r,n)},UC=V([At,BC],Dh),c7=V([At,M0,u7,UC],j0),WC=V([c7],Zy),d7=V([ut,I0,At,Rt],jC),f7=V([ut,I0,At,Rt],xC),h7=(e,t,r,n,a,o,u,l)=>{if(t){var f=t.type,h=zn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Wr(a[0]-a[1])*2*g:g,h&&u?u.map((x,b)=>{var j=n.map(x);return Be(j)?{coordinate:j+g,value:x,index:b,offset:g}:null}).filter(xr):n.domain().map((x,b)=>{var j=n.map(x);return Be(j)?{coordinate:j+g,value:o?o[x]:x,index:b,offset:g}:null}).filter(xr)}}},xi=V([ut,At,M0,WC,BC,d7,f7,Rt],h7),T0=V([EC,PC,yU],(e,t,r)=>AC(r.shared,e,t)),HC=e=>e.tooltip.settings.trigger,D0=e=>e.tooltip.settings.defaultIndex,uc=V([Zs,T0,HC,D0],IC),Lu=V([uc,fo,Ls,zs],fu),KC=V([xi,Lu],CC),p7=V([uc],e=>{if(e)return e.dataKey}),m7=V([uc],e=>{if(e)return e.graphicalItemId}),GC=V([Zs,T0,HC,D0],DC),g7=V([pi,mi,ut,Vt,xi,D0,GC],TC),v7=V([uc,g7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),y7=V([uc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),x7=V([GC,Lu,pn,Ls,KC,RC,T0],$C),b7=V([x7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fS(e){for(var t=1;tCe(At),N7=()=>{var e=S7(),t=Ce(xi),r=Ce(WC);return jf(!e||!r?void 0:fS(fS({},e),{},{scale:r}),t)};function hS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},O7=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var l=a.coordinate,f=n.angle;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function _7(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var VC=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(p=r[l])===null||p===void 0?void 0:p.coordinate,k=l>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(x=r[l+1])===null||x===void 0?void 0:x.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Wr(j-b)!==Wr(k-j)){var N=[];if(Wr(k-j)===Wr(a[1]-a[0])){S=k;var P=j+a[1]-a[0];N[0]=Math.min(P,(P+b)/2),N[1]=Math.max(P,(P+b)/2)}else{S=b;var O=k+a[1]-a[0];N[0]=Math.min(j,(O+j)/2),N[1]=Math.max(j,(O+j)/2)}var A=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>A[0]&&e<=A[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[l])===null||_===void 0?void 0:_.index}}else{var C=Math.min(b,k),I=Math.max(b,k);if(e>(C+j)/2&&e<=(I+j)/2){var W;return(W=r[l])===null||W===void 0?void 0:W.index}}}else if(t)for(var U=0;U(G.coordinate+$.coordinate)/2||U>0&&U(G.coordinate+$.coordinate)/2&&e<=(G.coordinate+Y.coordinate)/2)return G.index}}return-1},qC=()=>Ce(Hy),R0=(e,t)=>t,QC=(e,t,r)=>r,$0=(e,t,r,n)=>n,M7=V(xi,e=>hh(e,t=>t.coordinate)),L0=V([Zs,R0,QC,$0],IC),z0=V([L0,fo,Ls,zs],fu),I7=(e,t,r)=>{if(t!=null){var n=Zs(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},YC=V([Zs,R0,QC,$0],DC),Vf=V([pi,mi,ut,Vt,xi,$0,YC],TC),T7=V([L0,Vf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),XC=V([xi,z0],CC),D7=V([YC,z0,pn,Ls,XC,RC,R0],$C),R7=V([L0,z0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),$7=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&_7(e,u)){var l=Y$(e,t),f=VC(l,o,a,r,n),h=C7(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},L7=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var l=J6(e,r);if(l){var f=X$(l,t),h=VC(f,u,o,n,a),p=O7(t,o,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},z7=(e,t,r,n,a,o,u,l)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?$7(e,t,n,a,o,u,l):L7(e,t,r,n,a,o,u)},F7=V(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),B7=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(or)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:OF}});function pS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mS(e){for(var t=1;tmS(mS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),K7)},V7=new Set(Object.values(or));function q7(e){return V7.has(e)}var ZC=rr({name:"zIndex",initialState:G7,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:at()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!q7(r)&&delete e.zIndexMap[r])},prepare:at()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:at()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:at()}}}),Yh=ZC.actions,Q7=Yh.registerZIndexPortal,Sg=Yh.unregisterZIndexPortal,Y7=Yh.registerZIndexPortalElement,X7=Yh.unregisterZIndexPortalElement,Z7=ZC.reducer;function bi(e){var t=e.zIndex,r=e.children,n=DL(),a=n&&t!==void 0&&t!==0,o=wr(),u=v.useRef(void 0),l=v.useRef(new Set),f=jt(),h=Ce(g=>F7(g,t,o));if(v.useLayoutEffect(()=>{if(!a){var g=l.current;g.forEach(b=>{f(Sg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(l.current.has(t)||(f(Q7({zIndex:t})),l.current.add(t)),h){u.current=h;var x=l.current;x.forEach(b=>{b!==t&&(f(Sg({zIndex:b})),x.delete(b))})}},[f,t,a,h]),v.useLayoutEffect(()=>{var g=l.current;return()=>{g.forEach(x=>{f(Sg({zIndex:x}))}),g.clear()}},[f]),!a)return r;var p=h??u.current;return p?ih.createPortal(r,p):null}function Vv(){return Vv=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.useContext(JC),Ng={exports:{}},vS;function oW(){return vS||(vS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,g,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,g||f,x),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var x=0,b=g.length,j=new Array(b);x{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Tn(r))return e[r]}},cW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},eO=rr({name:"options",initialState:cW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),dW=eO.reducer,fW=eO.actions.createEventEmitter;function hW(e){return e.tooltip.syncInteraction}var pW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},tO=rr({name:"chartData",initialState:pW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),F0=tO.actions,xS=F0.setChartData,mW=F0.setDataStartEndIndexes;F0.setComputedData;var gW=tO.reducer,vW=["x","y"];function bS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;tf.rootProps.className);v.useEffect(()=>{if(e==null)return Ws;var f=(h,p,g)=>{if(t!==g&&e===h){if(p.payload.active===!1){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var x;if(u&&p!==null&&p!==void 0&&(x=p.payload)!==null&&x!==void 0&&x.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,j=b.x,k=b.y,S=wW(b,vW),N=p.payload.sourceViewBox,P=N.x,O=N.y,A=N.width,_=N.height,C=es(es({},S),{},{x:u.x+(A?(j-P)/A:0)*u.width,y:u.y+(_?(k-O)/_:0)*u.height});r(es(es({},p),{},{payload:es(es({},p.payload),{},{coordinate:C})}))}else r(p);return}if(a!=null){var I;if(typeof n=="function"){var W={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},U=n(a,W);I=a[U]}else n==="value"&&(I=a.find(pe=>String(pe.value)===p.payload.label));var G=p.payload.coordinate;if(G==null||u==null){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=G.x,$=G.y,ue=Math.min(Y,u.x+u.width),J=Math.min($,u.y+u.height),ge={x:o==="horizontal"?I.coordinate:ue,y:o==="horizontal"?J:I.coordinate},we=uu({active:p.payload.active,coordinate:ge,dataKey:p.payload.dataKey,index:String(I.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(we)}}};return zu.on(qv,f),()=>{zu.off(qv,f)}},[l,r,t,e,n,a,o,u])}function SW(){var e=Ce(Ky),t=Ce(Gy),r=jt();v.useEffect(()=>{if(e==null)return Ws;var n=(a,o,u)=>{t!==u&&e===a&&r(mW(o))};return zu.on(yS,n),()=>{zu.off(yS,n)}},[r,t,e])}function NW(){var e=jt();v.useEffect(()=>{e(fW())},[e]),kW(),SW()}function EW(e,t,r,n,a,o){var u=Ce(j=>I7(j,e,t)),l=Ce(m7),f=Ce(Gy),h=Ce(Ky),p=Ce(YP),g=Ce(hW),x=(g==null?void 0:g.sourceViewBox)!=null,b=Ah();v.useEffect(()=>{if(!x&&h!=null&&f!=null){var j=uu({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});zu.emit(qv,h,j,f)}},[x,r,u,l,a,n,f,h,p,o,b])}function wS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{I(kU({shared:P,trigger:O,axisId:C,active:a,defaultIndex:W}))},[I,P,O,C,a,W]);var U=Ah(),G=CP(),Y=vU(P),$=(t=Ce(_e=>R7(_e,Y,O,W)))!==null&&t!==void 0?t:{},ue=$.activeIndex,J=$.isActive,ge=Ce(_e=>D7(_e,Y,O,W)),we=Ce(_e=>XC(_e,Y,O,W)),pe=Ce(_e=>T7(_e,Y,O,W)),F=ge,Z=aW(),Q=(r=a??J)!==null&&r!==void 0?r:!1,D=RR([F,Q]),T=OW(D,2),te=T[0],ie=T[1],re=Y==="axis"?we:void 0;EW(Y,O,pe,re,ue,Q);var ce=_??Z;if(ce==null||U==null||Y==null)return null;var me=F??SS;Q||(me=SS),h&&me.length&&(me=aR(me.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),x,DW));var Oe=me.length>0,ee=jS(jS({},n),{},{payload:me,label:re,active:Q,activeIndex:ue,coordinate:pe,accessibilityLayer:G}),ke=v.createElement(Vz,{allowEscapeViewBox:o,animationDuration:u,animationEasing:l,isAnimationActive:p,active:Q,coordinate:pe,hasPayload:Oe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:U,wrapperStyle:S,lastBoundingBox:te,innerRef:ie,hasPortalFromProps:!!_},RW(f,ee));return v.createElement(v.Fragment,null,ih.createPortal(ke,ce),Q&&v.createElement(iW,{cursor:N,tooltipEventType:Y,coordinate:pe,payload:me,index:ue}))}function zW(e,t,r){return(t=FW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FW(e){var t=BW(e,"string");return typeof t=="symbol"?t:t+""}function BW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class UW{constructor(t){zW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function NS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function WW(e){for(var t=1;t{try{var r=document.getElementById(PS);r||(r=document.createElement("span"),r.setAttribute("id",PS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,qW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},hu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ec.isSsr)return{width:0,height:0};if(!rO.enableCache)return AS(t,r);var n=QW(t,r),a=ES.get(n);if(a)return a;var o=AS(t,r);return ES.set(n,o),o},nO;function qf(e,t){return JW(e)||ZW(e,t)||XW(e,t)||YW()}function YW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XW(e,t){if(e){if(typeof e=="string")return CS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?CS(e,t):void 0}}function CS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Kt(t)||(r?a=t.toString().split(""):a=t.toString().split(aO));var o=a.map(l=>({word:l,width:hu(l,n).width})),u=r?0:hu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function sO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function xH(e){return Kt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var lO=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,l=o.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+re.reduce((t,r)=>t.width>r.width?t:r),bH="…",RS=(e,t,r,n,a,o,u,l)=>{var f=e.slice(0,t),h=oO({breakAll:r,style:n,children:f+bH});if(!h)return[!1,[]];var p=lO(h.wordsWithComputedWidth,o,u,l),g=p.length>a||uO(p).width>Number(o);return[g,p]},wH=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,l=e.style,f=e.breakAll,h=Ne(o),p=String(u),g=lO(t,n,r,a);if(!h||a)return g;var x=g.length>o||uO(g).width>Number(n);if(!x)return g;for(var b=0,j=p.length-1,k=0,S;b<=j&&k<=p.length-1;){var N=Math.floor((b+j)/2),P=N-1,O=RS(p,P,f,l,o,n,r,a),A=TS(O,2),_=A[0],C=A[1],I=RS(p,N,f,l,o,n,r,a),W=TS(I,1),U=W[0];if(!_&&!U&&(b=N+1),_&&U&&(j=N-1),!_&&U){S=C;break}k++}return S||g},$S=e=>{var t=Kt(e)?[]:e.toString().split(aO);return[{words:t,width:void 0}]},jH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!ec.isSsr){var l,f,h=oO({breakAll:o,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;l=p,f=g}else return $S(n);return wH({breakAll:o,children:n,maxLines:u,style:a},l,f,t,!!r)}return $S(n)},cO="#808080",kH={angle:0,breakAll:!1,capHeight:"0.71em",fill:cO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},B0=v.forwardRef((e,t)=>{var r=Qr(e,kH),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,g=IS(r,fH),x=v.useMemo(()=>jH({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,j=g.dy,k=g.angle,S=g.className,N=g.breakAll,P=IS(g,hH);if(!Dn(n)||!Dn(a)||x.length===0)return null;var O=Number(n)+(Ne(b)?b:0),A=Number(a)+(Ne(j)?j:0);if(!Be(O)||!Be(A))return null;var _;switch(p){case"start":_=Eg("calc(".concat(u,")"));break;case"middle":_=Eg("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Eg("calc(".concat(x.length-1," * -").concat(o,")"));break}var C=[],I=x[0];if(f&&I!=null){var W=I.width,U=g.width;C.push("scale(".concat(Ne(U)&&Ne(W)?U/W:1,")"))}return k&&C.push("rotate(".concat(k,", ").concat(O,", ").concat(A,")")),C.length&&(P.transform=C.join(" ")),v.createElement("text",Qv({},Gr(P),{ref:t,x:O,y:A,className:et("recharts-text",S),textAnchor:h,fill:l.includes("url")?cO:l}),x.map((G,Y)=>{var $=G.words.join(N?"":" ");return v.createElement("tspan",{x:O,dy:Y===0?_:o,key:"".concat($,"-").concat(Y)},$)}))});B0.displayName="Text";function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=Dy(t),l=u.x,f=u.y,h=u.height,p=u.upperWidth,g=u.lowerWidth,x=l,b=l+(p-g)/2,j=(x+b)/2,k=(p+g)/2,S=x+p/2,N=h>=0?1:-1,P=N*a,O=N>0?"end":"start",A=N>0?"start":"end",_=p>=0?1:-1,C=_*a,I=_>0?"end":"start",W=_>0?"start":"end",U=o;if(r==="top"){var G={x:x+p/2,y:f-P,horizontalAnchor:"middle",verticalAnchor:O};return U&&(G.height=Math.max(f-U.y,0),G.width=p),G}if(r==="bottom"){var Y={x:b+g/2,y:f+h+P,horizontalAnchor:"middle",verticalAnchor:A};return U&&(Y.height=Math.max(U.y+U.height-(f+h),0),Y.width=g),Y}if(r==="left"){var $={x:j-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return U&&($.width=Math.max($.x-U.x,0),$.height=h),$}if(r==="right"){var ue={x:j+k+C,y:f+h/2,horizontalAnchor:W,verticalAnchor:"middle"};return U&&(ue.width=Math.max(U.x+U.width-ue.x,0),ue.height=h),ue}var J=U?{width:k,height:h}:{};return r==="insideLeft"?kn({x:j+C,y:f+h/2,horizontalAnchor:W,verticalAnchor:"middle"},J):r==="insideRight"?kn({x:j+k-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},J):r==="insideTop"?kn({x:x+p/2,y:f+P,horizontalAnchor:"middle",verticalAnchor:A},J):r==="insideBottom"?kn({x:b+g/2,y:f+h-P,horizontalAnchor:"middle",verticalAnchor:O},J):r==="insideTopLeft"?kn({x:x+C,y:f+P,horizontalAnchor:W,verticalAnchor:A},J):r==="insideTopRight"?kn({x:x+p-C,y:f+P,horizontalAnchor:I,verticalAnchor:A},J):r==="insideBottomLeft"?kn({x:b+C,y:f+h-P,horizontalAnchor:W,verticalAnchor:O},J):r==="insideBottomRight"?kn({x:b+g-C,y:f+h-P,horizontalAnchor:I,verticalAnchor:O},J):r&&typeof r=="object"&&(Ne(r.x)||oo(r.x))&&(Ne(r.y)||oo(r.y))?kn({x:l+da(r.x,k),y:f+da(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},J):kn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},J)},AH=["labelRef"],CH=["content"];function zS(e,t){if(e==null)return{};var r,n,a=OH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,l=e.children,f=v.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return v.createElement(dO.Provider,{value:f},l)},fO=()=>{var e=v.useContext(dO),t=Ah();return e||(t?Dy(t):void 0)},DH=v.createContext(null),RH=()=>{var e=v.useContext(DH),t=Ce(tA);return e||t},$H=e=>{var t=e.value,r=e.formatter,n=Kt(e.children)?t:e.children;return typeof r=="function"?r(n):n},U0=e=>e!=null&&typeof e=="function",LH=(e,t)=>{var r=Wr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},zH=(e,t,r,n,a)=>{var o=e.offset,u=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,g=a.startAngle,x=a.endAngle,b=a.clockWise,j=(h+p)/2,k=LH(g,x),S=k>=0?1:-1,N,P;switch(t){case"insideStart":N=g+S*o,P=b;break;case"insideEnd":N=x-S*o,P=!b;break;case"end":N=x+S*o,P=b;break;default:throw new Error("Unsupported position ".concat(t))}P=k<=0?P:!P;var O=Ht(l,f,j,N),A=Ht(l,f,j,N+(P?1:-1)*359),_="M".concat(O.x,",").concat(O.y,` + A`).concat(j,",").concat(j,",0,1,").concat(P?0:1,`, + `).concat(A.x,",").concat(A.y),C=Kt(e.id)?Nu("recharts-radial-line-"):e.id;return v.createElement("text",ri({},n,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),v.createElement("defs",null,v.createElement("path",{id:C,d:_})),v.createElement("textPath",{xlinkHref:"#".concat(C)},r))},FH=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Ht(n,a,u+t,h),g=p.x,x=p.y;return{x:g,y:x,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=Ht(n,a,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},nf=e=>e!=null&&"cx"in e&&Ne(e.cx),BH={angle:0,offset:5,zIndex:or.label,position:"middle",textBreakAll:!1};function UH(e){if(!nf(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function Qi(e){var t=Qr(e,BH),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,g=t.labelRef,x=RH(),b=fO(),j=a==="center"?b:x??b,k,S,N;r==null?k=j:nf(r)?k=r:k=Dy(r);var P=UH(k);if(!k||Kt(o)&&Kt(u)&&!v.isValidElement(l)&&typeof l!="function")return null;var O=cu(cu({},t),{},{viewBox:k});if(v.isValidElement(l)){O.labelRef;var A=zS(O,AH);return v.cloneElement(l,A)}if(typeof l=="function"){O.content;var _=zS(O,CH);if(S=v.createElement(l,_),v.isValidElement(S))return S}else S=$H(t);var C=Gr(t);if(nf(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return zH(t,a,S,C,k);N=FH(k,t.offset,t.position)}else{if(!P)return null;var I=PH({viewBox:P,position:a,offset:t.offset,parentViewBox:nf(n)?void 0:n});N=cu(cu({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return v.createElement(bi,{zIndex:t.zIndex},v.createElement(B0,ri({ref:g,className:et("recharts-label",h)},C,N,{textAnchor:sO(C.textAnchor)?C.textAnchor:N.textAnchor,breakAll:p}),S))}Qi.displayName="Label";var WH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?v.createElement(Qi,ri({key:"label-implicit"},n)):Dn(e)?v.createElement(Qi,ri({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===Qi?v.cloneElement(e,cu({key:"label-implicit"},n)):v.createElement(Qi,ri({key:"label-implicit",content:e},n)):U0(e)?v.createElement(Qi,ri({key:"label-implicit",content:e},n)):e&&typeof e=="object"?v.createElement(Qi,ri({},e,{key:"label-implicit"},n)):null};function HH(e){var t=e.label,r=e.labelRef,n=fO();return WH(t,n,r)||null}var KH=["valueAccessor"],GH=["dataKey","clockWise","id","textBreakAll","zIndex"];function Qf(){return Qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(xH(t))return t},hO=v.createContext(void 0),QH=hO.Provider,pO=v.createContext(void 0);pO.Provider;function YH(){return v.useContext(hO)}function XH(){return v.useContext(pO)}function af(e){var t=e.valueAccessor,r=t===void 0?qH:t,n=BS(e,KH),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,l=n.zIndex,f=BS(n,GH),h=YH(),p=XH(),g=h||p;return!g||!g.length?null:v.createElement(bi,{zIndex:l??or.label},v.createElement(Vr,{className:"recharts-label-list"},g.map((x,b)=>{var j,k=Kt(a)?r(x,b):Tt(x.payload,a),S=Kt(o)?{}:{id:"".concat(o,"-").concat(b)};return v.createElement(Qi,Qf({key:"label-".concat(b)},Gr(x),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:x.fill,parentViewBox:x.parentViewBox,value:k,textBreakAll:u,viewBox:x.viewBox,index:b,zIndex:0}))})))}af.displayName="LabelList";function ZH(e){var t=e.label;return t?t===!0?v.createElement(af,{key:"labelList-implicit"}):v.isValidElement(t)||U0(t)?v.createElement(af,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(af,Qf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=et("recharts-dot",a);return Ne(t)&&Ne(r)&&Ne(n)?v.createElement("circle",Yv({},dn(e),Ny(e),{className:o,cx:t,cy:r,r:n})):null},JH={radiusAxis:{},angleAxis:{}},gO=rr({name:"polarAxis",initialState:JH,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),Xh=gO.actions;Xh.addRadiusAxis;Xh.removeRadiusAxis;Xh.addAngleAxis;Xh.removeAngleAxis;var eK=gO.reducer;function tK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var vO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function US(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function WS(e){for(var t=1;t{n||(a.current===null?r(bU(t)):a.current!==t&&r(wU({prev:a.current,next:t})),a.current=t)},[t,r,n]),v.useLayoutEffect(()=>()=>{a.current&&(r(jU(a.current)),a.current=null)},[r]),null}function dK(e){var t=e.legendPayload,r=jt(),n=wr(),a=v.useRef(null);return v.useLayoutEffect(()=>{n||(a.current===null?r(qL(t)):a.current!==t&&r(QL({prev:a.current,next:t})),a.current=t)},[r,n,t]),v.useLayoutEffect(()=>()=>{a.current&&(r(YL(a.current)),a.current=null)},[r]),null}function fK(e,t){return gK(e)||mK(e,t)||pK(e,t)||hK()}function hK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pK(e,t){if(e){if(typeof e=="string")return HS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?HS(e,t):void 0}}function HS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;oe[Math.floor(o*r)]);return H0(n,t)}function xK(e,t){var r=t.map((n,a)=>e[a]);return H0(r,t)}function bK(e,t){for(var r=new Map,n=0;n{var b=r(g,x);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),u=[];for(var l of n){var f=fK(l,2),h=f[0],p=f[1];a.has(h)||u.push(p)}return H0(o,t,u)}function Xv(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===W0?yK(e,t):r===vK?xK(e,t):wK(e,t,r)}function xO(e,t){var r=v.useRef(e),n=v.useRef(t.current),a=v.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=v.useCallback(function(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=u),l>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function jK(e,t){return EK(e)||NK(e,t)||SK(e,t)||kK()}function kK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SK(e,t){if(e){if(typeof e=="string")return KS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?KS(e,t):void 0}}function KS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),l=v.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:l}}function AK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,g=e.onAnimationEnd,x=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=TP(r,n),P=xO(N,o),O=(t=P.startValue)!==null&&t!==void 0?t:null,A=Xv(O,a,b??W0);return v.createElement(IP,{animationId:N,begin:l,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:p,key:N},_=>{var C=O==null,I=a==null?a:x(A,_,S),W=j?j(_):_>0;return P.syncStepValue(I,_,W),I==null?null:k(I,_,C)})}var Pg;function CK(e,t){return IK(e)||MK(e,t)||_K(e,t)||OK()}function OK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=v.useState(()=>Nu("uid-")),t=CK(e,1),r=t[0];return r},bO=(Pg=nh.useId)!==null&&Pg!==void 0?Pg:TK;function DK(e,t){var r=bO();return t||(e?"".concat(e,"-").concat(r):r)}var RK=v.createContext(void 0),$K=e=>{var t=e.id,r=e.type,n=e.children,a=DK("recharts-".concat(r),t);return v.createElement(RK.Provider,{value:a},n(a))},LK={cartesianItems:[],polarItems:[]},wO=rr({name:"graphicalItems",initialState:LK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:at()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:at()},removeCartesianGraphicalItem:{reducer(e,t){var r=Hr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:at()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:at()},removePolarGraphicalItem:{reducer(e,t){var r=Hr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:at()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:at()}}}),Js=wO.actions,zK=Js.addCartesianGraphicalItem,FK=Js.replaceCartesianGraphicalItem,BK=Js.removeCartesianGraphicalItem;Js.addPolarGraphicalItem;Js.removePolarGraphicalItem;Js.replacePolarGraphicalItem;var UK=wO.reducer,WK=e=>{var t=jt(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(zK(e)):r.current!==e&&t(FK({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(BK(r.current)),r.current=null)},[t]),null},HK=v.memo(WK),KK=["points"];function VS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t{var N,P,O=Ag(Ag(Ag({r:3},u),x),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(P=k.y)!==null&&P!==void 0?P:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return v.createElement(XK,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),j={};return l&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),v.createElement(bi,{zIndex:p},v.createElement(Vr,Yf({className:n},j),b))}function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function QS(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),hG=V([fG,pi,mi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),K0=()=>Ce(hG),pG=()=>Ce(b7);function YS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cg(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var l={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Cg(Cg(Cg({},l),ch(a)),Ny(a)),h;return v.isValidElement(a)?h=v.cloneElement(a,f):typeof a=="function"?h=a(f):h=v.createElement(mO,f),v.createElement(Vr,{className:"recharts-active-dot",clipPath:u},h)};function XS(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,l=u===void 0?or.activeDot:u,f=Ce(Lu),h=pG();if(t==null||h==null)return null;var p=t.find(g=>h.includes(g.payload));return Kt(p)?null:v.createElement(bi,{zIndex:l},v.createElement(yG,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var xG=e=>{var t=e.chartData,r=jt(),n=wr();return v.useEffect(()=>n?()=>{}:(r(xS(t)),()=>{r(xS(void 0))}),[t,r,n]),null},ZS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},SO=rr({name:"brush",initialState:ZS,reducers:{setBrushSettings(e,t){return t.payload==null?ZS:t.payload}}});SO.actions.setBrushSettings;var bG=SO.reducer;function wG(e){return(e%180+180)%180}var jG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=wG(a),u=o*Math.PI/180,l=Math.atan(n/r),f=u>l&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Hr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Hr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Hr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),el=NO.actions;el.addDot;el.removeDot;el.addArea;el.removeArea;el.addLine;el.removeLine;var SG=NO.reducer;function NG(e,t){return CG(e)||AG(e,t)||PG(e,t)||EG()}function EG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PG(e,t){if(e){if(typeof e=="string")return JS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JS(e,t):void 0}}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=v.useState("".concat(Nu("recharts"),"-clip")),n=NG(r,1),a=n[0],o=K0();if(o==null)return null;var u=o.x,l=o.y,f=o.width,h=o.height;return v.createElement(OG.Provider,{value:a},v.createElement("defs",null,v.createElement("clipPath",{id:a},v.createElement("rect",{x:u,y:l,height:h,width:f}))),t)};function EO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function TG(e,t){return EO(e,t+1)}function DG(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,l=t.end,f=0,h=1,p=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:EO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),P=j.coordinate,O=f===0||Fu(e,P,N,p,l);O||(f=0,p=u,h+=1),O&&(p=P+e*(N()/2+a),f+=h)},x;h<=o.length;)if(x=g(),x)return x.v;return[]}function RG(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var l=t.start,f=t.end,h=1;h<=u;h++){for(var p=(u-1)%h,g=l,x=!0,b=function(){var A=n[k];if(A==null)return 0;var _=k,C,I=()=>(C===void 0&&(C=r(A,_)),C),W=A.coordinate,U=k===p||Fu(e,W,I,g,f);if(!U)return x=!1,1;U&&(g=W+e*(I()/2+a))},j,k=p;k(k===void 0&&(k=r(b,x)),k);if(x===u-1){var N=e*(j.coordinate+e*S()/2-f);o[x]=j=er(er({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[x]=j=er(er({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var P=Fu(e,j.tickCoord,S,l,f);P&&(f=j.tickCoord-e*(S()/2+a),o[x]=er(er({},j),{},{isShow:!0}))}},p=u-1;p>=0;p--)h(p);return o}function BG(e,t,r,n,a,o){var u=(n||[]).slice(),l=u.length,f=t.start,h=t.end;if(o){var p=n[l-1];if(p!=null){var g=r(p,l-1),x=e*(p.coordinate+e*g/2-h);if(u[l-1]=p=er(er({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate}),p.tickCoord!=null){var b=Fu(e,p.tickCoord,()=>g,f,h);b&&(h=p.tickCoord-e*(g/2+a),u[l-1]=er(er({},p),{},{isShow:!0}))}}}for(var j=o?l-1:l,k=function(P){var O=u[P];if(O==null)return 1;var A=O,_,C=()=>(_===void 0&&(_=r(O,P)),_);if(P===0){var I=e*(A.coordinate-e*C()/2-f);u[P]=A=er(er({},A),{},{tickCoord:I<0?A.coordinate-I*e:A.coordinate})}else u[P]=A=er(er({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var W=Fu(e,A.tickCoord,C,f,h);W&&(f=A.tickCoord+e*(C()/2+a),u[P]=er(er({},A),{},{isShow:!0}))}},S=0;S{var I=typeof h=="function"?h(_.value,C):_.value;return j==="width"?MG(hu(I,{fontSize:t,letterSpacing:r}),k,g):hu(I,{fontSize:t,letterSpacing:r})[j]},N=a[0],P=a[1],O=a.length>=2&&N!=null&&P!=null?Wr(P.coordinate-N.coordinate):1,A=IG(o,O,j);return f==="equidistantPreserveStart"?DG(O,A,S,a,u):f==="equidistantPreserveEnd"?RG(O,A,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=BG(O,A,S,a,u,f==="preserveStartEnd"):b=FG(O,A,S,a,u),b.filter(_=>_.isShow))}var UG=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var p=r?r.getBoundingClientRect().width:0,g=u+f,x=h+g+p+(r?a:0);return Math.round(x)}return 0},WG={xAxis:{},yAxis:{}},PO=rr({name:"renderedTicks",initialState:WG,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),AO=PO.actions,HG=AO.setRenderedTicks,KG=AO.removeRenderedTicks,GG=PO.reducer,VG=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function tN(e,t){return XG(e)||YG(e,t)||QG(e,t)||qG()}function qG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QG(e,t){if(e){if(typeof e=="string")return rN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rN(e,t):void 0}}function rN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Ws;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(HG({ticks:o,axisId:n,axisType:r})),()=>{a(KG({axisId:n,axisType:r}))}},[a,t,n,r]),null}var uV=v.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,g=e.orientation,x=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,P=e.tickMargin,O=e.fontSize,A=e.letterSpacing,_=e.getTicksConfig,C=e.events,I=e.axisType,W=e.axisId,U=G0(mt(mt({},_),{},{ticks:n}),O,A),G=dn(_),Y=ch(a),$=sO(G.textAnchor)?G.textAnchor:aV(g,x),ue=oV(g,x),J={};typeof o=="object"&&(J=o);var ge=mt(mt({},G),{},{fill:"none"},J),we=U.map(Z=>mt({entry:Z},iV(Z,b,j,k,S,g,N,x,P))),pe=we.map(Z=>{var Q=Z.entry,D=Z.line;return v.createElement(Vr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},o&&v.createElement("line",ho({},ge,D,{className:et("recharts-cartesian-axis-tick-line",vo(o,"className"))})))}),F=we.map((Z,Q)=>{var D,T,te=Z.entry,ie=Z.tick,re=mt(mt(mt(mt({verticalAnchor:ue},G),{},{textAnchor:$,stroke:"none",fill:u},ie),{},{index:Q,payload:te,visibleTicksCount:U.length,tickFormatter:l,padding:h},p),{},{angle:(D=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:G.angle)!==null&&D!==void 0?D:0}),ce=mt(mt({},re),Y);return v.createElement(Vr,ho({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(te.value,"-").concat(te.coordinate,"-").concat(te.tickCoord)},hD(C,te,Q)),a&&v.createElement(sV,{option:a,tickProps:ce,value:"".concat(typeof l=="function"?l(te.value,Q):te.value).concat(f||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},v.createElement(lV,{ticks:U,axisId:W,axisType:I}),F.length>0&&v.createElement(bi,{zIndex:or.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},F)),pe.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},pe))}),cV=v.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=ZG(e,VG),g=v.useState(""),x=tN(g,2),b=x[0],j=x[1],k=v.useState(""),S=tN(k,2),N=S[0],P=S[1],O=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return UG({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var A=v.useCallback(_=>{if(_){var C=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=C;var I=C[0];if(I){var W=window.getComputedStyle(I),U=W.fontSize,G=W.letterSpacing;(U!==b||G!==N)&&(j(U),P(G))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:v.createElement(bi,{zIndex:e.zIndex},v.createElement(Vr,{className:et("recharts-cartesian-axis",o)},v.createElement(nV,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:dn(e)}),v.createElement(uV,{ref:A,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),v.createElement(TH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(HH,{label:e.label,labelRef:e.labelRef}),e.children)))}),V0=v.forwardRef((e,t)=>{var r=Qr(e,ui);return v.createElement(cV,ho({},r,{ref:t}))});V0.displayName="CartesianAxis";var dV=["x1","y1","x2","y2","key"],fV=["offset"],hV=["xAxisId","yAxisId"],pV=["xAxisId","yAxisId"];function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.ry;return v.createElement("rect",{x:n,y:a,ry:l,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function CO(e){var t=e.option,r=e.lineItemProps,n;if(v.isValidElement(t))n=v.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,l=r.x2,f=r.y2,h=r.key,p=Xf(r,dV),g=(a=dn(p))!==null&&a!==void 0?a:{};g.offset;var x=Xf(g,fV);n=v.createElement("line",Ha({},x,{x1:o,y1:u,x2:l,y2:f,fill:"none",key:h}))}return n}function bV(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Xf(e,hV),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return v.createElement(CO,{key:"line-".concat(h),option:a,lineItemProps:p})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function wV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Xf(e,pV),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return v.createElement(CO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function jV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(x=>Math.round(x+a-a)).sort((x,b)=>x-b);a!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var j=p[b+1],k=j==null,S=k?a+u-x:j-x;if(S<=0)return null;var N=b%t.length;return v.createElement("rect",{key:"react-".concat(b),y:x,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function kV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(x=>Math.round(x+o-o)).sort((x,b)=>x-b);o!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var j=p[b+1],k=j==null,S=k?o+l-x:j-x;if(S<=0)return null;var N=b%n.length;return v.createElement("rect",{key:"react-".concat(b),x,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var SV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return uP(G0(tr(tr(tr({},ui),r),{},{ticks:cP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},NV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return uP(G0(tr(tr(tr({},ui),r),{},{ticks:cP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},EV={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:or.grid};function OO(e){var t=yP(),r=xP(),n=vP(),a=tr(tr({},Qr(e,EV)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,g=a.syncWithTicks,x=a.horizontalValues,b=a.verticalValues,j=wr(),k=Ce(U=>oS(U,"xAxis",o,j)),S=Ce(U=>oS(U,"yAxis",u,j));if(!Rn(h)||!Rn(p)||!Ne(l)||!Ne(f))return null;var N=a.verticalCoordinatesGenerator||SV,P=a.horizontalCoordinatesGenerator||NV,O=a.horizontalPoints,A=a.verticalPoints;if((!O||!O.length)&&typeof P=="function"){var _=x&&x.length,C=P({yAxis:S?tr(tr({},S),{},{ticks:_?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:g);kf(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(O=C)}if((!A||!A.length)&&typeof N=="function"){var I=b&&b.length,W=N({xAxis:k?tr(tr({},k),{},{ticks:I?b:k.ticks}):void 0,width:t??h,height:r??p,offset:n},I?!0:g);kf(Array.isArray(W),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof W,"]")),Array.isArray(W)&&(A=W)}return v.createElement(bi,{zIndex:a.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(xV,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),v.createElement(jV,Ha({},a,{horizontalPoints:O})),v.createElement(kV,Ha({},a,{verticalPoints:A})),v.createElement(bV,Ha({},a,{offset:n,horizontalPoints:O,xAxis:k,yAxis:S})),v.createElement(wV,Ha({},a,{offset:n,verticalPoints:A,xAxis:k,yAxis:S}))))}OO.displayName="CartesianGrid";var PV={},_O=rr({name:"errorBars",initialState:PV,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),q0=_O.actions;q0.addErrorBar;q0.replaceErrorBar;q0.removeErrorBar;var AV=_O.reducer;function MO(e,t){var r,n,a=Ce(h=>vi(h,e)),o=Ce(h=>yi(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Nt.allowDataOverflow,l=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Et.allowDataOverflow,f=u||l;return{needClip:f,needClipX:u,needClipY:l}}function CV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=K0(),o=MO(t,r),u=o.needClipX,l=o.needClipY,f=o.needClip,h=Ce(O=>gC(O,t,!1)),p=Ce(O=>vC(O,r,!1));if(!f||!a)return null;var g=a.x,x=a.y,b=a.width,j=a.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=l&&p?Math.min(p[0],p[1]):x-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,P=l&&p?Math.abs(p[1]-p[0]):j*2;return v.createElement("clipPath",{id:"clipPath-".concat(n)},v.createElement("rect",{x:k,y:S,width:N,height:P}))}function OV(e){var t=ch(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),l=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(l)||l<0)&&(l=n),{r:u,strokeWidth:l}}return{r,strokeWidth:n}}function Q0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:jO}function Y0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:jO}var IO=(e,t,r)=>NC(e,"xAxis",Q0(e,t),r),TO=(e,t,r)=>SC(e,"xAxis",Q0(e,t),r),DO=(e,t,r)=>NC(e,"yAxis",Y0(e,t),r),RO=(e,t,r)=>SC(e,"yAxis",Y0(e,t),r),_V=V([ut,IO,DO,TO,RO],(e,t,r,n,a)=>zn(e,"xAxis")?jf(t,n,!1):jf(r,a,!1)),MV=(e,t)=>t,$O=V([HA,MV],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),LO=e=>{var t=ut(e),r=zn(t,"xAxis");return r?"yAxis":"xAxis"},IV=(e,t)=>{var r=LO(e);return r==="yAxis"?Y0(e,t):Q0(e,t)},TV=(e,t,r)=>eC(e,LO(e),IV(e,t),r),DV=V([$O,TV],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Yy(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(l=>l.key===a);if(u!=null)return u.map(l=>[l[0],l[1]])}}}),RV=V([ut,IO,DO,TO,RO,DV,oF,_V,$O,kF],(e,t,r,n,a,o,u,l,f,h)=>{var p=u.chartData,g=u.dataStartIndex,x=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=p==null?void 0:p.slice(g,x+1),j!=null)return lq({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:l})}}),$V=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],LV=["id","baseLine"];function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.y||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.y||0),p)),Ne(p)?v.createElement("rect",{x:lg.x||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.x||0),p)),Ne(p)?v.createElement("rect",{x:0,y:le==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Fs(Fs({},r.next),{},{x:ni(r.prev.x,r.next.x,t),y:ni(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),FO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:W0,animationInterpolateFn:YV,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:WV,xAxisId:0,yAxisId:0,zIndex:or.area};function Jf(e,t){return e&&e!=="none"?e:t}var XV=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:Jf(n,a),value:dP(r,t),payload:e}]},ZV=v.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,g={dataDefinedOnItem:r,getPosition:Ws,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:dP(u,t),hide:l,type:h,color:Jf(n,o),unit:f,graphicalItemId:p}};return v.createElement(cK,{tooltipEntrySettings:g})});function JV(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,l=dn(n);return v.createElement(JK,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:l,needClip:a,clipPathId:t})}function eq(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,l,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(l=o.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Fs(Fs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return v.createElement(QH,{value:t?a:void 0},r)}function tq(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=o.layout,p=o.type,g=o.stroke,x=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=zO(o,HV),N=Gr(S),P=Fs(Fs({},N),{},{id:k,points:t,connectNulls:x,type:p,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:l,isEntrance:f});return v.createElement(v.Fragment,null,(t==null?void 0:t.length)>1&&v.createElement(Vr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},v.createElement(uK,{option:j,DefaultShape:FO.shape,shapeProps:P})),v.createElement(JV,{points:t,props:S,clipPathId:a}))}function rq(e,t,r){if(Ne(e)){var n=Ne(t)?t:void 0;return ni(n,e,r)}if(Kt(e)||Tn(e)){var a=Ne(t)?t:void 0;return ni(a,0,r)}return e}function nq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,g=n.animationEasing,x=n.animationMatchBy,b=n.animationInterpolateFn,j=v.useMemo(()=>({points:u,baseLine:l}),[u,l]),k=xO(j,o),S=Ry(),N=PK(n.onAnimationStart,n.onAnimationEnd),P=N.isAnimating,O=N.handleAnimationStart,A=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var C;return Array.isArray(l)&&Array.isArray(_)?C=Xv(_,l,x):Array.isArray(l)?C=Xv(null,l,x):C=null,v.createElement(AK,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,onAnimationStart:O,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:x,layout:S},(I,W,U)=>{var G;return W===1?G=l:Array.isArray(l)?G=b(C,W,S):G=U?l:rq(l,_,W),k.syncStepValue(G,W),v.createElement(eq,{showLabels:!P,points:u},n.children,v.createElement(tq,{points:I,baseLine:G,needClip:t,clipPathId:r,props:n,animationElapsedTime:W,isAnimating:P||W<1,isEntrance:U}),v.createElement(ZH,{label:n.label}))})}function iq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=v.useRef(null),o=v.useRef();return v.createElement(nq,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class aq extends v.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,g=t.width,x=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=et("recharts-area",o),N=b,P=OV(n),O=P.r,A=P.strokeWidth,_=vO(n),C=O*2+A,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return v.createElement(bi,{zIndex:k},v.createElement(Vr,{className:S},f&&v.createElement("defs",null,v.createElement(CV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&v.createElement("clipPath",{id:"clipPath-dots-".concat(N)},v.createElement("rect",{x:l-C/2,y:u-C/2,width:g+C,height:x+C}))),v.createElement(iq,{needClip:f,clipPathId:N,props:this.props})),v.createElement(XS,{points:a,mainColor:Jf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(j)&&v.createElement(XS,{points:j,mainColor:Jf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function oq(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,g=e.isAnimationActive,x=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=zO(e,KV),N=Hs(),P=qC(),O=MO(j,k),A=O.needClip,_=wr(),C=(t=Ce(ge=>RV(ge,e.id,_)))!==null&&t!==void 0?t:{},I=C.points,W=C.isRange,U=C.baseLine,G=K0();if(N!=="horizontal"&&N!=="vertical"||G==null||P!=="AreaChart"&&P!=="ComposedChart")return null;var Y=G.height,$=G.width,ue=G.x,J=G.y;return!I||!I.length?null:v.createElement(aq,Zf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:U,connectNulls:u,dot:l,fill:f,fillOpacity:h,height:Y,hide:p,layout:N,isAnimationActive:g,isRange:W,legendType:x,needClip:A,points:I,stroke:b,width:$,left:ue,top:J,xAxisId:j,yAxisId:k}))}var sq=(e,t,r,n,a)=>{var o=r??t;if(Ne(o))return o;var u=e==="horizontal"?a:n,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]};function lq(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,g=e.dataStartIndex,x=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=sq(u,l,n,f,h),N=u==="horizontal",P=!1,O=p.map((_,C)=>{var I,W,U,G;if(k)G=o[g+C];else{var Y=Tt(_,a);Array.isArray(Y)?(G=Y,P=!0):G=[S,Y]}var $=(I=(W=G)===null||W===void 0?void 0:W[1])!==null&&I!==void 0?I:null,ue=$==null||k&&!r&&Tt(_,a)==null;if(N){var J;return{x:tj({axis:f,ticks:x,bandSize:j,entry:_,index:C}),y:ue?null:(J=h.scale.map($))!==null&&J!==void 0?J:null,value:G,payload:_}}return{x:ue?null:(U=f.scale.map($))!==null&&U!==void 0?U:null,y:tj({axis:h,ticks:b,bandSize:j,entry:_,index:C}),value:G,payload:_}}),A;return k||P?A=O.map(_=>{var C,I=Array.isArray(_.value)?_.value[0]:null;if(N){var W;return{x:_.x,y:I!=null&&_.y!=null&&(W=h.scale.map(I))!==null&&W!==void 0?W:null,payload:_.payload}}return{x:I!=null&&(C=f.scale.map(I))!==null&&C!==void 0?C:null,y:_.y,payload:_.payload}}):A=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:A??0,isRange:P}}function uq(e){var t=Qr(e,FO),r=wr();return v.createElement($K,{id:t.id,type:"area"},n=>v.createElement(v.Fragment,null,v.createElement(dK,{legendPayload:XV(t)}),v.createElement(ZV,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),v.createElement(HK,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:G$(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),v.createElement(oq,Zf({},t,{id:n}))))}var BO=v.memo(uq,Mh);BO.displayName="Area";var cq=["domain","range"],dq=["domain","range"];function sN(e,t){if(e==null)return{};var r,n,a=fq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(u!=null)return cN(cN({},o),{},{type:u})},[o,u]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(iG(l)):r.current!==l&&t(aG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(oG(r.current)),r.current=null)},[t]),null}var wq=e=>{var t=e.xAxisId,r=e.className,n=Ce(hP),a=wr(),o="xAxis",u=Ce(x=>kC(x,o,t,a)),l=Ce(x=>tU(x,t)),f=Ce(x=>sU(x,t)),h=Ce(x=>FA(x,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=Jv(e,pq);h.id,h.scale;var g=Jv(h,mq);return v.createElement(V0,Zv({},p,g,{x:f.x,y:f.y,width:l.width,height:l.height,className:et("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},jq={allowDataOverflow:Nt.allowDataOverflow,allowDecimals:Nt.allowDecimals,allowDuplicatedCategory:Nt.allowDuplicatedCategory,angle:Nt.angle,axisLine:ui.axisLine,height:Nt.height,hide:!1,includeHidden:Nt.includeHidden,interval:Nt.interval,label:!1,minTickGap:Nt.minTickGap,mirror:Nt.mirror,orientation:Nt.orientation,padding:Nt.padding,reversed:Nt.reversed,scale:Nt.scale,tick:Nt.tick,tickCount:Nt.tickCount,tickLine:ui.tickLine,tickSize:ui.tickSize,type:Nt.type,niceTicks:Nt.niceTicks,xAxisId:0},kq=e=>{var t=Qr(e,jq);return v.createElement(v.Fragment,null,v.createElement(bq,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(wq,t))},WO=v.memo(kq,UO);WO.displayName="XAxis";var Sq=["type"],Nq=["dangerouslySetInnerHTML","ticks","scale"],Eq=["id","scale"];function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return fN(fN({},o),{},{type:u})},[u,o]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(sG(l)):r.current!==l&&t(lG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(uG(r.current)),r.current=null)},[t]),null}function Mq(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=v.useRef(null),u=v.useRef(null),l=Ce(hP),f=wr(),h=jt(),p="yAxis",g=Ce(N=>cU(N,t)),x=Ce(N=>uU(N,t)),b=Ce(N=>kC(N,p,t,f)),j=Ce(N=>BA(N,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!g||U0(a)||v.isValidElement(a)||j==null)){var N=o.current;if(N){var P=N.getCalculatedWidth();Math.round(g.width)!==Math.round(P)&&h(cG({id:t,width:P}))}}},[b,g,h,a,t,n,j]),g==null||x==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=ty(e,Nq);j.id,j.scale;var S=ty(j,Eq);return v.createElement(V0,ey({},k,S,{ref:o,labelRef:u,x:x.x,y:x.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:et("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var Iq={allowDataOverflow:Et.allowDataOverflow,allowDecimals:Et.allowDecimals,allowDuplicatedCategory:Et.allowDuplicatedCategory,angle:Et.angle,axisLine:ui.axisLine,hide:!1,includeHidden:Et.includeHidden,interval:Et.interval,label:!1,minTickGap:Et.minTickGap,mirror:Et.mirror,orientation:Et.orientation,padding:Et.padding,reversed:Et.reversed,scale:Et.scale,tick:Et.tick,tickCount:Et.tickCount,tickLine:ui.tickLine,tickSize:ui.tickSize,type:Et.type,niceTicks:Et.niceTicks,width:Et.width,yAxisId:0},Tq=e=>{var t=Qr(e,Iq);return v.createElement(v.Fragment,null,v.createElement(_q,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(Mq,t))},HO=v.memo(Tq,UO);HO.displayName="YAxis";var Dq=(e,t)=>t,X0=V([Dq,ut,tA,Rt,UC,xi,M7,Vt],z7);function Rq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Z0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Rq(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>u(l.clientX,l.clientY)):u(e.clientX,e.clientY)}var KO=Mr("mouseClick"),GO=Qu();GO.startListening({actionCreator:KO,effect:(e,t)=>{var r=e.payload,n=X0(t.getState(),Z0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(NU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var ry=Mr("mouseMove"),VO=Qu(),ts=null,Ma=null,Og=null;VO.startListening({actionCreator:ry,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||(u==null?void 0:u.includes("mousemove"));ts!==null&&(cancelAnimationFrame(ts),ts=null),Ma!==null&&(typeof o!="number"||!l)&&(clearTimeout(Ma),Ma=null),Og=Z0(r);var f=()=>{var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(!Og){ts=null,Ma=null;return}if(p==="axis"){var g=X0(h,Og);(g==null?void 0:g.activeIndex)!=null?t.dispatch(MC({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(_C())}ts=null,Ma=null};if(!l){f();return}o==="raf"?ts=requestAnimationFrame(f):typeof o=="number"&&Ma===null&&(Ma=setTimeout(f,o))}});function $q(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var hN={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},qO=rr({name:"rootProps",initialState:hN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:hN.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Lq=qO.reducer,zq=qO.actions.updateOptions,Fq=null,Bq={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},QO=rr({name:"polarOptions",initialState:Fq,reducers:Bq});QO.actions.updatePolarOptions;var Uq=QO.reducer,YO=Mr("keyDown"),XO=Mr("focus"),ZO=Mr("blur"),Zh=Qu(),rs=null,Ia=null,Hd=null;Zh.startListening({actionCreator:YO,effect:(e,t)=>{Hd=e.payload,rs!==null&&(cancelAnimationFrame(rs),rs=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ia!==null&&(typeof a!="number"||!u)&&(clearTimeout(Ia),Ia=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,g=Hd;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var x=fu(p,fo(f),Ls(f),zs(f)),b=x==null?-1:Number(x),j=!Number.isFinite(b)||b<0,k=xi(f),S=fo(f),N=lc(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var P=Vf(f,N,"hover",String(p.index));t.dispatch(Gf({active:!p.active,activeIndex:p.index,activeCoordinate:P}));return}var O=mU(f),A=O==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,C;if(j){var I=Ls(f),W=zs(f),U=_*A,G=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,U>0){for(var Y=0;Y=0;$--)if(fu(G($),S,I,W)!=null){C=$;break}if(C<0)return}else{C=b+_*A;var ue=(k==null?void 0:k.length)||S.length;if(ue===0||C>=ue||C<0)return}var J=Vf(f,N,"hover",String(C));t.dispatch(Gf({active:!0,activeIndex:C.toString(),activeCoordinate:J}))}finally{rs=null,Ia=null}};if(!u){l();return}a==="raf"?rs=requestAnimationFrame(l):typeof a=="number"&&Ia===null&&(l(),Hd=null,Ia=setTimeout(()=>{Hd?l():(Ia=null,rs=null)},a))}});Zh.startListening({actionCreator:XO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=lc(r,r.tooltip.settings.shared),l=Vf(r,u,"hover",String(o));t.dispatch(Gf({active:!0,activeIndex:o,activeCoordinate:l}))}}}});Zh.startListening({actionCreator:ZO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Gf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function JO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Fr=Mr("externalEvent"),e_=Qu(),Kd=new Map,au=new Map,_g=new Map;e_.startListening({actionCreator:Fr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=JO(a);_g.set(o,{handler:n,reactEvent:u});var l=Kd.get(o);l!==void 0&&(cancelAnimationFrame(l),Kd.delete(o));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,g=h.throttledEvents,x=g,b=x==="all"||(x==null?void 0:x.includes(o)),j=au.get(o);j!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(j),au.delete(o));var k=()=>{var P=_g.get(o);try{if(!P)return;var O=P.handler,A=P.reactEvent,_=t.getState(),C={activeCoordinate:v7(_),activeDataKey:p7(_),activeIndex:Lu(_),activeLabel:KC(_),activeTooltipIndex:Lu(_),isTooltipActive:y7(_)};O&&O(C,A)}finally{Kd.delete(o),au.delete(o),_g.delete(o)}};if(!b){k();return}if(p==="raf"){var S=requestAnimationFrame(k);Kd.set(o,S)}else if(typeof p=="number"){if(!au.has(o)){k();var N=setTimeout(k,p);au.set(o,N)}}else k()}}});var Wq=V([Zs],e=>e.tooltipItemPayloads),Hq=V([Wq,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),t_=Mr("touchMove"),r_=Qu(),Ta=null,Ki=null,pN=null,ou=null;r_.startListening({actionCreator:t_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){ou=JO(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||u.includes("touchmove");Ta!==null&&(cancelAnimationFrame(Ta),Ta=null),Ki!==null&&(typeof o!="number"||!l)&&(clearTimeout(Ki),Ki=null),pN=Array.from(r.touches).map(h=>Z0({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(ou!=null){var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(p==="axis"){var g,x=(g=pN)===null||g===void 0?void 0:g[0];if(x==null){Ta=null,Ki=null;return}var b=X0(h,x);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(MC({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var j,k=ou.touches[0];if(document.elementFromPoint==null||k==null)return;var S=document.elementFromPoint(k.clientX,k.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(J$),P=(j=S.getAttribute(eL))!==null&&j!==void 0?j:void 0,O=bo(h).find(C=>C.id===P);if(N==null||O==null||P==null)return;var A=O.dataKey,_=Hq(h,N,P);t.dispatch(SU({activeDataKey:A,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:P}))}Ta=null,Ki=null}};if(!l){f();return}o==="raf"?Ta=requestAnimationFrame(f):typeof o=="number"&&Ki===null&&(f(),ou=null,Ki=setTimeout(()=>{ou?f():(Ki=null,Ta=null)},o))}}});var n_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},i_=rr({name:"eventSettings",initialState:n_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),Kq=i_.actions.setEventSettings,Gq=i_.reducer,Vq=TE({brush:bG,cartesianAxis:dG,chartData:gW,errorBars:AV,eventSettings:Gq,graphicalItems:UK,layout:$$,legend:XL,options:dW,polarAxis:eK,polarOptions:Uq,referenceElements:SG,renderedTicks:GG,rootProps:Lq,tooltip:EU,zIndex:Z7}),qq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return l$({reducer:Vq,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([GO.middleware,VO.middleware,Zh.middleware,e_.middleware,r_.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(QE({type:"raf"}))},devTools:{serialize:{replacer:$q},name:"recharts-".concat(r)}})};function Qq(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=wr(),o=v.useRef(null);if(a)return r;o.current==null&&(o.current=qq(t,n));var u=Py;return v.createElement(hz,{context:u,store:o.current},r)}function Yq(e){var t=e.layout,r=e.margin,n=jt(),a=wr();return v.useEffect(()=>{a||(n(T$(t)),n(I$(r)))},[n,a,t,r]),null}var Xq=v.memo(Yq,Mh);function Zq(e){var t=jt();return v.useEffect(()=>{t(zq(e))},[t,e]),null}var Jq=e=>{var t=jt();return v.useEffect(()=>{t(Kq(e))},[t,e]),null},eQ=v.memo(Jq,Mh);function mN(e){var t=e.zIndex,r=e.isPanorama,n=v.useRef(null),a=jt();return v.useLayoutEffect(()=>(n.current&&a(Y7({zIndex:t,element:n.current,isPanorama:r})),()=>{a(X7({zIndex:t,isPanorama:r}))}),[a,t,r]),v.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function gN(e){var t=e.children,r=e.isPanorama,n=Ce(B7);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return v.createElement(v.Fragment,null,a.map(u=>v.createElement(mN,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>v.createElement(mN,{key:u,zIndex:u,isPanorama:r})))}var tQ=["children"];function rQ(e,t){if(e==null)return{};var r,n,a=nQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=yP(),n=xP(),a=CP();if(!Rn(r)||!Rn(n))return null;var o=e.children,u=e.otherAttributes,l=e.title,f=e.desc,h,p;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?p=u.role:p=a?"application":void 0),v.createElement(Z2,eh({},u,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:iQ,ref:t}),o)}),oQ=e=>{var t=e.children,r=Ce(Ph);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return v.createElement(Z2,{width:n,height:a,x:u,y:o},t)},vN=v.forwardRef((e,t)=>{var r=e.children,n=rQ(e,tQ),a=wr();return a?v.createElement(oQ,null,v.createElement(gN,{isPanorama:!0},r)):v.createElement(aQ,eh({ref:t},n),v.createElement(gN,{isPanorama:!1},r))});function sQ(e,t){return dQ(e)||cQ(e,t)||uQ(e,t)||lQ()}function lQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uQ(e,t){if(e){if(typeof e=="string")return yN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yN(e,t):void 0}}function yN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var u=n.getBoundingClientRect(),l=u.width/n.offsetWidth;Be(l)&&l!==o&&e(R$(l))}},[n,e,o]),a}function xN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hQ(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(NW(),null);function rh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var jQ=v.forwardRef((e,t)=>{var r,n,a=v.useRef(null),o=v.useState({containerWidth:rh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:rh((n=e.style)===null||n===void 0?void 0:n.height)}),u=th(o,2),l=u[0],f=u[1],h=v.useCallback((g,x)=>{f(b=>{var j=Math.round(g),k=Math.round(x);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),p=v.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var x=g.getBoundingClientRect(),b=x.width,j=x.height;h(b,j);var k=N=>{var P=N[0];if(P!=null){var O=P.contentRect,A=O.width,_=O.height;h(A,_)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return v.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),v.createElement(v.Fragment,null,v.createElement(Xu,{width:l.containerWidth,height:l.containerHeight}),v.createElement("div",ua({ref:p},e)))}),kQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height,a=v.useState({containerWidth:rh(r),containerHeight:rh(n)}),o=th(a,2),u=o[0],l=o[1],f=v.useCallback((p,g)=>{l(x=>{var b=Math.round(p),j=Math.round(g);return x.containerWidth===b&&x.containerHeight===j?x:{containerWidth:b,containerHeight:j}})},[]),h=v.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var g=p.getBoundingClientRect(),x=g.width,b=g.height;f(x,b)}},[t,f]);return v.createElement(v.Fragment,null,v.createElement(Xu,{width:u.containerWidth,height:u.containerHeight}),v.createElement("div",ua({ref:h},e)))}),SQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement("div",ua({ref:t},e)))}),NQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?v.createElement(kQ,ua({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?v.createElement(SQ,ua({},e,{width:r,height:n,ref:t})):v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement("div",ua({ref:t},e)))});function EQ(e){return e?jQ:NQ}var PQ=v.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,g=e.onMouseMove,x=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,P=e.responsive,O=e.dispatchTouchEvents,A=O===void 0?!0:O,_=v.useRef(null),C=jt(),I=v.useState(null),W=th(I,2),U=W[0],G=W[1],Y=v.useState(null),$=th(Y,2),ue=$[0],J=$[1],ge=fQ(),we=Ty(),pe=(we==null?void 0:we.width)>0?we.width:N,F=(we==null?void 0:we.height)>0?we.height:a,Z=v.useCallback(fe=>{ge(fe),typeof t=="function"&&t(fe),G(fe),J(fe),fe!=null&&(_.current=fe)},[ge,t,G,J]),Q=v.useCallback(fe=>{C(KO(fe)),C(Fr({handler:o,reactEvent:fe}))},[C,o]),D=v.useCallback(fe=>{C(ry(fe)),C(Fr({handler:h,reactEvent:fe}))},[C,h]),T=v.useCallback(fe=>{C(_C()),C(Fr({handler:p,reactEvent:fe}))},[C,p]),te=v.useCallback(fe=>{C(ry(fe)),C(Fr({handler:g,reactEvent:fe}))},[C,g]),ie=v.useCallback(()=>{C(XO())},[C]),re=v.useCallback(()=>{C(ZO())},[C]),ce=v.useCallback(fe=>{C(YO(fe.key))},[C]),me=v.useCallback(fe=>{C(Fr({handler:u,reactEvent:fe}))},[C,u]),Oe=v.useCallback(fe=>{C(Fr({handler:l,reactEvent:fe}))},[C,l]),ee=v.useCallback(fe=>{C(Fr({handler:f,reactEvent:fe}))},[C,f]),ke=v.useCallback(fe=>{C(Fr({handler:x,reactEvent:fe}))},[C,x]),_e=v.useCallback(fe=>{C(Fr({handler:k,reactEvent:fe}))},[C,k]),oe=v.useCallback(fe=>{A&&C(t_(fe)),C(Fr({handler:j,reactEvent:fe}))},[C,A,j]),Xe=v.useCallback(fe=>{C(Fr({handler:b,reactEvent:fe}))},[C,b]),X=EQ(P);return v.createElement(JC.Provider,{value:U},v.createElement(B4.Provider,{value:ue},v.createElement(X,{width:pe??(S==null?void 0:S.width),height:F??(S==null?void 0:S.height),className:et("recharts-wrapper",n),style:hQ({position:"relative",cursor:"default",width:pe,height:F},S),onClick:Q,onContextMenu:me,onDoubleClick:Oe,onFocus:ie,onBlur:re,onKeyDown:ce,onMouseDown:ee,onMouseEnter:D,onMouseLeave:T,onMouseMove:te,onMouseUp:ke,onTouchEnd:Xe,onTouchMove:oe,onTouchStart:_e,ref:Z},v.createElement(wQ,null),r)))}),AQ=["width","height","responsive","children","className","style","compact","title","desc"];function CQ(e,t){if(e==null)return{};var r,n,a=OQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,g=CQ(e,AQ),x=dn(g);return f?v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement(vN,{otherAttributes:x,title:h,desc:p},o)):v.createElement(PQ,{className:u,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(vN,{otherAttributes:x,title:h,desc:p,ref:t},v.createElement(_G,null,o)))});function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.createElement(LQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:zQ,tooltipPayloadSearcher:uW,categoricalChartProps:e,ref:t}));const BQ="rgba(130,130,150,0.14)",jN="rgba(130,130,150,0.85)";function UQ(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function a_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function WQ({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:c.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:c.jsx("div",{className:"space-y-1",children:t.map(n=>c.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),c.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),c.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:a_(n.value,r)})]},n.dataKey))})})}function o_({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((l,f)=>t.reduce((h,p)=>Math.max(h,Number(f[p.key])||0),l),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(UQ(o*1.15),10);return c.jsx("div",{style:{height:a},className:"w-full",children:c.jsx(IL,{width:"100%",height:"100%",children:c.jsxs(FQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[c.jsx("defs",{children:t.map(l=>c.jsxs("linearGradient",{id:`grad-${l.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:l.color,stopOpacity:.22}),c.jsx("stop",{offset:"100%",stopColor:l.color,stopOpacity:0})]},l.key))}),c.jsx(OO,{vertical:!1,stroke:BQ}),c.jsx(WO,{dataKey:"t",hide:!0}),c.jsx(HO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:l=>a_(l,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:jN}}),c.jsx(LW,{content:c.jsx(WQ,{unit:r}),cursor:{stroke:jN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(l=>c.jsx(BO,{type:"monotone",dataKey:l.key,name:l.label,stroke:l.color,strokeWidth:2,fill:`url(#grad-${l.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},l.key))]})})})}const HQ=[{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 KQ(){var u,l,f,h;const{sys:e,hist:t}=O4(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=HQ.filter(p=>p.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(l=e==null?void 0:e.ram)==null?void 0:l.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Qo(e.ram.used)}/${Qo(e.ram.total)} GB`:"",gpu:r?`${Qo(e.gpu.gtt_used)}/${Qo(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Qo(e.disk.used)}/${Qo(e.disk.total)} GB`:""};return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(p=>c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:p.color}}),c.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),c.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[p.key]??0),"%"]}),o[p.key]&&c.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[p.key]})]},p.key))}),c.jsx(o_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):c.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&c.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&c.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&c.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function Gd({label:e,value:t,tone:r}){return c.jsxs("div",{className:de("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{className:"flex items-center gap-1.5",children:e}),c.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function GQ(){var r;const{data:e}=vy(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(kI,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&c.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Gd,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),c.jsx(Gd,{label:"Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),c.jsx(Gd,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>c.jsx(Gd,{tone:n.update===!0?"alert":"muted",label:c.jsxs(c.Fragment,{children:[n.name,n.reachable===!1&&c.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),c.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",c.jsx(t2,{className:"h-3.5 w-3.5"})]})]})}function s_({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:l}){const f=v.useRef(null);return c.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),c.jsx("button",{onClick:l||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{ref:f,type:"text",defaultValue:n,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:h=>{var p;h.key==="Enter"&&u((p=f.current)==null?void 0:p.value)}}),a!==void 0&&c.jsx("button",{type:"button",onClick:()=>{f.current&&(f.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:o||"Auto"})]}),c.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&c.jsx("button",{onClick:l,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"}),c.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.value:void 0;u(h)},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:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function tl(){const[e,t]=v.useState(null),r=v.useCallback(()=>t(null),[]),n=v.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=v.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),o=v.useCallback((l,f,h,p,g,x)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?c.jsx(s_,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function VQ(){const e=po(),{data:t}=gy(3e3),{data:r}=go(),{showAlert:n,dialogElement:a}=tl(),[o,u]=v.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await Me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:wt.agentStatus}),u(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&c.jsxs("a",{href:Ms(t.terminal_url),target:"_blank",rel:"noopener",className:de("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[c.jsx(xu,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),c.jsx(_n,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[c.jsx(bu,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),c.jsx(ju,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[c.jsxs("div",{children:["Config: ",t.has_config?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Skills: ",t.has_skills?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Memory: ",t.has_memories?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&c.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"Telegram"}),c.jsx("span",{className:de("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"MCP-Server"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"PC Executor"}),c.jsx("span",{className:de("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return c.jsxs("button",{onClick:()=>f(h),className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function qQ(){const{data:e}=go(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(bu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:V2.map(n=>{var u;const a=t.find(l=>l.role===n),o=a?r.includes(a.name):!1;return c.jsxs("div",{className:de("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",o?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1 mr-2",children:c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:de("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",xy(n)),children:n}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(u=a.name.split("/").pop())==null?void 0:u.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&c.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&c.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),c.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?o?c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function QQ(){const e=po(),{data:t=[]}=iv({limit:3}),[r,n]=v.useState(""),[a,o]=v.useState("stable"),[u,l]=v.useState(!1);async function f(){if(!(!r.trim()||u)){l(!0);try{await Me("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(As,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),c.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[c.jsxs("select",{value:a,onChange:h=>o(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[c.jsx("option",{value:"stable",children:"🔵 Fakt"}),c.jsx("option",{value:"instruction",children:"📋 Regel"}),c.jsx("option",{value:"user",children:"👤 User"}),c.jsx("option",{value:"versioned",children:"🟡 Version"})]}),c.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[c.jsx(Qd,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),c.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[c.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),c.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?c.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>c.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[c.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),c.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}const kN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function YQ(){const{data:e}=my(3e3),t=A4(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&c.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[c.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&c.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[c.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",c.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),c.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),c.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:kN.map(a=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),c.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?c.jsx(o_,{data:t,series:kN,unit:" tok/s",yMode:"auto",height:150}):c.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),c.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 XQ(){const{data:e}=$3(3e3),{showAlert:t,dialogElement:r}=tl(),[n,a]=v.useState({});async function o(u){a(l=>({...l,[u]:!0}));try{const l=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});l.ok||t("Fehler",`Neustart fehlgeschlagen: ${l.err||"Unbekannt"}`)}catch(l){t("Fehler",`Fehler: ${l.message}`)}finally{a(l=>({...l,[u]:!1}))}}return c.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(n2,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>c.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:de("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),c.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),c.jsx("button",{onClick:()=>o(u.name),disabled:n[u.name],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:c.jsx(du,{className:de("h-3.5 w-3.5",n[u.name]&&"animate-spin")})})]},u.name))}),c.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[c.jsxs("a",{href:Ms(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Engine"]}),c.jsxs("a",{href:Ms(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Gateway"]})]})]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}function SN({children:e}){return c.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function ZQ(){return c.jsxs("div",{className:"space-y-7",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),c.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[c.jsx(KQ,{}),c.jsx(YQ,{}),c.jsx(S4,{})]}),c.jsxs("section",{children:[c.jsx(SN,{children:"Stack-Status"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsx(qQ,{}),c.jsx(XQ,{})]})]}),c.jsxs("section",{children:[c.jsx(SN,{children:"Betrieb & Wissen"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[c.jsx(GQ,{}),c.jsx(VQ,{}),c.jsx(QQ,{})]})]})]})}function JQ(){const e=po(),{data:t=[]}=z3(2e3),{showAlert:r,dialogElement:n}=tl();async function a(l){try{await Me(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:wt.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(l=>l.state==="running"||l.state==="queued"),u=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:c.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(l=>c.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center text-xs",children:[c.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",av(l.done_bytes),"/",av(l.total_bytes),l.eta_s?` • ETA ${W3(l.eta_s)}`:""]}),c.jsx("button",{onClick:()=>a(l.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),u.map(l=>c.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[c.jsx("span",{className:"truncate",children:l.label}),c.jsx("span",{className:de("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function Da({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function NN({caps:e}){return e?c.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&c.jsx(Da,{children:"💻 Code"}),e.vision&&c.jsx(Da,{children:"👁 Bild"}),e.reasoning&&c.jsx(Da,{children:"🧠 Reason"}),e.moe&&c.jsxs(Da,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&c.jsx(Da,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&c.jsx(Da,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&c.jsx(Da,{children:"🔢 Embed"})]}):null}function eY({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=U3(e.gguf_path),[o,u]=v.useState(null),[l,f]=v.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],g=p.filter(N=>N.compatible===!0),x=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await Me(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(P){f(String((P==null?void 0:P.message)||P)),u(null)}}const j=N=>{var P;return N?`${N.pre??"?"} · ${((P=N.n_vocab)==null?void 0:P.toLocaleString())??"?"} Tokens`:"—"};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-lg 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[c.jsx(ls,{className:"h-4 w-4"})," Speculative Draft"]}),c.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',c.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),c.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&x&&c.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[c.jsx(An,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",x]}),c.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[c.jsx(Cs,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),c.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?c.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?c.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",c.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):p.map(N=>{var A,_;const P=N.filename===x,O=N.compatible===!0;return c.jsxs("div",{className:de("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",P&&"border-primary/40 bg-primary/10"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),c.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Br(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),O?P?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[c.jsx(An,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):c.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(A=N.vocab)==null?void 0:A.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[c.jsx(Cs,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&g.length===0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",c.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",c.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&c.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function tY(){var jo,ga,al,ji,ki,cc,ol,sl;const e=po(),{data:t,isLoading:r,error:n}=go(4e3),{data:a}=L3(4e3),{data:o}=F2(),{data:u}=vy(4e3),{data:l}=F3(),{data:f}=uh(),{showAlert:h,showConfirm:p,showPrompt:g,dialogElement:x}=tl(),b=(t==null?void 0:t.models)??[],j=(t==null?void 0:t.running)??[],k=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:wt.models}),e.invalidateQueries({queryKey:wt.routing})},[N,P]=v.useState(null),[O,A]=v.useState(null),[_,C]=v.useState(null),[I,W]=v.useState(null),[U,G]=v.useState(!1),[Y,$]=v.useState(!1),[ue,J]=v.useState(null),[ge,we]=v.useState("grid"),[pe,F]=v.useState("all"),Z=b.filter(B=>pe==="in_use"?!!B.role||j.includes(B.name):!0),[Q,D]=v.useState({width:800,height:360}),T=v.useRef(null),te=v.useCallback(B=>{if(T.current&&(T.current.disconnect(),T.current=null),B){const he=new ResizeObserver(Pe=>{if(!Pe||Pe.length===0)return;const ze=Pe[0].contentRect;D({width:ze.width,height:ze.height})});he.observe(B),T.current=he}},[]),ie=Q.width,re=Q.height,ce=B=>{const he=ie*.1,Pe=re*B,ze=ie*.5,Ve=re*.5,qt=ie*.3,Ze=Pe,gt=ie*.3;return`M ${he} ${Pe} C ${qt} ${Ze}, ${gt} ${Ve}, ${ze} ${Ve}`},me=B=>{const he=ie*.5,Pe=re*.5,ze=ie*.9,Ve=re*B,qt=ie*.7,Ze=Pe,gt=ie*.7;return`M ${he} ${Pe} C ${qt} ${Ze}, ${gt} ${Ve}, ${ze} ${Ve}`};async function Oe(B){try{await Me(`/api/models/${encodeURIComponent(B)}/load`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Laden des Modells: ${he.message}`)}}async function ee(B){try{await Me(`/api/models/${encodeURIComponent(B)}/unload`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Entladen des Modells: ${he.message}`)}}async function ke(){try{await Me("/api/models/unload",{method:"POST"}),S()}catch(B){h("Fehler",`Fehler beim Entladen aller Modelle: ${B.message}`)}}async function _e(B,he){try{await Me(`/api/models/${encodeURIComponent(he)}/role`,{method:"POST",body:JSON.stringify({role:B||null})}),S()}catch(Pe){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function oe(B){A(B),C(null),Me(`/api/roles/${encodeURIComponent(B)}/recommend`).then(he=>C(he)).catch(()=>{})}async function Xe(B,he){let Pe=null;try{Pe=await Me(`/api/models/${encodeURIComponent(B)}/ctx/auto`)}catch{}const ze=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB − reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";g("Kontextlänge anpassen",ze,String(he||32768),async Ve=>{if(Ve)try{await Me(`/api/models/${encodeURIComponent(B)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Ve,10)})}),S()}catch(qt){h("Fehler",`Fehler beim Setzen des Kontexts: ${qt.message||qt}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function X(B){p("Modell löschen?",`Modell '${B}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Me(`/api/models/${encodeURIComponent(B)}`,{method:"DELETE"}),S()}catch(he){h("Fehler",`Fehler beim Löschen: ${he.message||he}`)}})}async function fe(B,he,Pe,ze){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:B,role:he,quant:Pe,jinja:ze})}),h("Herunterladen gestartet",`Download für '${B}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ve){h("Fehler",`Fehler beim Starten des Upgrades: ${Ve.message||Ve}`)}}async function tt(B){const he=l==null?void 0:l.budget,Pe=he&&!he.fits?` + +⚠ Speicher-Warnung: Dieses Brain (~${he.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${he.largest_ondemand_gb} GB) sprengt das das Budget (${he.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${B.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:B,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(ze){h("Fehler",`Update fehlgeschlagen: ${ze.message||ze}`)}})}async function jr(B){p("Agent-Hirn wechseln?",`'${B.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await Me("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:B})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),G(!1),S()}catch(he){h("Fehler",`Wechsel fehlgeschlagen: ${he.message||he}`)}})}async function pa(B){B&&(await navigator.clipboard.writeText(B),$(!0),setTimeout(()=>$(!1),1500))}if(r)return c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",k,")."]});const ma=b.filter(B=>j.includes(B.name)),Bn=ma.reduce((B,he)=>B+(he.size_bytes||0),0),Un=((jo=f==null?void 0:f.gpu)==null?void 0:jo.gtt_total)||((ga=f==null?void 0:f.gpu)==null?void 0:ga.vram_total)||0,wo=((al=f==null?void 0:f.gpu)==null?void 0:al.gtt_used)||0,rl=16*1024**3,nl=Un>2*1024**3?Un:Bn>rl?Bn*1.2:rl,il=B=>b.find(he=>he.role===B),wi=B=>{const he=il(B);return he?j.includes(he.name):!1};return c.jsxs("div",{className:"space-y-8",children:[c.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Um,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Br(Bn)," Gewichte",wo>0?` · ${Br(wo)} real belegt (inkl. KV)`:""," / ",Br(nl)]}),j.length>0&&c.jsx("button",{onClick:ke,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),c.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:ma.length===0?c.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):ma.map((B,he)=>{var Ve;const Pe=(B.size_bytes||0)/nl*100,ze=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][he%4];return c.jsxs("div",{style:{width:`${Pe}%`},className:de("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",ze),title:`${B.name} (${Br(B.size_bytes)})`,children:[c.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[B.role?`[${B.role}] `:"",(Ve=B.name.split("/").pop())==null?void 0:Ve.replace(".gguf","")]}),c.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Br(B.size_bytes)})]},B.name)})})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),c.jsxs("div",{ref:te,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:ce(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ue==="roocode"||N==="roocode")&&c.jsx("path",{d:ce(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ue==="cursor"||N==="cursor")&&c.jsx("path",{d:ce(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ue==="opencode"||N==="opencode")&&c.jsx("path",{d:ce(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ue==="zed"||N==="zed")&&c.jsx("path",{d:ce(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ue==="continue"||N==="continue")&&c.jsx("path",{d:ce(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wi("fast")&&c.jsx("path",{d:me(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wi("heavy")&&c.jsx("path",{d:me(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wi("coder")&&c.jsx("path",{d:me(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wi("vision")&&c.jsx("path",{d:me(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wi("scout")&&c.jsx("path",{d:me(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>J("roocode"),onMouseLeave:()=>J(null),onClick:()=>P(B=>B==="roocode"?null:"roocode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Roo Code"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>J("cursor"),onMouseLeave:()=>J(null),onClick:()=>P(B=>B==="cursor"?null:"cursor"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Cursor IDE"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>J("opencode"),onMouseLeave:()=>J(null),onClick:()=>P(B=>B==="opencode"?null:"opencode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"OpenCode"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>J("zed"),onMouseLeave:()=>J(null),onClick:()=>P(B=>B==="zed"?null:"zed"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Zed"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>J("continue"),onMouseLeave:()=>J(null),onClick:()=>P(B=>B==="continue"?null:"continue"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Continue"})]}),c.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[c.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),c.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),V2.map(B=>{var qt;const he=["12%","31%","50%","69%","88%"],Pe=il(B),ze=Pe?j.includes(Pe.name):!1;if(B==="agent")return null;const Ve={fast:0,heavy:1,coder:2,vision:3,scout:4}[B];return c.jsxs("div",{className:de("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",ze?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Pe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:he[Ve]},onClick:()=>oe(B),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:B}),ze&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Pe?(qt=Pe.name.split("/").pop())==null?void 0:qt.replace(".gguf",""):"Keine Zuweisung"})]},B)}),N&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),c.jsx("button",{onClick:()=>P(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),c.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",c.jsx("strong",{children:"OpenAI Compatible"}),"."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",c.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne Cursor Settings ➔ ",c.jsx("strong",{children:"Models"}),"."]}),c.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",c.jsx("strong",{children:"OpenAI API"})," auf."]}),c.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",c.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die ",c.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),c.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",c.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die Zed Settings (",c.jsx("code",{children:"ctrl+,"}),")."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",c.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),c.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",c.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),o.tools&&c.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),c.jsxs("button",{onClick:()=>{var B,he,Pe,ze,Ve;return pa(N==="roocode"?(B=o.tools.cline)==null?void 0:B.snippet:N==="cursor"?(he=o.tools.cursor)==null?void 0:he.snippet:N==="opencode"?(Pe=o.tools.opencode)==null?void 0:Pe.snippet:N==="zed"?(ze=o.tools.zed)==null?void 0:ze.snippet:(Ve=o.tools.continue)==null?void 0:Ve.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[Y?c.jsx(An,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(r2,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:Y?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:c.jsxs("code",{children:[N==="roocode"&&((ji=o.tools.cline)==null?void 0:ji.snippet),N==="cursor"&&((ki=o.tools.cursor)==null?void 0:ki.snippet),N==="opencode"&&((cc=o.tools.opencode)==null?void 0:cc.snippet),N==="zed"&&((ol=o.tools.zed)==null?void 0:ol.snippet),N==="continue"&&((sl=o.tools.continue)==null?void 0:sl.snippet)]})})]}),c.jsx("button",{onClick:()=>P(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),c.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(B=>{var ze;const he=b.find(Ve=>Ve.role===B),Pe=he?j.includes(he.name):!1;return c.jsxs("div",{onClick:()=>oe(B),className:de("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":he?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:de("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",xy(B)),children:B}),Pe&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:he==null?void 0:he.name,children:he?(ze=he.name.split("/").pop())==null?void 0:ze.replace(/\.gguf$/i,""):"nicht zugewiesen"}),c.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},B)})})]}),(l==null?void 0:l.current)&&c.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-indigo-400"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&c.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",l.current.version]})]}),c.jsx("button",{onClick:()=>G(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:l.current.quant||"GGUF"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:Br(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?c.jsxs("button",{onClick:()=>tt(l.recommended.repo),className:de("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",l.budget&&!l.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):c.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[c.jsx(An,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&c.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",c.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&c.jsxs("div",{className:de("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[c.jsx(Um,{className:"h-3 w-3 shrink-0 mt-0.5"}),c.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",Z.length," von ",b.length,")"]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>F("all"),className:de("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),c.jsx("button",{onClick:()=>F("in_use"),className:de("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>we("grid"),className:de("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),c.jsx("button",{onClick:()=>we("list"),className:de("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ge==="grid"?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Z.length===0?c.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Z.map(B=>{const he=j.includes(B.name),Pe=u==null?void 0:u.model_list.find(Ve=>Ve.role===B.role),ze=ww(B.name);return c.jsxs("div",{className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",he?"border-primary/45 shadow-primary/5":B.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-start justify-between gap-3",children:c.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[c.jsx("div",{className:de("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",ze.color),title:ze.name,children:ze.initial}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:B.name,children:B.name.split("/").pop()}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:B.quant||"GGUF"}),he&&c.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[c.jsx(yu,{className:"h-3 w-3 animate-pulse"})," Warm"]}),B.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:B.role}),B.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),B.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${B.spec_draft_model})`,children:"SPEC"}):B.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${B.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,B.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${B.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",B.parallel_slots]}),B.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),c.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:c.jsx(NN,{caps:B.capabilities})})]}),c.jsxs("div",{className:"space-y-3 pt-1",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(Um,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),c.jsx("div",{className:"text-foreground font-semibold",children:Br(B.size_bytes)})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(vI,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),c.jsx("div",{className:"text-foreground font-semibold",children:yw(B.ctx)})]})]})]}),Pe&&c.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),c.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>fe(Pe.repo,B.role,B.quant||"Q4_K_M",B.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[c.jsx(no,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[c.jsx("button",{onClick:()=>he?ee(B.name):Oe(B.name),disabled:B.incomplete&&!he,className:de("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",B.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(B.name,B.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>W(B),className:de("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",B.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":B.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>X(B.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:c.jsx(Zg,{className:"h-3.5 w-3.5"})})]})]})]},B.name)})}):c.jsx("div",{className:"space-y-2",children:Z.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Z.map(B=>{const he=j.includes(B.name),Pe=ww(B.name);return c.jsxs("div",{className:de("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",he?"border-primary/45":B.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("div",{className:de("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),c.jsxs("div",{className:"min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:B.name,children:B.name.split("/").pop()}),B.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:B.role}),B.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),B.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${B.spec_draft_model})`,children:"SPEC"}):B.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${B.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,B.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${B.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",B.parallel_slots]}),B.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),he&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsxs("span",{children:["Größe: ",Br(B.size_bytes)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Kontext: ",yw(B.ctx)]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:"font-mono text-[9px]",children:B.quant||"GGUF"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[c.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:c.jsx(NN,{caps:B.capabilities})}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("button",{onClick:()=>he?ee(B.name):Oe(B.name),disabled:B.incomplete&&!he,className:de("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",B.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(B.name,B.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>W(B),className:de("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",B.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":B.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>X(B.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:c.jsx(Zg,{className:"h-3.5 w-3.5"})})]})]})]},B.name)})})]}),O&&(()=>{var Ve,qt;const B=_&&_.role===O?_:null,he={};B==null||B.models.forEach(Ze=>{he[Ze.name]=Ze});const Pe=B?B.models.map(Ze=>b.find(gt=>gt.name===Ze.name)).filter(Boolean):b,ze=Ze=>{_e(O,Ze),A(null)};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),c.jsx("button",{onClick:()=>A(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",c.jsx("strong",{className:"text-foreground",children:O}),":"]}),(B==null?void 0:B.recommended)&&c.jsxs("button",{onClick:()=>ze(B.recommended),title:(Ve=he[B.recommended])==null?void 0:Ve.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[c.jsx(ls,{className:"h-3 w-3"})," Auto: ",(qt=B.recommended.split("/").pop())==null?void 0:qt.replace(/\.gguf$/i,"")]})]}),c.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[c.jsx("button",{onClick:()=>ze(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:c.jsx("span",{children:"Zuweisung entfernen"})}),Pe.map(Ze=>{var ul;const gt=he[Ze.name],va=Ze.role===O,ll=!!(gt!=null&>.recommended),dc=!!gt&&!gt.suitable;return c.jsxs("button",{onClick:()=>ze(Ze.name),className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",ll?"border-primary/50 bg-primary/10":va?"text-primary font-bold bg-primary/5 border-primary/30":dc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[c.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[c.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(ul=Ze.name.split("/").pop())==null?void 0:ul.replace(/\.gguf$/i,""),ll&&c.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:gt?`${gt.params_b}B · ${Ze.quant} · ${gt.reason}`:`${Br(Ze.size_bytes)} · ${Ze.quant}`})]}),va&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},Ze.name)})]})]})})})(),I&&c.jsx(eY,{model:I,onClose:()=>W(null),onChanged:S}),U&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Ps,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),c.jsx("button",{onClick:()=>G(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",c.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",c.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),c.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(B=>{var Pe;const he=B.role==="hermes";return c.jsxs("button",{onClick:()=>!he&&jr(B.name),disabled:he||B.incomplete,className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",he?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":B.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Pe=B.name.split("/").pop())==null?void 0:Pe.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[B.capabilities.params_b?`${B.capabilities.params_b}B`:"?"," · ",Br(B.size_bytes),B.role&&` · Rolle: ${B.role}`,B.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),he?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[c.jsx(An,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},B.name)})}),c.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[c.jsx("span",{children:"💡"}),c.jsxs("span",{children:["Für einen ",c.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),x]})}function rY(){const[e,t]=v.useState(""),[r,n]=v.useState([]),[a,o]=v.useState("Q4_K_M"),[u,l]=v.useState(""),[f,h]=v.useState(""),[p,g]=v.useState(""),[x,b]=v.useState([]),[j,k]=v.useState(null),[S,N]=v.useState(!1),P=["fast","heavy","coder","vision","scout"],{data:O}=go(),A=f?O==null?void 0:O.models.find($=>($.role||"").toLowerCase()===f):void 0;async function _($,ue,J){if(N(!1),!$.trim()){k(null);return}try{const ge=await Me(`/api/fit?params_b=0&quant=${encodeURIComponent(ue)}&ctx=8192&name=${encodeURIComponent($)}&role=${encodeURIComponent(J)}`);k(ge)}catch{k(null)}}async function C($){const ue=$??e;if(ue.trim()){l("Analysiere HuggingFace Repository..."),k(null);try{const J=await Me(`/api/hf/quants?repo=${encodeURIComponent(ue)}`);t(J.repo),n(J.quants);const ge=J.quants.length?J.quants.includes("Q4_K_M")?"Q4_K_M":J.quants[0]:a;J.quants.length&&o(ge),l(J.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),J.quants.length&&_(J.repo,ge,f)}catch(J){l(`Fehler: ${J}`)}}}function I($){o($),_(e,$,f)}function W($){h($),r.length&&_(e,a,$)}async function U(){if(p.trim()){l("Durchsuche HuggingFace...");try{const $=await Me(`/api/hf/search?q=${encodeURIComponent(p)}`);b($.results),l($.results.length?"":"Keine Ergebnisse gefunden.")}catch($){l(`Suche fehlgeschlagen: ${$}`)}}}async function G(){if(e.trim()){if((j==null?void 0:j.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(A?` „${f}" wurde von ${A.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch($){l(`Download-Fehler: ${$}`)}}}const Y=(j==null?void 0:j.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(j==null?void 0:j.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return c.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[c.jsx("input",{value:e,onChange:$=>{t($.target.value),k(null),N(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>C(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("select",{value:a,onChange:$=>I($.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map($=>c.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))}),c.jsxs("select",{value:f,onChange:$=>W($.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[c.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),P.map($=>c.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))]}),c.jsx("button",{onClick:G,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?c.jsxs(c.Fragment,{children:[c.jsx(Cs,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):c.jsxs(c.Fragment,{children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),j&&c.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${Y}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-wide",children:j.fit.text}),c.jsxs("span",{className:"font-mono opacity-90",children:["~",j.params_b,"B · ~",j.fit.req_gb," GB / ",j.sys_ram_gb," GB RAM · ~",j.fit.tps," t/s"]}),j.fit.level!=="too_tight"&&c.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${j.budget.gtt_gb} GB − reserviert ${j.budget.reserved_gb} GB (${j.budget.mode}) → ${j.budget.budget_gb} GB frei`,children:["ctx → ",(j.assigned_ctx/1024).toFixed(0),"k"]}),j.fit.level==="too_tight"&&c.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),A&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[c.jsx(Cs,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("span",{children:["Rolle ",c.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",c.jsx("strong",{children:A.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",A.name," bleibt installiert, verliert sie aber."]})]}),c.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:p,onChange:$=>g($.target.value),onKeyDown:$=>$.key==="Enter"&&U(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(cy,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsx("button",{onClick:U,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),x.length>0&&c.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:x.map($=>c.jsxs("button",{onClick:()=>{t($.repo),b([]),g(""),C($.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[c.jsx("span",{className:"font-semibold truncate",children:$.repo}),c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[c.jsx(no,{className:"h-3 w-3"})," ",$.downloads.toLocaleString()]})]},$.repo))}),u&&c.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:u})]})}const nY={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ls},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:As},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Qg},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Xg},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Yg}};function iY(){const{data:e,isLoading:t,error:r}=B3(),{data:n}=go(),{data:a}=vy(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[l,f]=v.useState({}),[h,p]=v.useState({}),[g,x]=v.useState(!1);async function b(j,k,S,N){f(P=>({...P,[j]:"Starte..."}));try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(P=>({...P,[j]:"Download läuft"}))}catch{f(O=>({...O,[j]:"Fehler"}))}}return t?c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[c.jsxs("div",{children:["Modell-Registry geladen für ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(a2,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),c.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=nY[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:bu},S=k.icon,N=o.find(I=>I.role===j.role),P=a==null?void 0:a.model_list.find(I=>I.role===j.role),O=j.models.find(I=>I.repo===j.recommended)||j.models[0];if(!O)return null;const A=l[O.repo],_=j.models.filter(I=>I.repo!==j.recommended),C=!!h[j.role];return c.jsxs("div",{className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:c.jsx(S,{className:"h-5.5 w-5.5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),c.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",j.role]})]})]}),N?c.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):c.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),c.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[c.jsxs("span",{children:["Größe: ",av(N.size_bytes||0)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{children:["Ersteller: ",O.author]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",O.quant]})]}),c.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:c.jsx(k4,{fit:O.fit})})]})}),c.jsx("div",{className:"pt-1",children:N?P?c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),c.jsxs("span",{children:["Bessere Version in der Registry: ",P.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>b(P.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[P.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),l[P.repo]||"Auf neue Version aktualisieren"]})]}):c.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[c.jsx(An,{className:"h-4 w-4"})," Auf neuestem Stand"]}):c.jsxs("button",{onClick:()=>b(O.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!A,className:de("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",A?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"}),A||"Optimales Modell einsetzen"]})})]}),_.length>0&&c.jsxs("div",{className:"border-t border-border/20 pt-3",children:[c.jsxs("button",{onClick:()=>p(I=>({...I,[j.role]:!C})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[C?c.jsx(iI,{className:"h-3 w-3"}):c.jsx(rI,{className:"h-3 w-3"}),c.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),C&&c.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>c.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),c.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[c.jsxs("span",{children:["Quant: ",I.quant]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:I.fit.text})]})]}),c.jsx("button",{onClick:()=>b(I.repo,j.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!l[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:l[I.repo]||"Installieren"})]},I.repo))})]})]},j.role)})}),c.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[c.jsxs("button",{onClick:()=>x(!g),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(cy,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),c.jsx("span",{className:"text-[10px] text-primary hover:underline",children:g?"Ausblenden ▲":"Anzeigen ▼"})]}),g&&c.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:c.jsx(rY,{})})]})]})}function aY(){const[e,t]=v.useState("cockpit");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),c.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>c.jsx("button",{onClick:()=>t(r),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),c.jsx(JQ,{}),c.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?c.jsx(tY,{}):c.jsx(iY,{})})]})}function oY(){const[e,t]=v.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=v.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=v.useState("cline"),[u,l]=v.useState(!1),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=F2(f.toString()),g=p?String(p):"";function x(S){t(S),S&&localStorage.setItem("mc_host",S)}function b(S){n(S),localStorage.setItem("mc_mcp_path",S)}const j=h==null?void 0:h.tools[a];async function k(){j&&(await navigator.clipboard.writeText(j.snippet),l(!0),setTimeout(()=>l(!1),1500))}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(cI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),c.jsx("input",{value:e,onChange:S=>x(S.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(uI,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),c.jsx("input",{value:r,onChange:S=>b(S.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),g&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",g]}),h&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(h.tools).map(([S,N])=>c.jsx("button",{onClick:()=>o(S),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:N.label},S))}),j&&c.jsxs("div",{className:"space-y-3",children:[j.note&&c.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[c.jsx(dI,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),c.jsx("span",{children:j.note})]}),c.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[c.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[c.jsx(sf,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{children:a==="cline"||a==="cursor"?"config.json":"settings.json"})]}),c.jsxs("button",{onClick:k,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[u?c.jsx(An,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(r2,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:u?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:c.jsx("code",{children:j.snippet})})]})]})]})]})}const sY="modulepreload",lY=function(e){return"/"+e},EN={},uY=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=u(r.map(h=>{if(h=lY(h),h in EN)return;EN[h]=!0;const p=h.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":sY,p||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),p)return new Promise((b,j)=>{x.addEventListener("load",b),x.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=u,window.dispatchEvent(l),!l.defaultPrevented)throw u}return a.then(u=>{for(const l of u||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};class cY extends v.Component{constructor(){super(...arguments);Gl(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?c.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[c.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),c.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const dY=v.lazy(()=>uY(()=>import("./GraphView-BmXGA8o_.js"),[]).then(e=>({default:e.GraphView}))),PN=["user","instruction","stable","versioned","ephemeral"],AN=new Set(["auto","agent","hermes"]),Vd={user:{label:"User",icon:NI,bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:wI,bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:wu,bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:SI,bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:oI,bg:"bg-pink-500/10",text:"text-pink-400"}},Mg={label:"Gedächtnis",icon:e2,bg:"bg-muted/10",text:"text-muted-foreground"},fY={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"},Ig=[{content:"Der Nutzer heißt Tobi — Homelab-Entwickler, bevorzugt pragmatische Lösungen.",category:"user"},{content:"Bevorzugt knappe, deutsche Antworten.",category:"user"},{content:"Deploy nur via PowerShell-Push (Git Credential Manager).",category:"instruction"},{content:"Tests bei Deployments nie überspringen.",category:"instruction"},{content:"AI-Box: 192.168.178.151 (Ryzen AI MAX+ 395, 122 GB Unified-RAM).",category:"stable"},{content:"Agent-Hirn = fast (Qwen3.6-35B-A3B), immer warm.",category:"stable"}];function hY(){const[e,t]=v.useState(""),[r,n]=v.useState(""),[a,o]=v.useState(""),[u,l]=v.useState("stable"),[f,h]=v.useState(!1),[p,g]=v.useState(!1),[x,b]=v.useState("graph"),[j,k]=v.useState(!1),S=po(),{showAlert:N,showConfirm:P,dialogElement:O}=tl(),{data:A=[]}=iv({}),{data:_=[],error:C}=iv({q:r,category:e}),{data:I}=D3(x==="graph"),W=C?String(C):"",U=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},G=v.useMemo(()=>{const F=A.length,Z=A.filter(Q=>AN.has(Q.source)).length;return{total:F,auto:Z,manual:F-Z,cats:new Set(A.map(Q=>Q.category)).size}},[A]),Y=A.length===0,$=v.useMemo(()=>{const F=I??{nodes:[],edges:[]};if(!r.trim())return F;const Z=r.toLowerCase(),Q=F.nodes.filter(T=>T.content.toLowerCase().includes(Z)),D=new Set(Q.map(T=>T.id));return{nodes:Q,edges:F.edges.filter(T=>D.has(T.source)&&D.has(T.target))}},[I,r]);async function ue(){a.trim()&&(await Me("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),k(!1),U())}async function J(F){await Me(`/api/memory/${F}`,{method:"DELETE"}),U()}function ge(){P("Starter-Vorlage einfügen",`${Ig.length} Beispiel-Fakten über dein Setup einfügen? Du kannst jeden einzeln bearbeiten oder löschen.`,async()=>{g(!0);try{for(const F of Ig)await Me("/api/memory",{method:"POST",body:JSON.stringify({content:F.content,category:F.category,source:"template"})});U()}catch(F){N("Fehler",`Vorlage konnte nicht eingefügt werden: ${F.message}`)}finally{g(!1)}})}async function we(){h(!0);try{const F=await Me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(F.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${F.duplicate_count} Dublette(n) in ${F.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),U()}catch(Z){N("Fehler",`Fehler beim Löschen: ${Z.message}`)}})}catch(F){N("Fehler",`Fehler bei der Deduplizierung: ${F.message}`)}finally{h(!1)}}const pe=({value:F,label:Z,accent:Q})=>c.jsxs("span",{className:de("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",Q==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[Q==="auto"&&c.jsx(jd,{className:"h-3 w-3"}),c.jsx("b",{className:de("font-semibold",Q==="auto"?"":"text-foreground"),children:F})," ",Z]});return c.jsxs("div",{className:"space-y-5",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("div",{className:"relative",children:[c.jsx("input",{value:r,onChange:F=>n(F.target.value),placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(cy,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsxs("button",{onClick:()=>k(F=>!F),className:"h-9 px-3 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(Qd,{className:"h-4 w-4"})," Eintrag"]}),c.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",pI,"Liste"],["graph",jI,"Graph"]].map(([F,Z,Q])=>c.jsxs("button",{onClick:()=>b(F),className:de("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",x===F?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(Z,{className:"h-3.5 w-3.5"})," ",Q]},F))}),c.jsx("button",{onClick:we,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",title:"Deduplizieren",children:c.jsx(jd,{className:"h-4 w-4 text-primary"})})]})]}),!Y&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(pe,{value:G.total,label:"Fakten"}),c.jsx(pe,{value:G.auto,label:"auto gelernt",accent:"auto"}),c.jsx(pe,{value:G.manual,label:"manuell"}),c.jsx(pe,{value:G.cats,label:"Kategorien"}),c.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[c.jsx(jd,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),c.jsx("button",{onClick:()=>k(!1),className:"text-muted-foreground hover:text-foreground",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsx("textarea",{value:a,onChange:F=>o(F.target.value),rows:2,placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsx("select",{value:u,onChange:F=>l(F.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:PN.map(F=>{var Z;return c.jsx("option",{value:F,className:"bg-popover text-foreground",children:((Z=Vd[F])==null?void 0:Z.label)||F},F)})}),c.jsxs("button",{onClick:ue,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[c.jsx(Qd,{className:"h-4 w-4"})," Speichern"]})]})]}),W&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",W]}),Y?c.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-10 flex flex-col items-center text-center gap-5",children:[c.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:c.jsx(As,{className:"h-7 w-7 text-primary"})}),c.jsxs("div",{className:"space-y-1.5 max-w-md",children:[c.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Dein Gedächtnis ist noch leer"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Es füllt sich automatisch, sobald Hermes mit dir spricht — im Terminal, über Telegram oder aus der IDE. Oder leg jetzt mit einer Vorlage los:"})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[c.jsxs("button",{onClick:ge,disabled:p,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer disabled:opacity-50",children:[c.jsx(EI,{className:"h-4 w-4"})," ",p?"Füge ein…":"Starter-Vorlage einfügen"]}),c.jsxs("button",{onClick:()=>k(!0),className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[c.jsx(Qd,{className:"h-4 w-4"})," Eigener Eintrag"]})]}),c.jsxs("div",{className:"w-full max-w-md text-left",children:[c.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60 mb-2",children:"Die Vorlage enthält"}),c.jsx("div",{className:"flex flex-col gap-1",children:Ig.map((F,Z)=>{const Q=Vd[F.category]||Mg;return c.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[c.jsx("span",{className:de("text-[8px] font-bold uppercase px-1.5 py-0.5 rounded shrink-0",Q.bg,Q.text),children:Q.label}),c.jsx("span",{className:"truncate",children:F.content})]},Z)})})]})]}):x==="graph"?c.jsx(cY,{children:c.jsx(v.Suspense,{fallback:c.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:c.jsx(dY,{data:$,onDelete:J})})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[c.jsx("button",{onClick:()=>t(""),className:de("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),PN.map(F=>{const Z=Vd[F]||Mg,Q=Z.icon;return c.jsxs("button",{onClick:()=>t(F),className:de("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===F?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(Q,{className:"h-3 w-3"})," ",Z.label]},F)})]}),c.jsx("div",{className:"space-y-3",children:_.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):_.map(F=>{const Z=Vd[F.category]||Mg,Q=Z.icon,D=AN.has(F.source);return c.jsxs("div",{className:de("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",fY[F.category]||"border-l-muted"),children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("span",{className:de("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",Z.bg,Z.text),children:[c.jsx(Q,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:Z.label})]}),c.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:F.content})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[typeof F.score=="number"&&c.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded uppercase tracking-wider",title:"Relevanz der semantischen Suche",children:[Math.round(F.score*100),"%"]}),c.jsxs("span",{className:de("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded uppercase tracking-wider",D?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:D?"Automatisch gelernt":"Manuell angelegt",children:[D&&c.jsx(jd,{className:"h-2.5 w-2.5"}),F.source]}),c.jsx("button",{onClick:()=>J(F.id),title:"Eintrag löschen",className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:c.jsx(Zg,{className:"h-3.5 w-3.5"})})]})]},F.id)})})]}),O]})}function qd({label:e,ok:t,detail:r,icon:n,onClick:a}){return c.jsxs("div",{onClick:a,className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),c.jsx(n,{className:de("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&c.jsxs("button",{onClick:o=>{o.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[c.jsx(_n,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Gehirn wechseln"})]})]})}function pY(){const{data:e,error:t}=gy(5e3),{data:r}=go(),{showAlert:n,dialogElement:a}=tl(),o=po(),u=t?String(t):"",l=v.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var C;return((C=_.name.split("/").pop())==null?void 0:C.replace(".gguf",""))||_.name})],[r]),[f,h]=v.useState(null),[p,g]=v.useState(!1),[x,b]=v.useState({width:800,height:360}),j=v.useRef(null),k=v.useCallback(A=>{if(j.current&&(j.current.disconnect(),j.current=null),A){const _=new ResizeObserver(C=>{if(!C||C.length===0)return;const I=C[0].contentRect;b({width:I.width,height:I.height})});_.observe(A),j.current=_}},[]),S=x.width,N=x.height,P=(A,_,C,I)=>{const W=(A+C)/2;return`M ${A} ${_} C ${W} ${_}, ${W} ${I}, ${C} ${I}`};async function O(A){try{await Me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:A})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${A}' geändert. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:wt.agentStatus}),g(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",c.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&c.jsxs("a",{href:Ms(e.terminal_url),target:"_blank",rel:"noopener",className:de("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[c.jsx(xu,{className:"h-4 w-4"}),c.jsx("span",{children:"Terminal öffnen"})]})]}),u&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(qd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:Ps}),c.jsx(qd,{label:"Terminal",ok:e.terminal_reachable,detail:"Web-Terminal (hermes chat)",icon:yu}),c.jsx(qd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:_n,onClick:()=>g(!0)}),c.jsx(qd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:ju})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),c.jsxs("div",{ref:k,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="terminal"||e.terminal_reachable)&&c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("terminal"),onMouseLeave:()=>h(null),onClick:()=>e.terminal_reachable&&window.open(Ms(e.terminal_url),"_blank"),title:e.terminal_reachable?"Klicken um das Hermes-Terminal zu öffnen":"Terminal offline",children:[c.jsx(yu,{className:de("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),c.jsx("span",{children:"Terminal"}),c.jsx("span",{className:de("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),c.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Ps,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),c.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),c.jsx("div",{className:de("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),c.jsxs("div",{className:de("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>g(!0),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(_n,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),c.jsxs("div",{className:de("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(ju,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[c.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),c.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),c.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(mI,{className:"h-5 w-5 text-primary"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("p",{children:["Der ",c.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),c.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),c.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?c.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[c.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),c.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",c.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",c.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",c.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),c.jsxs("p",{children:["Starte ",c.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",c.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),c.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(wu,{className:"h-5 w-5 text-amber-500"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[c.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),c.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",c.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),c.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[c.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),c.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",c.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&p&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>g(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(A=>{const _=["auto","fast","heavy"].includes(A);return c.jsxs("button",{onClick:()=>O(A),className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===A||!e.brain_model&&A==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:A}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===A||!e.brain_model&&A==="auto")&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},A)})})]})}),a]})}function mY(){const{data:e}=gy(5e3),t=e!=null&&e.terminal_url?Ms(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return c.jsxs("div",{className:"flex h-full flex-col gap-4",children:[c.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[c.jsxs("div",{children:[c.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:"Hermes Terminal"}),c.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",c.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&c.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[c.jsx(xu,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?c.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&c.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[c.jsx(Cs,{className:"h-8 w-8 text-amber-400"}),c.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),c.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",c.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",c.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),c.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):c.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[c.jsx(i2,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}function gY(){const[e,t]=v.useState("connect"),[r,n]=v.useState("roocode"),[a,o]=v.useState(null),u="192.168.178.151",[l,f]=v.useState(!1),[h,p]=v.useState(null);function g(){f(!0),Me("/api/health").then(x=>{o(x),p(x.engine_reachable?"success":"partial")}).catch(()=>{o(null),p("fail")}).finally(()=>f(!1))}return v.useEffect(()=>{g()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),c.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[c.jsx("button",{onClick:()=>t("connect"),className:de("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),c.jsx("button",{onClick:()=>t("concepts"),className:de("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),e==="connect"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:de("h-3 w-3 rounded-full ring-2 ring-black/40",h==="success"&&"bg-emerald-500 animate-pulse",h==="partial"&&"bg-amber-500",h==="fail"&&"bg-red-500",!h&&"bg-muted")}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[h==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,h==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",h==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!h&&"Verbindung wird geprüft..."]})]})]}),c.jsxs("button",{onClick:g,disabled:l,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[c.jsx(du,{className:de("h-3.5 w-3.5",l&&"animate-spin")}),c.jsx("span",{children:"Testen"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(e2,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4 text-cyan-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(bu,{className:"h-4 w-4 text-violet-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",c.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(As,{className:"h-4 w-4 text-indigo-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(Qg,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),c.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[c.jsxs("button",{onClick:()=>n("roocode"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",r==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[c.jsx(a2,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),c.jsx("button",{onClick:()=>n("cursor"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),c.jsx("button",{onClick:()=>n("opencode"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r==="roocode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),c.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),c.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),c.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),c.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",c.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",c.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),r==="cursor"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),c.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),c.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",c.jsx("strong",{children:"Models"}),"."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),c.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",c.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),c.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",c.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),r==="opencode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),c.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),c.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),c.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),c.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(sf,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),c.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue in der ",c.jsx("strong",{children:"Zentrale"})," unter ",c.jsx("strong",{children:"Dienste"}),", ob `llama-swap` aktiv (grün) ist. Wenn nicht, klicke daneben auf ",c.jsx("strong",{children:"Restart"}),"."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte im ",c.jsx("strong",{children:"Terminal"})," eine frische Session (neuer `hermes chat`). Ältere Sessions sammeln Kontext-Müll an."]})]})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[c.jsx(Yg,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(bu,{className:"h-5 w-5 text-cyan-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),c.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",c.jsx("em",{children:"Experts"}),"). Ein intelligenter ",c.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[c.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Yg,{className:"h-5 w-5 text-violet-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),c.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(As,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",c.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",c.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),c.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- +name: tdd-pro +description: Drive development with strict TDD practices +--- +# Instructions +...`}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",c.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",c.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills find"}),c.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Globaler Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",c.jsx("i",{children:"code-simplification"}),", ",c.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Projekt-Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",c.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(_n,{className:"h-5 w-5 text-indigo-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),c.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),c.jsx("p",{children:c.jsx("strong",{children:"Best Practices für Hermes:"})}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",c.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (`~/.hermes/SOUL.md` / Config), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(ju,{className:"h-5 w-5 text-amber-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),c.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(sf,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),c.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",c.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(Qg,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),c.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",c.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(ju,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),c.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(wu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[c.jsxs("p",{children:["Mission Control 2 ist als ",c.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(Z1,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),c.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),c.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(Z1,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),c.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[c.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function vY({title:e,hint:t}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[c.jsx(lI,{className:"h-8 w-8 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const yY=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user"}];function Tg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function xY({open:e,onClose:t,defaultTab:r="maintenance"}){const[n,a]=v.useState(null),[o,u]=v.useState([]),[l,f]=v.useState("llama-swap"),[h,p]=v.useState(""),[g,x]=v.useState(!1),[b,j]=v.useState(null),[k,S]=v.useState({}),[N,P]=v.useState("maintenance"),[O,A]=v.useState(!1),[_,C]=v.useState(""),[I,W]=v.useState(!1),[U,G]=v.useState(null);function Y(X,fe,tt){G({type:"alert",title:X,message:fe,onConfirm:()=>{G(null),tt&&tt()}})}function $(X,fe,tt){G({type:"confirm",title:X,message:fe,onConfirm:()=>{G(null),tt()},onCancel:()=>G(null)})}function ue(X){return X?new Date(X*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[J,ge]=v.useState(""),[we,pe]=v.useState(""),[F,Z]=v.useState(!1),[Q,D]=v.useState(!1);v.useEffect(()=>{e&&(ge(localStorage.getItem("mc_sudo_password")||""),pe(localStorage.getItem("mc_hf_token")||""))},[e]),v.useEffect(()=>{e&&r&&P(r)},[e,r]);const T=v.useRef(null);function te(){Me("/api/maintenance/updates").then(a).catch(X=>console.error("Error loading updates",X))}function ie(){Me("/api/jobs").then(X=>u(X.jobs||[])).catch(X=>console.error("Error loading jobs",X))}function re(X){x(!0),j(null),Me(`/api/maintenance/logs?service=${X}&lines=150`).then(fe=>{fe.ok?p(fe.text):(p(`Fehler beim Laden der Logs: ${fe.err||"Unbekannter Fehler"}`),(fe.status==="incorrect_password"||fe.status==="password_required")&&j(fe.status))}).catch(fe=>p(`Fehler: ${fe.message}`)).finally(()=>{x(!1),setTimeout(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},50)})}v.useEffect(()=>{if(!e)return;te(),ie();const X=setInterval(()=>{ie(),te()},3e3);return()=>clearInterval(X)},[e]),v.useEffect(()=>{!e||N!=="logs"||re(l)},[e,N,l]);async function ce(){try{await Me("/api/maintenance/os-update",{method:"POST"}),ie(),P("maintenance")}catch(X){Y("Fehler",`Fehler beim Starten des OS-Updates: ${X.message}`)}}async function me(){try{await Me("/api/maintenance/engine-update",{method:"POST"}),ie(),P("maintenance")}catch(X){Y("Fehler",`Fehler beim Engine-Update: ${X.message}`)}}async function Oe(){A(!0);try{await Me("/api/maintenance/check-updates",{method:"POST"}),ie(),P("maintenance")}catch(X){Y("Fehler",`Fehler bei der Update-Suche: ${X.message}`)}finally{A(!1)}}async function ee(X,fe){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:X,role:fe})}),Y("Gestartet",`Modell-Upgrade für '${fe}' (${X}) gestartet.`),ie(),P("maintenance")}catch(tt){Y("Fehler",`Fehler beim Starten des Modell-Upgrades: ${tt.message}`)}}async function ke(){$("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Me("/api/maintenance/reboot",{method:"POST"}),Y("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(X){Y("Fehler",`Fehler beim Reboot: ${X.message}`)}})}async function _e(){W(!0),C("Snapshot wird erzeugt...");try{const X=await Me("/api/system/backup",{method:"POST"});C(X.ok?`Snapshot erzeugt: ${X.snapshot} (${X.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(X){C(`Fehler: ${X.message}`)}finally{W(!1)}}async function oe(X){S(fe=>({...fe,[X]:!0}));try{const fe=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:X})});fe.ok?Y("Dienst neu gestartet",`Dienst ${X} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===X&&re(X)}):Y("Fehler",`Fehler beim Neustart: ${fe.err||"Unbekannter Fehler"}`)}catch(fe){Y("Fehler",`Fehler beim Neustart: ${fe.message}`)}finally{S(fe=>({...fe,[X]:!1}))}}async function Xe(X){try{await Me(`/api/jobs/${X}/cancel`,{method:"POST"}),ie()}catch(fe){Y("Fehler",`Fehler beim Abbrechen: ${fe.message}`)}}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:de("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),c.jsxs("div",{className:de("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[c.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),c.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:c.jsx(oi,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[c.jsx("button",{onClick:()=>P("maintenance"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),c.jsx("button",{onClick:()=>P("logs"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),c.jsx("button",{onClick:()=>P("settings"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),c.jsxs("div",{className:"flex items-center gap-2",children:[(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",ue(n.last_check)]}),c.jsxs("button",{onClick:Oe,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[c.jsx(du,{className:de("h-3 w-3",O&&"animate-spin")}),"Nach Updates suchen"]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{onClick:ce,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(wu,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.os?`${n.os} Updates verfügbar`:"Auf neuestem Stand"})]}),c.jsxs("button",{onClick:me,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(n2,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),c.jsxs("button",{onClick:ke,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[c.jsx(xI,{className:"h-4.5 w-4.5"}),c.jsxs("div",{children:[c.jsx("div",{children:"Host-System neu starten (Reboot)"}),c.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"System-Backup & Snapshot"}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-background/20 space-y-3",children:[c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Git-Snapshot der aktuellen Konfigurationen und des System-Zustands erzeugen."}),c.jsxs("button",{onClick:_e,disabled:I,className:"w-full h-9 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shadow-md shadow-primary/10",children:[c.jsx(bI,{className:de("h-4 w-4",I&&"animate-pulse")})," Snapshot erstellen"]}),_&&c.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]})]}),(n==null?void 0:n.model_list)&&n.model_list.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",ue(n.last_check)]})]}),c.jsx("div",{className:"space-y-2",children:n.model_list.map(X=>c.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold",children:X.title}),c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:X.repo}),c.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",X.role]})]}),c.jsxs("button",{onClick:()=>ee(X.repo,X.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},X.role))})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),c.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(X=>X.state==="running"||X.state==="queued").length," Aktiv"]})]}),c.jsx("div",{className:"space-y-3",children:o.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(X=>{const fe=X.state==="running"||X.state==="queued";return c.jsxs("div",{className:de("p-3 rounded-xl border transition-all duration-300",fe?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[fe&&c.jsxs("span",{className:"flex h-2 w-2 relative",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),X.label]}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[c.jsxs("span",{children:["ID: ",X.id]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:de(X.state==="done"&&"text-emerald-400",X.state==="failed"&&"text-red-400",X.state==="running"&&"text-primary",X.state==="queued"&&"text-amber-400",X.state==="canceled"&&"text-muted-foreground"),children:X.state})]})]}),fe&&c.jsx("button",{onClick:()=>Xe(X.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),X.state==="running"&&c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${X.progress??0}%`}})}),c.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[c.jsxs("span",{children:[X.progress??0,"%"]}),X.done_bytes!=null&&X.total_bytes!=null&&c.jsxs("span",{children:[Tg(X.done_bytes)," / ",Tg(X.total_bytes),X.rate_bps!=null&&` (${Tg(X.rate_bps)}/s)`]}),X.eta_s!=null&&c.jsxs("span",{children:["ETA: ",X.eta_s,"s"]})]})]})]},X.id)})})]})]}),N==="logs"&&c.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:l,onChange:X=>f(X.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:yY.map(X=>c.jsxs("option",{value:X.id,children:[X.label," (",X.type==="system"?"systemd-root":"user",")"]},X.id))}),c.jsxs("button",{onClick:()=>oe(l),disabled:k[l],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[c.jsx(du,{className:de("h-3.5 w-3.5",k[l]&&"animate-spin")}),"Restart"]})]}),c.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[c.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[c.jsx(sf,{className:"h-3 w-3 text-primary"}),c.jsxs("span",{children:["stdout/stderr - ",l]})]}),c.jsx("button",{onClick:()=>re(l),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.jsx(du,{className:de("h-3 w-3",g&&"animate-spin")})})]}),c.jsx("pre",{ref:T,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[c.jsx(Cs,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),c.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),c.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),c.jsx("button",{onClick:()=>P("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):g&&!h?c.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||c.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(wu,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:F?"text":"password",value:J,onChange:X=>ge(X.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>Z(!F),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:F?c.jsx(J1,{className:"h-4 w-4"}):c.jsx(Xg,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(fI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:Q?"text":"password",value:we,onChange:X=>pe(X.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>D(!Q),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Q?c.jsx(J1,{className:"h-4 w-4"}):c.jsx(Xg,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),c.jsxs("div",{className:"flex gap-3 pt-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",J),localStorage.setItem("mc_hf_token",we),Y("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),c.jsx("button",{onClick:()=>{ge(""),pe(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),Y("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 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:"Zurücksetzen"})]})]})]})]}),U&&c.jsx(s_,{type:U.type,title:U.title,message:U.message,onConfirm:U.onConfirm,onCancel:U.onCancel})]})}function bY(){var g,x,b,j,k;C4();const[e,t]=v.useState("dashboard"),[r,n]=v.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,o]=v.useState(!1),[u,l]=v.useState("maintenance"),{data:f}=R3(),{data:h}=uh(2e4);v.useEffect(()=>{document.documentElement.classList.add("dark")},[]),v.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),o(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]);const p=Jg.find(S=>S.id===e);return c.jsxs("div",{className:"flex h-full relative",children:[c.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[c.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),c.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),c.jsx(T3,{onNavigate:t}),c.jsx(xY,{open:a,onClose:()=>o(!1),defaultTab:u}),c.jsxs("aside",{className:de("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[c.jsxs("div",{className:de("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[c.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&c.jsxs("div",{className:"leading-tight",children:[c.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),c.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?c.jsx(t2,{className:"h-4 w-4"}):c.jsx(nI,{className:"h-4 w-4"})})]}),c.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Jg.map(S=>c.jsxs("button",{onClick:()=>t(S.id),className:de("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[c.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&c.jsx("span",{className:"truncate",children:S.label})]},S.id))}),c.jsx("div",{className:de("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?c.jsx("div",{className:"flex justify-center",children:c.jsx("span",{className:de("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):c.jsxs("div",{className:"space-y-2 text-left",children:[f?c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),c.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",c.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&c.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[c.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:((g=h.versions.engine)==null?void 0:g.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((x=h.versions.engine)==null?void 0:x.version_text)||"unbekannt",children:[c.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((k=(j=h.versions.engine)==null?void 0:j.version_text)==null?void 0:k.split(" ").pop())||"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"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"}),c.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},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:[c.jsx(sI,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Suchen"}),c.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),c.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&c.jsx(ZQ,{}),e==="models"&&c.jsx(aY,{}),e==="connect"&&c.jsx(oY,{}),e==="memory"&&c.jsx(hY,{}),e==="agent"&&c.jsx(pY,{}),e==="terminal"&&c.jsx(mY,{}),e==="guide"&&c.jsx(gY,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&c.jsx(vY,{title:p.label,hint:p.hint})]})]})]})}const wY=new zM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});hM.createRoot(document.getElementById("root")).render(c.jsx(zN.StrictMode,{children:c.jsx(FM,{client:wY,children:c.jsx(bY,{})})}));export{zN as R,jd as S,Zg as T,Bs as a,jI as b,fM as c,ay as g,c as j,fA as l,v as r}; diff --git a/frontend/dist/assets/index-DEncQp-z.css b/frontend/dist/assets/index-DEncQp-z.css deleted file mode 100644 index f94e8c6..0000000 --- a/frontend/dist/assets/index-DEncQp-z.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.visible\!{visibility:visible!important}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.static\!{position:static!important}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.hidden\!{display:none!important}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-\[150px\]{height:150px}.h-\[480px\]{height:480px}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[68vh\]{min-height:68vh}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.min-h-\[480px\]{min-height:480px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[\#070a0f\]{background-color:#070a0f}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[130px\]{--tw-blur:blur(130px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_280px\]{grid-template-columns:1fr 280px}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-DNH8F21o.css b/frontend/dist/assets/index-DNH8F21o.css new file mode 100644 index 0000000..48f8523 --- /dev/null +++ b/frontend/dist/assets/index-DNH8F21o.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.visible\!{visibility:visible!important}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-\[150px\]{height:150px}.h-\[480px\]{height:480px}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[68vh\]{min-height:68vh}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.min-h-\[480px\]{min-height:480px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-52{width:calc(var(--spacing) * 52)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[\#070a0f\]{background-color:#070a0f}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-emerald-500\/\[0\.07\]{background-color:#00bb7f12}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/\[0\.07\]{background-color:color-mix(in oklab,var(--color-emerald-500) 7%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow\!{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[130px\]{--tw-blur:blur(130px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_280px\]{grid-template-columns:1fr 280px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-DuvhfsJu.js b/frontend/dist/assets/index-DuvhfsJu.js deleted file mode 100644 index 8c3b9ff..0000000 --- a/frontend/dist/assets/index-DuvhfsJu.js +++ /dev/null @@ -1,483 +0,0 @@ -var tM=Object.defineProperty;var C1=e=>{throw TypeError(e)};var rM=(e,t,r)=>t in e?tM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Kl=(e,t,r)=>rM(e,typeof t!="symbol"?t+"":t,r),Im=(e,t,r)=>t.has(e)||C1("Cannot "+r);var z=(e,t,r)=>(Im(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?C1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Im(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Fe=(e,t,r)=>(Im(e,t,"access private method"),r);var xd=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return z(e,t,n)}});function nM(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function ty(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tm={exports:{}},Gl={},Dm={exports:{}},Le={};/** - * @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 A1;function iM(){if(A1)return Le;A1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,j={};function S(L,T,ee){this.props=L,this.context=T,this.refs=j,this.updater=ee||b}S.prototype.isReactComponent={},S.prototype.setState=function(L,T){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,T,"setState")},S.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function N(){}N.prototype=S.prototype;function P(L,T,ee){this.props=L,this.context=T,this.refs=j,this.updater=ee||b}var O=P.prototype=new N;O.constructor=P,k(O,S.prototype),O.isPureReactComponent=!0;var C=Array.isArray,_=Object.prototype.hasOwnProperty,A={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function $(L,T,ee){var ne,te={},ue=null,pe=null;if(T!=null)for(ne in T.ref!==void 0&&(pe=T.ref),T.key!==void 0&&(ue=""+T.key),T)_.call(T,ne)&&!I.hasOwnProperty(ne)&&(te[ne]=T[ne]);var Oe=arguments.length-2;if(Oe===1)te.children=ee;else if(1>>1,T=Q[L];if(0>>1;La(te,X))uea(pe,te)?(Q[L]=pe,Q[ue]=X,L=ue):(Q[L]=te,Q[ne]=X,L=ne);else if(uea(pe,X))Q[L]=pe,Q[ue]=X,L=ue;else break e}}return oe}function a(Q,oe){var X=Q.sortIndex-oe.sortIndex;return X!==0?X:Q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],h=[],p=1,v=null,x=3,b=!1,k=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var oe=r(h);oe!==null;){if(oe.callback===null)n(h);else if(oe.startTime<=Q)n(h),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=r(h)}}function C(Q){if(j=!1,O(Q),!k)if(r(f)!==null)k=!0,ke(_);else{var oe=r(h);oe!==null&&me(C,oe.startTime-Q)}}function _(Q,oe){k=!1,j&&(j=!1,N($),$=-1),b=!0;var X=x;try{for(O(oe),v=r(f);v!==null&&(!(v.expirationTime>oe)||Q&&!q());){var L=v.callback;if(typeof L=="function"){v.callback=null,x=v.priorityLevel;var T=L(v.expirationTime<=oe);oe=e.unstable_now(),typeof T=="function"?v.callback=T:v===r(f)&&n(f),O(oe)}else n(f);v=r(f)}if(v!==null)var ee=!0;else{var ne=r(h);ne!==null&&me(C,ne.startTime-oe),ee=!1}return ee}finally{v=null,x=X,b=!1}}var A=!1,I=null,$=-1,B=5,K=-1;function q(){return!(e.unstable_now()-KQ||125L?(Q.sortIndex=X,t(h,Q),r(f)===null&&Q===r(h)&&(j?(N($),$=-1):j=!0,me(C,X-L))):(Q.sortIndex=T,t(f,Q),k||b||(k=!0,ke(_))),Q},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Q){var oe=x;return function(){var X=x;x=oe;try{return Q.apply(this,arguments)}finally{x=X}}}})(Lm)),Lm}var T1;function lM(){return T1||(T1=1,$m.exports=sM()),$m.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 D1;function uM(){if(D1)return vr;D1=1;var e=Fs(),t=lM();function r(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},v={};function x(i){return f.call(v,i)?!0:f.call(p,i)?!1:h.test(i)?v[i]=!0:(p[i]=!0,!1)}function b(i,s,d,m){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function k(i,s,d,m){if(s===null||typeof s>"u"||b(i,s,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function j(i,s,d,m,g,w,E){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=g,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=E}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new j(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new j(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new j(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new j(i,2,!1,i,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(i){S[i]=new j(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new j(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new j(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new j(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new j(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function P(i){return i[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(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,s,d,m){var g=S.hasOwnProperty(s)?S[s]:null;(g!==null?g.type!==0:m||!(2M||g[E]!==w[M]){var D=` -`+g[E].replace(" at new "," at ");return i.displayName&&D.includes("")&&(D=D.replace("",i.displayName)),D}while(1<=E&&0<=M);break}}}finally{ee=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function te(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=ne(i.type,!1),i;case 11:return i=ne(i.type.render,!1),i;case 1:return i=ne(i.type,!0),i;default:return""}}function ue(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case I:return"Fragment";case A:return"Portal";case B:return"Profiler";case $:return"StrictMode";case de:return"Suspense";case Z:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case q:return(i.displayName||"Context")+".Consumer";case K:return(i._context.displayName||"Context")+".Provider";case R:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:ue(i.type)||"Memo";case ke:s=i._payload,i=i._init;try{return ue(i(s))}catch{}}return null}function pe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(s);case 8:return s===$?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Oe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function J(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function je(i){var s=J(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(E){m=""+E,w.call(this,E)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(E){m=""+E},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function _e(i){i._valueTracker||(i._valueTracker=je(i))}function ae(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),m="";return i&&(m=J(i)?i.checked?"true":"false":i.value),i=m,i!==d?(s.setValue(i),!0):!1}function Xe(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Y(i,s){var d=s.checked;return X({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function ce(i,s){var d=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;d=Oe(s.value!=null?s.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function tt(i,s){s=s.checked,s!=null&&O(i,"checked",s,!1)}function kr(i,s){tt(i,s);var d=Oe(s.value),m=s.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ma(i,s.type,d):s.hasOwnProperty("defaultValue")&&ma(i,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function pa(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function ma(i,s,d){(s!=="number"||Xe(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Bn=Array.isArray;function Un(i,s,d,m){if(i=i.options,s){s={};for(var g=0;g"+s.valueOf().toString()+"",s=va.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function wi(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var ki={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},cc=["Webkit","ms","Moz","O"];Object.keys(ki).forEach(function(i){cc.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ki[s]=ki[i]})});function al(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ki.hasOwnProperty(i)&&ki[i]?(""+s).trim():s+"px"}function ol(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var m=d.indexOf("--")===0,g=al(d,s[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,g):i[d]=g}}var U=X({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 he(i,s){if(s){if(U[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Pe(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 ze=null;function Ve(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Ze=null,vt=null;function ga(i){if(i=Ol(i)){if(typeof qt!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Tc(s),qt(i.stateNode,i.type,s))}}function sl(i){Ze?vt?vt.push(i):vt=[i]:Ze=i}function dc(){if(Ze){var i=Ze,s=vt;if(vt=Ze=null,ga(i),s)for(i=0;i>>=0,i===0?32:31-(g_(i)/y_|0)|0}var vc=64,gc=4194304;function fl(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function yc(i,s){var d=i.pendingLanes;if(d===0)return 0;var m=0,g=i.suspendedLanes,w=i.pingedLanes,E=d&268435455;if(E!==0){var M=E&~g;M!==0?m=fl(M):(w&=E,w!==0&&(m=fl(w)))}else E=d&~g,E!==0?m=fl(E):w!==0&&(m=fl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&g)===0&&(g=m&-m,w=s&-s,g>=w||g===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0d;d++)s.push(i);return s}function hl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zr(s),i[s]=d}function k_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0=wl),wx=" ",kx=!1;function jx(i,s){switch(i){case"keyup":return Y_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function Z_(i,s){switch(i){case"compositionend":return Sx(s);case"keypress":return s.which!==32?null:(kx=!0,wx);case"textInput":return i=s.data,i===wx&&kx?null:i;default:return null}}function J_(i,s){if(No)return i==="compositionend"||!hp&&jx(i,s)?(i=mx(),jc=sp=Pi=null,No=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:d,offset:s-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=_x(d)}}function Ix(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Ix(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Tx(){for(var i=window,s=Xe();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Xe(i.document)}return s}function vp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function l5(i){var s=Tx(),d=i.focusedElem,m=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Ix(d.ownerDocument.documentElement,d)){if(m!==null&&vp(d)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=d.textContent.length,w=Math.min(m.start,g);m=m.end===void 0?w:Math.min(m.end,g),!i.extend&&w>m&&(g=m,m=w,w=g),g=Mx(d,w);var E=Mx(d,m);g&&E&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==E.node||i.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Eo=null,gp=null,Nl=null,yp=!1;function Dx(i,s,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;yp||Eo==null||Eo!==Xe(m)||(m=Eo,"selectionStart"in m&&vp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Nl&&Sl(Nl,m)||(Nl=m,m=_c(gp,"onSelect"),0_o||(i.current=Op[_o],Op[_o]=null,_o--)}function Je(i,s){_o++,Op[_o]=i.current,i.current=s}var _i={},Qt=Oi(_i),dr=Oi(!1),ba=_i;function Mo(i,s){var d=i.type.contextTypes;if(!d)return _i;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var g={},w;for(w in d)g[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function fr(i){return i=i.childContextTypes,i!=null}function Dc(){nt(dr),nt(Qt)}function Yx(i,s,d){if(Qt.current!==_i)throw Error(r(168));Je(Qt,s),Je(dr,d)}function Xx(i,s,d){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var g in m)if(!(g in s))throw Error(r(108,pe(i)||"Unknown",g));return X({},d,m)}function Rc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||_i,ba=Qt.current,Je(Qt,i),Je(dr,dr.current),!0}function Zx(i,s,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=Xx(i,s,ba),m.__reactInternalMemoizedMergedChildContext=i,nt(dr),nt(Qt),Je(Qt,i)):nt(dr),Je(dr,d)}var Hn=null,$c=!1,_p=!1;function Jx(i){Hn===null?Hn=[i]:Hn.push(i)}function b5(i){$c=!0,Jx(i)}function Mi(){if(!_p&&Hn!==null){_p=!0;var i=0,s=Qe;try{var d=Hn;for(Qe=1;i>=E,g-=E,Kn=1<<32-Zr(s)+g|d<Re?(_t=Te,Te=null):_t=Te.sibling;var Ke=re(W,Te,H[Re],le);if(Ke===null){Te===null&&(Te=_t);break}i&&Te&&Ke.alternate===null&&s(W,Te),F=w(Ke,F,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke,Te=_t}if(Re===H.length)return d(W,Te),st&&ka(W,Re),Ee;if(Te===null){for(;ReRe?(_t=Te,Te=null):_t=Te.sibling;var Bi=re(W,Te,Ke.value,le);if(Bi===null){Te===null&&(Te=_t);break}i&&Te&&Bi.alternate===null&&s(W,Te),F=w(Bi,F,Re),Ie===null?Ee=Bi:Ie.sibling=Bi,Ie=Bi,Te=_t}if(Ke.done)return d(W,Te),st&&ka(W,Re),Ee;if(Te===null){for(;!Ke.done;Re++,Ke=H.next())Ke=se(W,Ke.value,le),Ke!==null&&(F=w(Ke,F,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke);return st&&ka(W,Re),Ee}for(Te=m(W,Te);!Ke.done;Re++,Ke=H.next())Ke=ve(Te,W,Re,Ke.value,le),Ke!==null&&(i&&Ke.alternate!==null&&Te.delete(Ke.key===null?Re:Ke.key),F=w(Ke,F,Re),Ie===null?Ee=Ke:Ie.sibling=Ke,Ie=Ke);return i&&Te.forEach(function(eM){return s(W,eM)}),st&&ka(W,Re),Ee}function yt(W,F,H,le){if(typeof H=="object"&&H!==null&&H.type===I&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case _:e:{for(var Ee=H.key,Ie=F;Ie!==null;){if(Ie.key===Ee){if(Ee=H.type,Ee===I){if(Ie.tag===7){d(W,Ie.sibling),F=g(Ie,H.props.children),F.return=W,W=F;break e}}else if(Ie.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===ke&&ab(Ee)===Ie.type){d(W,Ie.sibling),F=g(Ie,H.props),F.ref=_l(W,Ie,H),F.return=W,W=F;break e}d(W,Ie);break}else s(W,Ie);Ie=Ie.sibling}H.type===I?(F=Oa(H.props.children,W.mode,le,H.key),F.return=W,W=F):(le=dd(H.type,H.key,H.props,null,W.mode,le),le.ref=_l(W,F,H),le.return=W,W=le)}return E(W);case A:e:{for(Ie=H.key;F!==null;){if(F.key===Ie)if(F.tag===4&&F.stateNode.containerInfo===H.containerInfo&&F.stateNode.implementation===H.implementation){d(W,F.sibling),F=g(F,H.children||[]),F.return=W,W=F;break e}else{d(W,F);break}else s(W,F);F=F.sibling}F=Cm(H,W.mode,le),F.return=W,W=F}return E(W);case ke:return Ie=H._init,yt(W,F,Ie(H._payload),le)}if(Bn(H))return we(W,F,H,le);if(oe(H))return Se(W,F,H,le);Bc(W,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,F!==null&&F.tag===6?(d(W,F.sibling),F=g(F,H),F.return=W,W=F):(d(W,F),F=Pm(H,W.mode,le),F.return=W,W=F),E(W)):d(W,F)}return yt}var Ro=ob(!0),sb=ob(!1),Uc=Oi(null),Wc=null,$o=null,$p=null;function Lp(){$p=$o=Wc=null}function zp(i){var s=Uc.current;nt(Uc),i._currentValue=s}function Fp(i,s,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===d)break;i=i.return}}function Lo(i,s){Wc=i,$p=$o=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(hr=!0),i.firstContext=null)}function Rr(i){var s=i._currentValue;if($p!==i)if(i={context:i,memoizedValue:s,next:null},$o===null){if(Wc===null)throw Error(r(308));$o=i,Wc.dependencies={lanes:0,firstContext:i}}else $o=$o.next=i;return s}var ja=null;function Bp(i){ja===null?ja=[i]:ja.push(i)}function lb(i,s,d,m){var g=s.interleaved;return g===null?(d.next=d,Bp(s)):(d.next=g.next,g.next=d),s.interleaved=d,Vn(i,m)}function Vn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Ii=!1;function Up(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ub(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ti(i,s,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(He&2)!==0){var g=m.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),m.pending=s,Vn(i,d)}return g=m.interleaved,g===null?(s.next=s,Bp(m)):(s.next=g.next,g.next=s),m.interleaved=s,Vn(i,d)}function Hc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,rp(i,d)}}function cb(i,s){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var g=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var E={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?g=w=E:w=w.next=E,d=d.next}while(d!==null);w===null?g=w=s:w=w.next=s}else g=w=s;d={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Kc(i,s,d,m){var g=i.updateQueue;Ii=!1;var w=g.firstBaseUpdate,E=g.lastBaseUpdate,M=g.shared.pending;if(M!==null){g.shared.pending=null;var D=M,V=D.next;D.next=null,E===null?w=V:E.next=V,E=D;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==E&&(M===null?ie.firstBaseUpdate=V:M.next=V,ie.lastBaseUpdate=D))}if(w!==null){var se=g.baseState;E=0,ie=V=D=null,M=w;do{var re=M.lane,ve=M.eventTime;if((m&re)===re){ie!==null&&(ie=ie.next={eventTime:ve,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var we=i,Se=M;switch(re=s,ve=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){se=we.call(ve,se,re);break e}se=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,re=typeof we=="function"?we.call(ve,se,re):we,re==null)break e;se=X({},se,re);break e;case 2:Ii=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[M]:re.push(M))}else ve={eventTime:ve,lane:re,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(V=ie=ve,D=se):ie=ie.next=ve,E|=re;if(M=M.next,M===null){if(M=g.shared.pending,M===null)break;re=M,M=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(ie===null&&(D=se),g.baseState=D,g.firstBaseUpdate=V,g.lastBaseUpdate=ie,s=g.shared.interleaved,s!==null){g=s;do E|=g.lane,g=g.next;while(g!==s)}else w===null&&(g.shared.lanes=0);Ea|=E,i.lanes=E,i.memoizedState=se}}function db(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;sd?d:4,i(!0);var m=Vp.transition;Vp.transition={};try{i(!1),s()}finally{Qe=d,Vp.transition=m}}function Ob(){return $r().memoizedState}function S5(i,s,d){var m=Li(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},_b(i))Mb(s,d);else if(d=lb(i,s,d,m),d!==null){var g=ir();an(d,i,m,g),Ib(d,s,m)}}function N5(i,s,d){var m=Li(i),g={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(_b(i))Mb(s,g);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var E=s.lastRenderedState,M=w(E,d);if(g.hasEagerState=!0,g.eagerState=M,Jr(M,E)){var D=s.interleaved;D===null?(g.next=g,Bp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch{}finally{}d=lb(i,s,g,m),d!==null&&(g=ir(),an(d,i,m,g),Ib(d,s,m))}}function _b(i){var s=i.alternate;return i===dt||s!==null&&s===dt}function Mb(i,s){Dl=qc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Ib(i,s,d){if((d&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,rp(i,d)}}var Xc={readContext:Rr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},E5={readContext:Rr,useCallback:function(i,s){return yn().memoizedState=[i,s===void 0?null:s],i},useContext:Rr,useEffect:kb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Qc(4194308,4,Nb.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Qc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Qc(4,2,i,s)},useMemo:function(i,s){var d=yn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var m=yn();return s=d!==void 0?d(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=S5.bind(null,dt,i),[m.memoizedState,i]},useRef:function(i){var s=yn();return i={current:i},s.memoizedState=i},useState:bb,useDebugValue:em,useDeferredValue:function(i){return yn().memoizedState=i},useTransition:function(){var i=bb(!1),s=i[0];return i=j5.bind(null,i[1]),yn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var m=dt,g=yn();if(st){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Ot===null)throw Error(r(349));(Na&30)!==0||mb(m,s,d)}g.memoizedState=d;var w={value:d,getSnapshot:s};return g.queue=w,kb(gb.bind(null,m,w,i),[i]),m.flags|=2048,Ll(9,vb.bind(null,m,w,d,s),void 0,null),d},useId:function(){var i=yn(),s=Ot.identifierPrefix;if(st){var d=Gn,m=Kn;d=(m&~(1<<32-Zr(m)-1)).toString(32)+d,s=":"+s+"R"+d,d=Rl++,0<\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=E.createElement(d,{is:m.is}):(i=E.createElement(d),d==="select"&&(E=i,m.multiple?E.multiple=!0:m.size&&(E.size=m.size))):i=E.createElementNS(i,d),i[vn]=s,i[Al]=m,Jb(i,s,!1,!1),s.stateNode=i;e:{switch(E=Pe(d,m),d){case"dialog":rt("cancel",i),rt("close",i),g=m;break;case"iframe":case"object":case"embed":rt("load",i),g=m;break;case"video":case"audio":for(g=0;gWo&&(s.flags|=128,m=!0,zl(w,!1),s.lanes=4194304)}else{if(!m)if(i=Gc(E),i!==null){if(s.flags|=128,m=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),zl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!E.alternate&&!st)return Xt(s),null}else 2*gt()-w.renderingStartTime>Wo&&d!==1073741824&&(s.flags|=128,m=!0,zl(w,!1),s.lanes=4194304);w.isBackwards?(E.sibling=s.child,s.child=E):(d=w.last,d!==null?d.sibling=E:s.child=E,w.last=E)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=gt(),s.sibling=null,d=ct.current,Je(ct,m?d&1|2:d&1),s):(Xt(s),null);case 22:case 23:return Sm(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Er&1073741824)!==0&&(Xt(s),s.subtreeFlags&6&&(s.flags|=8192)):Xt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function T5(i,s){switch(Ip(s),s.tag){case 1:return fr(s.type)&&Dc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zo(),nt(dr),nt(Qt),Gp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Hp(s),null;case 13:if(nt(ct),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Do()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return nt(ct),null;case 4:return zo(),null;case 10:return zp(s.type._context),null;case 22:case 23:return Sm(),null;case 24:return null;default:return null}}var td=!1,Zt=!1,D5=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Bo(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){ft(i,s,m)}else d.current=null}function fm(i,s,d){try{d()}catch(m){ft(i,s,m)}}var r1=!1;function R5(i,s){if(Sp=wc,i=Tx(),vp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var g=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var E=0,M=-1,D=-1,V=0,ie=0,se=i,re=null;t:for(;;){for(var ve;se!==d||g!==0&&se.nodeType!==3||(M=E+g),se!==w||m!==0&&se.nodeType!==3||(D=E+m),se.nodeType===3&&(E+=se.nodeValue.length),(ve=se.firstChild)!==null;)re=se,se=ve;for(;;){if(se===i)break t;if(re===d&&++V===g&&(M=E),re===w&&++ie===m&&(D=E),(ve=se.nextSibling)!==null)break;se=re,re=se.parentNode}se=ve}d=M===-1||D===-1?null:{start:M,end:D}}else d=null}d=d||{start:0,end:0}}else d=null;for(Np={focusedElem:i,selectionRange:d},wc=!1,xe=s;xe!==null;)if(s=xe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,xe=i;else for(;xe!==null;){s=xe;try{var we=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,yt=we.memoizedState,W=s.stateNode,F=W.getSnapshotBeforeUpdate(s.elementType===s.type?Se:tn(s.type,Se),yt);W.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var H=s.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){ft(s,s.return,le)}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}return we=r1,r1=!1,we}function Fl(i,s,d){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var g=m=m.next;do{if((g.tag&i)===i){var w=g.destroy;g.destroy=void 0,w!==void 0&&fm(s,d,w)}g=g.next}while(g!==m)}}function rd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==s)}}function hm(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function n1(i){var s=i.alternate;s!==null&&(i.alternate=null,n1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[vn],delete s[Al],delete s[Ap],delete s[y5],delete s[x5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function i1(i){return i.tag===5||i.tag===3||i.tag===4}function a1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||i1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function pm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Ic));else if(m!==4&&(i=i.child,i!==null))for(pm(i,s,d),i=i.sibling;i!==null;)pm(i,s,d),i=i.sibling}function mm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(mm(i,s,d),i=i.sibling;i!==null;)mm(i,s,d),i=i.sibling}var Lt=null,rn=!1;function Di(i,s,d){for(d=d.child;d!==null;)o1(i,s,d),d=d.sibling}function o1(i,s,d){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(mc,d)}catch{}switch(d.tag){case 5:Zt||Bo(d,s);case 6:var m=Lt,g=rn;Lt=null,Di(i,s,d),Lt=m,rn=g,Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Lt.removeChild(d.stateNode));break;case 18:Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?Cp(i.parentNode,d):i.nodeType===1&&Cp(i,d),yl(i)):Cp(Lt,d.stateNode));break;case 4:m=Lt,g=rn,Lt=d.stateNode.containerInfo,rn=!0,Di(i,s,d),Lt=m,rn=g;break;case 0:case 11:case 14:case 15:if(!Zt&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){g=m=m.next;do{var w=g,E=w.destroy;w=w.tag,E!==void 0&&((w&2)!==0||(w&4)!==0)&&fm(d,s,E),g=g.next}while(g!==m)}Di(i,s,d);break;case 1:if(!Zt&&(Bo(d,s),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(M){ft(d,s,M)}Di(i,s,d);break;case 21:Di(i,s,d);break;case 22:d.mode&1?(Zt=(m=Zt)||d.memoizedState!==null,Di(i,s,d),Zt=m):Di(i,s,d);break;default:Di(i,s,d)}}function s1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new D5),s.forEach(function(m){var g=K5.bind(null,i,m);d.has(m)||(d.add(m),m.then(g,g))})}}function nn(i,s){var d=s.deletions;if(d!==null)for(var m=0;mg&&(g=E),m&=~w}if(m=g,m=gt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*L5(m/1960))-m,10i?16:i,$i===null)var m=!1;else{if(i=$i,$i=null,sd=0,(He&6)!==0)throw Error(r(331));var g=He;for(He|=4,xe=i.current;xe!==null;){var w=xe,E=w.child;if((xe.flags&16)!==0){var M=w.deletions;if(M!==null){for(var D=0;Dgt()-ym?Ca(i,0):gm|=d),mr(i,s)}function b1(i,s){s===0&&((i.mode&1)===0?s=1:(s=gc,gc<<=1,(gc&130023424)===0&&(gc=4194304)));var d=ir();i=Vn(i,s),i!==null&&(hl(i,s,d),mr(i,d))}function H5(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),b1(i,d)}function K5(i,s){var d=0;switch(i.tag){case 13:var m=i.stateNode,g=i.memoizedState;g!==null&&(d=g.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(s),b1(i,d)}var w1;w1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||dr.current)hr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return hr=!1,M5(i,s,d);hr=(i.flags&131072)!==0}else hr=!1,st&&(s.flags&1048576)!==0&&eb(s,zc,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;ed(i,s),i=s.pendingProps;var g=Mo(s,Qt.current);Lo(s,d),g=Qp(null,s,m,i,g,d);var w=Yp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,fr(m)?(w=!0,Rc(s)):w=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Up(s),g.updater=Zc,s.stateNode=g,g._reactInternals=s,rm(s,m,i,d),s=om(null,s,m,!0,w,d)):(s.tag=0,st&&w&&Mp(s),nr(null,s,g,d),s=s.child),s;case 16:m=s.elementType;e:{switch(ed(i,s),i=s.pendingProps,g=m._init,m=g(m._payload),s.type=m,g=s.tag=V5(m),i=tn(m,i),g){case 0:s=am(null,s,m,i,d);break e;case 1:s=Vb(null,s,m,i,d);break e;case 11:s=Ub(null,s,m,i,d);break e;case 14:s=Wb(null,s,m,tn(m.type,i),d);break e}throw Error(r(306,m,""))}return s;case 0:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),am(i,s,m,g,d);case 1:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),Vb(i,s,m,g,d);case 3:e:{if(qb(s),i===null)throw Error(r(387));m=s.pendingProps,w=s.memoizedState,g=w.element,ub(i,s),Kc(s,m,null,d);var E=s.memoizedState;if(m=E.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){g=Fo(Error(r(423)),s),s=Qb(i,s,m,d,g);break e}else if(m!==g){g=Fo(Error(r(424)),s),s=Qb(i,s,m,d,g);break e}else for(Nr=Ai(s.stateNode.containerInfo.firstChild),Sr=s,st=!0,en=null,d=sb(s,null,m,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Do(),m===g){s=Qn(i,s,d);break e}nr(i,s,m,d)}s=s.child}return s;case 5:return fb(s),i===null&&Dp(s),m=s.type,g=s.pendingProps,w=i!==null?i.memoizedProps:null,E=g.children,Ep(m,g)?E=null:w!==null&&Ep(m,w)&&(s.flags|=32),Gb(i,s),nr(i,s,E,d),s.child;case 6:return i===null&&Dp(s),null;case 13:return Yb(i,s,d);case 4:return Wp(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=Ro(s,null,m,d):nr(i,s,m,d),s.child;case 11:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),Ub(i,s,m,g,d);case 7:return nr(i,s,s.pendingProps,d),s.child;case 8:return nr(i,s,s.pendingProps.children,d),s.child;case 12:return nr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(m=s.type._context,g=s.pendingProps,w=s.memoizedProps,E=g.value,Je(Uc,m._currentValue),m._currentValue=E,w!==null)if(Jr(w.value,E)){if(w.children===g.children&&!dr.current){s=Qn(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){E=w.child;for(var D=M.firstContext;D!==null;){if(D.context===m){if(w.tag===1){D=qn(-1,d&-d),D.tag=2;var V=w.updateQueue;if(V!==null){V=V.shared;var ie=V.pending;ie===null?D.next=D:(D.next=ie.next,ie.next=D),V.pending=D}}w.lanes|=d,D=w.alternate,D!==null&&(D.lanes|=d),Fp(w.return,d,s),M.lanes|=d;break}D=D.next}}else if(w.tag===10)E=w.type===s.type?null:w.child;else if(w.tag===18){if(E=w.return,E===null)throw Error(r(341));E.lanes|=d,M=E.alternate,M!==null&&(M.lanes|=d),Fp(E,d,s),E=w.sibling}else E=w.child;if(E!==null)E.return=w;else for(E=w;E!==null;){if(E===s){E=null;break}if(w=E.sibling,w!==null){w.return=E.return,E=w;break}E=E.return}w=E}nr(i,s,g.children,d),s=s.child}return s;case 9:return g=s.type,m=s.pendingProps.children,Lo(s,d),g=Rr(g),m=m(g),s.flags|=1,nr(i,s,m,d),s.child;case 14:return m=s.type,g=tn(m,s.pendingProps),g=tn(m.type,g),Wb(i,s,m,g,d);case 15:return Hb(i,s,s.type,s.pendingProps,d);case 17:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),ed(i,s),s.tag=1,fr(m)?(i=!0,Rc(s)):i=!1,Lo(s,d),Db(s,m,g),rm(s,m,g,d),om(null,s,m,!0,i,d);case 19:return Zb(i,s,d);case 22:return Kb(i,s,d)}throw Error(r(156,s.tag))};function k1(i,s){return tx(i,s)}function G5(i,s,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(i,s,d,m){return new G5(i,s,d,m)}function Em(i){return i=i.prototype,!(!i||!i.isReactComponent)}function V5(i){if(typeof i=="function")return Em(i)?1:0;if(i!=null){if(i=i.$$typeof,i===R)return 11;if(i===ge)return 14}return 2}function Fi(i,s){var d=i.alternate;return d===null?(d=zr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function dd(i,s,d,m,g,w){var E=2;if(m=i,typeof i=="function")Em(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case I:return Oa(d.children,g,w,s);case $:E=8,g|=8;break;case B:return i=zr(12,d,s,g|2),i.elementType=B,i.lanes=w,i;case de:return i=zr(13,d,s,g),i.elementType=de,i.lanes=w,i;case Z:return i=zr(19,d,s,g),i.elementType=Z,i.lanes=w,i;case me:return fd(d,g,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case K:E=10;break e;case q:E=9;break e;case R:E=11;break e;case ge:E=14;break e;case ke:E=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=zr(E,d,s,g),s.elementType=i,s.type=m,s.lanes=w,s}function Oa(i,s,d,m){return i=zr(7,i,m,s),i.lanes=d,i}function fd(i,s,d,m){return i=zr(22,i,m,s),i.elementType=me,i.lanes=d,i.stateNode={isHidden:!1},i}function Pm(i,s,d){return i=zr(6,i,null,s),i.lanes=d,i}function Cm(i,s,d){return s=zr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function q5(i,s,d,m,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tp(0),this.expirationTimes=tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tp(0),this.identifierPrefix=m,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Am(i,s,d,m,g,w,E,M,D){return i=new q5(i,s,d,M,D),s===1?(s=1,w===!0&&(s|=8)):s=0,w=zr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Up(w),i}function Q5(i,s,d){var m=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rm.exports=uM(),Rm.exports}var $1;function cM(){if($1)return bd;$1=1;var e=$N();return bd.createRoot=e.createRoot,bd.hydrateRoot=e.hydrateRoot,bd}var dM=cM();const fM=ty(dM);var Gu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ka,Yi,ps,EN,hM=(EN=class extends Gu{constructor(){super();De(this,Ka);De(this,Yi);De(this,ps);ye(this,ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,Yi)||this.setEventListener(z(this,ps))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Yi))==null||t.call(this),ye(this,Yi,void 0))}setEventListener(t){var r;ye(this,ps,t),(r=z(this,Yi))==null||r.call(this),ye(this,Yi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,Ka)!==t&&(ye(this,Ka,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Ka)=="boolean"?z(this,Ka):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ka=new WeakMap,Yi=new WeakMap,ps=new WeakMap,EN),ry=new hM,pM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xi,ey,PN,mM=(PN=class{constructor(){De(this,Xi,pM);De(this,ey,!1)}setTimeoutProvider(e){ye(this,Xi,e)}setTimeout(e,t){return z(this,Xi).setTimeout(e,t)}clearTimeout(e){z(this,Xi).clearTimeout(e)}setInterval(e,t){return z(this,Xi).setInterval(e,t)}clearInterval(e){z(this,Xi).clearInterval(e)}},Xi=new WeakMap,ey=new WeakMap,PN),za=new mM;function vM(e){setTimeout(e,0)}var gM=typeof window>"u"||"Deno"in globalThis;function yr(){}function yM(e,t){return typeof e=="function"?e(t):e}function Mv(e){return typeof e=="number"&&e>=0&&e!==1/0}function LN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function aa(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function L1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==ny(u,t.options))return!1}else if(!mu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function z1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(pu(t.options.mutationKey)!==pu(o))return!1}else if(!mu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function ny(e,t){return((t==null?void 0:t.queryKeyHashFn)||pu)(e)}function pu(e){return JSON.stringify(e,(t,r)=>Tv(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function mu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>mu(e[r],t[r])):!1}var xM=Object.prototype.hasOwnProperty;function zN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=F1(e)&&F1(t);if(!n&&!(Tv(e)&&Tv(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),l=u.length,f=n?new Array(l):{};let h=0;for(let p=0;p{za.setTimeout(t,e)})}function Dv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?zN(e,t):t}function wM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function kM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var iy=Symbol();function FN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===iy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BN(e,t){return typeof e=="function"?e(...t):!!e}function jM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var vu=(()=>{let e=()=>gM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Rv(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var SM=vM;function NM(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=SM;const o=l=>{t?e.push(l):a(()=>{r(l)})},u=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||u()}return f},batchCalls:l=>(...f)=>{o(()=>{l(...f)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Wt=NM(),ms,Zi,vs,CN,EM=(CN=class extends Gu{constructor(){super();De(this,ms,!0);De(this,Zi);De(this,vs);ye(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,Zi)||this.setEventListener(z(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Zi))==null||t.call(this),ye(this,Zi,void 0))}setEventListener(t){var r;ye(this,vs,t),(r=z(this,Zi))==null||r.call(this),ye(this,Zi,t(this.setOnline.bind(this)))}setOnline(t){z(this,ms)!==t&&(ye(this,ms,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,ms)}},ms=new WeakMap,Zi=new WeakMap,vs=new WeakMap,CN),rf=new EM;function PM(e){return Math.min(1e3*2**e,3e4)}function UN(e){return(e??"online")==="online"?rf.isOnline():!0}var $v=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function WN(e){let t=!1,r=0,n;const a=Rv(),o=()=>a.status!=="pending",u=j=>{var S;if(!o()){const N=new $v(j);x(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>ry.isFocused()&&(e.networkMode==="always"||rf.isOnline())&&e.canRun(),p=()=>UN(e.networkMode)&&e.canRun(),v=j=>{o()||(n==null||n(),a.resolve(j))},x=j=>{o()||(n==null||n(),a.reject(j))},b=()=>new Promise(j=>{var S;n=N=>{(o()||h())&&j(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var j;n=void 0,o()||(j=e.onContinue)==null||j.call(e)}),k=()=>{if(o())return;let j;const S=r===0?e.initialPromise:void 0;try{j=S??e.fn()}catch(N){j=Promise.reject(N)}Promise.resolve(j).then(v).catch(N=>{var A;if(o())return;const P=e.retry??(vu.isServer()?0:3),O=e.retryDelay??PM,C=typeof O=="function"?O(r,N):O,_=P===!0||typeof P=="number"&&rh()?void 0:b()).then(()=>{t?x(N):k()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?k():b().then(k),a)}}var Ga,AN,HN=(AN=class{constructor(){De(this,Ga)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mv(this.gcTime)&&ye(this,Ga,za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vu.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,Ga)!==void 0&&(za.clearTimeout(z(this,Ga)),ye(this,Ga,void 0))}},Ga=new WeakMap,AN);function CM(e){return{onFetch:(t,r)=>{var p,v,x,b,k;const n=t.options,a=(x=(v=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let j=!1;const S=O=>{jM(O,()=>t.signal,()=>j=!0)},N=FN(t.options,t.fetchOptions),P=async(O,C,_)=>{if(j)return Promise.reject(t.signal.reason);if(C==null&&O.pages.length)return Promise.resolve(O);const I=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};return S(q),q})(),$=await N(I),{maxPages:B}=t.options,K=_?kM:wM;return{pages:K(O.pages,$,B),pageParams:K(O.pageParams,C,B)}};if(a&&o.length){const O=a==="backward",C=O?AM:U1,_={pages:o,pageParams:u},A=C(n,_);l=await P(_,A,O)}else{const O=e??o.length;do{const C=f===0?u[0]??n.initialPageParam:U1(n,l);if(f>0&&C==null)break;l=await P(l,C),f++}while(f{var j,S;return(S=(j=t.options).persister)==null?void 0:S.call(j,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function U1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function AM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var gs,Va,ys,Ur,qa,Mt,Bu,Qa,Pr,KN,Zn,ON,OM=(ON=class extends HN{constructor(t){super();De(this,Pr);De(this,gs);De(this,Va);De(this,ys);De(this,Ur);De(this,qa);De(this,Mt);De(this,Bu);De(this,Qa);ye(this,Qa,!1),ye(this,Bu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,qa,t.client),ye(this,Ur,z(this,qa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Va,H1(this.options)),this.state=t.state??z(this,Va),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,gs)}get promise(){var t;return(t=z(this,Mt))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Bu),...t},t!=null&&t._type&&ye(this,gs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=H1(this.options);r.data!==void 0&&(this.setState(W1(r.data,r.dataUpdatedAt)),ye(this,Va,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Ur).remove(this)}setData(t,r){const n=Dv(this.state.data,t,this.options);return Fe(this,Pr,Zn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Fe(this,Pr,Zn).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=z(this,Mt))==null?void 0:n.promise;return(a=z(this,Mt))==null||a.cancel(t),r?r.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,Va)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>aa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!LN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,Ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Mt)&&(z(this,Qa)||Fe(this,Pr,KN).call(this)?z(this,Mt).cancel({revert:!0}):z(this,Mt).cancelRetry()),this.scheduleGc()),z(this,Ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,Pr,Zn).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,v,x,b,k,j,S,N,P,O;if(this.state.fetchStatus!=="idle"&&((h=z(this,Mt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Mt))return z(this,Mt).continueRetry(),z(this,Mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(_=>_.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,a=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ye(this,Qa,!0),n.signal)})},o=()=>{const C=FN(this.options,r),A=(()=>{const I={client:z(this,qa),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return ye(this,Qa,!1),this.options.persister?this.options.persister(C,A,this):C(A)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,qa),state:this.state,fetchFn:o};return a(C),C})(),f=z(this,gs)==="infinite"?CM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),ye(this,ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&Fe(this,Pr,Zn).call(this,{type:"fetch",meta:(v=l.fetchOptions)==null?void 0:v.meta}),ye(this,Mt,WN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof $v&&C.revert&&this.setState({...z(this,ys),fetchStatus:"idle"}),n.abort()},onFail:(C,_)=>{Fe(this,Pr,Zn).call(this,{type:"failed",failureCount:C,error:_})},onPause:()=>{Fe(this,Pr,Zn).call(this,{type:"pause"})},onContinue:()=>{Fe(this,Pr,Zn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await z(this,Mt).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(b=(x=z(this,Ur).config).onSuccess)==null||b.call(x,C,this),(j=(k=z(this,Ur).config).onSettled)==null||j.call(k,C,this.state.error,this),C}catch(C){if(C instanceof $v){if(C.silent)return z(this,Mt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Fe(this,Pr,Zn).call(this,{type:"error",error:C}),(N=(S=z(this,Ur).config).onError)==null||N.call(S,C,this),(O=(P=z(this,Ur).config).onSettled)==null||O.call(P,this.state.data,C,this),C}finally{this.scheduleGc()}}},gs=new WeakMap,Va=new WeakMap,ys=new WeakMap,Ur=new WeakMap,qa=new WeakMap,Mt=new WeakMap,Bu=new WeakMap,Qa=new WeakMap,Pr=new WeakSet,KN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Zn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...GN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...W1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ys,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,Ur).notify({query:this,type:"updated",action:t})})},ON);function GN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function W1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function H1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var gr,Ue,Uu,ar,Ya,xs,ei,Ji,Wu,bs,ws,Xa,Za,ea,ks,qe,ou,Lv,zv,Fv,Bv,Uv,Wv,Hv,VN,_N,_M=(_N=class extends Gu{constructor(t,r){super();De(this,qe);De(this,gr);De(this,Ue);De(this,Uu);De(this,ar);De(this,Ya);De(this,xs);De(this,ei);De(this,Ji);De(this,Wu);De(this,bs);De(this,ws);De(this,Xa);De(this,Za);De(this,ea);De(this,ks,new Set);this.options=r,ye(this,gr,t),ye(this,Ji,null),ye(this,ei,Rv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,Ue).addObserver(this),K1(z(this,Ue),this.options)?Fe(this,qe,ou).call(this):this.updateResult(),Fe(this,qe,Bv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kv(z(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kv(z(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,qe,Uv).call(this),Fe(this,qe,Wv).call(this),z(this,Ue).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,Ue);if(this.options=z(this,gr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,z(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,qe,Hv).call(this),z(this,Ue).setOptions(this.options),r._defaulted&&!Iv(this.options,r)&&z(this,gr).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,Ue),observer:this});const a=this.hasListeners();a&&G1(z(this,Ue),n,this.options,r)&&Fe(this,qe,ou).call(this),this.updateResult(),a&&(z(this,Ue)!==n||Cr(this.options.enabled,z(this,Ue))!==Cr(r.enabled,z(this,Ue))||aa(this.options.staleTime,z(this,Ue))!==aa(r.staleTime,z(this,Ue)))&&Fe(this,qe,Lv).call(this);const o=Fe(this,qe,zv).call(this);a&&(z(this,Ue)!==n||Cr(this.options.enabled,z(this,Ue))!==Cr(r.enabled,z(this,Ue))||o!==z(this,ea))&&Fe(this,qe,Fv).call(this,o)}getOptimisticResult(t){const r=z(this,gr).getQueryCache().build(z(this,gr),t),n=this.createResult(r,t);return IM(this,n)&&(ye(this,ar,n),ye(this,xs,this.options),ye(this,Ya,z(this,Ue).state)),n}getCurrentResult(){return z(this,ar)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,ei).status==="pending"&&z(this,ei).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){z(this,ks).add(t)}getCurrentQuery(){return z(this,Ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,gr).defaultQueryOptions(t),n=z(this,gr).getQueryCache().build(z(this,gr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Fe(this,qe,ou).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,ar)))}createResult(t,r){var B;const n=z(this,Ue),a=this.options,o=z(this,ar),u=z(this,Ya),l=z(this,xs),h=t!==n?t.state:z(this,Uu),{state:p}=t;let v={...p},x=!1,b;if(r._optimisticResults){const K=this.hasListeners(),q=!K&&K1(t,r),R=K&&G1(t,n,r,a);(q||R)&&(v={...v,...GN(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:k,errorUpdatedAt:j,status:S}=v;b=v.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let K;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(K=o.data,N=!0):K=typeof r.placeholderData=="function"?r.placeholderData((B=z(this,ws))==null?void 0:B.state.data,z(this,ws)):r.placeholderData,K!==void 0&&(S="success",b=Dv(o==null?void 0:o.data,K,r),x=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===z(this,Wu))b=z(this,bs);else try{ye(this,Wu,r.select),b=r.select(b),b=Dv(o==null?void 0:o.data,b,r),ye(this,bs,b),ye(this,Ji,null)}catch(K){ye(this,Ji,K)}z(this,Ji)&&(k=z(this,Ji),b=z(this,bs),j=Date.now(),S="error");const P=v.fetchStatus==="fetching",O=S==="pending",C=S==="error",_=O&&P,A=b!==void 0,$={status:S,fetchStatus:v.fetchStatus,isPending:O,isSuccess:S==="success",isError:C,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:v.dataUpdatedAt,error:k,errorUpdatedAt:j,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>h.dataUpdateCount||v.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!O,isLoadingError:C&&!A,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:C&&A,isStale:ay(t,r),refetch:this.refetch,promise:z(this,ei),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=$.data!==void 0,q=$.status==="error"&&!K,R=ge=>{q?ge.reject($.error):K&&ge.resolve($.data)},de=()=>{const ge=ye(this,ei,$.promise=Rv());R(ge)},Z=z(this,ei);switch(Z.status){case"pending":t.queryHash===n.queryHash&&R(Z);break;case"fulfilled":(q||$.data!==Z.value)&&de();break;case"rejected":(!q||$.error!==Z.reason)&&de();break}}return $}updateResult(){const t=z(this,ar),r=this.createResult(z(this,Ue),this.options);if(ye(this,Ya,z(this,Ue).state),ye(this,xs,this.options),z(this,Ya).data!==void 0&&ye(this,ws,z(this,Ue)),Iv(r,t))return;ye(this,ar,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!z(this,ks).size)return!0;const u=new Set(o??z(this,ks));return this.options.throwOnError&&u.add("error"),Object.keys(z(this,ar)).some(l=>{const f=l;return z(this,ar)[f]!==t[f]&&u.has(f)})};Fe(this,qe,VN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,qe,Bv).call(this)}},gr=new WeakMap,Ue=new WeakMap,Uu=new WeakMap,ar=new WeakMap,Ya=new WeakMap,xs=new WeakMap,ei=new WeakMap,Ji=new WeakMap,Wu=new WeakMap,bs=new WeakMap,ws=new WeakMap,Xa=new WeakMap,Za=new WeakMap,ea=new WeakMap,ks=new WeakMap,qe=new WeakSet,ou=function(t){Fe(this,qe,Hv).call(this);let r=z(this,Ue).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(yr)),r},Lv=function(){Fe(this,qe,Uv).call(this);const t=aa(this.options.staleTime,z(this,Ue));if(vu.isServer()||z(this,ar).isStale||!Mv(t))return;const n=LN(z(this,ar).dataUpdatedAt,t)+1;ye(this,Xa,za.setTimeout(()=>{z(this,ar).isStale||this.updateResult()},n))},zv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,Ue)):this.options.refetchInterval)??!1},Fv=function(t){Fe(this,qe,Wv).call(this),ye(this,ea,t),!(vu.isServer()||Cr(this.options.enabled,z(this,Ue))===!1||!Mv(z(this,ea))||z(this,ea)===0)&&ye(this,Za,za.setInterval(()=>{(this.options.refetchIntervalInBackground||ry.isFocused())&&Fe(this,qe,ou).call(this)},z(this,ea)))},Bv=function(){Fe(this,qe,Lv).call(this),Fe(this,qe,Fv).call(this,Fe(this,qe,zv).call(this))},Uv=function(){z(this,Xa)!==void 0&&(za.clearTimeout(z(this,Xa)),ye(this,Xa,void 0))},Wv=function(){z(this,Za)!==void 0&&(za.clearInterval(z(this,Za)),ye(this,Za,void 0))},Hv=function(){const t=z(this,gr).getQueryCache().build(z(this,gr),this.options);if(t===z(this,Ue))return;const r=z(this,Ue);ye(this,Ue,t),ye(this,Uu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},VN=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,ar))}),z(this,gr).getQueryCache().notify({query:z(this,Ue),type:"observerResultsUpdated"})})},_N);function MM(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function K1(e,t){return MM(e,t)||e.state.data!==void 0&&Kv(e,t,t.refetchOnMount)}function Kv(e,t,r){if(Cr(t.enabled,e)!==!1&&aa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ay(e,t)}return!1}function G1(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ay(e,r)}function ay(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(aa(t.staleTime,e))}function IM(e,t){return!Iv(e.getCurrentResult(),t)}var Hu,Sn,Jt,Ja,Nn,Ki,MN,TM=(MN=class extends HN{constructor(t){super();De(this,Nn);De(this,Hu);De(this,Sn);De(this,Jt);De(this,Ja);ye(this,Hu,t.client),this.mutationId=t.mutationId,ye(this,Jt,t.mutationCache),ye(this,Sn,[]),this.state=t.state||DM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Sn).includes(t)||(z(this,Sn).push(t),this.clearGcTimeout(),z(this,Jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Sn,z(this,Sn).filter(r=>r!==t)),this.scheduleGc(),z(this,Jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():z(this,Jt).remove(this))}continue(){var t;return((t=z(this,Ja))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,l,f,h,p,v,x,b,k,j,S,N,P,O,C,_,A,I;const r=()=>{Fe(this,Nn,Ki).call(this,{type:"continue"})},n={client:z(this,Hu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,Ja,WN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:($,B)=>{Fe(this,Nn,Ki).call(this,{type:"failed",failureCount:$,error:B})},onPause:()=>{Fe(this,Nn,Ki).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,Jt).canRun(this)}));const a=this.state.status==="pending",o=!z(this,Ja).canStart();try{if(a)r();else{Fe(this,Nn,Ki).call(this,{type:"pending",variables:t,isPaused:o}),z(this,Jt).config.onMutate&&await z(this,Jt).config.onMutate(t,this,n);const B=await((l=(u=this.options).onMutate)==null?void 0:l.call(u,t,n));B!==this.state.context&&Fe(this,Nn,Ki).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const $=await z(this,Ja).start();return await((h=(f=z(this,Jt).config).onSuccess)==null?void 0:h.call(f,$,t,this.state.context,this,n)),await((v=(p=this.options).onSuccess)==null?void 0:v.call(p,$,t,this.state.context,n)),await((b=(x=z(this,Jt).config).onSettled)==null?void 0:b.call(x,$,null,this.state.variables,this.state.context,this,n)),await((j=(k=this.options).onSettled)==null?void 0:j.call(k,$,null,t,this.state.context,n)),Fe(this,Nn,Ki).call(this,{type:"success",data:$}),$}catch($){try{await((N=(S=z(this,Jt).config).onError)==null?void 0:N.call(S,$,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((O=(P=this.options).onError)==null?void 0:O.call(P,$,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((_=(C=z(this,Jt).config).onSettled)==null?void 0:_.call(C,void 0,$,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((I=(A=this.options).onSettled)==null?void 0:I.call(A,void 0,$,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Fe(this,Nn,Ki).call(this,{type:"error",error:$}),$}finally{z(this,Jt).runNext(this)}}},Hu=new WeakMap,Sn=new WeakMap,Jt=new WeakMap,Ja=new WeakMap,Nn=new WeakSet,Ki=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Wt.batch(()=>{z(this,Sn).forEach(n=>{n.onMutationUpdate(t)}),z(this,Jt).notify({mutation:this,type:"updated",action:t})})},MN);function DM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ti,sn,Ku,IN,RM=(IN=class extends Gu{constructor(t={}){super();De(this,ti);De(this,sn);De(this,Ku);this.config=t,ye(this,ti,new Set),ye(this,sn,new Map),ye(this,Ku,0)}build(t,r,n){const a=new TM({client:t,mutationCache:this,mutationId:++xd(this,Ku)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){z(this,ti).add(t);const r=wd(t);if(typeof r=="string"){const n=z(this,sn).get(r);n?n.push(t):z(this,sn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,ti).delete(t)){const r=wd(t);if(typeof r=="string"){const n=z(this,sn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&z(this,sn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=wd(t);if(typeof r=="string"){const n=z(this,sn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=wd(t);if(typeof r=="string"){const a=(n=z(this,sn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{z(this,ti).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,ti).clear(),z(this,sn).clear()})}getAll(){return Array.from(z(this,ti))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>z1(r,n))}findAll(t={}){return this.getAll().filter(r=>z1(t,r))}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Wt.batch(()=>Promise.all(t.map(r=>r.continue().catch(yr))))}},ti=new WeakMap,sn=new WeakMap,Ku=new WeakMap,IN);function wd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var En,TN,$M=(TN=class extends Gu{constructor(t={}){super();De(this,En);this.config=t,ye(this,En,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??ny(a,r);let u=this.get(o);return u||(u=new OM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){z(this,En).has(t.queryHash)||(z(this,En).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,En).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,En).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,En).get(t)}getAll(){return[...z(this,En).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>L1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>L1(t,n)):r}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},En=new WeakMap,TN),ht,ta,ra,js,Ss,na,Ns,Es,DN,LM=(DN=class{constructor(e={}){De(this,ht);De(this,ta);De(this,ra);De(this,js);De(this,Ss);De(this,na);De(this,Ns);De(this,Es);ye(this,ht,e.queryCache||new $M),ye(this,ta,e.mutationCache||new RM),ye(this,ra,e.defaultOptions||{}),ye(this,js,new Map),ye(this,Ss,new Map),ye(this,na,0)}mount(){xd(this,na)._++,z(this,na)===1&&(ye(this,Ns,ry.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ht).onFocus())})),ye(this,Es,rf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ht).onOnline())})))}unmount(){var e,t;xd(this,na)._--,z(this,na)===0&&((e=z(this,Ns))==null||e.call(this),ye(this,Ns,void 0),(t=z(this,Es))==null||t.call(this),ye(this,Es,void 0))}isFetching(e){return z(this,ht).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,ta).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,ht).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,ht).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(aa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,ht).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=z(this,ht).get(n.queryHash),o=a==null?void 0:a.state.data,u=yM(t,o);if(u!==void 0)return z(this,ht).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Wt.batch(()=>z(this,ht).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,ht).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,ht);Wt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,ht);return Wt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Wt.batch(()=>z(this,ht).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(yr).catch(yr)}invalidateQueries(e,t={}){return Wt.batch(()=>(z(this,ht).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Wt.batch(()=>z(this,ht).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(yr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(yr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,ht).build(this,t);return r.isStaleByTime(aa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rf.isOnline()?z(this,ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,ht)}getMutationCache(){return z(this,ta)}getDefaultOptions(){return z(this,ra)}setDefaultOptions(e){ye(this,ra,e)}setQueryDefaults(e,t){z(this,js).set(pu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,js).values()],r={};return t.forEach(n=>{mu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,Ss).set(pu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Ss).values()],r={};return t.forEach(n=>{mu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,ra).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ny(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===iy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,ra).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,ht).clear(),z(this,ta).clear()}},ht=new WeakMap,ta=new WeakMap,ra=new WeakMap,js=new WeakMap,Ss=new WeakMap,na=new WeakMap,Ns=new WeakMap,Es=new WeakMap,DN),qN=y.createContext(void 0),po=e=>{const t=y.useContext(qN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zM=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(qN.Provider,{value:e,children:t})),QN=y.createContext(!1),FM=()=>y.useContext(QN);QN.Provider;function BM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var UM=y.createContext(BM()),WM=()=>y.useContext(UM),HM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?BN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},KM=e=>{y.useEffect(()=>{e.clearReset()},[e])},GM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||BN(r,[e.error,n])),VM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},qM=(e,t)=>e.isLoading&&e.isFetching&&!t,QM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,V1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function YM(e,t,r){var b,k,j,S;const n=FM(),a=WM(),o=po(),u=o.defaultQueryOptions(e);(k=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||k.call(b,u);const l=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,VM(u),HM(u,a,l),KM(a);const h=!o.getQueryCache().get(u.queryHash),[p]=y.useState(()=>new t(o,u)),v=p.getOptimisticResult(u),x=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const P=x?p.subscribe(Wt.batchCalls(N)):yr;return p.updateResult(),P},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),y.useEffect(()=>{p.setOptions(u)},[u,p]),QM(u,v))throw V1(u,p,a);if(GM({result:v,errorResetBoundary:a,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw v.error;if((S=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||S.call(j,u,v),u.experimental_prefetchInRender&&!vu.isServer()&&qM(v,n)){const N=h?V1(u,p,a):l==null?void 0:l.promise;N==null||N.catch(yr).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?v:p.trackResult(v)}function ur(e,t){return YM(e,_M)}/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).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 ZM={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 JM=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...l},f)=>y.createElement("svg",{ref:f,...ZM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:YN("lucide",a),...l},[...u.map(([h,p])=>y.createElement(h,p)),...Array.isArray(o)?o:[o]]));/** - * @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 Ce=(e,t)=>{const r=y.forwardRef(({className:n,...a},o)=>y.createElement(JM,{ref:o,iconNode:t,className:YN(`lucide-${XM(e)}`,n),...a}));return r.displayName=`${e}`,r};/** - * @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 gu=Ce("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 q1=Ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @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 XN=Ce("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** - * @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 Ps=Ce("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 eI=Ce("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 yu=Ce("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 Cn=Ce("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 tI=Ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @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 rI=Ce("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 ZN=Ce("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 nI=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @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 iI=Ce("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 aI=Ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @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 Gv=Ce("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** - * @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 oI=Ce("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 Vv=Ce("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @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 sI=Ce("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** - * @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 JN=Ce("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @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 _n=Ce("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 no=Ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @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 xu=Ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @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 Q1=Ce("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @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 qv=Ce("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 lI=Ce("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uI=Ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @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 zm=Ce("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 cI=Ce("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 dI=Ce("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @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 bu=Ce("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @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 fI=Ce("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 hI=Ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** - * @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 pI=Ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @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 mI=Ce("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @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 vI=Ce("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @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 gI=Ce("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 e2=Ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @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 yI=Ce("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @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 cu=Ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @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 xI=Ce("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @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 bI=Ce("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @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 oy=Ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @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 t2=Ce("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 wI=Ce("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** - * @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 kI=Ce("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 wu=Ce("Shield",[["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"}]]);/** - * @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=Ce("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 r2=Ce("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 n2=Ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @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 jI=Ce("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** - * @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 nf=Ce("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @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 Qv=Ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @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 Cs=Ce("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 SI=Ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @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 ku=Ce("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 oa=Ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @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 ls=Ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Yv=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:fI},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:eI},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:yu},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:gI},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Ps},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:r2},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:iI}];var X1=1,NI=.9,EI=.8,PI=.17,Fm=.1,Bm=.999,CI=.9999,AI=.99,OI=/[\\\/_+.#"@\[\(\{&]/,_I=/[\\\/_+.#"@\[\(\{&]/g,MI=/[\s-]/,i2=/[\s-]/g;function Xv(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?X1:AI;var l=`${a},${o}`;if(u[l]!==void 0)return u[l];for(var f=n.charAt(o),h=r.indexOf(f,a),p=0,v,x,b,k;h>=0;)v=Xv(e,t,r,n,h+1,o+1,u),v>p&&(h===a?v*=X1:OI.test(e.charAt(h-1))?(v*=EI,b=e.slice(a,h-1).match(_I),b&&a>0&&(v*=Math.pow(Bm,b.length))):MI.test(e.charAt(h-1))?(v*=NI,k=e.slice(a,h-1).match(i2),k&&a>0&&(v*=Math.pow(Bm,k.length))):(v*=PI,a>0&&(v*=Math.pow(Bm,h-a))),e.charAt(h)!==t.charAt(o)&&(v*=CI)),(vv&&(v=x*Fm)),v>p&&(p=v),h=r.indexOf(f,h+1);return u[l]=p,p}function Z1(e){return e.toLowerCase().replace(i2," ")}function II(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Xv(e,t,Z1(e),Z1(t),0,0,{})}function sa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function J1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function As(...e){return t=>{let r=!1;const n=e.map(a=>{const o=J1(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a{var N;const{scope:x,children:b,...k}=v,j=((N=x==null?void 0:x[e])==null?void 0:N[f])||l,S=y.useMemo(()=>k,Object.values(k));return c.jsx(j.Provider,{value:S,children:b})};h.displayName=o+"Provider";function p(v,x){var j;const b=((j=x==null?void 0:x[e])==null?void 0:j[f])||l,k=y.useContext(b);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${o}\``)}return[h,p]}const a=()=>{const o=r.map(u=>y.createContext(u));return function(l){const f=(l==null?void 0:l[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,DI(a,...t)]}function DI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((l,{useScope:f,scopeName:h})=>{const v=f(o)[`__scope${h}`];return{...l,...v}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var ju=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},RI=eh[" useId ".trim().toString()]||(()=>{}),$I=0;function oi(e){const[t,r]=y.useState(RI());return ju(()=>{r(n=>n??String($I++))},[e]),t?`radix-${t}`:""}var LI=eh[" useInsertionEffect ".trim().toString()]||ju;function zI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=FI({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=y.useRef(e!==void 0);y.useEffect(()=>{const v=p.current;v!==l&&console.warn(`${n} is changing from ${v?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const h=y.useCallback(p=>{var v;if(l){const x=BI(p)?p(e):p;x!==e&&((v=u.current)==null||v.call(u,x))}else o(p)},[l,e,o,u]);return[f,h]}function FI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),a=y.useRef(r),o=y.useRef(t);return LI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function BI(e){return typeof e=="function"}var th=$N();function a2(e){const t=y.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,l=!1;const f=[];ew(a)&&typeof kd=="function"&&(a=kd(a._payload)),y.Children.forEach(a,x=>{var b;if(GI(x)){l=!0;const k=x;let j="child"in k.props?k.props.child:k.props.children;ew(j)&&typeof kd=="function"&&(j=kd(j._payload)),u=WI(k,j),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(x)}),u?u=y.cloneElement(u,void 0,f):!l&&y.Children.count(a)===1&&y.isValidElement(a)&&(u=a);const h=u?KI(u):void 0,p=mo(n,h);if(!u){if(a||a===0)throw new Error(l?YI(e):QI(e));return a}const v=HI(o,u.props??{});return u.type!==y.Fragment&&(v.ref=n?p:h),y.cloneElement(u,v)});return t.displayName=`${e}.Slot`,t}var UI=Symbol.for("radix.slottable"),WI=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function HI(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...l)=>{const f=o(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function KI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function GI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UI}var VI=Symbol.for("react.lazy");function ew(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===VI&&"_payload"in e&&qI(e._payload)}function qI(e){return typeof e=="object"&&e!==null&&"then"in e}var QI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,YI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=eh[" use ".trim().toString()],XI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gt=XI.reduce((e,t)=>{const r=a2(`Primitive.${t}`),n=y.forwardRef((a,o)=>{const{asChild:u,...l}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZI(e,t){e&&th.flushSync(()=>e.dispatchEvent(t))}function Su(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function JI(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var eT="DismissableLayer",Zv="dismissableLayer.update",tT="dismissableLayer.pointerDownOutside",rT="dismissableLayer.focusOutside",tw,sy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),o2=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:l,onDismiss:f,...h}=e,p=y.useContext(sy),[v,x]=y.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=y.useState({}),j=mo(t,B=>x(B)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(N),O=v?S.indexOf(v):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=P,A=y.useRef(!1),I=oT(B=>{const K=B.target;if(!(K instanceof Node))return;const q=[...p.branches].some(R=>R.contains(K));!_||q||(o==null||o(B),l==null||l(B),B.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:A,dismissableSurfaces:p.dismissableSurfaces}),$=sT(B=>{if(n&&A.current)return;const K=B.target;[...p.branches].some(R=>R.contains(K))||(u==null||u(B),l==null||l(B),B.defaultPrevented||f==null||f())},b);return JI(B=>{O===p.layers.size-1&&(a==null||a(B),!B.defaultPrevented&&f&&(B.preventDefault(),f()))},b),y.useEffect(()=>{if(v)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(tw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),rw(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(v),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=tw))}},[v,b,r,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),rw())},[v,p]),y.useEffect(()=>{const B=()=>k({});return document.addEventListener(Zv,B),()=>document.removeEventListener(Zv,B)},[]),c.jsx(Gt.div,{...h,ref:j,style:{pointerEvents:C?_?"auto":"none":void 0,...e.style},onFocusCapture:sa(e.onFocusCapture,$.onFocusCapture),onBlurCapture:sa(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:sa(e.onPointerDownCapture,I.onPointerDownCapture)})});o2.displayName=eT;var nT="DismissableLayerBranch",iT=y.forwardRef((e,t)=>{const r=y.useContext(sy),n=y.useRef(null),a=mo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Gt.div,{...e,ref:a})});iT.displayName=nT;function aT(){const e=y.useContext(sy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function oT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=Su(e),l=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),p=y.useRef(()=>{});return y.useEffect(()=>{function v(){f.current=!1,a.current=!1,h.current.clear()}function x(){return Array.from(h.current.values()).some(Boolean)}function b(P){if(!f.current)return;const O=P.target;O instanceof Node&&[...o].some(_=>_.contains(O))||h.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function k(P){f.current&&h.current.set(P.type,!1)}const j=P=>{if(P.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=x();v(),_||s2(tT,u,C,{discrete:!0})};const C={originalEvent:P};f.current=!0,a.current=n&&P.button===0,h.current.clear(),!n||P.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),v();l.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const P of S)r.addEventListener(P,b,!0),r.addEventListener(P,k);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",j)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",j),r.removeEventListener("click",p.current);for(const P of S)r.removeEventListener(P,b,!0),r.removeEventListener(P,k)}},[r,u,n,a,o]),{onPointerDownCapture:()=>l.current=!0}}function sT(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e),n=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!n.current&&s2(rT,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function rw(){const e=new CustomEvent(Zv);document.dispatchEvent(e)}function s2(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?ZI(a,o):a.dispatchEvent(o)}var Um="focusScope.autoFocusOnMount",Wm="focusScope.autoFocusOnUnmount",nw={bubbles:!1,cancelable:!0},lT="FocusScope",l2=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[l,f]=y.useState(null),h=Su(a),p=Su(o),v=y.useRef(null),x=mo(t,j=>f(j)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let j=function(O){if(b.paused||!l)return;const C=O.target;l.contains(C)?v.current=C:Gi(v.current,{select:!0})},S=function(O){if(b.paused||!l)return;const C=O.relatedTarget;C!==null&&(l.contains(C)||Gi(v.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&Gi(l)};document.addEventListener("focusin",j),document.addEventListener("focusout",S);const P=new MutationObserver(N);return l&&P.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",S),P.disconnect()}}},[n,l,b.paused]),y.useEffect(()=>{if(l){aw.add(b);const j=document.activeElement;if(!l.contains(j)){const N=new CustomEvent(Um,nw);l.addEventListener(Um,h),l.dispatchEvent(N),N.defaultPrevented||(uT(pT(u2(l)),{select:!0}),document.activeElement===j&&Gi(l))}return()=>{l.removeEventListener(Um,h),setTimeout(()=>{const N=new CustomEvent(Wm,nw);l.addEventListener(Wm,p),l.dispatchEvent(N),N.defaultPrevented||Gi(j??document.body,{select:!0}),l.removeEventListener(Wm,p),aw.remove(b)},0)}}},[l,h,p,b]);const k=y.useCallback(j=>{if(!r&&!n||b.paused)return;const S=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,N=document.activeElement;if(S&&N){const P=j.currentTarget,[O,C]=cT(P);O&&C?!j.shiftKey&&N===C?(j.preventDefault(),r&&Gi(O,{select:!0})):j.shiftKey&&N===O&&(j.preventDefault(),r&&Gi(C,{select:!0})):N===P&&j.preventDefault()}},[r,n,b.paused]);return c.jsx(Gt.div,{tabIndex:-1,...u,ref:x,onKeyDown:k})});l2.displayName=lT;function uT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gi(n,{select:t}),document.activeElement!==r)return}function cT(e){const t=u2(e),r=iw(t,e),n=iw(t.reverse(),e);return[r,n]}function u2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function iw(e,t){for(const r of e)if(!dT(r,{upTo:t}))return r}function dT(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fT(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fT(e)&&t&&e.select()}}var aw=hT();function hT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ow(e,t),e.unshift(t)},remove(t){var r;e=ow(e,t),(r=e[0])==null||r.resume()}}}function ow(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pT(e){return e.filter(t=>t.tagName!=="A")}var mT="Portal",c2=y.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,o]=y.useState(!1);ju(()=>o(!0),[]);const u=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?th.createPortal(c.jsx(Gt.div,{...n,ref:t}),u):null});c2.displayName=mT;function vT(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var rh=e=>{const{present:t,children:r}=e,n=gT(t),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=yT(n.ref,xT(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:o}):null};rh.displayName="Presence";function gT(e){const[t,r]=y.useState(),n=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[l,f]=vT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=jd(n.current);o.current=l==="mounted"?h:"none"},[l]),ju(()=>{const h=n.current,p=a.current;if(p!==e){const x=o.current,b=jd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&x!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),ju(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,v=b=>{const j=jd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&j&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=b=>{b.target===t&&(o.current=jd(n.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function sw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yT(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const l=sw(u,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let u=0;u{bn||(bn={start:lw(),end:lw()});const{start:e,end:t}=bn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Sd++,()=>{Sd===1&&(bn==null||bn.start.remove(),bn==null||bn.end.remove(),bn=null),Sd=Math.max(0,Sd-1)}},[])}function lw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pn=function(){return Pn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return $T;var t=LT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},FT=p2(),us="data-scroll-locked",BT=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,l=e.gap;return r===void 0&&(r="margin"),` - .`.concat(kT,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(l,"px ").concat(n,`; - } - body[`).concat(us,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(a,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(u,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(l,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Vd,` { - right: `).concat(l,"px ").concat(n,`; - } - - .`).concat(qd,` { - margin-right: `).concat(l,"px ").concat(n,`; - } - - .`).concat(Vd," .").concat(Vd,` { - right: 0 `).concat(n,`; - } - - .`).concat(qd," .").concat(qd,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(us,`] { - `).concat(jT,": ").concat(l,`px; - } -`)},cw=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},UT=function(){y.useEffect(function(){return document.body.setAttribute(us,(cw()+1).toString()),function(){var e=cw()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},WT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;UT();var o=y.useMemo(function(){return zT(a)},[a]);return y.createElement(FT,{styles:BT(o,!t,a,r?"":"!important")})},Jv=!1;if(typeof window<"u")try{var Nd=Object.defineProperty({},"passive",{get:function(){return Jv=!0,!0}});window.addEventListener("test",Nd,Nd),window.removeEventListener("test",Nd,Nd)}catch{Jv=!1}var Ko=Jv?{passive:!1}:!1,HT=function(e){return e.tagName==="TEXTAREA"},m2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!HT(e)&&r[t]==="visible")},KT=function(e){return m2(e,"overflowY")},GT=function(e){return m2(e,"overflowX")},dw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=v2(e,n);if(a){var o=g2(e,n),u=o[1],l=o[2];if(u>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},VT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},v2=function(e,t){return e==="v"?KT(t):GT(t)},g2=function(e,t){return e==="v"?VT(t):qT(t)},QT=function(e,t){return e==="h"&&t==="rtl"?-1:1},YT=function(e,t,r,n,a){var o=QT(e,window.getComputedStyle(t).direction),u=o*n,l=r.target,f=t.contains(l),h=!1,p=u>0,v=0,x=0;do{if(!l)break;var b=g2(e,l),k=b[0],j=b[1],S=b[2],N=j-S-o*k;(k||N)&&v2(e,l)&&(v+=N,x+=k);var P=l.parentNode;l=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(v)<1||!p&&Math.abs(x)<1)&&(h=!0),h},Ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fw=function(e){return[e.deltaX,e.deltaY]},hw=function(e){return e&&"current"in e?e.current:e},XT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZT=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},JT=0,Go=[];function e3(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),a=y.useState(JT++)[0],o=y.useState(p2)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var j=wT([e.lockRef.current],(e.shards||[]).map(hw),!0).filter(Boolean);return j.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),j.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(j,S){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!u.current.allowPinchZoom;var N=Ed(j),P=r.current,O="deltaX"in j?j.deltaX:P[0]-N[0],C="deltaY"in j?j.deltaY:P[1]-N[1],_,A=j.target,I=Math.abs(O)>Math.abs(C)?"h":"v";if("touches"in j&&I==="h"&&A.type==="range")return!1;var $=window.getSelection(),B=$&&$.anchorNode,K=B?B===A||B.contains(A):!1;if(K)return!1;var q=dw(I,A);if(!q)return!0;if(q?_=I:(_=I==="v"?"h":"v",q=dw(I,A)),!q)return!1;if(!n.current&&"changedTouches"in j&&(O||C)&&(n.current=_),!_)return!0;var R=n.current||_;return YT(R,S,j,R==="h"?O:C)},[]),f=y.useCallback(function(j){var S=j;if(!(!Go.length||Go[Go.length-1]!==o)){var N="deltaY"in S?fw(S):Ed(S),P=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&XT(_.delta,N)})[0];if(P&&P.should){S.cancelable&&S.preventDefault();return}if(!P){var O=(u.current.shards||[]).map(hw).filter(Boolean).filter(function(_){return _.contains(S.target)}),C=O.length>0?l(S,O[0]):!u.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(j,S,N,P){var O={name:j,delta:S,target:N,should:P,shadowParent:t3(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(C){return C!==O})},1)},[]),p=y.useCallback(function(j){r.current=Ed(j),n.current=void 0},[]),v=y.useCallback(function(j){h(j.type,fw(j),j.target,l(j,e.lockRef.current))},[]),x=y.useCallback(function(j){h(j.type,Ed(j),j.target,l(j,e.lockRef.current))},[]);y.useEffect(function(){return Go.push(o),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",f,Ko),document.addEventListener("touchmove",f,Ko),document.addEventListener("touchstart",p,Ko),function(){Go=Go.filter(function(j){return j!==o}),document.removeEventListener("wheel",f,Ko),document.removeEventListener("touchmove",f,Ko),document.removeEventListener("touchstart",p,Ko)}},[]);var b=e.removeScrollBar,k=e.inert;return y.createElement(y.Fragment,null,k?y.createElement(o,{styles:ZT(a)}):null,b?y.createElement(WT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function t3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const r3=OT(h2,e3);var y2=y.forwardRef(function(e,t){return y.createElement(nh,Pn({},e,{ref:t,sideCar:r3}))});y2.classNames=nh.classNames;var n3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vo=new WeakMap,Pd=new WeakMap,Cd={},Vm=0,x2=function(e){return e&&(e.host||x2(e.parentNode))},i3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=x2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},a3=function(e,t,r,n){var a=i3(t,Array.isArray(e)?e:[e]);Cd[r]||(Cd[r]=new WeakMap);var o=Cd[r],u=[],l=new Set,f=new Set(a),h=function(v){!v||l.has(v)||(l.add(v),h(v.parentNode))};a.forEach(h);var p=function(v){!v||f.has(v)||Array.prototype.forEach.call(v.children,function(x){if(l.has(x))p(x);else try{var b=x.getAttribute(n),k=b!==null&&b!=="false",j=(Vo.get(x)||0)+1,S=(o.get(x)||0)+1;Vo.set(x,j),o.set(x,S),u.push(x),j===1&&k&&Pd.set(x,!0),S===1&&x.setAttribute(r,"true"),k||x.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(t),l.clear(),Vm++,function(){u.forEach(function(v){var x=Vo.get(v)-1,b=o.get(v)-1;Vo.set(v,x),o.set(v,b),x||(Pd.has(v)||v.removeAttribute(n),Pd.delete(v)),b||v.removeAttribute(r)}),Vm--,Vm||(Vo=new WeakMap,Vo=new WeakMap,Pd=new WeakMap,Cd={})}},o3=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=n3(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),a3(n,a,r,"aria-hidden")):function(){return null}},ih="Dialog",[b2]=TI(ih),[s3,hn]=b2(ih),w2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,l=y.useRef(null),f=y.useRef(null),[h,p]=zI({prop:n,defaultProp:a??!1,onChange:o,caller:ih});return c.jsx(s3,{scope:t,triggerRef:l,contentRef:f,contentId:oi(),titleId:oi(),descriptionId:oi(),open:h,onOpenChange:p,onOpenToggle:y.useCallback(()=>p(v=>!v),[p]),modal:u,children:r})};w2.displayName=ih;var k2="DialogTrigger",l3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(k2,r),o=mo(t,a.triggerRef);return c.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":uy(a.open),...n,ref:o,onClick:sa(e.onClick,a.onOpenToggle)})});l3.displayName=k2;var ly="DialogPortal",[u3,j2]=b2(ly,{forceMount:void 0}),S2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=hn(ly,t);return c.jsx(u3,{scope:t,forceMount:r,children:y.Children.map(n,u=>c.jsx(rh,{present:r||o.open,children:c.jsx(c2,{asChild:!0,container:a,children:u})}))})};S2.displayName=ly;var af="DialogOverlay",N2=y.forwardRef((e,t)=>{const r=j2(af,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(af,e.__scopeDialog);return o.modal?c.jsx(rh,{present:n||o.open,children:c.jsx(d3,{...a,ref:t})}):null});N2.displayName=af;var c3=a2("DialogOverlay.RemoveScroll"),d3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(af,r),o=aT(),u=mo(t,o);return c.jsx(y2,{as:c3,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Gt.div,{"data-state":uy(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Os="DialogContent",E2=y.forwardRef((e,t)=>{const r=j2(Os,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(Os,e.__scopeDialog);return c.jsx(rh,{present:n||o.open,children:o.modal?c.jsx(f3,{...a,ref:t}):c.jsx(h3,{...a,ref:t})})});E2.displayName=Os;var f3=y.forwardRef((e,t)=>{const r=hn(Os,e.__scopeDialog),n=y.useRef(null),a=mo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return o3(o)},[]),c.jsx(P2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:sa(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:sa(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&o.preventDefault()}),onFocusOutside:sa(e.onFocusOutside,o=>o.preventDefault())})}),h3=y.forwardRef((e,t)=>{const r=hn(Os,e.__scopeDialog),n=y.useRef(!1),a=y.useRef(!1);return c.jsx(P2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),P2=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,l=hn(Os,r);return bT(),c.jsx(c.Fragment,{children:c.jsx(l2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:c.jsx(o2,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":uy(l.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),C2="DialogTitle",p3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(C2,r);return c.jsx(Gt.h2,{id:a.titleId,...n,ref:t})});p3.displayName=C2;var A2="DialogDescription",m3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(A2,r);return c.jsx(Gt.p,{id:a.descriptionId,...n,ref:t})});m3.displayName=A2;var O2="DialogClose",v3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(O2,r);return c.jsx(Gt.button,{type:"button",...n,ref:t,onClick:sa(e.onClick,()=>a.onOpenChange(!1))})});v3.displayName=O2;function uy(e){return e?"open":"closed"}var Vl='[cmdk-group=""]',qm='[cmdk-group-items=""]',g3='[cmdk-group-heading=""]',_2='[cmdk-item=""]',pw=`${_2}:not([aria-disabled="true"])`,eg="cmdk-item-select",ns="data-value",y3=(e,t,r)=>II(e,t,r),M2=y.createContext(void 0),Vu=()=>y.useContext(M2),I2=y.createContext(void 0),cy=()=>y.useContext(I2),T2=y.createContext(void 0),D2=y.forwardRef((e,t)=>{let r=is(()=>{var T,ee;return{search:"",value:(ee=(T=e.value)!=null?T:e.defaultValue)!=null?ee:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=is(()=>new Set),a=is(()=>new Map),o=is(()=>new Map),u=is(()=>new Set),l=R2(e),{label:f,children:h,value:p,onValueChange:v,filter:x,shouldFilter:b,loop:k,disablePointerSelection:j=!1,vimBindings:S=!0,...N}=e,P=oi(),O=oi(),C=oi(),_=y.useRef(null),A=A3();io(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,I.emit()}},[p]),io(()=>{A(6,de)},[]);let I=y.useMemo(()=>({subscribe:T=>(u.current.add(T),()=>u.current.delete(T)),snapshot:()=>r.current,setState:(T,ee,ne)=>{var te,ue,pe,Oe;if(!Object.is(r.current[T],ee)){if(r.current[T]=ee,T==="search")R(),K(),A(1,q);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(C);J?J.focus():(te=document.getElementById(P))==null||te.focus()}if(A(7,()=>{var J;r.current.selectedItemId=(J=Z())==null?void 0:J.id,I.emit()}),ne||A(5,de),((ue=l.current)==null?void 0:ue.value)!==void 0){let J=ee??"";(Oe=(pe=l.current).onValueChange)==null||Oe.call(pe,J);return}}I.emit()}},emit:()=>{u.current.forEach(T=>T())}}),[]),$=y.useMemo(()=>({value:(T,ee,ne)=>{var te;ee!==((te=o.current.get(T))==null?void 0:te.value)&&(o.current.set(T,{value:ee,keywords:ne}),r.current.filtered.items.set(T,B(ee,ne)),A(2,()=>{K(),I.emit()}))},item:(T,ee)=>(n.current.add(T),ee&&(a.current.has(ee)?a.current.get(ee).add(T):a.current.set(ee,new Set([T]))),A(3,()=>{R(),K(),r.current.value||q(),I.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let ne=Z();A(4,()=>{R(),(ne==null?void 0:ne.getAttribute("id"))===T&&q(),I.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:P,inputId:C,labelId:O,listInnerRef:_}),[]);function B(T,ee){var ne,te;let ue=(te=(ne=l.current)==null?void 0:ne.filter)!=null?te:y3;return T?ue(T,r.current.search,ee):0}function K(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,ee=[];r.current.filtered.groups.forEach(te=>{let ue=a.current.get(te),pe=0;ue.forEach(Oe=>{let J=T.get(Oe);pe=Math.max(J,pe)}),ee.push([te,pe])});let ne=_.current;ge().sort((te,ue)=>{var pe,Oe;let J=te.getAttribute("id"),je=ue.getAttribute("id");return((pe=T.get(je))!=null?pe:0)-((Oe=T.get(J))!=null?Oe:0)}).forEach(te=>{let ue=te.closest(qm);ue?ue.appendChild(te.parentElement===ue?te:te.closest(`${qm} > *`)):ne.appendChild(te.parentElement===ne?te:te.closest(`${qm} > *`))}),ee.sort((te,ue)=>ue[1]-te[1]).forEach(te=>{var ue;let pe=(ue=_.current)==null?void 0:ue.querySelector(`${Vl}[${ns}="${encodeURIComponent(te[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function q(){let T=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),ee=T==null?void 0:T.getAttribute(ns);I.setState("value",ee||void 0)}function R(){var T,ee,ne,te;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ue=0;for(let pe of n.current){let Oe=(ee=(T=o.current.get(pe))==null?void 0:T.value)!=null?ee:"",J=(te=(ne=o.current.get(pe))==null?void 0:ne.keywords)!=null?te:[],je=B(Oe,J);r.current.filtered.items.set(pe,je),je>0&&ue++}for(let[pe,Oe]of a.current)for(let J of Oe)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=ue}function de(){var T,ee,ne;let te=Z();te&&(((T=te.parentElement)==null?void 0:T.firstChild)===te&&((ne=(ee=te.closest(Vl))==null?void 0:ee.querySelector(g3))==null||ne.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function Z(){var T;return(T=_.current)==null?void 0:T.querySelector(`${_2}[aria-selected="true"]`)}function ge(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(pw))||[])}function ke(T){let ee=ge()[T];ee&&I.setState("value",ee.getAttribute(ns))}function me(T){var ee;let ne=Z(),te=ge(),ue=te.findIndex(Oe=>Oe===ne),pe=te[ue+T];(ee=l.current)!=null&&ee.loop&&(pe=ue+T<0?te[te.length-1]:ue+T===te.length?te[0]:te[ue+T]),pe&&I.setState("value",pe.getAttribute(ns))}function Q(T){let ee=Z(),ne=ee==null?void 0:ee.closest(Vl),te;for(;ne&&!te;)ne=T>0?P3(ne,Vl):C3(ne,Vl),te=ne==null?void 0:ne.querySelector(pw);te?I.setState("value",te.getAttribute(ns)):me(T)}let oe=()=>ke(ge().length-1),X=T=>{T.preventDefault(),T.metaKey?oe():T.altKey?Q(1):me(1)},L=T=>{T.preventDefault(),T.metaKey?ke(0):T.altKey?Q(-1):me(-1)};return y.createElement(Gt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var ee;(ee=N.onKeyDown)==null||ee.call(N,T);let ne=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||ne))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&X(T);break}case"ArrowDown":{X(T);break}case"p":case"k":{S&&T.ctrlKey&&L(T);break}case"ArrowUp":{L(T);break}case"Home":{T.preventDefault(),ke(0);break}case"End":{T.preventDefault(),oe();break}case"Enter":{T.preventDefault();let te=Z();if(te){let ue=new Event(eg);te.dispatchEvent(ue)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:$.inputId,id:$.labelId,style:_3},f),ah(e,T=>y.createElement(I2.Provider,{value:I},y.createElement(M2.Provider,{value:$},T))))}),x3=y.forwardRef((e,t)=>{var r,n;let a=oi(),o=y.useRef(null),u=y.useContext(T2),l=Vu(),f=R2(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;io(()=>{if(!h)return l.item(a,u==null?void 0:u.id)},[h]);let p=$2(a,o,[e.value,e.children,o],e.keywords),v=cy(),x=ca(A=>A.value&&A.value===p.current),b=ca(A=>h||l.filter()===!1?!0:A.search?A.filtered.items.get(a)>0:!0);y.useEffect(()=>{let A=o.current;if(!(!A||e.disabled))return A.addEventListener(eg,k),()=>A.removeEventListener(eg,k)},[b,e.onSelect,e.disabled]);function k(){var A,I;j(),(I=(A=f.current).onSelect)==null||I.call(A,p.current)}function j(){v.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:P,forceMount:O,keywords:C,..._}=e;return y.createElement(Gt.div,{ref:As(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!x,"data-disabled":!!S,"data-selected":!!x,onPointerMove:S||l.getDisablePointerSelection()?void 0:j,onClick:S?void 0:k},e.children)}),b3=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=oi(),l=y.useRef(null),f=y.useRef(null),h=oi(),p=Vu(),v=ca(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);io(()=>p.group(u),[]),$2(u,l,[e.value,e.heading,f]);let x=y.useMemo(()=>({id:u,forceMount:a}),[a]);return y.createElement(Gt.div,{ref:As(l,t),...o,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),ah(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(T2.Provider,{value:x},b))))}),w3=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=y.useRef(null),o=ca(u=>!u.search);return!r&&!o?null:y.createElement(Gt.div,{ref:As(a,t),...n,"cmdk-separator":"",role:"separator"})}),k3=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=cy(),u=ca(h=>h.search),l=ca(h=>h.selectedItemId),f=Vu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Gt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":l,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),j3=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=y.useRef(null),u=y.useRef(null),l=ca(h=>h.selectedItemId),f=Vu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,p=o.current,v,x=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(v),x.unobserve(h)}}},[]),y.createElement(Gt.div,{ref:As(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},ah(e,h=>y.createElement("div",{ref:As(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),S3=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...l}=e;return y.createElement(w2,{open:r,onOpenChange:n},y.createElement(S2,{container:u},y.createElement(N2,{"cmdk-overlay":"",className:a}),y.createElement(E2,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(D2,{ref:t,...l}))))}),N3=y.forwardRef((e,t)=>ca(r=>r.filtered.count===0)?y.createElement(Gt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),E3=y.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return y.createElement(Gt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ah(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),qo=Object.assign(D2,{List:j3,Item:x3,Input:k3,Group:b3,Separator:w3,Dialog:S3,Empty:N3,Loading:E3});function P3(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function C3(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function R2(e){let t=y.useRef(e);return io(()=>{t.current=e}),t}var io=typeof window>"u"?y.useEffect:y.useLayoutEffect;function is(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ca(e){let t=cy(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function $2(e,t,r,n=[]){let a=y.useRef(),o=Vu();return io(()=>{var u;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,l,f),(u=t.current)==null||u.setAttribute(ns,l),a.current=l}),a}var A3=()=>{let[e,t]=y.useState(),r=is(()=>new Map);return io(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function O3(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ah({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(O3(t),{ref:t.ref},r(t.props.children)):r(t)}var _3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function M3({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),c.jsx(qo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>r(!1),children:c.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[c.jsx(qo.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),c.jsxs(qo.List,{className:"max-h-80 overflow-y-auto p-2",children:[c.jsx(qo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),c.jsx(qo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Yv.map(n=>c.jsxs(qo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[c.jsx(n.icon,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:n.label}),c.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function Me(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:o});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const wt={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},I3=(e=!0)=>ur({queryKey:wt.memoryGraph,queryFn:()=>Me("/api/memory/graph"),enabled:e}),T3=()=>ur({queryKey:wt.health,queryFn:()=>Me("/api/health"),refetchInterval:1e4}),oh=(e=5e3)=>ur({queryKey:wt.systemStatus,queryFn:()=>Me("/api/system/status"),refetchInterval:e}),D3=(e=3e3)=>ur({queryKey:wt.services,queryFn:()=>Me("/api/system/services"),refetchInterval:e}),vo=(e=4e3)=>ur({queryKey:wt.models,queryFn:()=>Me("/api/models"),refetchInterval:e}),R3=(e=4e3)=>ur({queryKey:wt.routing,queryFn:()=>Me("/api/routing"),refetchInterval:e}),$3=(e=2e3)=>ur({queryKey:wt.jobs,queryFn:()=>Me("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),dy=(e=3e3)=>ur({queryKey:wt.tokenStats,queryFn:()=>Me("/api/system/token-stats"),refetchInterval:e}),fy=(e=5e3)=>ur({queryKey:wt.agentStatus,queryFn:()=>Me("/api/agent/status"),refetchInterval:e}),L3=(e=6e4)=>ur({queryKey:wt.hermesBrain,queryFn:()=>Me("/api/agent/brain"),refetchInterval:e}),hy=e=>ur({queryKey:wt.updates,queryFn:()=>Me("/api/maintenance/updates"),refetchInterval:e}),z3=()=>ur({queryKey:wt.discover,queryFn:()=>Me("/api/discover")}),F3=e=>ur({queryKey:wt.drafts(e),queryFn:()=>Me(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),L2=e=>ur({queryKey:wt.connect(e),queryFn:()=>Me(e?`/api/connect?${e}`:"/api/connect")}),z2=e=>ur({queryKey:wt.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),Me(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function Qo(e){return(e/1024**3).toFixed(1)}function tg(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Br(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function B3(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function mw(e){return e?`${Math.round(e/1024)}k`:"—"}function F2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=H3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const l=u.split(py);return l[0]===""&&l.length!==1&&l.shift(),B2(l,t)||W3(u)},getConflictingClassGroupIds:(u,l)=>{const f=r[u]||[];return l&&n[u]?[...f,...n[u]]:f}}},B2=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?B2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(py);return(u=t.validators.find(({validator:l})=>l(o)))==null?void 0:u.classGroupId},vw=/^\[(.+)\]$/,W3=e=>{if(vw.test(e)){const t=vw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},H3=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return G3(Object.entries(e.classGroups),r).forEach(([o,u])=>{rg(u,n,o,t)}),n},rg=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:gw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(K3(a)){rg(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{rg(u,gw(t,o),r,n)})})},gw=(e,t)=>{let r=e;return t.split(py).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},K3=e=>e.isThemeGetter,G3=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,l])=>[t+u,l])):o);return[r,a]}):e,V3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},U2="!",q3=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=l=>{const f=[];let h=0,p=0,v;for(let S=0;Sp?v-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:j}};return r?l=>r({className:l,parseClassName:u}):u},Q3=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Y3=e=>({cache:V3(e.cacheSize),parseClassName:q3(e),...U3(e)}),X3=/\s+/,Z3=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(X3);let l="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:p,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:b}=r(h);let k=!!b,j=n(k?x.substring(0,b):x);if(!j){if(!k){l=h+(l.length>0?" "+l:l);continue}if(j=n(x),!j){l=h+(l.length>0?" "+l:l);continue}k=!1}const S=Q3(p).join(":"),N=v?S+U2:S,P=N+j;if(o.includes(P))continue;o.push(P);const O=a(j,k);for(let C=0;C0?" "+l:l)}return l};function J3(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nv(p),e());return r=Y3(h),n=r.cache.get,a=r.cache.set,o=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=Z3(f,r);return a(f,p),p}return function(){return o(J3.apply(null,arguments))}}const it=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},H2=/^\[(?:([a-z-]+):)?(.+)\]$/i,t4=/^\d+\/\d+$/,r4=new Set(["px","full","screen"]),n4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,i4=/\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$/,a4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,o4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,s4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xn=e=>cs(e)||r4.has(e)||t4.test(e),Ui=e=>Bs(e,"length",m4),cs=e=>!!e&&!Number.isNaN(Number(e)),Qm=e=>Bs(e,"number",cs),ql=e=>!!e&&Number.isInteger(Number(e)),l4=e=>e.endsWith("%")&&cs(e.slice(0,-1)),$e=e=>H2.test(e),Wi=e=>n4.test(e),u4=new Set(["length","size","percentage"]),c4=e=>Bs(e,u4,K2),d4=e=>Bs(e,"position",K2),f4=new Set(["image","url"]),h4=e=>Bs(e,f4,g4),p4=e=>Bs(e,"",v4),Ql=()=>!0,Bs=(e,t,r)=>{const n=H2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},m4=e=>i4.test(e)&&!a4.test(e),K2=()=>!1,v4=e=>o4.test(e),g4=e=>s4.test(e),y4=()=>{const e=it("colors"),t=it("spacing"),r=it("blur"),n=it("brightness"),a=it("borderColor"),o=it("borderRadius"),u=it("borderSpacing"),l=it("borderWidth"),f=it("contrast"),h=it("grayscale"),p=it("hueRotate"),v=it("invert"),x=it("gap"),b=it("gradientColorStops"),k=it("gradientColorStopPositions"),j=it("inset"),S=it("margin"),N=it("opacity"),P=it("padding"),O=it("saturate"),C=it("scale"),_=it("sepia"),A=it("skew"),I=it("space"),$=it("translate"),B=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",$e,t],R=()=>[$e,t],de=()=>["",Xn,Ui],Z=()=>["auto",cs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],oe=()=>["","0",$e],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[cs,$e];return{cacheSize:500,separator:":",theme:{colors:[Ql],spacing:[Xn,Ui],blur:["none","",Wi,$e],brightness:L(),borderColor:[e],borderRadius:["none","","full",Wi,$e],borderSpacing:R(),borderWidth:de(),contrast:L(),grayscale:oe(),hueRotate:L(),invert:oe(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[l4,Ui],inset:q(),margin:q(),opacity:L(),padding:R(),saturate:L(),scale:L(),sepia:oe(),skew:L(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Wi]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...ge(),$e]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ql,$e]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:oe()}],shrink:[{shrink:oe()}],order:[{order:["first","last","none",ql,$e]}],"grid-cols":[{"grid-cols":[Ql]}],"col-start-end":[{col:["auto",{span:["full",ql,$e]},$e]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Ql]}],"row-start-end":[{row:["auto",{span:[ql,$e]},$e]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Wi]},Wi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wi,Ui]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qm]}],"font-family":[{font:[Ql]}],"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",$e]}],"line-clamp":[{"line-clamp":["none",cs,Qm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xn,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xn,Ui]}],"underline-offset":[{"underline-offset":["auto",Xn,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),d4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",c4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},h4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ke()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[Xn,$e]}],"outline-w":[{outline:[Xn,Ui]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Xn,Ui]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wi,p4]}],"shadow-color":[{shadow:[Ql]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Wi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[v]}],saturate:[{saturate:[O]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[ql,$e]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xn,Ui,Qm]}],stroke:[{stroke:[e,"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"]}}},x4=e4(y4);function fe(...e){return x4(et(e))}function _s(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const G2=["fast","heavy","coder","vision","scout"],b4={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},my=e=>e&&b4[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function w4({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return c.jsxs("span",{className:fe("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function yw(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function k4(){const{data:e}=vo(2e3),{data:t}=dy(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),o=y.useRef(null),[u,l]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(o.current!==null&&f>o.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return o.current=f,()=>clearTimeout(h)}o.current=f},[t==null?void 0:t.total_tokens]),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),c.jsxs("span",{className:fe("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",u?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[u?c.jsx(ls,{className:"h-3 w-3 animate-pulse"}):c.jsx(mI,{className:"h-3 w-3"}),u?"Inferenz aktiv":"Idle"]})]}),a.length===0?c.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):c.jsx("div",{className:"grid gap-2",children:a.map(f=>{var h;return c.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.role&&c.jsx("span",{className:fe("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",my(f.role)),children:f.role}),c.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),c.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Br(f.size_bytes)," im Unified-RAM"]})]}),c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[c.jsx("span",{className:fe("h-1.5 w-1.5 rounded-full bg-emerald-500",u&&"animate-pulse")})," warm"]})]},f.name)})})]})}let ng=[],ig=[];const ag=new Set,V2=()=>ag.forEach(e=>e());function q2(e){return ag.add(e),()=>{ag.delete(e)}}function j4(e){ng=[...ng,e].slice(-40),V2()}function S4(e){ig=[...ig,e].slice(-40),V2()}const N4=()=>y.useSyncExternalStore(q2,()=>ng),E4=()=>y.useSyncExternalStore(q2,()=>ig);function P4(){const{data:e,dataUpdatedAt:t}=oh(3e3),{data:r,dataUpdatedAt:n}=dy(3e3),a=y.useRef(null);y.useEffect(()=>{var o,u,l,f;e&&j4({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((l=e.gpu)==null?void 0:l.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,l=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);S4({t:o,prompt:Math.max(0,(u-a.current.p)/f),completion:Math.max(0,(l-a.current.c)/f)})}a.current={p:u,c:l,t:o}},[n])}function C4(){const{data:e,error:t}=oh(3e3),r=N4();return{sys:e,hist:r,error:t}}var A4=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function vy(e){if(typeof e!="string")return!1;var t=A4;return t.includes(e)}var O4=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],_4=new Set(O4);function Q2(e){return typeof e!="string"?!1:_4.has(e)}function Y2(e){return typeof e=="string"&&e.startsWith("data-")}function dn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Q2(r)||Y2(r))&&(t[r]=e[r]);return t}function sh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return dn(t)}return typeof e=="object"&&!Array.isArray(e)?dn(e):null}function Gr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Q2(r)||Y2(r)||vy(r))&&(t[r]=e[r]);return t}function M4(e){return e==null?null:y.isValidElement(e)?Gr(e.props):typeof e=="object"&&!Array.isArray(e)?Gr(e):null}var I4=["children","width","height","viewBox","className","style","title","desc"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,l=e.style,f=e.title,h=e.desc,p=T4(e,I4),v=o||{width:n,height:a,x:0,y:0},x=et("recharts-surface",u);return y.createElement("svg",og({},Gr(p),{className:x,width:n,height:a,style:l,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),R4=["children","className"];function sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,a=$4(e,R4),o=et("recharts-layer",n);return y.createElement("g",sg({className:o},Gr(a),{ref:t}),r)}),z4=y.createContext(null);function pt(e){return function(){return e}}const lg=Math.PI,ug=2*lg,Ra=1e-6,F4=ug-Ra;function Z2(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Z2;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;aRa)if(!(Math.abs(v*f-h*p)>Ra)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,k=a-l,j=f*f+h*h,S=b*b+k*k,N=Math.sqrt(j),P=Math.sqrt(x),O=o*Math.tan((lg-Math.acos((j+x-S)/(2*N*P)))/2),C=O/P,_=O/N;Math.abs(C-1)>Ra&&this._append`L${t+C*p},${r+C*v}`,this._append`A${o},${o},0,0,${+(v*b>p*k)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,v=1^u,x=u?a-o:o-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ra||Math.abs(this._y1-p)>Ra)&&this._append`L${h},${p}`,n&&(x<0&&(x=x%ug+ug),x>F4?this._append`A${n},${n},0,1,${v},${t-l},${r-f}A${n},${n},0,1,${v},${this._x1=h},${this._y1=p}`:x>Ra&&this._append`A${n},${n},0,${+(x>=lg)},${v},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function J2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new U4(t)}function gy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eE(e){this._context=e}eE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function lh(e){return new eE(e)}function tE(e){return e[0]}function rE(e){return e[1]}function nE(e,t){var r=pt(!0),n=null,a=lh,o=null,u=J2(l);e=typeof e=="function"?e:e===void 0?tE:pt(e),t=typeof t=="function"?t:t===void 0?rE:pt(t);function l(f){var h,p=(f=gy(f)).length,v,x=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=p;++h)!(h=b;--k)l.point(O[k],C[k]);l.lineEnd(),l.areaEnd()}N&&(O[x]=+e(S,x,v),C[x]=+t(S,x,v),l.point(n?+n(S,x,v):O[x],r?+r(S,x,v):C[x]))}if(P)return l=null,P+""||null}function p(){return nE().defined(a).curve(u).context(o)}return h.x=function(v){return arguments.length?(e=typeof v=="function"?v:pt(+v),n=null,h):e},h.x0=function(v){return arguments.length?(e=typeof v=="function"?v:pt(+v),h):e},h.x1=function(v){return arguments.length?(n=v==null?null:typeof v=="function"?v:pt(+v),h):n},h.y=function(v){return arguments.length?(t=typeof v=="function"?v:pt(+v),r=null,h):t},h.y0=function(v){return arguments.length?(t=typeof v=="function"?v:pt(+v),h):t},h.y1=function(v){return arguments.length?(r=v==null?null:typeof v=="function"?v:pt(+v),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(v){return arguments.length?(a=typeof v=="function"?v:pt(!!v),h):a},h.curve=function(v){return arguments.length?(u=v,o!=null&&(l=u(o)),h):u},h.context=function(v){return arguments.length?(v==null?o=l=null:l=u(o=v),h):o},h}class iE{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function W4(e){return new iE(e,!0)}function H4(e){return new iE(e,!1)}function of(){}function sf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function aE(e){this._context=e}aE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:sf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K4(e){return new aE(e)}function oE(e){this._context=e}oE.prototype={areaStart:of,areaEnd:of,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function G4(e){return new oE(e)}function sE(e){this._context=e}sE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V4(e){return new sE(e)}function lE(e){this._context=e}lE.prototype={areaStart:of,areaEnd:of,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function q4(e){return new lE(e)}function xw(e){return e<0?-1:1}function bw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),l=(o*a+u*n)/(n+a);return(xw(o)+xw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function ww(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ym(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,a+l*t,o-l,u-l*r,o,u)}function lf(e){this._context=e}lf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ym(this,this._t0,ww(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ym(this,ww(this,r=bw(this,e,t)),r);break;default:Ym(this,this._t0,r=bw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function uE(e){this._context=new cE(e)}(uE.prototype=Object.create(lf.prototype)).point=function(e,t){lf.prototype.point.call(this,t,e)};function cE(e){this._context=e}cE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function Q4(e){return new lf(e)}function Y4(e){return new uE(e)}function dE(e){this._context=e}dE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=kw(e),a=kw(t),o=0,u=1;u=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Z4(e){return new uh(e,.5)}function J4(e){return new uh(e,0)}function eD(e){return new uh(e,1)}function ao(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,l=o.length;r=0;)r[t]=t;return r}function tD(e,t){return e[t]}function rD(e){const t=[];return t.key=e,t}function nD(){var e=pt([]),t=cg,r=ao,n=tD;function a(o){var u=Array.from(e.apply(this,arguments),rD),l,f=u.length,h=-1,p;for(const v of o)for(l=0,++h;l0){for(var r,n,a=0,o=e[0].length,u;a0){for(var r=0,n=e[t[0]],a,o=n.length;r0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n1&&arguments[1]!==void 0?arguments[1]:lD,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var l=r[u-1];return typeof l=="string"?a+l+o:l!==void 0?a+ia(l)+o:a+o},"")}var Wr=e=>e===0?0:e>0?1:-1,Tn=e=>typeof e=="number"&&e!=+e,oo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Tn(e),Dn=e=>Ne(e)||typeof e=="string",uD=0,Nu=e=>{var t=++uD;return"".concat(e||"").concat(t)},da=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var o;if(oo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Tn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},pE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):go(n,t))===r)}var Kt=e=>e===null||typeof e>"u",by=e=>Kt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function xr(e){return e!=null}function Us(){}var vE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,wy=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{vy(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},cD=(e,t,r)=>n=>(e(t,r,n),null),dD=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];vy(a)&&typeof o=="function"&&(n||(n={}),n[a]=cD(o,t,r))}),n};function jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fD(e){for(var t=1;t(u[l]===void 0&&n[l]!==void 0&&(u[l]=n[l]),u),r);return o}function vD(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function ky(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const wD="[object RegExp]",yE="[object String]",xE="[object Number]",bE="[object Boolean]",wE="[object Arguments]",kD="[object Symbol]",jD="[object Date]",SD="[object Map]",ND="[object Set]",ED="[object Array]",PD="[object ArrayBuffer]",CD="[object Object]",AD="[object DataView]",OD="[object Uint8Array]",_D="[object Uint8ClampedArray]",MD="[object Uint16Array]",ID="[object Uint32Array]",TD="[object Int8Array]",DD="[object Int16Array]",RD="[object Int32Array]",$D="[object Float32Array]",LD="[object Float64Array]",Sw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function zD(e){return typeof Sw.Buffer<"u"&&Sw.Buffer.isBuffer(e)}function FD(e,t){return Fa(e,void 0,e,new Map,t)}function Fa(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(fg(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let l=0;l{}):hg(e,t,function n(a,o,u,l,f,h){const p=r(a,o,u,l,f,h);return p!==void 0?!!p:hg(a,o,n,h,!1)},new Map,!0)}function hg(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return WD(e,t,r,n);case"function":return Object.keys(t).length>0?hg(e,{...t},r,n,a):Qd(e,t);default:return kE(e)&&a?typeof t=="string"?t==="":!0:Qd(e,t)}}function WD(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return SE(e,t,r,n);if(t instanceof Map)return HD(e,t,r,n);if(t instanceof Set)return KD(e,t,r,n);const a=Object.keys(t);if(e==null||fg(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function GD(e){return e=UD(e),t=>NE(t,e)}function VD(e,t){return FD(e,(r,n,a,o)=>{if(typeof e=="object"){if(ky(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),on(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case xE:case yE:case bE:{const u=new e.constructor(e==null?void 0:e.valueOf());return on(u,e),u}case wE:{const u={};return on(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function qD(e){return VD(e)}const QD=/^(?:0|[1-9]\d*)$/;function EE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function PE(e){return e!=null&&typeof e!="function"&&eR(e.length)}function tR(e){return typeof e=="object"&&e!==null}function rR(e){return tR(e)&&PE(e)}function Nw(e,t=gE){return rR(e)?vD(Array.from(e),gD(JD(t),1)):[]}function nR(e,t,r){return t===!0?Nw(e,r):typeof t=="function"?Nw(e,t):e}var Xm={exports:{}},Zm={},Jm={exports:{}},ev={};/** - * @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 Ew;function iR(){if(Ew)return ev;Ew=1;var e=Fs();function t(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function l(v,x){var b=x(),k=n({inst:{value:b,getSnapshot:x}}),j=k[0].inst,S=k[1];return o(function(){j.value=b,j.getSnapshot=x,f(j)&&S({inst:j})},[v,b,x]),a(function(){return f(j)&&S({inst:j}),v(function(){f(j)&&S({inst:j})})},[v]),u(b),b}function f(v){var x=v.getSnapshot;v=v.value;try{var b=x();return!r(v,b)}catch{return!0}}function h(v,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return ev.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ev}var Pw;function aR(){return Pw||(Pw=1,Jm.exports=iR()),Jm.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 Cw;function oR(){if(Cw)return Zm;Cw=1;var e=Fs(),t=aR();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return Zm.useSyncExternalStoreWithSelector=function(h,p,v,x,b){var k=o(null);if(k.current===null){var j={hasValue:!1,value:null};k.current=j}else j=k.current;k=l(function(){function N(A){if(!P){if(P=!0,O=A,A=x(A),b!==void 0&&j.hasValue){var I=j.value;if(b(I,A))return C=I}return C=A}if(I=C,n(O,A))return I;var $=x(A);return b!==void 0&&b(I,$)?(O=A,I):(O=A,C=$)}var P=!1,O,C,_=v===void 0?null:v;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,v,x,b]);var S=a(h,k[0],k[1]);return u(function(){j.hasValue=!0,j.value=S},[S]),f(S),S},Zm}var Aw;function sR(){return Aw||(Aw=1,Xm.exports=oR()),Xm.exports}var lR=sR(),jy=y.createContext(null),uR=e=>e,kt=()=>{var e=y.useContext(jy);return e?e.store.dispatch:uR},Yd=()=>{},cR=()=>Yd,dR=(e,t)=>e===t;function Ae(e){var t=y.useContext(jy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Yd,[t,e]);return lR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:cR,t?t.store.getState:Yd,t?t.store.getState:Yd,r,dR)}function fR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function hR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Ow=e=>Array.isArray(e)?e:[e];function pR(e){const t=Array.isArray(e[0])?e[0]:e;return hR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mR(e,t){const r=[],{length:n}=e;for(let a=0;atypeof WeakRef>"u"?vR:WeakRef,CE=gR(),yR=0,_w=1;function Od(){return{s:yR,v:void 0,o:null,p:null}}function xR(e){return e instanceof CE?e.deref():e}function AE(e,t={}){let r=Od();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let l=r;const{length:f}=arguments;for(let v=0,x=f;v{r=Od(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function bR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),fR(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:v,memoizeOptions:x=[],argsMemoize:b=AE,argsMemoizeOptions:k=[]}=p,j=Ow(x),S=Ow(k),N=pR(a),P=v(function(){return o++,h.apply(null,arguments)},...j),O=b(function(){u++;const _=mR(N,arguments);return l=P.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:P,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:v,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var G=bR(AE);function wR(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let l=0;l{if(e!==t){const n=Mw(e),a=Mw(t);if(n===a&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function OE(e){return typeof e=="symbol"||e instanceof Symbol}const jR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SR=/^\w*$/;function NR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||OE(e)?!0:typeof e=="string"&&(SR.test(e)||!jR.test(e))||t!=null}function ER(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;pf==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,u=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||NR(l)?l:{key:l,path:xy(l)}));return e.map(l=>({original:l,criteria:u.map(f=>o(f,l))})).slice().sort((l,f)=>{for(let h=0;hl.original)}function ch(e,...t){const r=t.length;return r>1&&pg(e,t[0],t[1])?t=[]:r>2&&pg(t[0],t[1],t[2])&&(t=[t[0]]),ER(e,wR(t),["asc"])}var _E=e=>e.legend.settings,PR=e=>e.legend.size,CR=e=>e.legend.payload;G([CR,_E],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?ch(n,r):n});function AR(e,t){return IR(e)||MR(e,t)||_R(e,t)||OR()}function OR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _R(e,t){if(e){if(typeof e=="string")return Iw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Iw(e,t):void 0}}function Iw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r_d||Math.abs(e.left-t.left)>_d||Math.abs(e.top-t.top)>_d||Math.abs(e.width-t.width)>_d}function Dw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function TR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=AR(t,2),n=r[0],a=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var l=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Dw(f);if(Tw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var v=Dw(f);Tw(v,u.current)&&a(v)});p.observe(f),o.current=p}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,l]}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var DR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Rw=DR,tv=()=>Math.random().toString(36).substring(7).split("").join("."),RR={INIT:`@@redux/INIT${tv()}`,REPLACE:`@@redux/REPLACE${tv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${tv()}`},uf=RR;function Sy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ME(e,t,r){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ft(1));return r(ME)(e,t)}let n=e,a=t,o=new Map,u=o,l=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function p(){if(f)throw new Error(Ft(3));return a}function v(S){if(typeof S!="function")throw new Error(Ft(4));if(f)throw new Error(Ft(5));let N=!0;h();const P=l++;return u.set(P,S),function(){if(N){if(f)throw new Error(Ft(6));N=!1,h(),u.delete(P),o=null}}}function x(S){if(!Sy(S))throw new Error(Ft(7));if(typeof S.type>"u")throw new Error(Ft(8));if(typeof S.type!="string")throw new Error(Ft(17));if(f)throw new Error(Ft(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(P=>{P()}),S}function b(S){if(typeof S!="function")throw new Error(Ft(10));n=S,x({type:uf.REPLACE})}function k(){const S=v;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ft(11));function P(){const C=N;C.next&&C.next(p())}return P(),{unsubscribe:S(P)}},[Rw](){return this}}}return x({type:uf.INIT}),{dispatch:x,subscribe:v,getState:p,replaceReducer:b,[Rw]:k}}function $R(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:uf.INIT})>"u")throw new Error(Ft(12));if(typeof r(void 0,{type:uf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function IE(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw l&&l.type,new Error(Ft(14));h[v]=k,f=f||k!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function cf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function LR(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Ft(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},l=e.map(f=>f(u));return o=cf(...l)(a.dispatch),{...a,dispatch:o}}}function TE(e){return Sy(e)&&"type"in e&&typeof e.type=="string"}var DE=Symbol.for("immer-nothing"),$w=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Or=Object,Ms=Or.getPrototypeOf,df="constructor",dh="prototype",mg="configurable",ff="enumerable",Xd="writable",Eu="value",ui=e=>!!e&&!!e[lr];function fn(e){var t;return e?RE(e)||hh(e)||!!e[$w]||!!((t=e[df])!=null&&t[$w])||ph(e)||mh(e):!1}var zR=Or[dh][df].toString(),Lw=new WeakMap;function RE(e){if(!e||!Ny(e))return!1;const t=Ms(e);if(t===null||t===Or[dh])return!0;const r=Or.hasOwnProperty.call(t,df)&&t[df];if(r===Object)return!0;if(!as(r))return!1;let n=Lw.get(r);return n===void 0&&(n=Function.toString.call(r),Lw.set(r,n)),n===zR}function fh(e,t,r=!0){qu(e)===0?(r?Reflect.ownKeys(e):Or.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function qu(e){const t=e[lr];return t?t.type_:hh(e)?1:ph(e)?2:mh(e)?3:0}var zw=(e,t,r=qu(e))=>r===2?e.has(t):Or[dh].hasOwnProperty.call(e,t),vg=(e,t,r=qu(e))=>r===2?e.get(t):e[t],hf=(e,t,r,n=qu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function FR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var hh=Array.isArray,ph=e=>e instanceof Map,mh=e=>e instanceof Set,Ny=e=>typeof e=="object",as=e=>typeof e=="function",rv=e=>typeof e=="boolean";function BR(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Jn=e=>e.copy_||e.base_,Ey=e=>e.modified_?e.copy_:e.base_;function gg(e,t){if(ph(e))return new Map(e);if(mh(e))return new Set(e);if(hh(e))return Array[dh].slice.call(e);const r=RE(e);if(t===!0||t==="class_only"&&!r){const n=Or.getOwnPropertyDescriptors(e);delete n[lr];let a=Reflect.ownKeys(n);for(let o=0;o1&&Or.defineProperties(e,{set:Md,add:Md,clear:Md,delete:Md}),Or.freeze(e),t&&fh(e,(r,n)=>{Py(n,!0)},!1)),e}function UR(){ln(2)}var Md={[Eu]:UR};function vh(e){return e===null||!Ny(e)?!0:Or.isFrozen(e)}var pf="MapSet",yg="Patches",Fw="ArrayMethods",$E={};function so(e){const t=$E[e];return t||ln(0,e),t}var Bw=e=>!!$E[e],Pu,LE=()=>Pu,WR=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Bw(pf)?so(pf):void 0,arrayMethodsPlugin_:Bw(Fw)?so(Fw):void 0});function Uw(e,t){t&&(e.patchPlugin_=so(yg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xg(e){bg(e),e.drafts_.forEach(HR),e.drafts_=null}function bg(e){e===Pu&&(Pu=e.parent_)}var Ww=e=>Pu=WR(Pu,e);function HR(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[lr].modified_&&(xg(t),ln(4)),fn(e)&&(e=Kw(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[lr].base_,e,t)}else e=Kw(t,r);return KR(t,e,!0),xg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==DE?e:void 0}function Kw(e,t){if(vh(t))return t;const r=t[lr];if(!r)return mf(t,e.handledSet_,e);if(!gh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);BE(r,e)}return r.copy_}function KR(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Py(t,r)}function zE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gh=(e,t)=>e.scope_===t,GR=[];function FE(e,t,r,n){const a=Jn(e),o=e.type_;if(n!==void 0&&vg(a,n,o)===t){hf(a,n,r,o);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;fh(a,(f,h)=>{if(ui(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const u=e.draftLocations_.get(t)??GR;for(const l of u)hf(a,l,r,o)}function VR(e,t,r){e.callbacks_.push(function(a){var l;const o=t;if(!o||!gh(o,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(o);const u=Ey(o);FE(e,o.draft_??o,u,r),BE(o,a)})}function BE(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}zE(e)}}function qR(e,t,r){const{scope_:n}=e;if(ui(r)){const a=r[lr];gh(a,n)&&a.callbacks_.push(function(){Zd(e);const u=Ey(a);FE(e,r,u,t)})}else fn(r)&&e.callbacks_.push(function(){const o=Jn(e);e.type_===3?o.has(r)&&mf(r,n.handledSet_,n):vg(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mf(vg(e.copy_,t,e.type_),n.handledSet_,n)})}function mf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ui(e)||t.has(e)||!fn(e)||vh(e)||(t.add(e),fh(e,(n,a)=>{if(ui(a)){const o=a[lr];if(gh(o,r)){const u=Ey(o);hf(e,n,u,e.type_),zE(o)}}else fn(a)&&mf(a,t,r)})),e}function QR(e,t){const r=hh(e),n={type_:r?1:0,scope_:t?t.scope_:LE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=vf;r&&(a=[n],o=Cu);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,[l,n]}var vf={get(e,t){if(t===lr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Jn(e);if(!zw(a,t,e.type_))return YR(e,a,t);const o=a[t];if(e.finalized_||!fn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&BR(t))return o;if(o===nv(e.base_,t)){Zd(e);const u=e.type_===1?+t:t,l=kg(e.scope_,o,e,u);return e.copy_[u]=l}return o},has(e,t){return t in Jn(e)},ownKeys(e){return Reflect.ownKeys(Jn(e))},set(e,t,r){const n=UE(Jn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=nv(Jn(e),t),o=a==null?void 0:a[lr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(FR(r,a)&&(r!==void 0||zw(e.base_,t,e.type_)))return!0;Zd(e),wg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),qR(e,t,r)),!0},deleteProperty(e,t){return Zd(e),nv(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),wg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Jn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Xd]:!0,[mg]:e.type_!==1||t!=="length",[ff]:n[ff],[Eu]:r[t]}},defineProperty(){ln(11)},getPrototypeOf(e){return Ms(e.base_)},setPrototypeOf(){ln(12)}},Cu={};for(let e in vf){let t=vf[e];Cu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,r){return vf.set.call(this,e[0],t,r,e[0])};function nv(e,t){const r=e[lr];return(r?Jn(r):e)[t]}function YR(e,t,r){var a;const n=UE(t,r);return n?Eu in n?n[Eu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function UE(e,t){if(!(t in e))return;let r=Ms(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ms(r)}}function wg(e){e.modified_||(e.modified_=!0,e.parent_&&wg(e.parent_))}function Zd(e){e.copy_||(e.assigned_=new Map,e.copy_=gg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var XR=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(as(r)&&!as(n)){const u=n;n=r;const l=this;return function(h=u,...p){return l.produce(h,v=>n.call(this,v,...p))}}as(n)||ln(6),a!==void 0&&!as(a)&&ln(7);let o;if(fn(r)){const u=Ww(this),l=kg(u,r,void 0);let f=!0;try{o=n(l),f=!1}finally{f?xg(u):bg(u)}return Uw(u,a),Hw(o,u)}else if(!r||!Ny(r)){if(o=n(r),o===void 0&&(o=r),o===DE&&(o=void 0),this.autoFreeze_&&Py(o,!0),a){const u=[],l=[];so(yg).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:l}),a(u,l)}return o}else ln(1,r)},this.produceWithPatches=(r,n)=>{if(as(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,o;return[this.produce(r,n,(l,f)=>{a=l,o=f}),a,o]},rv(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),rv(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),rv(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){fn(t)||ln(8),ui(t)&&(t=Hr(t));const r=Ww(this),n=kg(r,t,void 0);return n[lr].isManual_=!0,bg(r),n}finishDraft(t,r){const n=t&&t[lr];(!n||!n.isManual_)&&ln(9);const{scope_:a}=n;return Uw(a,r),Hw(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=so(yg).applyPatches_;return ui(t)?a(t,r):this.produce(t,o=>a(o,r))}};function kg(e,t,r,n){const[a,o]=ph(t)?so(pf).proxyMap_(t,r):mh(t)?so(pf).proxySet_(t,r):QR(t,r);return((r==null?void 0:r.scope_)??LE()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?VR(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Hr(e){return ui(e)||ln(10,e),WE(e)}function WE(e){if(!fn(e)||vh(e))return e;const t=e[lr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gg(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gg(e,!0);return fh(r,(a,o)=>{hf(r,a,WE(o))},n),t&&(t.finalized_=!1),r}var ZR=new XR,HE=ZR.produce;function KE(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var JR=KE(),e$=KE,t$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cf:cf.apply(null,arguments)};function Mr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(_r(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>TE(n)&&n.type===e,r}var GE=class su extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,su.prototype)}static get[Symbol.species](){return su}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new su(...t[0].concat(this)):new su(...t.concat(this))}};function Gw(e){return fn(e)?HE(e,()=>{}):e}function Id(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function r$(e){return typeof e=="boolean"}var n$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new GE;return r&&(r$(r)?u.push(JR):u.push(e$(r.extraArgument))),u},VE="RTK_autoBatch",at=()=>e=>({payload:e,meta:{[VE]:!0}}),Vw=e=>t=>{setTimeout(t,e)},i$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},qE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?i$(window.requestAnimationFrame,100):Vw(10):e.type==="callback"?e.queueNotification:Vw(e.timeout),h=()=>{u=!1,o&&(o=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const v=()=>a&&p(),x=n.subscribe(v);return l.add(p),()=>{x(),l.delete(p)}},dispatch(p){var v;try{return a=!((v=p==null?void 0:p.meta)!=null&&v[VE]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},a$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new GE(e);return n&&a.push(qE(typeof n=="object"?n:void 0)),a};function o$(e){const t=n$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(Sy(r))l=IE(r);else throw new Error(_r(1));let f;typeof n=="function"?f=n(t):f=t();let h=cf;a&&(h=t$({trace:!1,...typeof a=="object"&&a}));const p=LR(...f),v=a$(p);let x=typeof u=="function"?u(v):v();const b=h(...x);return ME(l,o,b)}function QE(e){const t={},r=[];let n;const a={addCase(o,u){const l=typeof o=="string"?o:o.type;if(!l)throw new Error(_r(28));if(l in t)throw new Error(_r(29));return t[l]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function s$(e){return typeof e=="function"}function l$(e,t){let[r,n,a]=QE(t),o;if(s$(e))o=()=>Gw(e());else{const l=Gw(e);o=()=>l}function u(l=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,v)=>{if(v)if(ui(p)){const b=v(p,f);return b===void 0?p:b}else{if(fn(p))return HE(p,x=>v(x,f));{const x=v(p,f);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},l)}return u.getInitialState=o,u}var u$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",c$=(e=21)=>{let t="",r=e;for(;r--;)t+=u$[Math.random()*64|0];return t},d$=Symbol.for("rtk-slice-createasyncthunk");function f$(e,t){return`${e}/${t}`}function h$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[d$];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(_r(11));const l=(typeof a.reducers=="function"?a.reducers(m$()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(C,_){const A=typeof C=="string"?C:C.type;if(!A)throw new Error(_r(12));if(A in h.sliceCaseReducersByType)throw new Error(_r(13));return h.sliceCaseReducersByType[A]=_,p},addMatcher(C,_){return h.sliceMatchers.push({matcher:C,reducer:_}),p},exposeAction(C,_){return h.actionCreators[C]=_,p},exposeCaseReducer(C,_){return h.sliceCaseReducersByName[C]=_,p}};f.forEach(C=>{const _=l[C],A={reducerName:C,type:f$(o,C),createNotation:typeof a.reducers=="function"};g$(_)?x$(A,_,p,t):v$(A,_,p)});function v(){const[C={},_=[],A=void 0]=typeof a.extraReducers=="function"?QE(a.extraReducers):[a.extraReducers],I={...C,...h.sliceCaseReducersByType};return l$(a.initialState,$=>{for(let B in I)$.addCase(B,I[B]);for(let B of h.sliceMatchers)$.addMatcher(B.matcher,B.reducer);for(let B of _)$.addMatcher(B.matcher,B.reducer);A&&$.addDefaultCase(A)})}const x=C=>C,b=new Map,k=new WeakMap;let j;function S(C,_){return j||(j=v()),j(C,_)}function N(){return j||(j=v()),j.getInitialState()}function P(C,_=!1){function A($){let B=$[C];return typeof B>"u"&&_&&(B=Id(k,A,N)),B}function I($=x){const B=Id(b,_,()=>new WeakMap);return Id(B,$,()=>{const K={};for(const[q,R]of Object.entries(a.selectors??{}))K[q]=p$(R,$,()=>Id(k,$,N),_);return K})}return{reducerPath:C,getSelectors:I,get selectors(){return I(A)},selectSlice:A}}const O={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...P(u),injectInto(C,{reducerPath:_,...A}={}){const I=_??u;return C.inject({reducerPath:I,reducer:S},A),{...O,...P(I,!0)}}};return O}}function p$(e,t,r,n){function a(o,...u){let l=t(o);return typeof l>"u"&&n&&(l=r()),e(l,...u)}return a.unwrapped=e,a}var rr=h$();function m$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function v$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!y$(n))throw new Error(_r(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Mr(e,u):Mr(e))}function g$(e){return e._reducerDefinitionType==="asyncThunk"}function y$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function x$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(_r(18));const{payloadCreator:o,fulfilled:u,pending:l,rejected:f,settled:h,options:p}=r,v=a(e,o,p);n.exposeAction(t,v),u&&n.addCase(v.fulfilled,u),l&&n.addCase(v.pending,l),f&&n.addCase(v.rejected,f),h&&n.addMatcher(v.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Td,pending:l||Td,rejected:f||Td,settled:h||Td})}function Td(){}var b$="task",YE="listener",XE="completed",Cy="cancelled",w$=`task-${Cy}`,k$=`task-${XE}`,jg=`${YE}-${Cy}`,j$=`${YE}-${XE}`,yh=class{constructor(e){Kl(this,"code");Kl(this,"name","TaskAbortError");Kl(this,"message");this.code=e,this.message=`${b$} ${Cy} (reason: ${e})`}},Ay=(e,t)=>{if(typeof e!="function")throw new TypeError(_r(32))},gf=()=>{},ZE=(e,t=gf)=>(e.catch(t),e),JE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),eo=e=>{if(e.aborted)throw new yh(e.reason)};function eP(e,t){let r=gf;return new Promise((n,a)=>{const o=()=>a(new yh(e.reason));if(e.aborted){o();return}r=JE(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=gf})}var S$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof yh?"cancelled":"rejected",error:r}}finally{t==null||t()}},yf=e=>t=>ZE(eP(e,t).then(r=>(eo(e),r))),tP=e=>{const t=yf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ds}=Object,qw={},xh="listenerMiddleware",N$=(e,t)=>{const r=n=>JE(e,()=>n.abort(e.reason));return(n,a)=>{Ay(n);const o=new AbortController;r(o);const u=S$(async()=>{eo(e),eo(o.signal);const l=await n({pause:yf(o.signal),delay:tP(o.signal),signal:o.signal});return eo(o.signal),l},()=>o.abort(k$));return a!=null&&a.autoJoin&&t.push(u.catch(gf)),{result:yf(e)(u),cancel(){o.abort(w$)}}}},E$=(e,t)=>{const r=async(n,a)=>{eo(t);let o=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(v,x)=>{x.unsubscribe(),f([v,x.getState(),x.getOriginalState()])}});o=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await eP(t,Promise.race(l));return eo(t),f}finally{o()}};return((n,a)=>ZE(r(n,a)))},rP=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Mr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(_r(21));return Ay(o),{predicate:a,type:t,effect:o}},nP=ds(e=>{const{type:t,predicate:r,effect:n}=rP(e);return{id:c$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(_r(22))}}},{withTypes:()=>nP}),Qw=(e,t)=>{const{type:r,effect:n,predicate:a}=rP(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Sg=e=>{e.pending.forEach(t=>{t.abort(jg)})},P$=(e,t)=>()=>{for(const r of t.keys())Sg(r);e.clear()},Yw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},iP=ds(Mr(`${xh}/add`),{withTypes:()=>iP}),C$=Mr(`${xh}/removeAll`),aP=ds(Mr(`${xh}/remove`),{withTypes:()=>aP}),A$=(...e)=>{console.error(`${xh}/error`,...e)},Qu=(e={})=>{const t=new Map,r=new Map,n=b=>{const k=r.get(b)??0;r.set(b,k+1)},a=b=>{const k=r.get(b)??1;k===1?r.delete(b):r.set(b,k-1)},{extra:o,onError:u=A$}=e;Ay(u);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),k=>{b.unsubscribe(),k!=null&&k.cancelActive&&Sg(b)}),f=(b=>{const k=Qw(t,b)??nP(b);return l(k)});ds(f,{withTypes:()=>f});const h=b=>{const k=Qw(t,b);return k&&(k.unsubscribe(),b.cancelActive&&Sg(k)),!!k};ds(h,{withTypes:()=>h});const p=async(b,k,j,S)=>{const N=new AbortController,P=E$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(k,ds({},j,{getOriginalState:S,condition:(C,_)=>P(C,_).then(Boolean),take:P,delay:tP(N.signal),pause:yf(N.signal),extra:o,signal:N.signal,fork:N$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((C,_,A)=>{C!==N&&(C.abort(jg),A.delete(C))})},cancel:()=>{N.abort(jg),b.pending.delete(N)},throwIfCancelled:()=>{eo(N.signal)}})))}catch(C){C instanceof yh||Yw(u,C,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(j$),a(b),b.pending.delete(N)}},v=P$(t,r);return{middleware:b=>k=>j=>{if(!TE(j))return k(j);if(iP.match(j))return f(j.payload);if(C$.match(j)){v();return}if(aP.match(j))return h(j.payload);let S=b.getState();const N=()=>{if(S===qw)throw new Error(_r(23));return S};let P;try{if(P=k(j),t.size>0){const O=b.getState(),C=Array.from(t.values());for(const _ of C){let A=!1;try{A=_.predicate(j,O,S)}catch(I){A=!1,Yw(u,I,{raisedBy:"predicate"})}A&&p(_,j,b,N)}}}finally{S=qw}return P},startListening:f,stopListening:h,clearListeners:v}};function _r(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var O$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},oP=rr({name:"chartLayout",initialState:O$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),bh=oP.actions,_$=bh.setMargin,M$=bh.setLayout,I$=bh.setChartSize,T$=bh.setScale,D$=oP.reducer;function sP(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function Rn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function os(e){for(var t=1;t{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&u==="middle")&&o!=="center"&&Ne(e[o]))return os(os({},e),{},{[o]:e[o]+(n||0)});if((l==="horizontal"||l==="vertical"&&o==="center")&&u!=="middle"&&Ne(e[u]))return os(os({},e),{},{[u]:e[u]+(a||0)})}return e},zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",lP=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,o,u=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate));return a||u.push(t),o||u.push(r),u},uP=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,v=e.ticks,x=e.niceTicks,b=e.axisType;if(!u)return null;var k=l==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,j=a==="category"&&u.bandwidth?u.bandwidth()/k:0;if(j=b==="angleAxis"&&o&&o.length>=2?Wr(o[0]-o[1])*2*j:j,v||x){var S=(v||x||[]).map((N,P)=>{var O=n?n.indexOf(N):N,C=u.map(O);return Be(C)?{coordinate:C+j,value:N,offset:j,index:P}:null}).filter(xr);return S}return f&&h?h.map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:N,index:P,offset:j}:null}).filter(xr):u.ticks&&p!=null?u.ticks(p).map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:N,index:P,offset:j}:null}).filter(xr):u.domain().map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:n?n[N]:N,index:P,offset:j}:null}).filter(xr)},F$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(h[0]=o,o+=x,h[1]=o):(h[0]=u,u+=x,h[1]=u)}}}},B$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},U$={sign:F$,expand:iD,none:ao,silhouette:aD,wiggle:oD,positive:B$},W$=(e,t,r)=>{var n,a=(n=U$[r])!==null&&n!==void 0?n:ao,o=nD().keys(t).value((l,f)=>Number(Tt(l,f,0))).order(cg).offset(a),u=o(e);return u.forEach((l,f)=>{l.forEach((h,p)=>{var v=Tt(e[p],t[f],0);Array.isArray(v)&&v.length===2&&Ne(v[0])&&Ne(v[1])&&(h[0]=v[0],h[1]=v[1])})}),u};function H$(e){return e==null?void 0:String(e)}function Zw(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(a[t.dataKey])){var l=mE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Tt(a,Kt(u)?t.dataKey:u),h=t.scale.map(f);return Ne(h)?h:null}var K$=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},G$=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],V$=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return G$(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,l=u.reduce((f,h)=>{var p=sP(h,t,r),v=K$(p);return!Be(v[0])||!Be(v[1])?f:[Math.min(f[0],v[0]),Math.max(f[1],v[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},Jw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ek=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=ch(t,p=>p.coordinate),o=1/0,u=1,l=a.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Q$=(e,t)=>t==="centric"?e.angle:e.radius,hi=e=>e.layout.width,pi=e=>e.layout.height,Y$=e=>e.layout.scale,dP=e=>e.layout.margin,wh=G(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),kh=G(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),X$="data-recharts-item-index",Z$="data-recharts-item-id",Yu=60;function rk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dd(e){for(var t=1;te.brush.height;function nL(e){var t=kh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function iL(e){var t=kh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function aL(e){var t=wh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function oL(e){var t=wh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=G([hi,pi,dP,rL,nL,iL,aL,oL,_E,PR],(e,t,r,n,a,o,u,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+o},v={top:(r.top||0)+u,bottom:(r.bottom||0)+l},x=Dd(Dd({},v),p),b=x.bottom;x.bottom+=n,x=z$(x,f,h);var k=e-x.left-x.right,j=t-x.top-x.bottom;return Dd(Dd({brushBottom:b},x),{},{width:Math.max(k,0),height:Math.max(j,0)})}),sL=G(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),fP=G(hi,pi,(e,t)=>({x:0,y:0,width:e,height:t})),lL=y.createContext(null),wr=()=>y.useContext(lL)!=null,jh=e=>e.brush,Sh=G([jh,Vt,dP],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ne(e.width)?e.width:t.width}));function uL(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{l&&f(),b()};let p=null;const v=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},x=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{x(),a=void 0,o=null},k=()=>{f()},j=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=p==null;v(),u&&N&&f()};return j.schedule=v,j.cancel=b,j.flush=k,r==null||r.addEventListener("abort",b,{once:!0}),j}function cL(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let l,f=null;const h=uL(function(...x){l=e.apply(this,x),f=null},t,{edges:u}),p=function(...x){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(l=e.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,x),l)},v=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=v,p}function dL(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return cL(e,t,{leading:n,maxWait:t,trailing:a})}var bf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;oa[u++]))}},An={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},hP=(e,t,r)=>{var n=r.width,a=n===void 0?An.width:n,o=r.height,u=o===void 0?An.height:o,l=r.aspect,f=r.maxHeight,h=oo(a)?e:Number(a),p=oo(u)?t:Number(u);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},fL={width:0,height:0,overflow:"visible"},hL={width:0,overflowX:"visible"},pL={height:0,overflowY:"visible"},mL={},vL=e=>{var t=e.width,r=e.height,n=oo(t),a=oo(r);return n&&a?fL:n?hL:a?pL:mL};function gL(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=An.width,o=An.height):a===void 0?a=n&&n>0?void 0:An.width:o===void 0&&(o=n&&n>0?void 0:An.height),{width:a,height:o}}var yL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return AL(a)?y.createElement(pP.Provider,{value:a},t):null}var Oy=()=>y.useContext(pP),OL=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?An.initialDimension:n,o=e.width,u=e.height,l=e.minWidth,f=l===void 0?An.minWidth:l,h=e.minHeight,p=e.maxHeight,v=e.children,x=e.debounce,b=x===void 0?An.debounce:x,k=e.id,j=e.className,S=e.onResize,N=e.style,P=N===void 0?{}:N,O=PL(e,yL),C=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>C.current);var A=y.useState({containerWidth:a.width,containerHeight:a.height}),I=kL(A,2),$=I[0],B=I[1],K=y.useCallback((ke,me)=>{B(Q=>{var oe=Math.round(ke),X=Math.round(me);return Q.containerWidth===oe&&Q.containerHeight===X?Q:{containerWidth:oe,containerHeight:X}})},[]);y.useEffect(()=>{if(C.current==null||typeof ResizeObserver>"u")return Us;var ke=L=>{var T,ee=L[0];if(ee!=null){var ne=ee.contentRect,te=ne.width,ue=ne.height;K(te,ue),(T=_.current)===null||T===void 0||T.call(_,te,ue)}};b>0&&(ke=dL(ke,b,{trailing:!0,leading:!1}));var me=new ResizeObserver(ke),Q=C.current.getBoundingClientRect(),oe=Q.width,X=Q.height;return K(oe,X),me.observe(C.current),()=>{me.disconnect()}},[K,b]);var q=$.containerWidth,R=$.containerHeight;bf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var de=hP(q,R,{width:o,height:u,aspect:r,maxHeight:p}),Z=de.calculatedWidth,ge=de.calculatedHeight;return bf(q<0||R<0||Z!=null&&Z>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,Z,ge,o,u,f,h,r),y.createElement("div",wf({id:k?"".concat(k):void 0,className:et("recharts-responsive-container",j),style:ik(ik({},P),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:p}),ref:C},O),y.createElement("div",{style:vL({width:o,height:u})},y.createElement(mP,{width:Z,height:ge},v)))}),_L=y.forwardRef((e,t)=>{var r=Oy();if(Rn(r.width)&&Rn(r.height))return e.children;var n=gL({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=hP(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),l=u.calculatedWidth,f=u.calculatedHeight;return Ne(l)&&Ne(f)?y.createElement(mP,{width:l,height:f},e.children):y.createElement(OL,wf({},e,{width:a,height:o,ref:t}))});function _y(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Nh=()=>{var e,t=wr(),r=Ae(sL),n=Ae(Sh),a=(e=Ae(jh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},ML={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},vP=()=>{var e;return(e=Ae(Vt))!==null&&e!==void 0?e:ML},gP=()=>Ae(hi),yP=()=>Ae(pi),ut=e=>e.layout.layoutType,Ws=()=>Ae(ut),My=()=>{var e=Ws();if(e==="horizontal"||e==="vertical")return e},xP=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},IL=()=>{var e=Ws();return e!==void 0},Xu=e=>{var t=kt(),r=wr(),n=e.width,a=e.height,o=Oy(),u=n,l=a;return o&&(u=o.width>0?o.width:n,l=o.height>0?o.height:a),y.useEffect(()=>{!r&&Rn(u)&&Rn(l)&&t(I$({width:u,height:l}))},[t,r,u,l]),null},bP=Symbol.for("immer-nothing"),ok=Symbol.for("immer-draftable"),Ir=Symbol.for("immer-state");function un(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Au=Object.getPrototypeOf;function Is(e){return!!e&&!!e[Ir]}function lo(e){var t;return e?wP(e)||Array.isArray(e)||!!e[ok]||!!((t=e.constructor)!=null&&t[ok])||Zu(e)||Ph(e):!1}var TL=Object.prototype.constructor.toString(),sk=new WeakMap;function wP(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=sk.get(r);return n===void 0&&(n=Function.toString.call(r),sk.set(r,n)),n===TL}function kf(e,t,r=!0){Eh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Eh(e){const t=e[Ir];return t?t.type_:Array.isArray(e)?1:Zu(e)?2:Ph(e)?3:0}function Ng(e,t){return Eh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kP(e,t,r){const n=Eh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function DL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zu(e){return e instanceof Map}function Ph(e){return e instanceof Set}function $a(e){return e.copy_||e.base_}function Eg(e,t){if(Zu(e))return new Map(e);if(Ph(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=wP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ir];let a=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:Rd,add:Rd,clear:Rd,delete:Rd}),Object.freeze(e),t&&Object.values(e).forEach(r=>Iy(r,!0))),e}function RL(){un(2)}var Rd={value:RL};function Ch(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var $L={};function uo(e){const t=$L[e];return t||un(0,e),t}var Ou;function jP(){return Ou}function LL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function lk(e,t){t&&(uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pg(e){Cg(e),e.drafts_.forEach(zL),e.drafts_=null}function Cg(e){e===Ou&&(Ou=e.parent_)}function uk(e){return Ou=LL(Ou,e)}function zL(e){const t=e[Ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ir].modified_&&(Pg(t),un(4)),lo(e)&&(e=jf(t,e),t.parent_||Sf(t,e)),t.patches_&&uo("Patches").generateReplacementPatches_(r[Ir].base_,e,t.patches_,t.inversePatches_)):e=jf(t,r,[]),Pg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==bP?e:void 0}function jf(e,t,r){if(Ch(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Ir];if(!a)return kf(t,(o,u)=>dk(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Sf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,l=!1;a.type_===3&&(u=new Set(o),o.clear(),l=!0),kf(u,(f,h)=>dk(e,a,o,f,h,r,l),n),Sf(e,o,!1),r&&e.patches_&&uo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function dk(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const l=Ch(a);if(!(l&&!u)){if(Is(a)){const f=o&&t&&t.type_!==3&&!Ng(t.assigned_,n)?o.concat(n):void 0,h=jf(e,a,f);if(kP(r,n,h),Is(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(lo(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;jf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Zu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Sf(e,a)}}}function Sf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Iy(t,r)}function FL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:jP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Ty;r&&(a=[n],o=_u);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,l}var Ty={get(e,t){if(t===Ir)return e;const r=$a(e);if(!Ng(r,t))return BL(e,r,t);const n=r[t];return e.finalized_||!lo(n)?n:n===iv(e.base_,t)?(av(e),e.copy_[t]=Og(n,e)):n},has(e,t){return t in $a(e)},ownKeys(e){return Reflect.ownKeys($a(e))},set(e,t,r){const n=SP($a(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=iv($a(e),t),o=a==null?void 0:a[Ir];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(DL(r,a)&&(r!==void 0||Ng(e.base_,t)))return!0;av(e),Ag(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return iv(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,av(e),Ag(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=$a(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){un(11)},getPrototypeOf(e){return Au(e.base_)},setPrototypeOf(){un(12)}},_u={};kf(Ty,(e,t)=>{_u[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});_u.deleteProperty=function(e,t){return _u.set.call(this,e,t,void 0)};_u.set=function(e,t,r){return Ty.set.call(this,e[0],t,r,e[0])};function iv(e,t){const r=e[Ir];return(r?$a(r):e)[t]}function BL(e,t,r){var a;const n=SP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function SP(e,t){if(!(t in e))return;let r=Au(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Au(r)}}function Ag(e){e.modified_||(e.modified_=!0,e.parent_&&Ag(e.parent_))}function av(e){e.copy_||(e.copy_=Eg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&un(6),n!==void 0&&typeof n!="function"&&un(7);let a;if(lo(t)){const o=uk(this),u=Og(t,void 0);let l=!0;try{a=r(u),l=!1}finally{l?Pg(o):Cg(o)}return lk(o,n),ck(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===bP&&(a=void 0),this.autoFreeze_&&Iy(a,!0),n){const o=[],u=[];uo("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else un(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,f=>t(f,...l));let n,a;return[this.produce(t,r,(u,l)=>{n=u,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){lo(e)||un(8),Is(e)&&(e=WL(e));const t=uk(this),r=Og(e,void 0);return r[Ir].isManual_=!0,Cg(t),r}finishDraft(e,t){const r=e&&e[Ir];(!r||!r.isManual_)&&un(9);const{scope_:n}=r;return lk(n,t),ck(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=uo("Patches").applyPatches_;return Is(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Og(e,t){const r=Zu(e)?uo("MapSet").proxyMap_(e,t):Ph(e)?uo("MapSet").proxySet_(e,t):FL(e,t);return(t?t.scope_:jP()).drafts_.push(r),r}function WL(e){return Is(e)||un(10,e),NP(e)}function NP(e){if(!lo(e)||Ch(e))return e;const t=e[Ir];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Eg(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Eg(e,!0);return kf(r,(a,o)=>{kP(r,a,NP(o))},n),t&&(t.finalized_=!1),r}var HL=new UL;HL.produce;var KL={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},EP=rr({name:"legend",initialState:KL,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:at()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:at()},removeLegendPayload:{reducer(e,t){var r=Hr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:at()}}}),Ju=EP.actions;Ju.setLegendSize;Ju.setLegendSettings;var GL=Ju.addLegendPayload,VL=Ju.replaceLegendPayload,qL=Ju.removeLegendPayload,QL=EP.reducer,ov={exports:{}},sv={};/** - * @license React - * use-sync-external-store-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 fk;function YL(){if(fk)return sv;fk=1;var e=Fs();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,l=e.useDebugValue;return sv.useSyncExternalStoreWithSelector=function(f,h,p,v,x){var b=a(null);if(b.current===null){var k={hasValue:!1,value:null};b.current=k}else k=b.current;b=u(function(){function S(_){if(!N){if(N=!0,P=_,_=v(_),x!==void 0&&k.hasValue){var A=k.value;if(x(A,_))return O=A}return O=_}if(A=O,r(P,_))return A;var I=v(_);return x!==void 0&&x(A,I)?(P=_,A):(P=_,O=I)}var N=!1,P,O,C=p===void 0?null:p;return[function(){return S(h())},C===null?void 0:function(){return S(C())}]},[h,p,v,x]);var j=n(f,b[0],b[1]);return o(function(){k.hasValue=!0,k.value=j},[j]),l(j),j},sv}var hk;function XL(){return hk||(hk=1,ov.exports=YL()),ov.exports}XL();function ZL(e){e()}function JL(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ZL(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var pk={notify(){},get:()=>[]};function ez(e,t){let r,n=pk,a=0,o=!1;function u(j){p();const S=n.subscribe(j);let N=!1;return()=>{N||(N=!0,S(),v())}}function l(){n.notify()}function f(){k.onStateChange&&k.onStateChange()}function h(){return o}function p(){a++,r||(r=e.subscribe(f),n=JL())}function v(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=pk)}function x(){o||(o=!0,p())}function b(){o&&(o=!1,v())}const k={addNestedSub:u,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>n};return k}var tz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rz=tz(),nz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",iz=nz(),az=()=>rz||iz?y.useLayoutEffect:y.useEffect,oz=az();function mk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function sz(e,t){if(mk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a{const f=ez(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=y.useMemo(()=>a.getState(),[a]);oz(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const l=r||uz;return y.createElement(l.Provider,{value:o},t)}var dz=cz,fz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function hz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ah(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(fz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!sz(e[n],t[n]))return!1}else if(!hz(e[n],t[n]))return!1;return!0}function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Yo.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?Yo.labelStyle:o,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,v=e.labelClassName,x=e.label,b=e.labelFormatter,k=e.accessibilityLayer,j=k===void 0?Yo.accessibilityLayer:k,S=()=>{if(l&&l.length){var $={padding:0,margin:0},B=jz(l,h),K=B.map((q,R)=>{if(!q||q.type==="none")return null;var de=q.formatter||f||kz,Z=q.value,ge=q.name,ke=Z,me=ge;if(de){var Q=de(Z,ge,q,R,l);if(Array.isArray(Q)){var oe=gz(Q,2);ke=oe[0],me=oe[1]}else if(Q!=null)ke=Q;else return null}var X=Yl(Yl({},Yo.itemStyle),{},{color:q.color||Yo.itemStyle.color},a);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:X},Dn(me)?y.createElement("span",{className:"recharts-tooltip-item-name"},me):null,Dn(me)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ke),y.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:$},K)}return null},N=Yl(Yl({},Yo.contentStyle),n),P=Yl({margin:0},u),O=!Kt(x),C=O?x:"",_=et("recharts-default-tooltip",p),A=et("recharts-tooltip-label",v);O&&b&&l!==void 0&&l!==null&&(C=b(x,l));var I=j?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",_g({className:_,style:N},I),y.createElement("p",{className:A,style:P},y.isValidElement(C)?C:"".concat(C)),S())},Xl="recharts-tooltip-wrapper",Nz={visibility:"hidden"};function Ez(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return et(Xl,{["".concat(Xl,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(Xl,"-left")]:Ne(r)&&t&&Ne(t.x)&&r=t.y,["".concat(Xl,"-top")]:Ne(n)&&t&&Ne(t.y)&&n0?a:0),v=r[n]+a;if(t[n])return u[n]?p:v;var x=f[n];if(x==null)return 0;if(u[n]){var b=p,k=x;return bS?Math.max(p,x):Math.max(v,x)}function Pz(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Cz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,v,x;return l.height>0&&l.width>0&&r?(v=yk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),x=yk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=Pz({translateX:v,translateY:x,useTranslate3d:f})):p=Nz,{cssProperties:p,cssClasses:Ez({translateX:v,translateY:x,coordinate:r})}}var Az=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ec={isSsr:Az()};function Oz(e,t){return Tz(e)||Iz(e,t)||Mz(e,t)||_z()}function _z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mz(e,t){if(e){if(typeof e=="string")return xk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xk(e,t):void 0}}function xk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rec.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=Oz(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=Lz(f,2),p=h[0],v=h[1];y.useEffect(()=>{var N=P=>{if(P.key==="Escape"){var O,C,_,A;v({dismissed:!0,dismissedAtCoordinate:{x:(O=(C=e.coordinate)===null||C===void 0?void 0:C.x)!==null&&O!==void 0?O:0,y:(_=(A=e.coordinate)===null||A===void 0?void 0:A.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==p.dismissedAtCoordinate.y)&&v(Xo(Xo({},p),{},{dismissed:!1}));var x=Cz({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=x.cssClasses,k=x.cssProperties,j=e.hasPortalFromProps?{}:Xo(Xo({transition:Wz({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=Xo(Xo({},j),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var Kz=y.memo(Hz),CP=()=>{var e;return(e=Ae(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;tBe(e.x)&&Be(e.y),Nk=e=>e.base!=null&&Nf(e.base)&&Nf(e),Zl=e=>e.x,Jl=e=>e.y,Qz=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(by(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Sk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Sk[r]||lh},Ek={connectNulls:!1,type:"linear"},Yz=e=>{var t=e.type,r=t===void 0?Ek.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,l=e.connectNulls,f=l===void 0?Ek.connectNulls:l,h=Qz(r,u),p=f?a.filter(Nf):a;if(Array.isArray(o)){var v,x=a.map((N,P)=>jk(jk({},N),{},{base:o[P]}));u==="vertical"?v=Ad().y(Jl).x1(Zl).x0(N=>N.base.x):v=Ad().x(Zl).y1(Jl).y0(N=>N.base.y);var b=v.defined(Nk).curve(h),k=f?x.filter(Nk):x;return b(k)}var j;u==="vertical"&&Ne(o)?j=Ad().y(Jl).x1(Zl).x0(o):Ne(o)?j=Ad().x(Zl).y1(Jl).y0(o):j=nE().x(Zl).y(Jl);var S=j.defined(Nf).curve(h);return S(p)},Jd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=Ws();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},l=r&&r.length?Yz(u):n;return y.createElement("path",Mg({},dn(e),wy(e),{className:et("recharts-curve",t),d:l===null?void 0:l,ref:a}))},Xz=["x","y","top","left","width","height","className"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),a6=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,v=e.height,x=v===void 0?0:v,b=e.className,k=r6(e,Xz),j=Zz({x:r,y:a,top:u,left:f,width:p,height:x},k);return!Ne(r)||!Ne(a)||!Ne(p)||!Ne(x)||!Ne(u)||!Ne(f)?null:y.createElement("path",Ig({},Gr(j),{className:et("recharts-cross",b),d:i6(r,a,p,x,u,f)}))};function o6(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Ef=1e-4,AP=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],OP=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ck=(e,t)=>r=>{var n=AP(e,t);return OP(n,r)},s6=(e,t)=>r=>{var n=AP(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return OP(a,r)},l6=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},u6=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=Ck(e,r),o=Ck(t,n),u=s6(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,v=p,x=0;x<8;++x){var b=a(v)-p,k=u(v);if(Math.abs(b-p)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,l=u===void 0?16.67:u,f=1,h=[0],p=0,v=0,x=1e4,b=0;b{var P,O,C;if(N<=0)return 0;if(N>=1)return f;var _=N*S,A=Math.floor(_),I=_-A;return((P=h[A])!==null&&P!==void 0?P:0)+(((O=h[A+1])!==null&&O!==void 0?O:0)-((C=h[A])!==null&&C!==void 0?C:0))*I}},f6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Ak(e);case"spring":return d6();default:if(e.split("(")[0]==="cubic-bezier")return Ak(e)}return typeof e=="function"?e:null},h6=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},_P=y.createContext(h6);_P.Provider;function p6(e){var t=y.useContext(_P);return y.useMemo(()=>e??t,[e,t])}function m6(e,t,r){return(t=v6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v6(e){var t=g6(e,"string");return typeof t=="symbol"?t:t+""}function g6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ok="init",_k="pending",Mk="active",y6="completed";function cv(e){return Math.max(0,e)}class x6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;m6(this,"state",Ok),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=cv(t.animationDuration),this.animationBegin=cv(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Ok)return this.state=_k,this.beginStartedTime=t,this.animationBegin;if(this.getState()===_k){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Mk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):cv(this.animationBegin-r)}if(this.getState()===Mk){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=y6}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class b6 extends x6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ni(this.getFrom(),this.getTo(),this.getProgress()))}}class w6{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function k6(e,t){return E6(e)||N6(e,t)||S6(e,t)||j6()}function j6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S6(e,t){if(e){if(typeof e=="string")return Ik(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ik(e,t):void 0}}function Ik(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},Tk=0,dv=1;function MP(e){var t=Qr(e,P6),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,v=PP(),x=n==="auto"?!ec.isSsr&&!v:n,b=p6(t.animationController),k=y.useState(x?Tk:dv),j=k6(k,2),S=j[0],N=j[1];return y.useEffect(()=>{x||N(dv)},[x]),y.useEffect(()=>{var P=f6(u);if(!x||!a||P==null)return Us;var O=new w6,C=new b6({animationId:r,easing:P,animationDuration:o,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:Tk,to:dv});return b(O,C,N)},[b,r,x,a,o,u,l,h,f]),p(Number(S))}function IP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(Nu(t)),n=y.useRef(e);return n.current!==e&&(r.current=Nu(t),n.current=e),r.current}var C6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),A6=(e,t,r)=>e.map(n=>"".concat(C6(n)," ").concat(t,"ms ").concat(r)).join(","),O6=["radius"],_6=["radius"],Dk,Rk,$k,Lk,zk,Fk,Bk,Uk,Wk,Hk;function Kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gk(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=ia(r),u=ia(n),l=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,p=u>=0&&o>=0||u<0&&o<0?1:0,v;if(l>0&&Array.isArray(a)){for(var x=[0,0,0,0],b=0,k=4;bl?l:S}v=Bt(Dk||(Dk=wn(["M",",",""])),e,t+f*x[0]),x[0]>0&&(v+=Bt(Rk||(Rk=wn(["A ",",",",0,0,",",",",",""])),x[0],x[0],p,e+h*x[0],t)),v+=Bt($k||($k=wn(["L ",",",""])),e+r-h*x[1],t),x[1]>0&&(v+=Bt(Lk||(Lk=wn(["A ",",",",0,0,",`, - `,",",""])),x[1],x[1],p,e+r,t+f*x[1])),v+=Bt(zk||(zk=wn(["L ",",",""])),e+r,t+n-f*x[2]),x[2]>0&&(v+=Bt(Fk||(Fk=wn(["A ",",",",0,0,",`, - `,",",""])),x[2],x[2],p,e+r-h*x[2],t+n)),v+=Bt(Bk||(Bk=wn(["L ",",",""])),e+h*x[3],t+n),x[3]>0&&(v+=Bt(Uk||(Uk=wn(["A ",",",",0,0,",`, - `,",",""])),x[3],x[3],p,e,t+n-f*x[3])),v+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);v=Bt(Wk||(Wk=wn(["M ",",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else v=Bt(Hk||(Hk=wn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return v},Yk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},B6=e=>{var t=Qr(e,Yk),r=y.useRef(null),n=y.useState(-1),a=R6(n,2),o=a[0],u=a[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Q=r.current.getTotalLength();Q&&u(Q)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,v=t.radius,x=t.className,b=t.animationEasing,k=t.animationDuration,j=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,P=y.useRef(h),O=y.useRef(p),C=y.useRef(l),_=y.useRef(f),A=y.useMemo(()=>({x:l,y:f,width:h,height:p,radius:v}),[l,f,h,p,v]),I=IP(A,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var $=et("recharts-rectangle",x);if(!N){var B=Gr(t);B.radius;var K=Vk(B,O6);return y.createElement("path",Pf({},K,{x:ia(l),y:ia(f),width:ia(h),height:ia(p),radius:typeof v=="number"?v:void 0,className:$,d:Qk(l,f,h,p,v)}))}var q=P.current,R=O.current,de=C.current,Z=_.current,ge="0px ".concat(o===-1?1:o,"px"),ke="".concat(o,"px ").concat(o,"px"),me=A6(["strokeDasharray"],k,typeof b=="string"?b:Yk.animationEasing);return y.createElement(MP,{animationId:I,key:I,canBegin:o>0,duration:k,easing:b,isActive:N,begin:j},Q=>{var oe=ni(q,h,Q),X=ni(R,p,Q),L=ni(de,l,Q),T=ni(Z,f,Q);r.current&&(P.current=oe,O.current=X,C.current=L,_.current=T);var ee;S?Q>0?ee={transition:me,strokeDasharray:ke}:ee={strokeDasharray:ge}:ee={strokeDasharray:ke};var ne=Gr(t);ne.radius;var te=Vk(ne,_6);return y.createElement("path",Pf({},te,{radius:typeof v=="number"?v:void 0,className:$,d:Qk(L,T,oe,X,v),ref:r,style:Gk(Gk({},ee),t.style)}))})};function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zk(e){for(var t=1;te*180/Math.PI,Ht=(e,t,r,n)=>({x:e+Math.cos(-Cf*n)*r,y:t+Math.sin(-Cf*n)*r}),G6=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},V6=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},q6=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=V6({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var l=(r-a)/u,f=Math.acos(l);return n>o&&(f=2*Math.PI-f),{radius:u,angle:K6(f),angleInRadian:f}},Q6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},Y6=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},X6=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=q6({x:r,y:n},t),o=a.radius,u=a.angle,l=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=Q6(t),p=h.startAngle,v=h.endAngle,x=u,b;if(p<=v){for(;x>v;)x-=360;for(;x=p&&x<=v}else{for(;x>p;)x-=360;for(;x=v&&x<=p}return b?Zk(Zk({},t),{},{radius:o,angle:Y6(x,t)}):null};function TP(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Ht(t,r,n,a),l=Ht(t,r,n,o);return{points:[u,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var Jk,ej,tj,rj,nj,ij,aj;function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Wr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},$d=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(u?1:-1)+n,p=Math.asin(l/h)/Cf,v=f?a:a+o*p,x=Ht(t,r,h,v),b=Ht(t,r,n,v),k=f?a-o*p:a,j=Ht(t,r,h*Math.cos(p*Cf),k);return{center:x,circleTangency:b,lineTangency:j,theta:p}},DP=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,l=Z6(o,u),f=o+l,h=Ht(t,r,a,o),p=Ht(t,r,a,f),v=Bt(Jk||(Jk=Ba(["M ",",",` - A `,",",`,0, - `,",",`, - `,",",` - `])),h.x,h.y,a,a,+(Math.abs(l)>180),+(o>f),p.x,p.y);if(n>0){var x=Ht(t,r,n,o),b=Ht(t,r,n,f);v+=Bt(ej||(ej=Ba(["L ",",",` - A `,",",`,0, - `,",",`, - `,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(o<=f),x.x,x.y)}else v+=Bt(tj||(tj=Ba(["L ",","," Z"])),t,r);return v},J6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=Wr(h-f),v=$d({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:l}),x=v.circleTangency,b=v.lineTangency,k=v.theta,j=$d({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:l}),S=j.circleTangency,N=j.lineTangency,P=j.theta,O=l?Math.abs(f-h):Math.abs(f-h)-k-P;if(O<0)return u?Bt(rj||(rj=Ba(["M ",",",` - a`,",",",0,0,1,",`,0 - a`,",",",0,0,1,",`,0 - `])),b.x,b.y,o,o,o*2,o,o,-o*2):DP({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var C=Bt(nj||(nj=Ba(["M ",",",` - A`,",",",0,0,",",",",",` - A`,",",",0,",",",",",",",` - A`,",",",0,0,",",",",",` - `])),b.x,b.y,o,o,+(p<0),x.x,x.y,a,a,+(O>180),+(p<0),S.x,S.y,o,o,+(p<0),N.x,N.y);if(n>0){var _=$d({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=_.circleTangency,I=_.lineTangency,$=_.theta,B=$d({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),K=B.circleTangency,q=B.lineTangency,R=B.theta,de=l?Math.abs(f-h):Math.abs(f-h)-$-R;if(de<0&&o===0)return"".concat(C,"L").concat(t,",").concat(r,"Z");C+=Bt(ij||(ij=Ba(["L",",",` - A`,",",",0,0,",",",",",` - A`,",",",0,",",",",",",",` - A`,",",",0,0,",",",",","Z"])),q.x,q.y,o,o,+(p<0),K.x,K.y,n,n,+(de>180),+(p>0),A.x,A.y,o,o,+(p<0),I.x,I.y)}else C+=Bt(aj||(aj=Ba(["L",",","Z"])),t,r);return C},eF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},tF=e=>{var t=Qr(e,eF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,v=t.className;if(o0&&Math.abs(h-p)<360?j=J6({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(k,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):j=DP({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),y.createElement("path",Tg({},Gr(t),{className:x,d:j}))};function rF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(vE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,l=t.angle,f=Ht(n,a,o,l),h=Ht(n,a,u,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return TP(t)}}function nF(e){return OE(e)?NaN:Number(e)}function fv(e){return e?(e=nF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function RP(e,t,r){r&&typeof r!="number"&&pg(e,t,r)&&(t=r=void 0),e=fv(e),t===void 0?(t=e,e=0):t=fv(t),r=r===void 0?ee.chartData,Dy=G([pn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Oh=(e,t,r,n)=>n?Dy(e):pn(e),iF=(e,t,r)=>r?Dy(e):pn(e),aF=G([Oh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});G([Dy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var oF=G([pn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Ry(e,t){return cF(e)||uF(e,t)||lF(e,t)||sF()}function sF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lF(e,t){if(e){if(typeof e=="string")return oj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oj(e,t):void 0}}function oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return si(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Ye(si(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return bt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ar))throw Error(qr+"NaN");if(r.s<1)throw Error(qr+(r.s?"NaN":"-Infinity"));return r.eq(Ar)?new n(0):(lt=!1,t=si(Mu(r,o),Mu(e,o),o),lt=!0,Ye(t,a))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?BP(t,e):zP(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(qr+"NaN");return r.s?(lt=!1,t=si(r,e,0,1).times(e),lt=!0,r.minus(t)):Ye(new n(r),a)};be.naturalExponential=be.exp=function(){return FP(this)};be.naturalLogarithm=be.ln=function(){return Mu(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zP(t,e):BP(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(to+e);if(t=bt(a)+1,n=a.d.length-1,r=n*ot+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,a,o,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(qr+"NaN")}for(e=bt(l),lt=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=On(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ks((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(si(l,o,u+2)).times(.5),On(o.d).slice(0,u)===(t=On(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Ye(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;u+=4}return lt=!0,Ye(n,r)};be.times=be.mul=function(e){var t,r,n,a,o,u,l,f,h,p=this,v=p.constructor,x=p.d,b=(e=new v(e)).d;if(!p.s||!e.s)return new v(0);for(e.s*=p.s,r=p.e+e.e,f=x.length,h=b.length,f=0;){for(t=0,a=f+n;a>n;)l=o[a]+b[n]*x[a-n-1]+t,o[a--]=l%It|0,t=l/It|0;o[a]=(o[a]+t)%It|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,lt?Ye(e,v.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:($n(e,0,Hs),t===void 0?t=n.rounding:$n(t,0,8),Ye(r,e+bt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=co(n,!0):($n(e,0,Hs),t===void 0?t=a.rounding:$n(t,0,8),n=Ye(new a(n),e+1,t),r=co(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?co(a):($n(e,0,Hs),t===void 0?t=o.rounding:$n(t,0,8),n=Ye(new o(a),e+bt(a)+1,t),r=co(n.abs(),!1,e+bt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),bt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,a,o,u,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Ar);if(l=new f(l),!l.s){if(e.s<1)throw Error(qr+"Infinity");return l}if(l.eq(Ar))return l;if(n=f.precision,e.eq(Ar))return Ye(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=l.s,u){if((r=p<0?-p:p)<=LP){for(a=new f(Ar),t=Math.ceil(n/ot+4),lt=!1;r%2&&(a=a.times(l),uj(a.d,t)),r=Ks(r/2),r!==0;)l=l.times(l),uj(l.d,t);return lt=!0,e.s<0?new f(Ar).div(a):Ye(a,n)}}else if(o<0)throw Error(qr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,lt=!1,a=e.times(Mu(l,n+h)),lt=!0,a=FP(a),a.s=o,a};be.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=bt(a),n=co(a,r<=o.toExpNeg||r>=o.toExpPos)):($n(e,1,Hs),t===void 0?t=o.rounding:$n(t,0,8),a=Ye(new o(a),e,t),r=bt(a),n=co(a,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):($n(e,1,Hs),t===void 0?t=n.rounding:$n(t,0,8)),Ye(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),r=e.constructor;return co(e,t<=r.toExpNeg||t>=r.toExpPos)};function zP(e,t){var r,n,a,o,u,l,f,h,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),lt?Ye(t,v):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,l=h.length):(n=h,a=u,l=f.length),u=Math.ceil(v/ot),l=u>l?u+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=h.length,l-o<0&&(o=l,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/It|0,f[o]%=It;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,lt?Ye(t,v):t}function $n(e,t,r){if(e!==~~e||er)throw Error(to+e)}function On(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;tu?1:-1;else for(l=f=0;la[l]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]1;)n.shift()}return function(n,a,o,u){var l,f,h,p,v,x,b,k,j,S,N,P,O,C,_,A,I,$,B=n.constructor,K=n.s==a.s?1:-1,q=n.d,R=a.d;if(!n.s)return new B(n);if(!a.s)throw Error(qr+"Division by zero");for(f=n.e-a.e,I=R.length,_=q.length,b=new B(K),k=b.d=[],h=0;R[h]==(q[h]||0);)++h;if(R[h]>(q[h]||0)&&--f,o==null?P=o=B.precision:u?P=o+(bt(n)-bt(a))+1:P=o,P<0)return new B(0);if(P=P/ot+2|0,h=0,I==1)for(p=0,R=R[0],P++;(h<_||p)&&P--;h++)O=p*It+(q[h]||0),k[h]=O/R|0,p=O%R|0;else{for(p=It/(R[0]+1)|0,p>1&&(R=e(R,p),q=e(q,p),I=R.length,_=q.length),C=I,j=q.slice(0,I),S=j.length;S=It/2&&++A;do p=0,l=t(R,j,I,S),l<0?(N=j[0],I!=S&&(N=N*It+(j[1]||0)),p=N/A|0,p>1?(p>=It&&(p=It-1),v=e(R,p),x=v.length,S=j.length,l=t(v,j,x,S),l==1&&(p--,r(v,I16)throw Error($y+bt(e));if(!e.s)return new p(Ar);for(lt=!1,l=v,u=new p(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(La(2,h))/Math.LN10*2+5|0,l+=n,r=a=o=new p(Ar),p.precision=l;;){if(a=Ye(a.times(e),l),r=r.times(++f),u=o.plus(si(a,r,l)),On(u.d).slice(0,l)===On(o.d).slice(0,l)){for(;h--;)o=Ye(o.times(o),l);return p.precision=v,t==null?(lt=!0,Ye(o,v)):o}o=u}}function bt(e){for(var t=e.e*ot,r=e.d[0];r>=10;r/=10)t++;return t}function hv(e,t,r){if(t>e.LN10.sd())throw lt=!0,r&&(e.precision=r),Error(qr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function Vi(e){for(var t="";e--;)t+="0";return t}function Mu(e,t){var r,n,a,o,u,l,f,h,p,v=1,x=10,b=e,k=b.d,j=b.constructor,S=j.precision;if(b.s<1)throw Error(qr+(b.s?"NaN":"-Infinity"));if(b.eq(Ar))return new j(0);if(t==null?(lt=!1,h=S):h=t,b.eq(10))return t==null&&(lt=!0),hv(j,h);if(h+=x,j.precision=h,r=On(k),n=r.charAt(0),o=bt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=On(b.d),n=r.charAt(0),v++;o=bt(b),n>1?(b=new j("0."+r),o++):b=new j(n+"."+r.slice(1))}else return f=hv(j,h+2,S).times(o+""),b=Mu(new j(n+"."+r.slice(1)),h-x).plus(f),j.precision=S,t==null?(lt=!0,Ye(b,S)):b;for(l=u=b=si(b.minus(Ar),b.plus(Ar),h),p=Ye(b.times(b),h),a=3;;){if(u=Ye(u.times(p),h),f=l.plus(si(u,new j(a),h)),On(f.d).slice(0,h)===On(l.d).slice(0,h))return l=l.times(2),o!==0&&(l=l.plus(hv(j,h+2,S).times(o+""))),l=si(l,new j(v),h),j.precision=S,t==null?(lt=!0,Ye(l,S)):l;l=f,a+=2}}function lj(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ks(r/ot),e.d=[],n=(r+1)%ot,r<0&&(n+=ot),nAf||e.e<-Af))throw Error($y+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,a,o,u,l,f,h,p,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=ot,a=t,h=v[p=0];else{if(p=Math.ceil((n+1)/ot),o=v.length,p>=o)return e;for(h=o=v[p],u=1;o>=10;o/=10)u++;n%=ot,a=n-ot+u}if(r!==void 0&&(o=La(10,u-a-1),l=h/o%10|0,f=t<0||v[p+1]!==void 0||h%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/La(10,u-a):0:v[p-1])%10&1||r==(e.s<0?8:7))),t<1||!v[0])return f?(o=bt(e),v.length=1,t=t-o-1,v[0]=La(10,(ot-t%ot)%ot),e.e=Ks(-t/ot)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(n==0?(v.length=p,o=1,p--):(v.length=p+1,o=La(10,ot-n),v[p]=a>0?(h/La(10,u-a)%La(10,a)|0)*o:0),f)for(;;)if(p==0){(v[0]+=o)==It&&(v[0]=1,++e.e);break}else{if(v[p]+=o,v[p]!=It)break;v[p--]=0,o=1}for(n=v.length;v[--n]===0;)v.pop();if(lt&&(e.e>Af||e.e<-Af))throw Error($y+bt(e));return e}function BP(e,t){var r,n,a,o,u,l,f,h,p,v,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),lt?Ye(t,b):t;if(f=e.d,v=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(p=u<0,p?(r=f,u=-u,l=v.length):(r=v,n=h,l=f.length),a=Math.max(Math.ceil(b/ot),l)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=v.length,p=a0;--a)f[l++]=0;for(a=v.length;a>u;){if(f[--a]0?o=o.charAt(0)+"."+o.slice(1)+Vi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Vi(-a-1)+o,r&&(n=r-u)>0&&(o+=Vi(n))):a>=u?(o+=Vi(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+Vi(n))):((n=a+1)0&&(a+1===u&&(o+="."),o+=Vi(n))),e.s<0?"-"+o:o}function uj(e,t){if(e.length>t)return e.length=t,!0}function UP(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(to+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return lj(u,o.toString())}else if(typeof o!="string")throw Error(to+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,hF.test(o))lj(u,o);else throw Error(to+o)}if(a.prototype=be,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=UP,a.config=a.set=pF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(to+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(to+r+": "+n);return this}var Ly=UP(fF);Ar=new Ly(1);const We=Ly;function WP(e){var t;return e===0?t=1:t=Math.floor(new We(e).abs().log(10).toNumber())+1,t}function HP(e,t,r){for(var n=new We(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Iu(e,t){return yF(e)||gF(e,t)||vF(e,t)||mF()}function mF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e,t){if(e){if(typeof e=="string")return cj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cj(e,t):void 0}}function cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Iu(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},zy=(e,t,r)=>{if(e.lte(0))return new We(0);var n=WP(e.toNumber()),a=new We(10).pow(n),o=e.div(a),u=n!==1?.05:.1,l=new We(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=l.mul(a);return t?new We(f.toNumber()):new We(Math.ceil(f.toNumber()))},GP=(e,t,r)=>{var n;if(e.lte(0))return new We(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new We(o).abs().log(10).toNumber()),l=new We(10).pow(u),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new We(10).pow(p))}var v=(n=a[h])!==null&&n!==void 0?n:1,x=new We(v).mul(l);return t?x:new We(Math.ceil(x.toNumber()))},xF=(e,t,r)=>{var n=new We(1),a=new We(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new We(10).pow(WP(e)-1),a=new We(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new We(Math.floor(e)))}else e===0?a=new We(Math.floor((t-1)/2)):r||(a=new We(Math.floor(e)));for(var u=Math.floor((t-1)/2),l=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:zy;if(!Number.isFinite((r-t)/(n-1)))return{step:new We(0),tickMin:new We(0),tickMax:new We(0)};var l=u(new We(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new We(0):(f=new We(t).add(r).div(2),f=f.sub(new We(f).mod(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new We(r).sub(f).div(l).toNumber()),v=h+p+1;return v>n?VP(t,r,n,a,o+1,u):(v0?p+(n-v):p,h=r>0?h:h+(n-v)),{step:l,tickMin:f.sub(new We(h).mul(l)),tickMax:f.add(new We(p).mul(l))})},dj=function(t){var r=Iu(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=KP([n,a]),p=Iu(h,2),v=p[0],x=p[1];if(v===-1/0||x===1/0){var b=x===1/0?[v,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),x];return n>a?b.reverse():b}if(v===x)return xF(v,o,u);var k=l==="snap125"?GP:zy,j=VP(v,x,f,u,0,k),S=j.step,N=j.tickMin,P=j.tickMax,O=HP(N,P.add(new We(.1).mul(S)),S);return n>a?O.reverse():O},fj=function(t,r){var n=Iu(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=KP([a,o]),h=Iu(f,2),p=h[0],v=h[1];if(p===-1/0||v===1/0)return[a,o];if(p===v)return[p];var x=l==="snap125"?GP:zy,b=Math.max(r,2),k=x(new We(v).sub(p).div(b-1),u,0),j=[...HP(new We(p),new We(v),k),v];return u===!1&&(j=j.map(S=>Math.round(S))),a>o?j.reverse():j},bF=e=>e.rootProps.barCategoryGap,_h=e=>e.rootProps.stackOffset,qP=e=>e.rootProps.reverseStackOrder,Fy=e=>e.options.chartName,By=e=>e.rootProps.syncId,QP=e=>e.rootProps.syncMethod,Uy=e=>e.options.eventEmitter,wF=e=>e.rootProps.baseValue,or={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_a={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},kn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Mh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Ih(e,t,r){if(r!=="auto")return r;if(e!=null)return zn(e,t)?"category":"number"}function hj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Of(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Wy=G([NF,xP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Ih(t,"angleAxis",pj.type))!==null&&r!==void 0?r:"category";return Of(Of({},pj),{},{type:n})}),EF=(e,t)=>e.polarAxis.radiusAxis[t],Hy=G([EF,xP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Ih(t,"radiusAxis",mj.type))!==null&&r!==void 0?r:"category";return Of(Of({},mj),{},{type:n})}),Th=e=>e.polarOptions,Ky=G([hi,pi,Vt],G6),YP=G([Th,Ky],(e,t)=>{if(e!=null)return da(e.innerRadius,t,0)}),XP=G([Th,Ky],(e,t)=>{if(e!=null)return da(e.outerRadius,t,t*.8)}),PF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},ZP=G([Th],PF);G([Wy,ZP],Mh);var JP=G([Ky,YP,XP],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});G([Hy,JP],Mh);var eC=G([ut,Th,YP,XP,hi,pi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:da(u,a,a/2),cy:da(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Dt=(e,t)=>t,Dh=(e,t,r)=>r;function Gy(e){return e==null?void 0:e.id}function tC(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var v=Gy(f);p.forEach((x,b)=>{var k=u==null||o?b:String(Tt(x,u,null)),j=Tt(x,f.dataKey,0),S;l.has(k)?S=l.get(k):S={},Object.assign(S,{[v]:j}),l.set(k,S)})}}),Array.from(l.values())}function Vy(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Rh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function $h(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function CF(e,t){if(e.length===t.length){for(var r=0;r{var t=ut(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Gs=e=>e.tooltip.settings.axisId;function qy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],l=a[1];return u<=l?o>=u&&o<=l:o>=l&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var l=e(o);if(l!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var AF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Mn(t)){for(var r,n,a=0;an)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function la(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function OF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Qy(e){let t,r,n;e.length!==2?(t=la,r=(l,f)=>la(e(l),f),n=(l,f)=>e(l)-f):(t=e===la||e===OF?e:_F,r=e,n=e);function a(l,f,h=0,p=l.length){if(h>>1;r(l[v],f)<0?h=v+1:p=v}while(h>>1;r(l[v],f)<=0?h=v+1:p=v}while(hh&&n(l[v-1],f)>-n(l[v],f)?v-1:v}return{left:a,center:u,right:o}}function _F(){return 0}function rC(e){return e===null?NaN:+e}function*MF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const IF=Qy(la),tc=IF.right;Qy(rC).center;class vj extends Map{constructor(t,r=RF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(gj(this,t))}has(t){return super.has(gj(this,t))}set(t,r){return super.set(TF(this,t),r)}delete(t){return super.delete(DF(this,t))}}function gj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function TF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function DF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function RF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function $F(e=la){if(e===la)return nC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function nC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const LF=Math.sqrt(50),zF=Math.sqrt(10),FF=Math.sqrt(2);function _f(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=LF?10:o>=zF?5:o>=FF?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/u,l=Math.round(e*h),f=Math.round(t*h),l/ht&&--f,h=-h):(h=Math.pow(10,a)*u,l=Math.round(e/h),f=Math.round(t/h),l*ht&&--f),f0))return[];if(e===t)return[e];const n=t=a))return[];const l=o-a+1,f=new Array(l);if(n)if(u<0)for(let h=0;h=n)&&(r=n);return r}function xj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function iC(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?nC:$F(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),v=.5*Math.exp(2*p/3),x=.5*Math.sqrt(p*v*(f-v)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*v/f+x)),k=Math.min(n,Math.floor(t+(f-h)*v/f+x));iC(e,t,b,k,a)}const o=e[t];let u=r,l=n;for(eu(e,r,t),a(e[n],o)>0&&eu(e,r,n);u0;)--l}a(e[r],o)===0?eu(e,r,l):(++l,eu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function eu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function BF(e,t,r){if(e=Float64Array.from(MF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return xj(e);if(t>=1)return yj(e);var n,a=(n-1)*t,o=Math.floor(a),u=yj(iC(e,o).subarray(0,o+1)),l=xj(e.subarray(o+1));return u+(l-u)*(a-o)}}function UF(e,t,r=rC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return u+(l-u)*(a-o)}}function WF(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ld(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ld(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=GF.exec(e))?new br(t[1],t[2],t[3],1):(t=VF.exec(e))?new br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qF.exec(e))?Ld(t[1],t[2],t[3],t[4]):(t=QF.exec(e))?Ld(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=YF.exec(e))?Ej(t[1],t[2]/100,t[3]/100,1):(t=XF.exec(e))?Ej(t[1],t[2]/100,t[3]/100,t[4]):bj.hasOwnProperty(e)?jj(bj[e]):e==="transparent"?new br(NaN,NaN,NaN,0):null}function jj(e){return new br(e>>16&255,e>>8&255,e&255,1)}function Ld(e,t,r,n){return n<=0&&(e=t=r=NaN),new br(e,t,r,n)}function e8(e){return e instanceof rc||(e=Ru(e)),e?(e=e.rgb(),new br(e.r,e.g,e.b,e.opacity)):new br}function zg(e,t,r,n){return arguments.length===1?e8(e):new br(e,t,r,n??1)}function br(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Zy(br,zg,oC(rc,{brighter(e){return e=e==null?Mf:Math.pow(Mf,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new br(ro(this.r),ro(this.g),ro(this.b),If(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sj,formatHex:Sj,formatHex8:t8,formatRgb:Nj,toString:Nj}));function Sj(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}`}function t8(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}${Ua((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nj(){const e=If(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function If(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ua(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function Ej(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new cn(e,t,r,n)}function sC(e){if(e instanceof cn)return new cn(e.h,e.s,e.l,e.opacity);if(e instanceof rc||(e=Ru(e)),!e)return new cn;if(e instanceof cn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,l=o-a,f=(o+a)/2;return l?(t===o?u=(r-n)/l+(r0&&f<1?0:u,new cn(u,l,f,e.opacity)}function r8(e,t,r,n){return arguments.length===1?sC(e):new cn(e,t,r,n??1)}function cn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Zy(cn,r8,oC(rc,{brighter(e){return e=e==null?Mf:Math.pow(Mf,e),new cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new cn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new br(pv(e>=240?e-240:e+120,a,n),pv(e,a,n),pv(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new cn(Pj(this.h),zd(this.s),zd(this.l),If(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=If(this.opacity);return`${e===1?"hsl(":"hsla("}${Pj(this.h)}, ${zd(this.s)*100}%, ${zd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pj(e){return e=(e||0)%360,e<0?e+360:e}function zd(e){return Math.max(0,Math.min(1,e||0))}function pv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Jy=e=>()=>e;function n8(e,t){return function(r){return e+r*t}}function i8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function a8(e){return(e=+e)==1?lC:function(t,r){return r-t?i8(t,r,e):Jy(isNaN(t)?r:t)}}function lC(e,t){var r=t-e;return r?n8(e,r):Jy(isNaN(e)?t:e)}const Cj=(function e(t){var r=a8(t);function n(a,o){var u=r((a=zg(a)).r,(o=zg(o)).r),l=r(a.g,o.g),f=r(a.b,o.b),h=lC(a.opacity,o.opacity);return function(p){return a.r=u(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function o8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;ar&&(o=t.slice(r,o),l[u]?l[u]+=o:l[++u]=o),(n=n[0])===(a=a[0])?l[u]?l[u]+=a:l[++u]=a:(l[++u]=null,f.push({i:u,x:Tf(n,a)})),r=mv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function g8(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a2?y8:g8,f=h=null,v}function v(x){return x==null||isNaN(x=+x)?o:(f||(f=l(e.map(n),t,r)))(n(u(x)))}return v.invert=function(x){return u(a((h||(h=l(t,e.map(n),Tf)))(x)))},v.domain=function(x){return arguments.length?(e=Array.from(x,Df),p()):e.slice()},v.range=function(x){return arguments.length?(t=Array.from(x),p()):t.slice()},v.rangeRound=function(x){return t=Array.from(x),r=e0,p()},v.clamp=function(x){return arguments.length?(u=x?!0:sr,p()):u!==sr},v.interpolate=function(x){return arguments.length?(r=x,p()):r},v.unknown=function(x){return arguments.length?(o=x,v):o},function(x,b){return n=x,a=b,p()}}function t0(){return Lh()(sr,sr)}function x8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ts(e){return e=Rf(Math.abs(e)),e?e[1]:NaN}function b8(e,t){return function(r,n){for(var a=r.length,o=[],u=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return o.reverse().join(t)}}function w8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var k8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $u(e){if(!(t=k8.exec(e)))throw new Error("invalid format: "+e);var t;return new r0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$u.prototype=r0.prototype;function r0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}r0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function j8(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var $f;function S8(e,t){var r=Rf(e,t);if(!r)return $f=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-($f=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Rf(e,Math.max(0,t+o-1))[0]}function Oj(e,t){var r=Rf(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const _j={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:x8,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Oj(e*100,t),r:Oj,s:S8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Mj(e){return e}var Ij=Array.prototype.map,Tj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N8(e){var t=e.grouping===void 0||e.thousands===void 0?Mj:b8(Ij.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Mj:w8(Ij.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(v,x){v=$u(v);var b=v.fill,k=v.align,j=v.sign,S=v.symbol,N=v.zero,P=v.width,O=v.comma,C=v.precision,_=v.trim,A=v.type;A==="n"?(O=!0,A="g"):_j[A]||(C===void 0&&(C=12),_=!0,A="g"),(N||b==="0"&&k==="=")&&(N=!0,b="0",k="=");var I=(x&&x.prefix!==void 0?x.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),$=(S==="$"?n:/[%p]/.test(A)?u:"")+(x&&x.suffix!==void 0?x.suffix:""),B=_j[A],K=/[defgprs%]/.test(A);C=C===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function q(R){var de=I,Z=$,ge,ke,me;if(A==="c")Z=B(R)+Z,R="";else{R=+R;var Q=R<0||1/R<0;if(R=isNaN(R)?f:B(Math.abs(R),C),_&&(R=j8(R)),Q&&+R==0&&j!=="+"&&(Q=!1),de=(Q?j==="("?j:l:j==="-"||j==="("?"":j)+de,Z=(A==="s"&&!isNaN(R)&&$f!==void 0?Tj[8+$f/3]:"")+Z+(Q&&j==="("?")":""),K){for(ge=-1,ke=R.length;++geme||me>57){Z=(me===46?a+R.slice(ge+1):R.slice(ge))+Z,R=R.slice(0,ge);break}}}O&&!N&&(R=t(R,1/0));var oe=de.length+R.length+Z.length,X=oe>1)+de+R+Z+X.slice(oe);break;default:R=X+de+R+Z;break}return o(R)}return q.toString=function(){return v+""},q}function p(v,x){var b=Math.max(-8,Math.min(8,Math.floor(Ts(x)/3)))*3,k=Math.pow(10,-b),j=h((v=$u(v),v.type="f",v),{suffix:Tj[8+b/3]});return function(S){return j(k*S)}}return{format:h,formatPrefix:p}}var Fd,n0,uC;E8({thousands:",",grouping:[3],currency:["$",""]});function E8(e){return Fd=N8(e),n0=Fd.format,uC=Fd.formatPrefix,Fd}function P8(e){return Math.max(0,-Ts(Math.abs(e)))}function C8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ts(t)/3)))*3-Ts(Math.abs(e)))}function A8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ts(t)-Ts(e))+1}function cC(e,t,r,n){var a=$g(e,t,r),o;switch(n=$u(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=C8(a,u))&&(n.precision=o),uC(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=A8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=P8(a))&&(n.precision=o-(n.type==="%")*2);break}}return n0(n)}function fa(e){var t=e.domain;return e.ticks=function(r){var n=t();return Dg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return cC(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],l=n[o],f,h,p=10;for(l0;){if(h=Rg(u,l,r),h===f)return n[a]=u,n[o]=l,t(n);if(h>0)u=Math.floor(u/h)*h,l=Math.ceil(l/h)*h;else if(h<0)u=Math.ceil(u*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function dC(){var e=t0();return e.copy=function(){return nc(e,dC())},Yr.apply(e,arguments),fa(e)}function fC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Df),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return fC(e).unknown(t)},e=arguments.length?Array.from(e,Df):[0,1],fa(r)}function hC(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return oMath.pow(e,t)}function T8(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function $j(e){return(t,r)=>-e(-t,r)}function i0(e){const t=e(Dj,Rj),r=t.domain;let n=10,a,o;function u(){return a=T8(n),o=I8(n),r()[0]<0?(a=$j(a),o=$j(o),e(O8,_8)):e(Dj,Rj),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const v=p0){for(;x<=b;++x)for(k=1;kp)break;N.push(j)}}else for(;x<=b;++x)for(k=n-1;k>=1;--k)if(j=x>0?k/o(-x):k*o(x),!(jp)break;N.push(j)}N.length*2{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=$u(f)).precision==null&&(f.trim=!0),f=n0(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let v=p/o(Math.round(a(p)));return v*nr(hC(r(),{floor:l=>o(Math.floor(a(l))),ceil:l=>o(Math.ceil(a(l)))})),t}function pC(){const e=i0(Lh()).domain([1,10]);return e.copy=()=>nc(e,pC()).base(e.base()),Yr.apply(e,arguments),e}function Lj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function zj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function a0(e){var t=1,r=e(Lj(t),zj(t));return r.constant=function(n){return arguments.length?e(Lj(t=+n),zj(t)):t},fa(r)}function mC(){var e=a0(Lh());return e.copy=function(){return nc(e,mC()).constant(e.constant())},Yr.apply(e,arguments)}function Fj(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function D8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function R8(e){return e<0?-e*e:e*e}function o0(e){var t=e(sr,sr),r=1;function n(){return r===1?e(sr,sr):r===.5?e(D8,R8):e(Fj(r),Fj(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},fa(t)}function s0(){var e=o0(Lh());return e.copy=function(){return nc(e,s0()).exponent(e.exponent())},Yr.apply(e,arguments),e}function $8(){return s0.apply(null,arguments).exponent(.5)}function Bj(e){return Math.sign(e)*e*e}function L8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vC(){var e=t0(),t=[0,1],r=!1,n;function a(o){var u=L8(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(Bj(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Df)).map(Bj)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return vC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Yr.apply(a,arguments),fa(a)}function gC(){var e=[],t=[],r=[],n;function a(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return yC().domain([e,t]).range(a).unknown(o)},Yr.apply(fa(u),arguments)}function xC(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[tc(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return xC().domain(e).range(t).unknown(r)},Yr.apply(a,arguments)}const vv=new Date,gv=new Date;function Pt(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const u=a(o),l=a.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,l)=>{const f=[];if(o=a.ceil(o),l=l==null?1:Math.floor(l),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,l),e(o);while(hPt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!o(u););else for(;--l>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(vv.setTime(+o),gv.setTime(+u),e(vv),e(gv),Math.floor(r(vv,gv))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Lf=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Lf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Lf);Lf.range;const ii=1e3,Kr=ii*60,ai=Kr*60,ci=ai*24,l0=ci*7,Uj=ci*30,yv=ci*365,Wa=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ii)},(e,t)=>(t-e)/ii,e=>e.getUTCSeconds());Wa.range;const u0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getMinutes());u0.range;const c0=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getUTCMinutes());c0.range;const d0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii-e.getMinutes()*Kr)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getHours());d0.range;const f0=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCHours());f0.range;const ic=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kr)/ci,e=>e.getDate()-1);ic.range;const zh=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ci,e=>e.getUTCDate()-1);zh.range;const bC=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ci,e=>Math.floor(e/ci));bC.range;function yo(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Kr)/l0)}const Fh=yo(0),zf=yo(1),z8=yo(2),F8=yo(3),Ds=yo(4),B8=yo(5),U8=yo(6);Fh.range;zf.range;z8.range;F8.range;Ds.range;B8.range;U8.range;function xo(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/l0)}const Bh=xo(0),Ff=xo(1),W8=xo(2),H8=xo(3),Rs=xo(4),K8=xo(5),G8=xo(6);Bh.range;Ff.range;W8.range;H8.range;Rs.range;K8.range;G8.range;const h0=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());h0.range;const p0=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());p0.range;const di=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());di.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});di.range;const fi=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());fi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});fi.range;function wC(e,t,r,n,a,o){const u=[[Wa,1,ii],[Wa,5,5*ii],[Wa,15,15*ii],[Wa,30,30*ii],[o,1,Kr],[o,5,5*Kr],[o,15,15*Kr],[o,30,30*Kr],[a,1,ai],[a,3,3*ai],[a,6,6*ai],[a,12,12*ai],[n,1,ci],[n,2,2*ci],[r,1,l0],[t,1,Uj],[t,3,3*Uj],[e,1,yv]];function l(h,p,v){const x=pS).right(u,x);if(b===u.length)return e.every($g(h/yv,p/yv,v));if(b===0)return Lf.every(Math.max($g(h,p,v),1));const[k,j]=u[x/u[b-1][2]53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Y=bv(tu(ae.y,0,1)),ce=Y.getUTCDay(),Y=ce>4||ce===0?Ff.ceil(Y):Ff(Y),Y=zh.offset(Y,(ae.V-1)*7),ae.y=Y.getUTCFullYear(),ae.m=Y.getUTCMonth(),ae.d=Y.getUTCDate()+(ae.w+6)%7):(Y=xv(tu(ae.y,0,1)),ce=Y.getDay(),Y=ce>4||ce===0?zf.ceil(Y):zf(Y),Y=ic.offset(Y,(ae.V-1)*7),ae.y=Y.getFullYear(),ae.m=Y.getMonth(),ae.d=Y.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),ce="Z"in ae?bv(tu(ae.y,0,1)).getUTCDay():xv(tu(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(ce+5)%7:ae.w+ae.U*7-(ce+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,bv(ae)):xv(ae)}}function $(J,je,_e,ae){for(var Xe=0,Y=je.length,ce=_e.length,tt,kr;Xe=ce)return-1;if(tt=je.charCodeAt(Xe++),tt===37){if(tt=je.charAt(Xe++),kr=_[tt in Wj?je.charAt(Xe++):tt],!kr||(ae=kr(J,_e,ae))<0)return-1}else if(tt!=_e.charCodeAt(ae++))return-1}return ae}function B(J,je,_e){var ae=h.exec(je.slice(_e));return ae?(J.p=p.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function K(J,je,_e){var ae=b.exec(je.slice(_e));return ae?(J.w=k.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function q(J,je,_e){var ae=v.exec(je.slice(_e));return ae?(J.w=x.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function R(J,je,_e){var ae=N.exec(je.slice(_e));return ae?(J.m=P.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function de(J,je,_e){var ae=j.exec(je.slice(_e));return ae?(J.m=S.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function Z(J,je,_e){return $(J,t,je,_e)}function ge(J,je,_e){return $(J,r,je,_e)}function ke(J,je,_e){return $(J,n,je,_e)}function me(J){return u[J.getDay()]}function Q(J){return o[J.getDay()]}function oe(J){return f[J.getMonth()]}function X(J){return l[J.getMonth()]}function L(J){return a[+(J.getHours()>=12)]}function T(J){return 1+~~(J.getMonth()/3)}function ee(J){return u[J.getUTCDay()]}function ne(J){return o[J.getUTCDay()]}function te(J){return f[J.getUTCMonth()]}function ue(J){return l[J.getUTCMonth()]}function pe(J){return a[+(J.getUTCHours()>=12)]}function Oe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var je=A(J+="",O);return je.toString=function(){return J},je},parse:function(J){var je=I(J+="",!1);return je.toString=function(){return J},je},utcFormat:function(J){var je=A(J+="",C);return je.toString=function(){return J},je},utcParse:function(J){var je=I(J+="",!0);return je.toString=function(){return J},je}}}var Wj={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,Z8=/^%/,J8=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o[t.toLowerCase(),r]))}function tB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function rB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function nB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function iB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function aB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Hj(e,t,r){var n=$t.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Kj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function oB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function sB(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function lB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Gj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function uB(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Vj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function cB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function dB(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function fB(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function hB(e,t,r){var n=$t.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function pB(e,t,r){var n=Z8.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function mB(e,t,r){var n=$t.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function vB(e,t,r){var n=$t.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function qj(e,t){return Ge(e.getDate(),t,2)}function gB(e,t){return Ge(e.getHours(),t,2)}function yB(e,t){return Ge(e.getHours()%12||12,t,2)}function xB(e,t){return Ge(1+ic.count(di(e),e),t,3)}function kC(e,t){return Ge(e.getMilliseconds(),t,3)}function bB(e,t){return kC(e,t)+"000"}function wB(e,t){return Ge(e.getMonth()+1,t,2)}function kB(e,t){return Ge(e.getMinutes(),t,2)}function jB(e,t){return Ge(e.getSeconds(),t,2)}function SB(e){var t=e.getDay();return t===0?7:t}function NB(e,t){return Ge(Fh.count(di(e)-1,e),t,2)}function jC(e){var t=e.getDay();return t>=4||t===0?Ds(e):Ds.ceil(e)}function EB(e,t){return e=jC(e),Ge(Ds.count(di(e),e)+(di(e).getDay()===4),t,2)}function PB(e){return e.getDay()}function CB(e,t){return Ge(zf.count(di(e)-1,e),t,2)}function AB(e,t){return Ge(e.getFullYear()%100,t,2)}function OB(e,t){return e=jC(e),Ge(e.getFullYear()%100,t,2)}function _B(e,t){return Ge(e.getFullYear()%1e4,t,4)}function MB(e,t){var r=e.getDay();return e=r>=4||r===0?Ds(e):Ds.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function IB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function Qj(e,t){return Ge(e.getUTCDate(),t,2)}function TB(e,t){return Ge(e.getUTCHours(),t,2)}function DB(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function RB(e,t){return Ge(1+zh.count(fi(e),e),t,3)}function SC(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function $B(e,t){return SC(e,t)+"000"}function LB(e,t){return Ge(e.getUTCMonth()+1,t,2)}function zB(e,t){return Ge(e.getUTCMinutes(),t,2)}function FB(e,t){return Ge(e.getUTCSeconds(),t,2)}function BB(e){var t=e.getUTCDay();return t===0?7:t}function UB(e,t){return Ge(Bh.count(fi(e)-1,e),t,2)}function NC(e){var t=e.getUTCDay();return t>=4||t===0?Rs(e):Rs.ceil(e)}function WB(e,t){return e=NC(e),Ge(Rs.count(fi(e),e)+(fi(e).getUTCDay()===4),t,2)}function HB(e){return e.getUTCDay()}function KB(e,t){return Ge(Ff.count(fi(e)-1,e),t,2)}function GB(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function VB(e,t){return e=NC(e),Ge(e.getUTCFullYear()%100,t,2)}function qB(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function QB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Rs(e):Rs.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function YB(){return"+0000"}function Yj(){return"%"}function Xj(e){return+e}function Zj(e){return Math.floor(+e/1e3)}var Zo,EC,PC;XB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function XB(e){return Zo=X8(e),EC=Zo.format,Zo.parse,PC=Zo.utcFormat,Zo.utcParse,Zo}function ZB(e){return new Date(e)}function JB(e){return e instanceof Date?+e:+new Date(+e)}function m0(e,t,r,n,a,o,u,l,f,h){var p=t0(),v=p.invert,x=p.domain,b=h(".%L"),k=h(":%S"),j=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),P=h("%b %d"),O=h("%B"),C=h("%Y");function _(A){return(f(A)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>BF(e,o/n))},r.copy=function(){return _C(t).domain(e)},mi.apply(r,arguments)}function Wh(){var e=0,t=.5,r=1,n=1,a,o,u,l,f,h=sr,p,v=!1,x;function b(j){return isNaN(j=+j)?x:(j=.5+((j=+p(j))-o)*(n*j{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return o9(n)?n:"point"}};function s9(e,t){for(var r=0,n=e.length,a=e[0]t)?r=o+1:n=o}return r}function $C(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,l,f=s9(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function l9(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):$C(e,void 0)}function eS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],vi=(e,t)=>{var r=zC(e,t);return r??Nt},Et={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Ug,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Yu},FC=(e,t)=>e.cartesianAxis.yAxis[t],gi=(e,t)=>{var r=FC(e,t);return r??Et},v9={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},x0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??v9},cr=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);case"zAxis":return x0(e,r);case"angleAxis":return Wy(e,r);case"radiusAxis":return Hy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},g9=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ac=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);case"angleAxis":return Wy(e,r);case"radiusAxis":return Hy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},BC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function UC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var WC=e=>e.graphicalItems.cartesianItems,y9=G([Dt,Dh],UC),HC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),qs=G([WC,cr,y9],HC,{memoizeOptions:{resultEqualityCheck:$h}}),KC=G([qs],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Vy)),GC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),x9=G([qs],GC),VC=e=>e.map(t=>t.data).filter(Boolean).flat(1),b9=G([qs],e=>e.some(t=>!t.data)),qC=G([qs],VC,{memoizeOptions:{resultEqualityCheck:$h}}),QC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},b0=G([qC,Oh],QC),w9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Tt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Tt(a,n)}))):e.map(n=>({value:n})),YC=(e,t,r,n,a,o)=>{var u=n.chartData,l=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,p=w9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var v=l.slice(f,h+1),x=v.map(b=>({value:Tt(b,t.dataKey)})).filter(b=>b.value!=null);return[...x,...p]}return p},oc=G([b0,cr,qs,Oh,b9,qC],YC);function hs(e){if(Dn(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function rS(e){if(Array.isArray(e)){var t=[hs(e[0]),hs(e[1])];return Mn(t)?t:void 0}var r=hs(e);if(r!=null)return[r,r]}function Ln(e){return e.map(hs).filter(xr)}function k9(e,t){var r=hs(e),n=hs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var j9=G([oc],e=>e==null?void 0:e.map(t=>t.value).sort(k9));function XC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function S9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Tn(t))n=t;else if(Array.isArray(t)){var a=Ln(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Ln(r.flatMap(o=>{var u=Tt(e,o.dataKey),l,f;if(Array.isArray(u)){var h=LC(u,2);l=h[0],f=h[1]}else l=f=u;if(!(!Be(l)||!Be(f)))return[n-l,n+f]}))}var Ct=e=>{var t=Rt(e),r=Gs(e);return ac(e,t,r)},$s=G([Ct],e=>e==null?void 0:e.dataKey),N9=G([KC,Oh,Ct],tC),ZC=(e,t,r,n)=>{var a={},o=t.reduce((u,l)=>{if(l.stackId==null)return u;var f=u[l.stackId];return f==null&&(f=[]),f.push(l),u[l.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var l=LC(u,2),f=l[0],h=l[1],p=n?[...h].reverse():h,v=p.map(Gy);return[f,{stackedData:W$(e,v,r),graphicalItems:p}]}))},JC=G([N9,KC,_h,qP],ZC),eA=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return V$(e,a,o)},E9=G([cr],e=>e.allowDataOverflow),w0=e=>{var t;if(e==null||!("domain"in e))return Ug;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Ln(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Ug},tA=G([cr],w0),rA=G([tA,E9],$P),P9=G([JC,pn,Dt,rA],eA,{memoizeOptions:{resultEqualityCheck:Rh}}),k0=e=>e.errorBars,C9=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>XC(r,n)),Uf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,v=h.data!=null?[...h.data]:u,x=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>XC(o,b));v.forEach(b=>{var k,j=Tt(b,(k=r.dataKey)!==null&&k!==void 0?k:h.dataKey),S=S9(b,j,x);if(S.length>=2){var N=Math.min(...S),P=Math.max(...S);(l==null||Nf)&&(f=P)}var O=rS(j);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=rS(Tt(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(l)&&Be(f))return[l,f]},A9=G([b0,cr,x9,k0,Dt,aF],nA,{memoizeOptions:{resultEqualityCheck:Rh}});function O9(e){var t=e.value;if(Dn(t)||t instanceof Date)return t}var _9=(e,t,r)=>{var n=e.map(O9).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&pE(n))?RP(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},iA=e=>e.referenceElements.dots,Qs=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),M9=G([iA,Dt,Dh],Qs),aA=e=>e.referenceElements.areas,I9=G([aA,Dt,Dh],Qs),oA=e=>e.referenceElements.lines,T9=G([oA,Dt,Dh],Qs),sA=(e,t)=>{if(e!=null){var r=Ln(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},D9=G(M9,Dt,sA),lA=(e,t)=>{if(e!=null){var r=Ln(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},R9=G([I9,Dt],lA);function $9(e){var t;if(e.x!=null)return Ln([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Ln(r)}function L9(e){var t;if(e.y!=null)return Ln([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Ln(r)}var uA=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?$9(n):L9(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},z9=G([T9,Dt],uA),F9=G(D9,z9,R9,(e,t,r)=>Uf(e,r,t)),cA=(e,t,r,n,a,o,u,l)=>{if(r!=null)return r;var f=u==="vertical"&&l==="xAxis"||u==="horizontal"&&l==="yAxis",h=f?Uf(n,o,a):Uf(o,a);return dF(t,h,e.allowDataOverflow)},B9=G([cr,tA,rA,P9,A9,F9,ut,Dt],cA,{memoizeOptions:{resultEqualityCheck:Rh}}),U9=[0,1],dA=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var l=e.dataKey,f=e.type,h=zn(t,o);if(h&&l==null){var p;return RP(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?_9(n,e,h):a==="expand"&&!h?U9:u}},j0=G([cr,ut,b0,oc,_h,Dt,B9],dA),Ys=G([cr,BC,Fy],RC),fA=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=w0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Mn(e)){if(o)return dj(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return fj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Mn(e))return dj(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Mn(e))return fj(e,t.tickCount,t.allowDecimals,"adaptive")}}},S0=G([j0,ac,Ys],fA),hA=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Mn(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,l),Math.max(f,h)]}return t},W9=G([cr,j0,S0,Dt],hA),H9=G(oc,cr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Ln(e.map(v=>v.value))).sort((v,x)=>v-x),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var l=0;la,(e,t,r,n,a)=>{if(!Be(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=da(r,e*o),l=e*o/2;return l-u-(l-u)/o*u}return 0}),K9=(e,t,r)=>{var n=vi(e,t);return n==null||typeof n.padding!="string"?0:pA(e,"xAxis",t,r,n.padding)},G9=(e,t,r)=>{var n=gi(e,t);return n==null||typeof n.padding!="string"?0:pA(e,"yAxis",t,r,n.padding)},V9=G(vi,K9,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),q9=G(gi,G9,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),mA=G([Vt,V9,Sh,jh,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),vA=G([Vt,ut,q9,Sh,jh,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),sc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return mA(e,r,n);case"yAxis":return vA(e,r,n);case"zAxis":return(a=x0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return ZP(e);case"radiusAxis":return JP(e,r);default:return}},gA=G([cr,sc],Mh),Q9=G([Ys,W9],AF),N0=G([cr,Ys,Q9,gA],y0),yA=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=zn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(l=>l.value)}},E0=G([ut,oc,ac,Dt],yA),Hh=G([N0],qy);G([N0],l9);G([N0,j9],$C);G([qs,k0,Dt],C9);function xA(e,t){return e.idt.id?1:0}var Kh=(e,t)=>t,Gh=(e,t,r)=>r,Y9=G(wh,Kh,Gh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(xA)),X9=G(kh,Kh,Gh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(xA)),bA=(e,t)=>({width:e.width,height:t.height}),Z9=(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}},J9=G(Vt,vi,bA),eU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},tU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},rU=G(pi,Vt,Y9,Kh,Gh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=bA(t,l);u==null&&(u=eU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[l.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),nU=G(hi,Vt,X9,Kh,Gh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=Z9(t,l);u==null&&(u=tU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[l.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),iU=(e,t)=>{var r=vi(e,t);if(r!=null)return rU(e,r.orientation,r.mirror)},aU=G([Vt,vi,iU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),oU=(e,t)=>{var r=gi(e,t);if(r!=null)return nU(e,r.orientation,r.mirror)},sU=G([Vt,gi,oU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),lU=G(Vt,gi,(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}}),wA=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,l=zn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(u&&l&&o==="category"&&a&&pE(h))return f}},P0=G([ut,oc,cr,Dt],wA),nS=G([ut,g9,Ys,Hh,P0,E0,sc,S0,Dt],(e,t,r,n,a,o,u,l,f)=>{if(t!=null){var h=zn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:l,range:u,realScaleType:r,scale:n}}}),uU=(e,t,r,n,a,o,u,l,f)=>{if(!(t==null||n==null)){var h=zn(e,f),p=t.type,v=t.ticks,x=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=p==="category"&&n.bandwidth?n.bandwidth()/b:0;k=f==="angleAxis"&&o!=null&&o.length>=2?Wr(o[0]-o[1])*2*k:k;var j=v||a;return j?j.map((S,N)=>{var P=u?u.indexOf(S):S,O=n.map(P);return Be(O)?{index:N,coordinate:O+k,value:S,offset:k}:null}).filter(xr):h&&l?l.map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:S,index:N,offset:k}:null}).filter(xr):n.ticks?n.ticks(x).map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:S,index:N,offset:k}:null}).filter(xr):n.domain().map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:u?u[S]:S,index:N,offset:k}:null}).filter(xr)}},kA=G([ut,ac,Ys,Hh,S0,sc,P0,E0,Dt],uU),cU=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=zn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Wr(n[0]-n[1])*2*h:h,l&&o?o.map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:v,offset:h}:null}).filter(xr):r.ticks?r.ticks(f).map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:v,offset:h}:null}).filter(xr):r.domain().map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:a?a[p]:p,index:v,offset:h}:null}).filter(xr)}},jA=G([ut,ac,Hh,sc,P0,E0,Dt],cU),SA=G(cr,Hh,(e,t)=>{if(!(e==null||t==null))return Bf(Bf({},e),{},{scale:t})}),dU=G([cr,Ys,j0,gA],y0),fU=G([dU],qy);G((e,t,r)=>x0(e,r),fU,(e,t)=>{if(!(e==null||t==null))return Bf(Bf({},e),{},{scale:t})});var hU=G([ut,wh,kh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),pU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};G([pU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);ue.options.defaultTooltipEventType,EA=e=>e.options.validateTooltipEventTypes;function PA(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function lc(e,t){var r=NA(e),n=EA(e);return PA(t,r,n)}function mU(e){return Ae(t=>lc(t,e))}var CA=(e,t)=>{var r,n=Number(t);if(!(Tn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},vU=e=>e.tooltip.settings,Qi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},gU={itemInteraction:{click:Qi,hover:Qi},axisInteraction:{click:Qi,hover:Qi},keyboardInteraction:Qi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},AA=rr({name:"tooltip",initialState:gU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:at()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:at()},removeTooltipEntrySettings:{reducer(e,t){var r=Hr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:at()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Xr=AA.actions,yU=Xr.addTooltipEntrySettings,xU=Xr.replaceTooltipEntrySettings,bU=Xr.removeTooltipEntrySettings,wU=Xr.setTooltipSettingsState,kU=Xr.setActiveMouseOverItemIndex;Xr.mouseLeaveItem;var OA=Xr.mouseLeaveChart;Xr.setActiveClickItemIndex;var _A=Xr.setMouseOverAxisIndex,jU=Xr.setMouseClickAxisIndex,lu=Xr.setSyncInteraction,Wf=Xr.setKeyboardInteraction,SU=AA.reducer;function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bd(e){for(var t=1;t{if(t==null)return Qi;var a=CU(e,t,r);if(a==null)return Qi;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(AU(a)){if(o)return Bd(Bd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Bd(Bd({},Qi),{},{coordinate:a.coordinate})};function OU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function _U(e,t){var r=OU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function MU(e,t,r){if(r==null||t==null)return!0;var n=Tt(e,t);return n==null||!Mn(r)?!0:_U(n,r)}var du=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!Be(o))return a;var u=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(u,Math.min(o,l)),h=t[f];return h==null||MU(h,r,n)?String(f):null},IA=(e,t,r,n,a,o,u)=>{if(o!=null){var l=u[0],f=l==null?void 0:l.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},TA=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var l;return((l=u.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},DA=e=>e.options.tooltipPayloadSearcher,Xs=e=>e.tooltip;function aS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oS(e){for(var t=1;te(t)}function sS(e){if(typeof e=="string")return e}function zU(e){if(!(e==null||typeof e!="object")){var t="name"in e?RU(e.name):void 0,r="unit"in e?$U(e.unit):void 0,n="dataKey"in e?LU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?sS(e.color):void 0,u="fill"in e?sS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function FU(e,t){return e??t}var RA=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,v=[];return e.reduce((x,b)=>{var k,j=b.dataDefinedOnItem,S=b.settings,N=FU(j,l),P=Array.isArray(N)?sP(N,h,p):N,O=(k=S==null?void 0:S.dataKey)!==null&&k!==void 0?k:n,C=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(P)&&!Array.isArray(P[0])&&u==="axis"?_=mE(P,n,a):_=o(P,t,f,C),Array.isArray(_))_.forEach(I=>{var $,B,K=zU(I),q=K==null?void 0:K.name,R=K==null?void 0:K.dataKey,de=K==null?void 0:K.payload,Z=oS(oS({},S),{},{name:q,unit:K==null?void 0:K.unit,color:($=K==null?void 0:K.color)!==null&&$!==void 0?$:S==null?void 0:S.color,fill:(B=K==null?void 0:K.fill)!==null&&B!==void 0?B:S==null?void 0:S.fill});x.push(tk({tooltipEntrySettings:Z,dataKey:R,payload:de,value:Tt(de,R),name:q==null?void 0:String(q)}))});else{var A;x.push(tk({tooltipEntrySettings:S,dataKey:O,payload:_,value:Tt(_,O),name:(A=Tt(_,C))!==null&&A!==void 0?A:S==null?void 0:S.name}))}return x},v)}},C0=G([Ct,BC,Fy],RC),BU=G([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),UU=G([Rt,Gs],UC),bo=G([BU,Ct,UU],HC,{memoizeOptions:{resultEqualityCheck:$h}}),WU=G([bo],e=>e.filter(Vy)),$A=G([bo],VC,{memoizeOptions:{resultEqualityCheck:$h}}),HU=G([bo],e=>e.some(t=>!t.data)),fo=G([$A,pn],QC),KU=G([WU,pn,Ct],tC),A0=G([fo,Ct,bo,pn,HU,$A],YC),LA=G([Ct],w0),GU=G([Ct],e=>e.allowDataOverflow),zA=G([LA,GU],$P),VU=G([bo],e=>e.filter(Vy)),qU=G([KU,VU,_h,qP],ZC),QU=G([qU,pn,Rt,zA],eA),YU=G([bo],GC),XU=G([fo,Ct,YU,k0,Rt,oF],nA,{memoizeOptions:{resultEqualityCheck:Rh}}),ZU=G([iA,Rt,Gs],Qs),JU=G([ZU,Rt],sA),e7=G([aA,Rt,Gs],Qs),t7=G([e7,Rt],lA),r7=G([oA,Rt,Gs],Qs),n7=G([r7,Rt],uA),i7=G([JU,n7,t7],Uf),a7=G([Ct,LA,zA,QU,XU,i7,ut,Rt],cA),Ls=G([Ct,ut,fo,A0,_h,Rt,a7],dA),o7=G([Ls,Ct,C0],fA),s7=G([Ct,Ls,o7,Rt],hA),FA=e=>{var t=Rt(e),r=Gs(e),n=!1;return sc(e,t,r,n)},BA=G([Ct,FA],Mh),l7=G([Ct,C0,s7,BA],y0),UA=G([l7],qy),u7=G([ut,A0,Ct,Rt],wA),c7=G([ut,A0,Ct,Rt],yA),d7=(e,t,r,n,a,o,u,l)=>{if(t){var f=t.type,h=zn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,v=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return v=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Wr(a[0]-a[1])*2*v:v,h&&u?u.map((x,b)=>{var k=n.map(x);return Be(k)?{coordinate:k+v,value:x,index:b,offset:v}:null}).filter(xr):n.domain().map((x,b)=>{var k=n.map(x);return Be(k)?{coordinate:k+v,value:o?o[x]:x,index:b,offset:v}:null}).filter(xr)}}},yi=G([ut,Ct,C0,UA,FA,u7,c7,Rt],d7),O0=G([NA,EA,vU],(e,t,r)=>PA(r.shared,e,t)),WA=e=>e.tooltip.settings.trigger,_0=e=>e.tooltip.settings.defaultIndex,uc=G([Xs,O0,WA,_0],MA),Lu=G([uc,fo,$s,Ls],du),HA=G([yi,Lu],CA),f7=G([uc],e=>{if(e)return e.dataKey}),h7=G([uc],e=>{if(e)return e.graphicalItemId}),KA=G([Xs,O0,WA,_0],TA),p7=G([hi,pi,ut,Vt,yi,_0,KA],IA),m7=G([uc,p7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),v7=G([uc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),g7=G([KA,Lu,pn,$s,HA,DA,O0],RA),y7=G([g7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function lS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uS(e){for(var t=1;tAe(Ct),j7=()=>{var e=k7(),t=Ae(yi),r=Ae(UA);return xf(!e||!r?void 0:uS(uS({},e),{},{scale:r}),t)};function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},C7=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var l=a.coordinate,f=n.angle;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function A7(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var GA=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,k=(p=r[l])===null||p===void 0?void 0:p.coordinate,j=l>=u-1?(v=r[0])===null||v===void 0?void 0:v.coordinate:(x=r[l+1])===null||x===void 0?void 0:x.coordinate,S=void 0;if(!(b==null||k==null||j==null))if(Wr(k-b)!==Wr(j-k)){var N=[];if(Wr(j-k)===Wr(a[1]-a[0])){S=j;var P=k+a[1]-a[0];N[0]=Math.min(P,(P+b)/2),N[1]=Math.max(P,(P+b)/2)}else{S=b;var O=j+a[1]-a[0];N[0]=Math.min(k,(O+k)/2),N[1]=Math.max(k,(O+k)/2)}var C=[Math.min(k,(S+k)/2),Math.max(k,(S+k)/2)];if(e>C[0]&&e<=C[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[l])===null||_===void 0?void 0:_.index}}else{var A=Math.min(b,j),I=Math.max(b,j);if(e>(A+k)/2&&e<=(I+k)/2){var $;return($=r[l])===null||$===void 0?void 0:$.index}}}else if(t)for(var B=0;B(K.coordinate+R.coordinate)/2||B>0&&B(K.coordinate+R.coordinate)/2&&e<=(K.coordinate+q.coordinate)/2)return K.index}}return-1},VA=()=>Ae(Fy),M0=(e,t)=>t,qA=(e,t,r)=>r,I0=(e,t,r,n)=>n,O7=G(yi,e=>ch(e,t=>t.coordinate)),T0=G([Xs,M0,qA,I0],MA),D0=G([T0,fo,$s,Ls],du),_7=(e,t,r)=>{if(t!=null){var n=Xs(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},QA=G([Xs,M0,qA,I0],TA),Hf=G([hi,pi,ut,Vt,yi,I0,QA],IA),M7=G([T0,Hf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),YA=G([yi,D0],CA),I7=G([QA,D0,pn,$s,YA,DA,M0],RA),T7=G([T0,D0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),D7=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&A7(e,u)){var l=q$(e,t),f=GA(l,o,a,r,n),h=P7(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},R7=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var l=X6(e,r);if(l){var f=Q$(l,t),h=GA(f,u,o,n,a),p=C7(t,o,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},$7=(e,t,r,n,a,o,u,l)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?D7(e,t,n,a,o,u,l):R7(e,t,r,n,a,o,u)},L7=G(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),z7=G(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(or)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:CF}});function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fS(e){for(var t=1;tfS(fS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),W7)},K7=new Set(Object.values(or));function G7(e){return K7.has(e)}var XA=rr({name:"zIndex",initialState:H7,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:at()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!G7(r)&&delete e.zIndexMap[r])},prepare:at()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:at()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:at()}}}),Vh=XA.actions,V7=Vh.registerZIndexPortal,wv=Vh.unregisterZIndexPortal,q7=Vh.registerZIndexPortalElement,Q7=Vh.unregisterZIndexPortalElement,Y7=XA.reducer;function xi(e){var t=e.zIndex,r=e.children,n=IL(),a=n&&t!==void 0&&t!==0,o=wr(),u=y.useRef(void 0),l=y.useRef(new Set),f=kt(),h=Ae(v=>L7(v,t,o));if(y.useLayoutEffect(()=>{if(!a){var v=l.current;v.forEach(b=>{f(wv({zIndex:b}))}),v.clear(),u.current=void 0;return}if(l.current.has(t)||(f(V7({zIndex:t})),l.current.add(t)),h){u.current=h;var x=l.current;x.forEach(b=>{b!==t&&(f(wv({zIndex:b})),x.delete(b))})}},[f,t,a,h]),y.useLayoutEffect(()=>{var v=l.current;return()=>{v.forEach(x=>{f(wv({zIndex:x}))}),v.clear()}},[f]),!a)return r;var p=h??u.current;return p?th.createPortal(r,p):null}function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.useContext(ZA),kv={exports:{}},pS;function iW(){return pS||(pS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,v,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,v||f,x),k=r?r+h:h;return f._events[k]?f._events[k].fn?f._events[k]=[f._events[k],b]:f._events[k].push(b):(f._events[k]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,v;if(this._eventsCount===0)return h;for(v in p=this._events)t.call(p,v)&&h.push(r?v.slice(1):v);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,v=this._events[p];if(!v)return[];if(v.fn)return[v.fn];for(var x=0,b=v.length,k=new Array(b);x{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Tn(r))return e[r]}},lW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},JA=rr({name:"options",initialState:lW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),uW=JA.reducer,cW=JA.actions.createEventEmitter;function dW(e){return e.tooltip.syncInteraction}var fW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},eO=rr({name:"chartData",initialState:fW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),R0=eO.actions,vS=R0.setChartData,hW=R0.setDataStartEndIndexes;R0.setComputedData;var pW=eO.reducer,mW=["x","y"];function gS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;tf.rootProps.className);y.useEffect(()=>{if(e==null)return Us;var f=(h,p,v)=>{if(t!==v&&e===h){if(p.payload.active===!1){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var x;if(u&&p!==null&&p!==void 0&&(x=p.payload)!==null&&x!==void 0&&x.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,k=b.x,j=b.y,S=xW(b,mW),N=p.payload.sourceViewBox,P=N.x,O=N.y,C=N.width,_=N.height,A=es(es({},S),{},{x:u.x+(C?(k-P)/C:0)*u.width,y:u.y+(_?(j-O)/_:0)*u.height});r(es(es({},p),{},{payload:es(es({},p.payload),{},{coordinate:A})}))}else r(p);return}if(a!=null){var I;if(typeof n=="function"){var $={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},B=n(a,$);I=a[B]}else n==="value"&&(I=a.find(me=>String(me.value)===p.payload.label));var K=p.payload.coordinate;if(K==null||u==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var q=K.x,R=K.y,de=Math.min(q,u.x+u.width),Z=Math.min(R,u.y+u.height),ge={x:o==="horizontal"?I.coordinate:de,y:o==="horizontal"?Z:I.coordinate},ke=lu({active:p.payload.active,coordinate:ge,dataKey:p.payload.dataKey,index:String(I.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(ke)}}};return zu.on(Hg,f),()=>{zu.off(Hg,f)}},[l,r,t,e,n,a,o,u])}function kW(){var e=Ae(By),t=Ae(Uy),r=kt();y.useEffect(()=>{if(e==null)return Us;var n=(a,o,u)=>{t!==u&&e===a&&r(hW(o))};return zu.on(mS,n),()=>{zu.off(mS,n)}},[r,t,e])}function jW(){var e=kt();y.useEffect(()=>{e(cW())},[e]),wW(),kW()}function SW(e,t,r,n,a,o){var u=Ae(k=>_7(k,e,t)),l=Ae(h7),f=Ae(Uy),h=Ae(By),p=Ae(QP),v=Ae(dW),x=(v==null?void 0:v.sourceViewBox)!=null,b=Nh();y.useEffect(()=>{if(!x&&h!=null&&f!=null){var k=lu({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});zu.emit(Hg,h,k,f)}},[x,r,u,l,a,n,f,h,p,o,b])}function yS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{I(wU({shared:P,trigger:O,axisId:A,active:a,defaultIndex:$}))},[I,P,O,A,a,$]);var B=Nh(),K=CP(),q=mU(P),R=(t=Ae(_e=>T7(_e,q,O,$)))!==null&&t!==void 0?t:{},de=R.activeIndex,Z=R.isActive,ge=Ae(_e=>I7(_e,q,O,$)),ke=Ae(_e=>YA(_e,q,O,$)),me=Ae(_e=>M7(_e,q,O,$)),Q=ge,oe=nW(),X=(r=a??Z)!==null&&r!==void 0?r:!1,L=TR([Q,X]),T=CW(L,2),ee=T[0],ne=T[1],te=q==="axis"?ke:void 0;SW(q,O,me,te,de,X);var ue=_??oe;if(ue==null||B==null||q==null)return null;var pe=Q??wS;X||(pe=wS),h&&pe.length&&(pe=nR(pe.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),x,IW));var Oe=pe.length>0,J=xS(xS({},n),{},{payload:pe,label:te,active:X,activeIndex:de,coordinate:me,accessibilityLayer:K}),je=y.createElement(Kz,{allowEscapeViewBox:o,animationDuration:u,animationEasing:l,isAnimationActive:p,active:X,coordinate:me,hasPayload:Oe,offset:v,position:b,reverseDirection:k,useTranslate3d:j,viewBox:B,wrapperStyle:S,lastBoundingBox:ee,innerRef:ne,hasPortalFromProps:!!_},TW(f,J));return y.createElement(y.Fragment,null,th.createPortal(je,ue),X&&y.createElement(rW,{cursor:N,tooltipEventType:q,coordinate:me,payload:pe,index:de}))}function $W(e,t,r){return(t=LW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LW(e){var t=zW(e,"string");return typeof t=="symbol"?t:t+""}function zW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class FW{constructor(t){$W(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function kS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function BW(e){for(var t=1;t{try{var r=document.getElementById(SS);r||(r=document.createElement("span"),r.setAttribute("id",SS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,GW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},fu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ec.isSsr)return{width:0,height:0};if(!tO.enableCache)return NS(t,r);var n=VW(t,r),a=jS.get(n);if(a)return a;var o=NS(t,r);return jS.set(n,o),o},rO;function Kf(e,t){return XW(e)||YW(e,t)||QW(e,t)||qW()}function qW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QW(e,t){if(e){if(typeof e=="string")return ES(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ES(e,t):void 0}}function ES(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Kt(t)||(r?a=t.toString().split(""):a=t.toString().split(iO));var o=a.map(l=>({word:l,width:fu(l,n).width})),u=r?0:fu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function oO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function gH(e){return Kt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var sO=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,l=o.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+re.reduce((t,r)=>t.width>r.width?t:r),yH="…",IS=(e,t,r,n,a,o,u,l)=>{var f=e.slice(0,t),h=aO({breakAll:r,style:n,children:f+yH});if(!h)return[!1,[]];var p=sO(h.wordsWithComputedWidth,o,u,l),v=p.length>a||lO(p).width>Number(o);return[v,p]},xH=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,l=e.style,f=e.breakAll,h=Ne(o),p=String(u),v=sO(t,n,r,a);if(!h||a)return v;var x=v.length>o||lO(v).width>Number(n);if(!x)return v;for(var b=0,k=p.length-1,j=0,S;b<=k&&j<=p.length-1;){var N=Math.floor((b+k)/2),P=N-1,O=IS(p,P,f,l,o,n,r,a),C=_S(O,2),_=C[0],A=C[1],I=IS(p,N,f,l,o,n,r,a),$=_S(I,1),B=$[0];if(!_&&!B&&(b=N+1),_&&B&&(k=N-1),!_&&B){S=A;break}j++}return S||v},TS=e=>{var t=Kt(e)?[]:e.toString().split(iO);return[{words:t,width:void 0}]},bH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!ec.isSsr){var l,f,h=aO({breakAll:o,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,v=h.spaceWidth;l=p,f=v}else return TS(n);return xH({breakAll:o,children:n,maxLines:u,style:a},l,f,t,!!r)}return TS(n)},uO="#808080",wH={angle:0,breakAll:!1,capHeight:"0.71em",fill:uO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},$0=y.forwardRef((e,t)=>{var r=Qr(e,wH),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,v=OS(r,cH),x=y.useMemo(()=>bH({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:f,style:v.style,width:v.width}),[v.breakAll,v.children,v.maxLines,f,v.style,v.width]),b=v.dx,k=v.dy,j=v.angle,S=v.className,N=v.breakAll,P=OS(v,dH);if(!Dn(n)||!Dn(a)||x.length===0)return null;var O=Number(n)+(Ne(b)?b:0),C=Number(a)+(Ne(k)?k:0);if(!Be(O)||!Be(C))return null;var _;switch(p){case"start":_=jv("calc(".concat(u,")"));break;case"middle":_=jv("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=jv("calc(".concat(x.length-1," * -").concat(o,")"));break}var A=[],I=x[0];if(f&&I!=null){var $=I.width,B=v.width;A.push("scale(".concat(Ne(B)&&Ne($)?B/$:1,")"))}return j&&A.push("rotate(".concat(j,", ").concat(O,", ").concat(C,")")),A.length&&(P.transform=A.join(" ")),y.createElement("text",Kg({},Gr(P),{ref:t,x:O,y:C,className:et("recharts-text",S),textAnchor:h,fill:l.includes("url")?uO:l}),x.map((K,q)=>{var R=K.words.join(N?"":" ");return y.createElement("tspan",{x:O,dy:q===0?_:o,key:"".concat(R,"-").concat(q)},R)}))});$0.displayName="Text";function DS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=_y(t),l=u.x,f=u.y,h=u.height,p=u.upperWidth,v=u.lowerWidth,x=l,b=l+(p-v)/2,k=(x+b)/2,j=(p+v)/2,S=x+p/2,N=h>=0?1:-1,P=N*a,O=N>0?"end":"start",C=N>0?"start":"end",_=p>=0?1:-1,A=_*a,I=_>0?"end":"start",$=_>0?"start":"end",B=o;if(r==="top"){var K={x:x+p/2,y:f-P,horizontalAnchor:"middle",verticalAnchor:O};return B&&(K.height=Math.max(f-B.y,0),K.width=p),K}if(r==="bottom"){var q={x:b+v/2,y:f+h+P,horizontalAnchor:"middle",verticalAnchor:C};return B&&(q.height=Math.max(B.y+B.height-(f+h),0),q.width=v),q}if(r==="left"){var R={x:k-A,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return B&&(R.width=Math.max(R.x-B.x,0),R.height=h),R}if(r==="right"){var de={x:k+j+A,y:f+h/2,horizontalAnchor:$,verticalAnchor:"middle"};return B&&(de.width=Math.max(B.x+B.width-de.x,0),de.height=h),de}var Z=B?{width:j,height:h}:{};return r==="insideLeft"?jn({x:k+A,y:f+h/2,horizontalAnchor:$,verticalAnchor:"middle"},Z):r==="insideRight"?jn({x:k+j-A,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},Z):r==="insideTop"?jn({x:x+p/2,y:f+P,horizontalAnchor:"middle",verticalAnchor:C},Z):r==="insideBottom"?jn({x:b+v/2,y:f+h-P,horizontalAnchor:"middle",verticalAnchor:O},Z):r==="insideTopLeft"?jn({x:x+A,y:f+P,horizontalAnchor:$,verticalAnchor:C},Z):r==="insideTopRight"?jn({x:x+p-A,y:f+P,horizontalAnchor:I,verticalAnchor:C},Z):r==="insideBottomLeft"?jn({x:b+A,y:f+h-P,horizontalAnchor:$,verticalAnchor:O},Z):r==="insideBottomRight"?jn({x:b+v-A,y:f+h-P,horizontalAnchor:I,verticalAnchor:O},Z):r&&typeof r=="object"&&(Ne(r.x)||oo(r.x))&&(Ne(r.y)||oo(r.y))?jn({x:l+da(r.x,j),y:f+da(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},Z):jn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},Z)},EH=["labelRef"],PH=["content"];function RS(e,t){if(e==null)return{};var r,n,a=CH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,l=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return y.createElement(cO.Provider,{value:f},l)},dO=()=>{var e=y.useContext(cO),t=Nh();return e||(t?_y(t):void 0)},IH=y.createContext(null),TH=()=>{var e=y.useContext(IH),t=Ae(eC);return e||t},DH=e=>{var t=e.value,r=e.formatter,n=Kt(e.children)?t:e.children;return typeof r=="function"?r(n):n},L0=e=>e!=null&&typeof e=="function",RH=(e,t)=>{var r=Wr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},$H=(e,t,r,n,a)=>{var o=e.offset,u=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,v=a.startAngle,x=a.endAngle,b=a.clockWise,k=(h+p)/2,j=RH(v,x),S=j>=0?1:-1,N,P;switch(t){case"insideStart":N=v+S*o,P=b;break;case"insideEnd":N=x-S*o,P=!b;break;case"end":N=x+S*o,P=b;break;default:throw new Error("Unsupported position ".concat(t))}P=j<=0?P:!P;var O=Ht(l,f,k,N),C=Ht(l,f,k,N+(P?1:-1)*359),_="M".concat(O.x,",").concat(O.y,` - A`).concat(k,",").concat(k,",0,1,").concat(P?0:1,`, - `).concat(C.x,",").concat(C.y),A=Kt(e.id)?Nu("recharts-radial-line-"):e.id;return y.createElement("text",ri({},n,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:A,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(A)},r))},LH=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Ht(n,a,u+t,h),v=p.x,x=p.y;return{x:v,y:x,textAnchor:v>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,k=Ht(n,a,b,h),j=k.x,S=k.y;return{x:j,y:S,textAnchor:"middle",verticalAnchor:"middle"}},ef=e=>e!=null&&"cx"in e&&Ne(e.cx),zH={angle:0,offset:5,zIndex:or.label,position:"middle",textBreakAll:!1};function FH(e){if(!ef(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function qi(e){var t=Qr(e,zH),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,v=t.labelRef,x=TH(),b=dO(),k=a==="center"?b:x??b,j,S,N;r==null?j=k:ef(r)?j=r:j=_y(r);var P=FH(j);if(!j||Kt(o)&&Kt(u)&&!y.isValidElement(l)&&typeof l!="function")return null;var O=uu(uu({},t),{},{viewBox:j});if(y.isValidElement(l)){O.labelRef;var C=RS(O,EH);return y.cloneElement(l,C)}if(typeof l=="function"){O.content;var _=RS(O,PH);if(S=y.createElement(l,_),y.isValidElement(S))return S}else S=DH(t);var A=Gr(t);if(ef(j)){if(a==="insideStart"||a==="insideEnd"||a==="end")return $H(t,a,S,A,j);N=LH(j,t.offset,t.position)}else{if(!P)return null;var I=NH({viewBox:P,position:a,offset:t.offset,parentViewBox:ef(n)?void 0:n});N=uu(uu({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return y.createElement(xi,{zIndex:t.zIndex},y.createElement($0,ri({ref:v,className:et("recharts-label",h)},A,N,{textAnchor:oO(A.textAnchor)?A.textAnchor:N.textAnchor,breakAll:p}),S))}qi.displayName="Label";var BH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(qi,ri({key:"label-implicit"},n)):Dn(e)?y.createElement(qi,ri({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===qi?y.cloneElement(e,uu({key:"label-implicit"},n)):y.createElement(qi,ri({key:"label-implicit",content:e},n)):L0(e)?y.createElement(qi,ri({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(qi,ri({},e,{key:"label-implicit"},n)):null};function UH(e){var t=e.label,r=e.labelRef,n=dO();return BH(t,n,r)||null}var WH=["valueAccessor"],HH=["dataKey","clockWise","id","textBreakAll","zIndex"];function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(gH(t))return t},fO=y.createContext(void 0),VH=fO.Provider,hO=y.createContext(void 0);hO.Provider;function qH(){return y.useContext(fO)}function QH(){return y.useContext(hO)}function tf(e){var t=e.valueAccessor,r=t===void 0?GH:t,n=LS(e,WH),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,l=n.zIndex,f=LS(n,HH),h=qH(),p=QH(),v=h||p;return!v||!v.length?null:y.createElement(xi,{zIndex:l??or.label},y.createElement(Vr,{className:"recharts-label-list"},v.map((x,b)=>{var k,j=Kt(a)?r(x,b):Tt(x.payload,a),S=Kt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(qi,Gf({key:"label-".concat(b)},Gr(x),f,S,{fill:(k=n.fill)!==null&&k!==void 0?k:x.fill,parentViewBox:x.parentViewBox,value:j,textBreakAll:u,viewBox:x.viewBox,index:b,zIndex:0}))})))}tf.displayName="LabelList";function YH(e){var t=e.label;return t?t===!0?y.createElement(tf,{key:"labelList-implicit"}):y.isValidElement(t)||L0(t)?y.createElement(tf,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(tf,Gf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=et("recharts-dot",a);return Ne(t)&&Ne(r)&&Ne(n)?y.createElement("circle",Gg({},dn(e),wy(e),{className:o,cx:t,cy:r,r:n})):null},XH={radiusAxis:{},angleAxis:{}},mO=rr({name:"polarAxis",initialState:XH,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),qh=mO.actions;qh.addRadiusAxis;qh.removeRadiusAxis;qh.addAngleAxis;qh.removeAngleAxis;var ZH=mO.reducer;function JH(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var vO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function zS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function FS(e){for(var t=1;t{n||(a.current===null?r(yU(t)):a.current!==t&&r(xU({prev:a.current,next:t})),a.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{a.current&&(r(bU(a.current)),a.current=null)},[r]),null}function uK(e){var t=e.legendPayload,r=kt(),n=wr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(GL(t)):a.current!==t&&r(VL({prev:a.current,next:t})),a.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{a.current&&(r(qL(a.current)),a.current=null)},[r]),null}function cK(e,t){return pK(e)||hK(e,t)||fK(e,t)||dK()}function dK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fK(e,t){if(e){if(typeof e=="string")return BS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?BS(e,t):void 0}}function BS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;oe[Math.floor(o*r)]);return F0(n,t)}function gK(e,t){var r=t.map((n,a)=>e[a]);return F0(r,t)}function yK(e,t){for(var r=new Map,n=0;n{var b=r(v,x);if(b!=null){var k=n.get(b);if(k!==void 0)return a.add(b),k}}),u=[];for(var l of n){var f=cK(l,2),h=f[0],p=f[1];a.has(h)||u.push(p)}return F0(o,t,u)}function Vg(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===z0?vK(e,t):r===mK?gK(e,t):xK(e,t,r)}function yO(e,t){var r=y.useRef(e),n=y.useRef(t.current),a=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=y.useCallback(function(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=u),l>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function bK(e,t){return SK(e)||jK(e,t)||kK(e,t)||wK()}function wK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(e,t){if(e){if(typeof e=="string")return US(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?US(e,t):void 0}}function US(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),l=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:l}}function EK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,v=e.onAnimationEnd,x=e.animationInterpolateFn,b=e.animationMatchBy,k=e.shouldUpdatePreviousRef,j=e.children,S=e.layout,N=IP(r,n),P=yO(N,o),O=(t=P.startValue)!==null&&t!==void 0?t:null,C=Vg(O,a,b??z0);return y.createElement(MP,{animationId:N,begin:l,duration:f,isActive:u,easing:h,onAnimationEnd:v,onAnimationStart:p,key:N},_=>{var A=O==null,I=a==null?a:x(C,_,S),$=k?k(_):_>0;return P.syncStepValue(I,_,$),I==null?null:j(I,_,A)})}var Sv;function PK(e,t){return _K(e)||OK(e,t)||AK(e,t)||CK()}function CK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AK(e,t){if(e){if(typeof e=="string")return WS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WS(e,t):void 0}}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=y.useState(()=>Nu("uid-")),t=PK(e,1),r=t[0];return r},xO=(Sv=eh.useId)!==null&&Sv!==void 0?Sv:MK;function IK(e,t){var r=xO();return t||(e?"".concat(e,"-").concat(r):r)}var TK=y.createContext(void 0),DK=e=>{var t=e.id,r=e.type,n=e.children,a=IK("recharts-".concat(r),t);return y.createElement(TK.Provider,{value:a},n(a))},RK={cartesianItems:[],polarItems:[]},bO=rr({name:"graphicalItems",initialState:RK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:at()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:at()},removeCartesianGraphicalItem:{reducer(e,t){var r=Hr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:at()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:at()},removePolarGraphicalItem:{reducer(e,t){var r=Hr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:at()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:at()}}}),Zs=bO.actions,$K=Zs.addCartesianGraphicalItem,LK=Zs.replaceCartesianGraphicalItem,zK=Zs.removeCartesianGraphicalItem;Zs.addPolarGraphicalItem;Zs.removePolarGraphicalItem;Zs.replacePolarGraphicalItem;var FK=bO.reducer,BK=e=>{var t=kt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t($K(e)):r.current!==e&&t(LK({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(zK(r.current)),r.current=null)},[t]),null},UK=y.memo(BK),WK=["points"];function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nv(e){for(var t=1;t{var N,P,O=Nv(Nv(Nv({r:3},u),x),{},{index:S,cx:(N=j.x)!==null&&N!==void 0?N:void 0,cy:(P=j.y)!==null&&P!==void 0?P:void 0,dataKey:o,value:j.value,payload:j.payload,points:t});return y.createElement(QK,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),k={};return l&&f!=null&&(k.clipPath="url(#clipPath-".concat(v?"":"dots-").concat(f,")")),y.createElement(xi,{zIndex:p},y.createElement(Vr,Vf({className:n},k),b))}function KS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function GS(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),dG=G([cG,hi,pi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),B0=()=>Ae(dG),fG=()=>Ae(y7);function VS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ev(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var l={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Ev(Ev(Ev({},l),sh(a)),wy(a)),h;return y.isValidElement(a)?h=y.cloneElement(a,f):typeof a=="function"?h=a(f):h=y.createElement(pO,f),y.createElement(Vr,{className:"recharts-active-dot",clipPath:u},h)};function qS(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,l=u===void 0?or.activeDot:u,f=Ae(Lu),h=fG();if(t==null||h==null)return null;var p=t.find(v=>h.includes(v.payload));return Kt(p)?null:y.createElement(xi,{zIndex:l},y.createElement(vG,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var gG=e=>{var t=e.chartData,r=kt(),n=wr();return y.useEffect(()=>n?()=>{}:(r(vS(t)),()=>{r(vS(void 0))}),[t,r,n]),null},QS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},jO=rr({name:"brush",initialState:QS,reducers:{setBrushSettings(e,t){return t.payload==null?QS:t.payload}}});jO.actions.setBrushSettings;var yG=jO.reducer;function xG(e){return(e%180+180)%180}var bG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=xG(a),u=o*Math.PI/180,l=Math.atan(n/r),f=u>l&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Hr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Hr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Hr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),Js=SO.actions;Js.addDot;Js.removeDot;Js.addArea;Js.removeArea;Js.addLine;Js.removeLine;var kG=SO.reducer;function jG(e,t){return PG(e)||EG(e,t)||NG(e,t)||SG()}function SG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NG(e,t){if(e){if(typeof e=="string")return YS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?YS(e,t):void 0}}function YS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=y.useState("".concat(Nu("recharts"),"-clip")),n=jG(r,1),a=n[0],o=B0();if(o==null)return null;var u=o.x,l=o.y,f=o.width,h=o.height;return y.createElement(CG.Provider,{value:a},y.createElement("defs",null,y.createElement("clipPath",{id:a},y.createElement("rect",{x:u,y:l,height:h,width:f}))),t)};function NO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function MG(e,t){return NO(e,t+1)}function IG(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,l=t.end,f=0,h=1,p=u,v=function(){var k=n==null?void 0:n[f];if(k===void 0)return{v:NO(n,h)};var j=f,S,N=()=>(S===void 0&&(S=r(k,j)),S),P=k.coordinate,O=f===0||Fu(e,P,N,p,l);O||(f=0,p=u,h+=1),O&&(p=P+e*(N()/2+a),f+=h)},x;h<=o.length;)if(x=v(),x)return x.v;return[]}function TG(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var l=t.start,f=t.end,h=1;h<=u;h++){for(var p=(u-1)%h,v=l,x=!0,b=function(){var C=n[j];if(C==null)return 0;var _=j,A,I=()=>(A===void 0&&(A=r(C,_)),A),$=C.coordinate,B=j===p||Fu(e,$,I,v,f);if(!B)return x=!1,1;B&&(v=$+e*(I()/2+a))},k,j=p;j(j===void 0&&(j=r(b,x)),j);if(x===u-1){var N=e*(k.coordinate+e*S()/2-f);o[x]=k=er(er({},k),{},{tickCoord:N>0?k.coordinate-N*e:k.coordinate})}else o[x]=k=er(er({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var P=Fu(e,k.tickCoord,S,l,f);P&&(f=k.tickCoord-e*(S()/2+a),o[x]=er(er({},k),{},{isShow:!0}))}},p=u-1;p>=0;p--)h(p);return o}function zG(e,t,r,n,a,o){var u=(n||[]).slice(),l=u.length,f=t.start,h=t.end;if(o){var p=n[l-1];if(p!=null){var v=r(p,l-1),x=e*(p.coordinate+e*v/2-h);if(u[l-1]=p=er(er({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate}),p.tickCoord!=null){var b=Fu(e,p.tickCoord,()=>v,f,h);b&&(h=p.tickCoord-e*(v/2+a),u[l-1]=er(er({},p),{},{isShow:!0}))}}}for(var k=o?l-1:l,j=function(P){var O=u[P];if(O==null)return 1;var C=O,_,A=()=>(_===void 0&&(_=r(O,P)),_);if(P===0){var I=e*(C.coordinate-e*A()/2-f);u[P]=C=er(er({},C),{},{tickCoord:I<0?C.coordinate-I*e:C.coordinate})}else u[P]=C=er(er({},C),{},{tickCoord:C.coordinate});if(C.tickCoord!=null){var $=Fu(e,C.tickCoord,A,f,h);$&&(f=C.tickCoord+e*(A()/2+a),u[P]=er(er({},C),{},{isShow:!0}))}},S=0;S{var I=typeof h=="function"?h(_.value,A):_.value;return k==="width"?OG(fu(I,{fontSize:t,letterSpacing:r}),j,v):fu(I,{fontSize:t,letterSpacing:r})[k]},N=a[0],P=a[1],O=a.length>=2&&N!=null&&P!=null?Wr(P.coordinate-N.coordinate):1,C=_G(o,O,k);return f==="equidistantPreserveStart"?IG(O,C,S,a,u):f==="equidistantPreserveEnd"?TG(O,C,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=zG(O,C,S,a,u,f==="preserveStartEnd"):b=LG(O,C,S,a,u),b.filter(_=>_.isShow))}var FG=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var k=b.getBoundingClientRect();k.width>h&&(h=k.width)}});var p=r?r.getBoundingClientRect().width:0,v=u+f,x=h+v+p+(r?a:0);return Math.round(x)}return 0},BG={xAxis:{},yAxis:{}},EO=rr({name:"renderedTicks",initialState:BG,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),PO=EO.actions,UG=PO.setRenderedTicks,WG=PO.removeRenderedTicks,HG=EO.reducer,KG=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function ZS(e,t){return QG(e)||qG(e,t)||VG(e,t)||GG()}function GG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VG(e,t){if(e){if(typeof e=="string")return JS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JS(e,t):void 0}}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Us;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(UG({ticks:o,axisId:n,axisType:r})),()=>{a(WG({axisId:n,axisType:r}))}},[a,t,n,r]),null}var sV=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,v=e.orientation,x=e.mirror,b=e.x,k=e.y,j=e.width,S=e.height,N=e.tickSize,P=e.tickMargin,O=e.fontSize,C=e.letterSpacing,_=e.getTicksConfig,A=e.events,I=e.axisType,$=e.axisId,B=U0(mt(mt({},_),{},{ticks:n}),O,C),K=dn(_),q=sh(a),R=oO(K.textAnchor)?K.textAnchor:nV(v,x),de=iV(v,x),Z={};typeof o=="object"&&(Z=o);var ge=mt(mt({},K),{},{fill:"none"},Z),ke=B.map(oe=>mt({entry:oe},rV(oe,b,k,j,S,v,N,x,P))),me=ke.map(oe=>{var X=oe.entry,L=oe.line;return y.createElement(Vr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},o&&y.createElement("line",ho({},ge,L,{className:et("recharts-cartesian-axis-tick-line",go(o,"className"))})))}),Q=ke.map((oe,X)=>{var L,T,ee=oe.entry,ne=oe.tick,te=mt(mt(mt(mt({verticalAnchor:de},K),{},{textAnchor:R,stroke:"none",fill:u},ne),{},{index:X,payload:ee,visibleTicksCount:B.length,tickFormatter:l,padding:h},p),{},{angle:(L=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:K.angle)!==null&&L!==void 0?L:0}),ue=mt(mt({},te),q);return y.createElement(Vr,ho({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(ee.value,"-").concat(ee.coordinate,"-").concat(ee.tickCoord)},dD(A,ee,X)),a&&y.createElement(aV,{option:a,tickProps:ue,value:"".concat(typeof l=="function"?l(ee.value,X):ee.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},y.createElement(oV,{ticks:B,axisId:$,axisType:I}),Q.length>0&&y.createElement(xi,{zIndex:or.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Q)),me.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},me))}),lV=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=YG(e,KG),v=y.useState(""),x=ZS(v,2),b=x[0],k=x[1],j=y.useState(""),S=ZS(j,2),N=S[0],P=S[1],O=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return FG({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var C=y.useCallback(_=>{if(_){var A=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=A;var I=A[0];if(I){var $=window.getComputedStyle(I),B=$.fontSize,K=$.letterSpacing;(B!==b||K!==N)&&(k(B),P(K))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:y.createElement(xi,{zIndex:e.zIndex},y.createElement(Vr,{className:et("recharts-cartesian-axis",o)},y.createElement(tV,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:dn(e)}),y.createElement(sV,{ref:C,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(MH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(UH,{label:e.label,labelRef:e.labelRef}),e.children)))}),W0=y.forwardRef((e,t)=>{var r=Qr(e,li);return y.createElement(lV,ho({},r,{ref:t}))});W0.displayName="CartesianAxis";var uV=["x1","y1","x2","y2","key"],cV=["offset"],dV=["xAxisId","yAxisId"],fV=["xAxisId","yAxisId"];function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.ry;return y.createElement("rect",{x:n,y:a,ry:l,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function CO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,l=r.x2,f=r.y2,h=r.key,p=qf(r,uV),v=(a=dn(p))!==null&&a!==void 0?a:{};v.offset;var x=qf(v,cV);n=y.createElement("line",Ha({},x,{x1:o,y1:u,x2:l,y2:f,fill:"none",key:h}))}return n}function yV(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=qf(e,dV),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(CO,{key:"line-".concat(h),option:a,lineItemProps:p})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function xV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=qf(e,fV),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(CO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function bV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(x=>Math.round(x+a-a)).sort((x,b)=>x-b);a!==p[0]&&p.unshift(0);var v=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?a+u-x:k-x;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:x,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},v)}function wV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(x=>Math.round(x+o-o)).sort((x,b)=>x-b);o!==p[0]&&p.unshift(0);var v=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?o+l-x:k-x;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},v)}var kV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return lP(U0(tr(tr(tr({},li),r),{},{ticks:uP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},jV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return lP(U0(tr(tr(tr({},li),r),{},{ticks:uP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},SV={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:or.grid};function AO(e){var t=gP(),r=yP(),n=vP(),a=tr(tr({},Qr(e,SV)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,v=a.syncWithTicks,x=a.horizontalValues,b=a.verticalValues,k=wr(),j=Ae(B=>nS(B,"xAxis",o,k)),S=Ae(B=>nS(B,"yAxis",u,k));if(!Rn(h)||!Rn(p)||!Ne(l)||!Ne(f))return null;var N=a.verticalCoordinatesGenerator||kV,P=a.horizontalCoordinatesGenerator||jV,O=a.horizontalPoints,C=a.verticalPoints;if((!O||!O.length)&&typeof P=="function"){var _=x&&x.length,A=P({yAxis:S?tr(tr({},S),{},{ticks:_?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:v);bf(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(O=A)}if((!C||!C.length)&&typeof N=="function"){var I=b&&b.length,$=N({xAxis:j?tr(tr({},j),{},{ticks:I?b:j.ticks}):void 0,width:t??h,height:r??p,offset:n},I?!0:v);bf(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof $,"]")),Array.isArray($)&&(C=$)}return y.createElement(xi,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(gV,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement(bV,Ha({},a,{horizontalPoints:O})),y.createElement(wV,Ha({},a,{verticalPoints:C})),y.createElement(yV,Ha({},a,{offset:n,horizontalPoints:O,xAxis:j,yAxis:S})),y.createElement(xV,Ha({},a,{offset:n,verticalPoints:C,xAxis:j,yAxis:S}))))}AO.displayName="CartesianGrid";var NV={},OO=rr({name:"errorBars",initialState:NV,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),H0=OO.actions;H0.addErrorBar;H0.replaceErrorBar;H0.removeErrorBar;var EV=OO.reducer;function _O(e,t){var r,n,a=Ae(h=>vi(h,e)),o=Ae(h=>gi(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Nt.allowDataOverflow,l=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Et.allowDataOverflow,f=u||l;return{needClip:f,needClipX:u,needClipY:l}}function PV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=B0(),o=_O(t,r),u=o.needClipX,l=o.needClipY,f=o.needClip,h=Ae(O=>mA(O,t,!1)),p=Ae(O=>vA(O,r,!1));if(!f||!a)return null;var v=a.x,x=a.y,b=a.width,k=a.height,j=u&&h?Math.min(h[0],h[1]):v-b/2,S=l&&p?Math.min(p[0],p[1]):x-k/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,P=l&&p?Math.abs(p[1]-p[0]):k*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:j,y:S,width:N,height:P}))}function CV(e){var t=sh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),l=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(l)||l<0)&&(l=n),{r:u,strokeWidth:l}}return{r,strokeWidth:n}}function K0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:wO}function G0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:wO}var MO=(e,t,r)=>SA(e,"xAxis",K0(e,t),r),IO=(e,t,r)=>jA(e,"xAxis",K0(e,t),r),TO=(e,t,r)=>SA(e,"yAxis",G0(e,t),r),DO=(e,t,r)=>jA(e,"yAxis",G0(e,t),r),AV=G([ut,MO,TO,IO,DO],(e,t,r,n,a)=>zn(e,"xAxis")?xf(t,n,!1):xf(r,a,!1)),OV=(e,t)=>t,RO=G([WC,OV],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),$O=e=>{var t=ut(e),r=zn(t,"xAxis");return r?"yAxis":"xAxis"},_V=(e,t)=>{var r=$O(e);return r==="yAxis"?G0(e,t):K0(e,t)},MV=(e,t,r)=>JC(e,$O(e),_V(e,t),r),IV=G([RO,MV],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Gy(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(l=>l.key===a);if(u!=null)return u.map(l=>[l[0],l[1]])}}}),TV=G([ut,MO,TO,IO,DO,IV,iF,AV,RO,wF],(e,t,r,n,a,o,u,l,f,h)=>{var p=u.chartData,v=u.dataStartIndex,x=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,k;if(b&&b.length>0?k=b:k=p==null?void 0:p.slice(v,x+1),k!=null)return oq({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:v,areaSettings:f,stackedData:o,displayedData:k,chartBaseValue:h,bandSize:l})}}),DV=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],RV=["id","baseLine"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.y||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(v=>v.y||0),p)),Ne(p)?y.createElement("rect",{x:lv.x||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(v=>v.x||0),p)),Ne(p)?y.createElement("rect",{x:0,y:le==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[zs(zs({},r.next),{},{x:ni(r.prev.x,r.next.x,t),y:ni(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),zO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:z0,animationInterpolateFn:qV,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:BV,xAxisId:0,yAxisId:0,zIndex:or.area};function Yf(e,t){return e&&e!=="none"?e:t}var QV=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:Yf(n,a),value:cP(r,t),payload:e}]},YV=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,v={dataDefinedOnItem:r,getPosition:Us,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:cP(u,t),hide:l,type:h,color:Yf(n,o),unit:f,graphicalItemId:p}};return y.createElement(lK,{tooltipEntrySettings:v})});function XV(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,l=dn(n);return y.createElement(XK,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:l,needClip:a,clipPathId:t})}function ZV(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,l,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(l=o.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return zs(zs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(VH,{value:t?a:void 0},r)}function JV(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=o.layout,p=o.type,v=o.stroke,x=o.connectNulls,b=o.isRange,k=o.shape,j=o.id,S=LO(o,UV),N=Gr(S),P=zs(zs({},N),{},{id:j,points:t,connectNulls:x,type:p,baseLine:r,layout:h,stroke:v,isRange:b,animationElapsedTime:u,isAnimating:l,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Vr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},y.createElement(sK,{option:k,DefaultShape:zO.shape,shapeProps:P})),y.createElement(XV,{points:t,props:S,clipPathId:a}))}function eq(e,t,r){if(Ne(e)){var n=Ne(t)?t:void 0;return ni(n,e,r)}if(Kt(e)||Tn(e)){var a=Ne(t)?t:void 0;return ni(a,0,r)}return e}function tq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,v=n.animationEasing,x=n.animationMatchBy,b=n.animationInterpolateFn,k=y.useMemo(()=>({points:u,baseLine:l}),[u,l]),j=yO(k,o),S=My(),N=NK(n.onAnimationStart,n.onAnimationEnd),P=N.isAnimating,O=N.handleAnimationStart,C=N.handleAnimationEnd,_=j.startValue;if(S==null)return null;var A;return Array.isArray(l)&&Array.isArray(_)?A=Vg(_,l,x):Array.isArray(l)?A=Vg(null,l,x):A=null,y.createElement(EK,{animationInput:k,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:v,onAnimationStart:O,onAnimationEnd:C,animationInterpolateFn:b,animationMatchBy:x,layout:S},(I,$,B)=>{var K;return $===1?K=l:Array.isArray(l)?K=b(A,$,S):K=B?l:eq(l,_,$),j.syncStepValue(K,$),y.createElement(ZV,{showLabels:!P,points:u},n.children,y.createElement(JV,{points:I,baseLine:K,needClip:t,clipPathId:r,props:n,animationElapsedTime:$,isAnimating:P||$<1,isEntrance:B}),y.createElement(YH,{label:n.label}))})}function rq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=y.useRef(null),o=y.useRef();return y.createElement(tq,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class nq extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,v=t.width,x=t.height,b=t.id,k=t.baseLine,j=t.zIndex;if(r)return null;var S=et("recharts-area",o),N=b,P=CV(n),O=P.r,C=P.strokeWidth,_=vO(n),A=O*2+C,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(xi,{zIndex:j},y.createElement(Vr,{className:S},f&&y.createElement("defs",null,y.createElement(PV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:l-A/2,y:u-A/2,width:v+A,height:x+A}))),y.createElement(rq,{needClip:f,clipPathId:N,props:this.props})),y.createElement(qS,{points:a,mainColor:Yf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(k)&&y.createElement(qS,{points:k,mainColor:Yf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function iq(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,v=e.isAnimationActive,x=e.legendType,b=e.stroke,k=e.xAxisId,j=e.yAxisId,S=LO(e,WV),N=Ws(),P=VA(),O=_O(k,j),C=O.needClip,_=wr(),A=(t=Ae(ge=>TV(ge,e.id,_)))!==null&&t!==void 0?t:{},I=A.points,$=A.isRange,B=A.baseLine,K=B0();if(N!=="horizontal"&&N!=="vertical"||K==null||P!=="AreaChart"&&P!=="ComposedChart")return null;var q=K.height,R=K.width,de=K.x,Z=K.y;return!I||!I.length?null:y.createElement(nq,Qf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:B,connectNulls:u,dot:l,fill:f,fillOpacity:h,height:q,hide:p,layout:N,isAnimationActive:v,isRange:$,legendType:x,needClip:C,points:I,stroke:b,width:R,left:de,top:Z,xAxisId:k,yAxisId:j}))}var aq=(e,t,r,n,a)=>{var o=r??t;if(Ne(o))return o;var u=e==="horizontal"?a:n,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]};function oq(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,v=e.dataStartIndex,x=e.xAxisTicks,b=e.yAxisTicks,k=e.bandSize,j=o&&o.length,S=aq(u,l,n,f,h),N=u==="horizontal",P=!1,O=p.map((_,A)=>{var I,$,B,K;if(j)K=o[v+A];else{var q=Tt(_,a);Array.isArray(q)?(K=q,P=!0):K=[S,q]}var R=(I=($=K)===null||$===void 0?void 0:$[1])!==null&&I!==void 0?I:null,de=R==null||j&&!r&&Tt(_,a)==null;if(N){var Z;return{x:Zw({axis:f,ticks:x,bandSize:k,entry:_,index:A}),y:de?null:(Z=h.scale.map(R))!==null&&Z!==void 0?Z:null,value:K,payload:_}}return{x:de?null:(B=f.scale.map(R))!==null&&B!==void 0?B:null,y:Zw({axis:h,ticks:b,bandSize:k,entry:_,index:A}),value:K,payload:_}}),C;return j||P?C=O.map(_=>{var A,I=Array.isArray(_.value)?_.value[0]:null;if(N){var $;return{x:_.x,y:I!=null&&_.y!=null&&($=h.scale.map(I))!==null&&$!==void 0?$:null,payload:_.payload}}return{x:I!=null&&(A=f.scale.map(I))!==null&&A!==void 0?A:null,y:_.y,payload:_.payload}}):C=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:C??0,isRange:P}}function sq(e){var t=Qr(e,zO),r=wr();return y.createElement(DK,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(uK,{legendPayload:QV(t)}),y.createElement(YV,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(UK,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:H$(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(iq,Qf({},t,{id:n}))))}var FO=y.memo(sq,Ah);FO.displayName="Area";var lq=["domain","range"],uq=["domain","range"];function iN(e,t){if(e==null)return{};var r,n,a=cq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(u!=null)return sN(sN({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{l!=null&&(r.current===null?t(rG(l)):r.current!==l&&t(nG({prev:r.current,next:l})),r.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(iG(r.current)),r.current=null)},[t]),null}var xq=e=>{var t=e.xAxisId,r=e.className,n=Ae(fP),a=wr(),o="xAxis",u=Ae(x=>kA(x,o,t,a)),l=Ae(x=>J9(x,t)),f=Ae(x=>aU(x,t)),h=Ae(x=>zC(x,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=Qg(e,fq);h.id,h.scale;var v=Qg(h,hq);return y.createElement(W0,qg({},p,v,{x:f.x,y:f.y,width:l.width,height:l.height,className:et("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},bq={allowDataOverflow:Nt.allowDataOverflow,allowDecimals:Nt.allowDecimals,allowDuplicatedCategory:Nt.allowDuplicatedCategory,angle:Nt.angle,axisLine:li.axisLine,height:Nt.height,hide:!1,includeHidden:Nt.includeHidden,interval:Nt.interval,label:!1,minTickGap:Nt.minTickGap,mirror:Nt.mirror,orientation:Nt.orientation,padding:Nt.padding,reversed:Nt.reversed,scale:Nt.scale,tick:Nt.tick,tickCount:Nt.tickCount,tickLine:li.tickLine,tickSize:li.tickSize,type:Nt.type,niceTicks:Nt.niceTicks,xAxisId:0},wq=e=>{var t=Qr(e,bq);return y.createElement(y.Fragment,null,y.createElement(yq,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(xq,t))},UO=y.memo(wq,BO);UO.displayName="XAxis";var kq=["type"],jq=["dangerouslySetInnerHTML","ticks","scale"],Sq=["id","scale"];function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return uN(uN({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{l!=null&&(r.current===null?t(aG(l)):r.current!==l&&t(oG({prev:r.current,next:l})),r.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(sG(r.current)),r.current=null)},[t]),null}function Oq(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=y.useRef(null),u=y.useRef(null),l=Ae(fP),f=wr(),h=kt(),p="yAxis",v=Ae(N=>lU(N,t)),x=Ae(N=>sU(N,t)),b=Ae(N=>kA(N,p,t,f)),k=Ae(N=>FC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!v||L0(a)||y.isValidElement(a)||k==null)){var N=o.current;if(N){var P=N.getCalculatedWidth();Math.round(v.width)!==Math.round(P)&&h(lG({id:t,width:P}))}}},[b,v,h,a,t,n,k]),v==null||x==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var j=Xg(e,jq);k.id,k.scale;var S=Xg(k,Sq);return y.createElement(W0,Yg({},j,S,{ref:o,labelRef:u,x:x.x,y:x.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:v.width,height:v.height,className:et("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var _q={allowDataOverflow:Et.allowDataOverflow,allowDecimals:Et.allowDecimals,allowDuplicatedCategory:Et.allowDuplicatedCategory,angle:Et.angle,axisLine:li.axisLine,hide:!1,includeHidden:Et.includeHidden,interval:Et.interval,label:!1,minTickGap:Et.minTickGap,mirror:Et.mirror,orientation:Et.orientation,padding:Et.padding,reversed:Et.reversed,scale:Et.scale,tick:Et.tick,tickCount:Et.tickCount,tickLine:li.tickLine,tickSize:li.tickSize,type:Et.type,niceTicks:Et.niceTicks,width:Et.width,yAxisId:0},Mq=e=>{var t=Qr(e,_q);return y.createElement(y.Fragment,null,y.createElement(Aq,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(Oq,t))},WO=y.memo(Mq,BO);WO.displayName="YAxis";var Iq=(e,t)=>t,V0=G([Iq,ut,eC,Rt,BA,yi,O7,Vt],$7);function Tq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function q0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Tq(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>u(l.clientX,l.clientY)):u(e.clientX,e.clientY)}var HO=Mr("mouseClick"),KO=Qu();KO.startListening({actionCreator:HO,effect:(e,t)=>{var r=e.payload,n=V0(t.getState(),q0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(jU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Zg=Mr("mouseMove"),GO=Qu(),ts=null,Ma=null,Pv=null;GO.startListening({actionCreator:Zg,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||(u==null?void 0:u.includes("mousemove"));ts!==null&&(cancelAnimationFrame(ts),ts=null),Ma!==null&&(typeof o!="number"||!l)&&(clearTimeout(Ma),Ma=null),Pv=q0(r);var f=()=>{var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(!Pv){ts=null,Ma=null;return}if(p==="axis"){var v=V0(h,Pv);(v==null?void 0:v.activeIndex)!=null?t.dispatch(_A({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate})):t.dispatch(OA())}ts=null,Ma=null};if(!l){f();return}o==="raf"?ts=requestAnimationFrame(f):typeof o=="number"&&Ma===null&&(Ma=setTimeout(f,o))}});function Dq(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var cN={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},VO=rr({name:"rootProps",initialState:cN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:cN.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Rq=VO.reducer,$q=VO.actions.updateOptions,Lq=null,zq={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},qO=rr({name:"polarOptions",initialState:Lq,reducers:zq});qO.actions.updatePolarOptions;var Fq=qO.reducer,QO=Mr("keyDown"),YO=Mr("focus"),XO=Mr("blur"),Qh=Qu(),rs=null,Ia=null,Wd=null;Qh.startListening({actionCreator:QO,effect:(e,t)=>{Wd=e.payload,rs!==null&&(cancelAnimationFrame(rs),rs=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ia!==null&&(typeof a!="number"||!u)&&(clearTimeout(Ia),Ia=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,v=Wd;if(v!=="ArrowRight"&&v!=="ArrowLeft"&&v!=="Enter")return;var x=du(p,fo(f),$s(f),Ls(f)),b=x==null?-1:Number(x),k=!Number.isFinite(b)||b<0,j=yi(f),S=fo(f),N=lc(f,f.tooltip.settings.shared);if(v==="Enter"){if(k)return;var P=Hf(f,N,"hover",String(p.index));t.dispatch(Wf({active:!p.active,activeIndex:p.index,activeCoordinate:P}));return}var O=hU(f),C=O==="left-to-right"?1:-1,_=v==="ArrowRight"?1:-1,A;if(k){var I=$s(f),$=Ls(f),B=_*C,K=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(A=-1,B>0){for(var q=0;q=0;R--)if(du(K(R),S,I,$)!=null){A=R;break}if(A<0)return}else{A=b+_*C;var de=(j==null?void 0:j.length)||S.length;if(de===0||A>=de||A<0)return}var Z=Hf(f,N,"hover",String(A));t.dispatch(Wf({active:!0,activeIndex:A.toString(),activeCoordinate:Z}))}finally{rs=null,Ia=null}};if(!u){l();return}a==="raf"?rs=requestAnimationFrame(l):typeof a=="number"&&Ia===null&&(l(),Wd=null,Ia=setTimeout(()=>{Wd?l():(Ia=null,rs=null)},a))}});Qh.startListening({actionCreator:YO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=lc(r,r.tooltip.settings.shared),l=Hf(r,u,"hover",String(o));t.dispatch(Wf({active:!0,activeIndex:o,activeCoordinate:l}))}}}});Qh.startListening({actionCreator:XO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Wf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function ZO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Fr=Mr("externalEvent"),JO=Qu(),Hd=new Map,iu=new Map,Cv=new Map;JO.startListening({actionCreator:Fr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=ZO(a);Cv.set(o,{handler:n,reactEvent:u});var l=Hd.get(o);l!==void 0&&(cancelAnimationFrame(l),Hd.delete(o));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,v=h.throttledEvents,x=v,b=x==="all"||(x==null?void 0:x.includes(o)),k=iu.get(o);k!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(k),iu.delete(o));var j=()=>{var P=Cv.get(o);try{if(!P)return;var O=P.handler,C=P.reactEvent,_=t.getState(),A={activeCoordinate:m7(_),activeDataKey:f7(_),activeIndex:Lu(_),activeLabel:HA(_),activeTooltipIndex:Lu(_),isTooltipActive:v7(_)};O&&O(A,C)}finally{Hd.delete(o),iu.delete(o),Cv.delete(o)}};if(!b){j();return}if(p==="raf"){var S=requestAnimationFrame(j);Hd.set(o,S)}else if(typeof p=="number"){if(!iu.has(o)){j();var N=setTimeout(j,p);iu.set(o,N)}}else j()}}});var Bq=G([Xs],e=>e.tooltipItemPayloads),Uq=G([Bq,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),e_=Mr("touchMove"),t_=Qu(),Ta=null,Hi=null,dN=null,au=null;t_.startListening({actionCreator:e_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){au=ZO(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||u.includes("touchmove");Ta!==null&&(cancelAnimationFrame(Ta),Ta=null),Hi!==null&&(typeof o!="number"||!l)&&(clearTimeout(Hi),Hi=null),dN=Array.from(r.touches).map(h=>q0({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(au!=null){var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(p==="axis"){var v,x=(v=dN)===null||v===void 0?void 0:v[0];if(x==null){Ta=null,Hi=null;return}var b=V0(h,x);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(_A({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var k,j=au.touches[0];if(document.elementFromPoint==null||j==null)return;var S=document.elementFromPoint(j.clientX,j.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(X$),P=(k=S.getAttribute(Z$))!==null&&k!==void 0?k:void 0,O=bo(h).find(A=>A.id===P);if(N==null||O==null||P==null)return;var C=O.dataKey,_=Uq(h,N,P);t.dispatch(kU({activeDataKey:C,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:P}))}Ta=null,Hi=null}};if(!l){f();return}o==="raf"?Ta=requestAnimationFrame(f):typeof o=="number"&&Hi===null&&(f(),au=null,Hi=setTimeout(()=>{au?f():(Hi=null,Ta=null)},o))}}});var r_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},n_=rr({name:"eventSettings",initialState:r_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),Wq=n_.actions.setEventSettings,Hq=n_.reducer,Kq=IE({brush:yG,cartesianAxis:uG,chartData:pW,errorBars:EV,eventSettings:Hq,graphicalItems:FK,layout:D$,legend:QL,options:uW,polarAxis:ZH,polarOptions:Fq,referenceElements:kG,renderedTicks:HG,rootProps:Rq,tooltip:SU,zIndex:Y7}),Gq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return o$({reducer:Kq,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([KO.middleware,GO.middleware,Qh.middleware,JO.middleware,t_.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(qE({type:"raf"}))},devTools:{serialize:{replacer:Dq},name:"recharts-".concat(r)}})};function Vq(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=wr(),o=y.useRef(null);if(a)return r;o.current==null&&(o.current=Gq(t,n));var u=jy;return y.createElement(dz,{context:u,store:o.current},r)}function qq(e){var t=e.layout,r=e.margin,n=kt(),a=wr();return y.useEffect(()=>{a||(n(M$(t)),n(_$(r)))},[n,a,t,r]),null}var Qq=y.memo(qq,Ah);function Yq(e){var t=kt();return y.useEffect(()=>{t($q(e))},[t,e]),null}var Xq=e=>{var t=kt();return y.useEffect(()=>{t(Wq(e))},[t,e]),null},Zq=y.memo(Xq,Ah);function fN(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),a=kt();return y.useLayoutEffect(()=>(n.current&&a(q7({zIndex:t,element:n.current,isPanorama:r})),()=>{a(Q7({zIndex:t,isPanorama:r}))}),[a,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function hN(e){var t=e.children,r=e.isPanorama,n=Ae(z7);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,a.map(u=>y.createElement(fN,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(fN,{key:u,zIndex:u,isPanorama:r})))}var Jq=["children"];function eQ(e,t){if(e==null)return{};var r,n,a=tQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=gP(),n=yP(),a=CP();if(!Rn(r)||!Rn(n))return null;var o=e.children,u=e.otherAttributes,l=e.title,f=e.desc,h,p;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?p=u.role:p=a?"application":void 0),y.createElement(X2,Xf({},u,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:rQ,ref:t}),o)}),iQ=e=>{var t=e.children,r=Ae(Sh);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return y.createElement(X2,{width:n,height:a,x:u,y:o},t)},pN=y.forwardRef((e,t)=>{var r=e.children,n=eQ(e,Jq),a=wr();return a?y.createElement(iQ,null,y.createElement(hN,{isPanorama:!0},r)):y.createElement(nQ,Xf({ref:t},n),y.createElement(hN,{isPanorama:!1},r))});function aQ(e,t){return uQ(e)||lQ(e,t)||sQ(e,t)||oQ()}function oQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sQ(e,t){if(e){if(typeof e=="string")return mN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mN(e,t):void 0}}function mN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var u=n.getBoundingClientRect(),l=u.width/n.offsetWidth;Be(l)&&l!==o&&e(T$(l))}},[n,e,o]),a}function vN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dQ(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(jW(),null);function Jf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var bQ=y.forwardRef((e,t)=>{var r,n,a=y.useRef(null),o=y.useState({containerWidth:Jf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Jf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Zf(o,2),l=u[0],f=u[1],h=y.useCallback((v,x)=>{f(b=>{var k=Math.round(v),j=Math.round(x);return b.containerWidth===k&&b.containerHeight===j?b:{containerWidth:k,containerHeight:j}})},[]),p=y.useCallback(v=>{if(typeof t=="function"&&t(v),a.current!=null&&(a.current.disconnect(),a.current=null),v!=null&&typeof ResizeObserver<"u"){var x=v.getBoundingClientRect(),b=x.width,k=x.height;h(b,k);var j=N=>{var P=N[0];if(P!=null){var O=P.contentRect,C=O.width,_=O.height;h(C,_)}},S=new ResizeObserver(j);S.observe(v),a.current=S}},[t,h]);return y.useEffect(()=>()=>{var v=a.current;v!=null&&v.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Xu,{width:l.containerWidth,height:l.containerHeight}),y.createElement("div",ua({ref:p},e)))}),wQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=y.useState({containerWidth:Jf(r),containerHeight:Jf(n)}),o=Zf(a,2),u=o[0],l=o[1],f=y.useCallback((p,v)=>{l(x=>{var b=Math.round(p),k=Math.round(v);return x.containerWidth===b&&x.containerHeight===k?x:{containerWidth:b,containerHeight:k}})},[]),h=y.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var v=p.getBoundingClientRect(),x=v.width,b=v.height;f(x,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Xu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",ua({ref:h},e)))}),kQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Xu,{width:r,height:n}),y.createElement("div",ua({ref:t},e)))}),jQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(wQ,ua({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(kQ,ua({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Xu,{width:r,height:n}),y.createElement("div",ua({ref:t},e)))});function SQ(e){return e?bQ:jQ}var NQ=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,v=e.onMouseMove,x=e.onMouseUp,b=e.onTouchEnd,k=e.onTouchMove,j=e.onTouchStart,S=e.style,N=e.width,P=e.responsive,O=e.dispatchTouchEvents,C=O===void 0?!0:O,_=y.useRef(null),A=kt(),I=y.useState(null),$=Zf(I,2),B=$[0],K=$[1],q=y.useState(null),R=Zf(q,2),de=R[0],Z=R[1],ge=cQ(),ke=Oy(),me=(ke==null?void 0:ke.width)>0?ke.width:N,Q=(ke==null?void 0:ke.height)>0?ke.height:a,oe=y.useCallback(ce=>{ge(ce),typeof t=="function"&&t(ce),K(ce),Z(ce),ce!=null&&(_.current=ce)},[ge,t,K,Z]),X=y.useCallback(ce=>{A(HO(ce)),A(Fr({handler:o,reactEvent:ce}))},[A,o]),L=y.useCallback(ce=>{A(Zg(ce)),A(Fr({handler:h,reactEvent:ce}))},[A,h]),T=y.useCallback(ce=>{A(OA()),A(Fr({handler:p,reactEvent:ce}))},[A,p]),ee=y.useCallback(ce=>{A(Zg(ce)),A(Fr({handler:v,reactEvent:ce}))},[A,v]),ne=y.useCallback(()=>{A(YO())},[A]),te=y.useCallback(()=>{A(XO())},[A]),ue=y.useCallback(ce=>{A(QO(ce.key))},[A]),pe=y.useCallback(ce=>{A(Fr({handler:u,reactEvent:ce}))},[A,u]),Oe=y.useCallback(ce=>{A(Fr({handler:l,reactEvent:ce}))},[A,l]),J=y.useCallback(ce=>{A(Fr({handler:f,reactEvent:ce}))},[A,f]),je=y.useCallback(ce=>{A(Fr({handler:x,reactEvent:ce}))},[A,x]),_e=y.useCallback(ce=>{A(Fr({handler:j,reactEvent:ce}))},[A,j]),ae=y.useCallback(ce=>{C&&A(e_(ce)),A(Fr({handler:k,reactEvent:ce}))},[A,C,k]),Xe=y.useCallback(ce=>{A(Fr({handler:b,reactEvent:ce}))},[A,b]),Y=SQ(P);return y.createElement(ZA.Provider,{value:B},y.createElement(z4.Provider,{value:de},y.createElement(Y,{width:me??(S==null?void 0:S.width),height:Q??(S==null?void 0:S.height),className:et("recharts-wrapper",n),style:dQ({position:"relative",cursor:"default",width:me,height:Q},S),onClick:X,onContextMenu:pe,onDoubleClick:Oe,onFocus:ne,onBlur:te,onKeyDown:ue,onMouseDown:J,onMouseEnter:L,onMouseLeave:T,onMouseMove:ee,onMouseUp:je,onTouchEnd:Xe,onTouchMove:ae,onTouchStart:_e,ref:oe},y.createElement(xQ,null),r)))}),EQ=["width","height","responsive","children","className","style","compact","title","desc"];function PQ(e,t){if(e==null)return{};var r,n,a=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,v=PQ(e,EQ),x=dn(v);return f?y.createElement(y.Fragment,null,y.createElement(Xu,{width:r,height:n}),y.createElement(pN,{otherAttributes:x,title:h,desc:p},o)):y.createElement(NQ,{className:u,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(pN,{otherAttributes:x,title:h,desc:p,ref:t},y.createElement(AG,null,o)))});function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(RQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:$Q,tooltipPayloadSearcher:sW,categoricalChartProps:e,ref:t}));const zQ="rgba(130,130,150,0.14)",xN="rgba(130,130,150,0.85)";function FQ(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function i_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function BQ({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:c.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:c.jsx("div",{className:"space-y-1",children:t.map(n=>c.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),c.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),c.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:i_(n.value,r)})]},n.dataKey))})})}function a_({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((l,f)=>t.reduce((h,p)=>Math.max(h,Number(f[p.key])||0),l),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(FQ(o*1.15),10);return c.jsx("div",{style:{height:a},className:"w-full",children:c.jsx(_L,{width:"100%",height:"100%",children:c.jsxs(LQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[c.jsx("defs",{children:t.map(l=>c.jsxs("linearGradient",{id:`grad-${l.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:l.color,stopOpacity:.22}),c.jsx("stop",{offset:"100%",stopColor:l.color,stopOpacity:0})]},l.key))}),c.jsx(AO,{vertical:!1,stroke:zQ}),c.jsx(UO,{dataKey:"t",hide:!0}),c.jsx(WO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:l=>i_(l,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:xN}}),c.jsx(RW,{content:c.jsx(BQ,{unit:r}),cursor:{stroke:xN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(l=>c.jsx(FO,{type:"monotone",dataKey:l.key,name:l.label,stroke:l.color,strokeWidth:2,fill:`url(#grad-${l.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},l.key))]})})})}const UQ=[{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 WQ(){var u,l,f,h;const{sys:e,hist:t}=C4(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=UQ.filter(p=>p.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(l=e==null?void 0:e.ram)==null?void 0:l.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Qo(e.ram.used)}/${Qo(e.ram.total)} GB`:"",gpu:r?`${Qo(e.gpu.gtt_used)}/${Qo(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Qo(e.disk.used)}/${Qo(e.disk.total)} GB`:""};return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(p=>c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:p.color}}),c.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),c.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[p.key]??0),"%"]}),o[p.key]&&c.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[p.key]})]},p.key))}),c.jsx(a_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):c.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&c.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&c.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&c.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function Kd({label:e,value:t,tone:r}){return c.jsxs("div",{className:fe("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{className:"flex items-center gap-1.5",children:e}),c.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function HQ(){var r;const{data:e}=hy(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(kI,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&c.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Kd,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),c.jsx(Kd,{label:"Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),c.jsx(Kd,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>c.jsx(Kd,{tone:n.update===!0?"alert":"muted",label:c.jsxs(c.Fragment,{children:[n.name,n.reachable===!1&&c.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),c.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",c.jsx(ZN,{className:"h-3.5 w-3.5"})]})]})}function o_({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:l}){const f=y.useRef(null);return c.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),c.jsx("button",{onClick:l||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{ref:f,type:"text",defaultValue:n,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:h=>{var p;h.key==="Enter"&&u((p=f.current)==null?void 0:p.value)}}),a!==void 0&&c.jsx("button",{type:"button",onClick:()=>{f.current&&(f.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:o||"Auto"})]}),c.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&c.jsx("button",{onClick:l,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"}),c.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.value:void 0;u(h)},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:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function el(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=y.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),o=y.useCallback((l,f,h,p,v,x)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),v==null||v()}})},[]),u=e?c.jsx(o_,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function KQ(){const e=po(),{data:t}=fy(3e3),{data:r}=vo(),{showAlert:n,dialogElement:a}=el(),[o,u]=y.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await Me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:wt.agentStatus}),u(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&c.jsxs("a",{href:_s(t.terminal_url),target:"_blank",rel:"noopener",className:fe("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[c.jsx(xu,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:fe("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:fe("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),c.jsx(_n,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[c.jsx(bu,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),c.jsx(ku,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[c.jsxs("div",{children:["Config: ",t.has_config?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Skills: ",t.has_skills?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Memory: ",t.has_memories?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&c.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"Telegram"}),c.jsx("span",{className:fe("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"MCP-Server"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"PC Executor"}),c.jsx("span",{className:fe("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return c.jsxs("button",{onClick:()=>f(h),className:fe("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&c.jsx(Cn,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function GQ(){const{data:e}=vo(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(bu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:G2.map(n=>{var u;const a=t.find(l=>l.role===n),o=a?r.includes(a.name):!1;return c.jsxs("div",{className:fe("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",o?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1 mr-2",children:c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:fe("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",my(n)),children:n}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(u=a.name.split("/").pop())==null?void 0:u.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&c.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&c.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),c.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?o?c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function VQ(){const e=po(),{data:t=[]}=z2({limit:3}),[r,n]=y.useState(""),[a,o]=y.useState("stable"),[u,l]=y.useState(!1);async function f(){if(!(!r.trim()||u)){l(!0);try{await Me("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),c.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[c.jsxs("select",{value:a,onChange:h=>o(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[c.jsx("option",{value:"stable",children:"🔵 Fakt"}),c.jsx("option",{value:"instruction",children:"📋 Regel"}),c.jsx("option",{value:"user",children:"👤 User"}),c.jsx("option",{value:"versioned",children:"🟡 Version"})]}),c.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[c.jsx(e2,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),c.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[c.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),c.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?c.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>c.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[c.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),c.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}const bN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function qQ(){const{data:e}=dy(3e3),t=E4(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&c.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[c.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&c.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[c.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",c.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),c.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),c.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:bN.map(a=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),c.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?c.jsx(a_,{data:t,series:bN,unit:" tok/s",yMode:"auto",height:150}):c.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),c.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 QQ(){const{data:e}=D3(3e3),{showAlert:t,dialogElement:r}=el(),[n,a]=y.useState({});async function o(u){a(l=>({...l,[u]:!0}));try{const l=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});l.ok||t("Fehler",`Neustart fehlgeschlagen: ${l.err||"Unbekannt"}`)}catch(l){t("Fehler",`Fehler: ${l.message}`)}finally{a(l=>({...l,[u]:!1}))}}return c.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(t2,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>c.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:fe("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),c.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),c.jsx("button",{onClick:()=>o(u.name),disabled:n[u.name],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:c.jsx(cu,{className:fe("h-3.5 w-3.5",n[u.name]&&"animate-spin")})})]},u.name))}),c.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[c.jsxs("a",{href:_s(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Engine"]}),c.jsxs("a",{href:_s(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Gateway"]})]})]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}function wN({children:e}){return c.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function YQ(){return c.jsxs("div",{className:"space-y-7",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),c.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[c.jsx(WQ,{}),c.jsx(qQ,{}),c.jsx(k4,{})]}),c.jsxs("section",{children:[c.jsx(wN,{children:"Stack-Status"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsx(GQ,{}),c.jsx(QQ,{})]})]}),c.jsxs("section",{children:[c.jsx(wN,{children:"Betrieb & Wissen"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[c.jsx(HQ,{}),c.jsx(KQ,{}),c.jsx(VQ,{})]})]})]})}function XQ(){const e=po(),{data:t=[]}=$3(2e3),{showAlert:r,dialogElement:n}=el();async function a(l){try{await Me(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:wt.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(l=>l.state==="running"||l.state==="queued"),u=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:c.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(l=>c.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center text-xs",children:[c.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",tg(l.done_bytes),"/",tg(l.total_bytes),l.eta_s?` • ETA ${B3(l.eta_s)}`:""]}),c.jsx("button",{onClick:()=>a(l.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),u.map(l=>c.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[c.jsx("span",{className:"truncate",children:l.label}),c.jsx("span",{className:fe("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function Da({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function kN({caps:e}){return e?c.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&c.jsx(Da,{children:"💻 Code"}),e.vision&&c.jsx(Da,{children:"👁 Bild"}),e.reasoning&&c.jsx(Da,{children:"🧠 Reason"}),e.moe&&c.jsxs(Da,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&c.jsx(Da,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&c.jsx(Da,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&c.jsx(Da,{children:"🔢 Embed"})]}):null}function ZQ({model:e,onClose:t,onChanged:r}){var j,S;const{data:n,isLoading:a}=F3(e.gguf_path),[o,u]=y.useState(null),[l,f]=y.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],v=p.filter(N=>N.compatible===!0),x=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await Me(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(P){f(String((P==null?void 0:P.message)||P)),u(null)}}const k=N=>{var P;return N?`${N.pre??"?"} · ${((P=N.n_vocab)==null?void 0:P.toLocaleString())??"?"} Tokens`:"—"};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-lg 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[c.jsx(ls,{className:"h-4 w-4"})," Speculative Draft"]}),c.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',c.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),c.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:(j=e.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-foreground",children:["Vocab: ",k(h)]})]}),e.spec_active&&x&&c.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[c.jsx(Cn,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",x]}),c.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[c.jsx(Cs,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),c.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?c.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?c.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",c.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):p.map(N=>{var C,_;const P=N.filename===x,O=N.compatible===!0;return c.jsxs("div",{className:fe("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",P&&"border-primary/40 bg-primary/10"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),c.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Br(N.size_bytes)," · Vocab: ",k(N.vocab)]})]}),O?P?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[c.jsx(Cn,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):c.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(C=N.vocab)==null?void 0:C.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[c.jsx(Cs,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&v.length===0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",c.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",c.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&c.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function JQ(){var ko,va,il,wi,ki,cc,al,ol;const e=po(),{data:t,isLoading:r,error:n}=vo(4e3),{data:a}=R3(4e3),{data:o}=L2(),{data:u}=hy(4e3),{data:l}=L3(),{data:f}=oh(),{showAlert:h,showConfirm:p,showPrompt:v,dialogElement:x}=el(),b=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],j=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:wt.models}),e.invalidateQueries({queryKey:wt.routing})},[N,P]=y.useState(null),[O,C]=y.useState(null),[_,A]=y.useState(null),[I,$]=y.useState(null),[B,K]=y.useState(!1),[q,R]=y.useState(!1),[de,Z]=y.useState(null),[ge,ke]=y.useState("grid"),[me,Q]=y.useState("all"),oe=b.filter(U=>me==="in_use"?!!U.role||k.includes(U.name):!0),[X,L]=y.useState({width:800,height:360}),T=y.useRef(null),ee=y.useCallback(U=>{if(T.current&&(T.current.disconnect(),T.current=null),U){const he=new ResizeObserver(Pe=>{if(!Pe||Pe.length===0)return;const ze=Pe[0].contentRect;L({width:ze.width,height:ze.height})});he.observe(U),T.current=he}},[]),ne=X.width,te=X.height,ue=U=>{const he=ne*.1,Pe=te*U,ze=ne*.5,Ve=te*.5,qt=ne*.3,Ze=Pe,vt=ne*.3;return`M ${he} ${Pe} C ${qt} ${Ze}, ${vt} ${Ve}, ${ze} ${Ve}`},pe=U=>{const he=ne*.5,Pe=te*.5,ze=ne*.9,Ve=te*U,qt=ne*.7,Ze=Pe,vt=ne*.7;return`M ${he} ${Pe} C ${qt} ${Ze}, ${vt} ${Ve}, ${ze} ${Ve}`};async function Oe(U){try{await Me(`/api/models/${encodeURIComponent(U)}/load`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Laden des Modells: ${he.message}`)}}async function J(U){try{await Me(`/api/models/${encodeURIComponent(U)}/unload`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Entladen des Modells: ${he.message}`)}}async function je(){try{await Me("/api/models/unload",{method:"POST"}),S()}catch(U){h("Fehler",`Fehler beim Entladen aller Modelle: ${U.message}`)}}async function _e(U,he){try{await Me(`/api/models/${encodeURIComponent(he)}/role`,{method:"POST",body:JSON.stringify({role:U||null})}),S()}catch(Pe){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function ae(U){C(U),A(null),Me(`/api/roles/${encodeURIComponent(U)}/recommend`).then(he=>A(he)).catch(()=>{})}async function Xe(U,he){let Pe=null;try{Pe=await Me(`/api/models/${encodeURIComponent(U)}/ctx/auto`)}catch{}const ze=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB − reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";v("Kontextlänge anpassen",ze,String(he||32768),async Ve=>{if(Ve)try{await Me(`/api/models/${encodeURIComponent(U)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Ve,10)})}),S()}catch(qt){h("Fehler",`Fehler beim Setzen des Kontexts: ${qt.message||qt}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function Y(U){p("Modell löschen?",`Modell '${U}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Me(`/api/models/${encodeURIComponent(U)}`,{method:"DELETE"}),S()}catch(he){h("Fehler",`Fehler beim Löschen: ${he.message||he}`)}})}async function ce(U,he,Pe,ze){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:he,quant:Pe,jinja:ze})}),h("Herunterladen gestartet",`Download für '${U}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ve){h("Fehler",`Fehler beim Starten des Upgrades: ${Ve.message||Ve}`)}}async function tt(U){const he=l==null?void 0:l.budget,Pe=he&&!he.fits?` - -⚠ Speicher-Warnung: Dieses Brain (~${he.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${he.largest_ondemand_gb} GB) sprengt das das Budget (${he.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${U.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(ze){h("Fehler",`Update fehlgeschlagen: ${ze.message||ze}`)}})}async function kr(U){p("Agent-Hirn wechseln?",`'${U.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await Me("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:U})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),K(!1),S()}catch(he){h("Fehler",`Wechsel fehlgeschlagen: ${he.message||he}`)}})}async function pa(U){U&&(await navigator.clipboard.writeText(U),R(!0),setTimeout(()=>R(!1),1500))}if(r)return c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(j)return c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",j,")."]});const ma=b.filter(U=>k.includes(U.name)),Bn=ma.reduce((U,he)=>U+(he.size_bytes||0),0),Un=((ko=f==null?void 0:f.gpu)==null?void 0:ko.gtt_total)||((va=f==null?void 0:f.gpu)==null?void 0:va.vram_total)||0,wo=((il=f==null?void 0:f.gpu)==null?void 0:il.gtt_used)||0,tl=16*1024**3,rl=Un>2*1024**3?Un:Bn>tl?Bn*1.2:tl,nl=U=>b.find(he=>he.role===U),bi=U=>{const he=nl(U);return he?k.includes(he.name):!1};return c.jsxs("div",{className:"space-y-8",children:[c.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(zm,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Br(Bn)," Gewichte",wo>0?` · ${Br(wo)} real belegt (inkl. KV)`:""," / ",Br(rl)]}),k.length>0&&c.jsx("button",{onClick:je,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),c.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:ma.length===0?c.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):ma.map((U,he)=>{var Ve;const Pe=(U.size_bytes||0)/rl*100,ze=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][he%4];return c.jsxs("div",{style:{width:`${Pe}%`},className:fe("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",ze),title:`${U.name} (${Br(U.size_bytes)})`,children:[c.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[U.role?`[${U.role}] `:"",(Ve=U.name.split("/").pop())==null?void 0:Ve.replace(".gguf","")]}),c.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Br(U.size_bytes)})]},U.name)})})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),c.jsxs("div",{ref:ee,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:ue(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="roocode"||N==="roocode")&&c.jsx("path",{d:ue(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="cursor"||N==="cursor")&&c.jsx("path",{d:ue(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="opencode"||N==="opencode")&&c.jsx("path",{d:ue(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="zed"||N==="zed")&&c.jsx("path",{d:ue(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="continue"||N==="continue")&&c.jsx("path",{d:ue(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("fast")&&c.jsx("path",{d:pe(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("heavy")&&c.jsx("path",{d:pe(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("coder")&&c.jsx("path",{d:pe(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("vision")&&c.jsx("path",{d:pe(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("scout")&&c.jsx("path",{d:pe(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>Z("roocode"),onMouseLeave:()=>Z(null),onClick:()=>P(U=>U==="roocode"?null:"roocode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Roo Code"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>Z("cursor"),onMouseLeave:()=>Z(null),onClick:()=>P(U=>U==="cursor"?null:"cursor"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Cursor IDE"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>Z("opencode"),onMouseLeave:()=>Z(null),onClick:()=>P(U=>U==="opencode"?null:"opencode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"OpenCode"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>Z("zed"),onMouseLeave:()=>Z(null),onClick:()=>P(U=>U==="zed"?null:"zed"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Zed"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>Z("continue"),onMouseLeave:()=>Z(null),onClick:()=>P(U=>U==="continue"?null:"continue"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Continue"})]}),c.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[c.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),c.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),G2.map(U=>{var qt;const he=["12%","31%","50%","69%","88%"],Pe=nl(U),ze=Pe?k.includes(Pe.name):!1;if(U==="agent")return null;const Ve={fast:0,heavy:1,coder:2,vision:3,scout:4}[U];return c.jsxs("div",{className:fe("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",ze?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Pe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:he[Ve]},onClick:()=>ae(U),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:U}),ze&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Pe?(qt=Pe.name.split("/").pop())==null?void 0:qt.replace(".gguf",""):"Keine Zuweisung"})]},U)}),N&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),c.jsx("button",{onClick:()=>P(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),c.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",c.jsx("strong",{children:"OpenAI Compatible"}),"."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",c.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne Cursor Settings ➔ ",c.jsx("strong",{children:"Models"}),"."]}),c.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",c.jsx("strong",{children:"OpenAI API"})," auf."]}),c.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",c.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die ",c.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),c.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",c.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die Zed Settings (",c.jsx("code",{children:"ctrl+,"}),")."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",c.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),c.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",c.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),o.tools&&c.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),c.jsxs("button",{onClick:()=>{var U,he,Pe,ze,Ve;return pa(N==="roocode"?(U=o.tools.cline)==null?void 0:U.snippet:N==="cursor"?(he=o.tools.cursor)==null?void 0:he.snippet:N==="opencode"?(Pe=o.tools.opencode)==null?void 0:Pe.snippet:N==="zed"?(ze=o.tools.zed)==null?void 0:ze.snippet:(Ve=o.tools.continue)==null?void 0:Ve.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[q?c.jsx(Cn,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(JN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:q?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:c.jsxs("code",{children:[N==="roocode"&&((wi=o.tools.cline)==null?void 0:wi.snippet),N==="cursor"&&((ki=o.tools.cursor)==null?void 0:ki.snippet),N==="opencode"&&((cc=o.tools.opencode)==null?void 0:cc.snippet),N==="zed"&&((al=o.tools.zed)==null?void 0:al.snippet),N==="continue"&&((ol=o.tools.continue)==null?void 0:ol.snippet)]})})]}),c.jsx("button",{onClick:()=>P(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),c.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(U=>{var ze;const he=b.find(Ve=>Ve.role===U),Pe=he?k.includes(he.name):!1;return c.jsxs("div",{onClick:()=>ae(U),className:fe("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":he?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:fe("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",my(U)),children:U}),Pe&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:he==null?void 0:he.name,children:he?(ze=he.name.split("/").pop())==null?void 0:ze.replace(/\.gguf$/i,""):"nicht zugewiesen"}),c.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},U)})})]}),(l==null?void 0:l.current)&&c.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-indigo-400"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&c.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",l.current.version]})]}),c.jsx("button",{onClick:()=>K(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:l.current.quant||"GGUF"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:Br(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?c.jsxs("button",{onClick:()=>tt(l.recommended.repo),className:fe("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",l.budget&&!l.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):c.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[c.jsx(Cn,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&c.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",c.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&c.jsxs("div",{className:fe("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[c.jsx(zm,{className:"h-3 w-3 shrink-0 mt-0.5"}),c.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",oe.length," von ",b.length,")"]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>Q("all"),className:fe("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),c.jsx("button",{onClick:()=>Q("in_use"),className:fe("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>ke("grid"),className:fe("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),c.jsx("button",{onClick:()=>ke("list"),className:fe("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ge==="grid"?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:oe.length===0?c.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:me==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(U=>{const he=k.includes(U.name),Pe=u==null?void 0:u.model_list.find(Ve=>Ve.role===U.role),ze=yw(U.name);return c.jsxs("div",{className:fe("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",he?"border-primary/45 shadow-primary/5":U.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-start justify-between gap-3",children:c.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[c.jsx("div",{className:fe("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",ze.color),title:ze.name,children:ze.initial}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:U.name,children:U.name.split("/").pop()}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:U.quant||"GGUF"}),he&&c.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[c.jsx(gu,{className:"h-3 w-3 animate-pulse"})," Warm"]}),U.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:U.role}),U.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),U.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${U.spec_draft_model})`,children:"SPEC"}):U.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${U.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,U.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${U.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",U.parallel_slots]}),U.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),c.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:c.jsx(kN,{caps:U.capabilities})})]}),c.jsxs("div",{className:"space-y-3 pt-1",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(zm,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),c.jsx("div",{className:"text-foreground font-semibold",children:Br(U.size_bytes)})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(vI,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),c.jsx("div",{className:"text-foreground font-semibold",children:mw(U.ctx)})]})]})]}),Pe&&c.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),c.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>ce(Pe.repo,U.role,U.quant||"Q4_K_M",U.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[c.jsx(no,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[c.jsx("button",{onClick:()=>he?J(U.name):Oe(U.name),disabled:U.incomplete&&!he,className:fe("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",U.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(U.name,U.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>$(U),className:fe("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",U.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":U.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Y(U.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:c.jsx(Qv,{className:"h-3.5 w-3.5"})})]})]})]},U.name)})}):c.jsx("div",{className:"space-y-2",children:oe.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:me==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(U=>{const he=k.includes(U.name),Pe=yw(U.name);return c.jsxs("div",{className:fe("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",he?"border-primary/45":U.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("div",{className:fe("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),c.jsxs("div",{className:"min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:U.name,children:U.name.split("/").pop()}),U.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:U.role}),U.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),U.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${U.spec_draft_model})`,children:"SPEC"}):U.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${U.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,U.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${U.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",U.parallel_slots]}),U.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),he&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsxs("span",{children:["Größe: ",Br(U.size_bytes)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Kontext: ",mw(U.ctx)]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:"font-mono text-[9px]",children:U.quant||"GGUF"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[c.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:c.jsx(kN,{caps:U.capabilities})}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("button",{onClick:()=>he?J(U.name):Oe(U.name),disabled:U.incomplete&&!he,className:fe("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",U.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(U.name,U.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>$(U),className:fe("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",U.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":U.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Y(U.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:c.jsx(Qv,{className:"h-3.5 w-3.5"})})]})]})]},U.name)})})]}),O&&(()=>{var Ve,qt;const U=_&&_.role===O?_:null,he={};U==null||U.models.forEach(Ze=>{he[Ze.name]=Ze});const Pe=U?U.models.map(Ze=>b.find(vt=>vt.name===Ze.name)).filter(Boolean):b,ze=Ze=>{_e(O,Ze),C(null)};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),c.jsx("button",{onClick:()=>C(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",c.jsx("strong",{className:"text-foreground",children:O}),":"]}),(U==null?void 0:U.recommended)&&c.jsxs("button",{onClick:()=>ze(U.recommended),title:(Ve=he[U.recommended])==null?void 0:Ve.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[c.jsx(ls,{className:"h-3 w-3"})," Auto: ",(qt=U.recommended.split("/").pop())==null?void 0:qt.replace(/\.gguf$/i,"")]})]}),c.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[c.jsx("button",{onClick:()=>ze(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:c.jsx("span",{children:"Zuweisung entfernen"})}),Pe.map(Ze=>{var ll;const vt=he[Ze.name],ga=Ze.role===O,sl=!!(vt!=null&&vt.recommended),dc=!!vt&&!vt.suitable;return c.jsxs("button",{onClick:()=>ze(Ze.name),className:fe("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",sl?"border-primary/50 bg-primary/10":ga?"text-primary font-bold bg-primary/5 border-primary/30":dc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[c.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[c.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(ll=Ze.name.split("/").pop())==null?void 0:ll.replace(/\.gguf$/i,""),sl&&c.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:vt?`${vt.params_b}B · ${Ze.quant} · ${vt.reason}`:`${Br(Ze.size_bytes)} · ${Ze.quant}`})]}),ga&&c.jsx(Cn,{className:"h-4 w-4 shrink-0 text-primary"})]},Ze.name)})]})]})})})(),I&&c.jsx(ZQ,{model:I,onClose:()=>$(null),onChanged:S}),B&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Ps,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),c.jsx("button",{onClick:()=>K(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",c.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",c.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),c.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(U=>{var Pe;const he=U.role==="hermes";return c.jsxs("button",{onClick:()=>!he&&kr(U.name),disabled:he||U.incomplete,className:fe("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",he?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":U.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Pe=U.name.split("/").pop())==null?void 0:Pe.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[U.capabilities.params_b?`${U.capabilities.params_b}B`:"?"," · ",Br(U.size_bytes),U.role&&` · Rolle: ${U.role}`,U.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),he?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[c.jsx(Cn,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},U.name)})}),c.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[c.jsx("span",{children:"💡"}),c.jsxs("span",{children:["Für einen ",c.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),x]})}function eY(){const[e,t]=y.useState(""),[r,n]=y.useState([]),[a,o]=y.useState("Q4_K_M"),[u,l]=y.useState(""),[f,h]=y.useState(""),[p,v]=y.useState(""),[x,b]=y.useState([]),[k,j]=y.useState(null),[S,N]=y.useState(!1),P=["fast","heavy","coder","vision","scout"],{data:O}=vo(),C=f?O==null?void 0:O.models.find(R=>(R.role||"").toLowerCase()===f):void 0;async function _(R,de,Z){if(N(!1),!R.trim()){j(null);return}try{const ge=await Me(`/api/fit?params_b=0&quant=${encodeURIComponent(de)}&ctx=8192&name=${encodeURIComponent(R)}&role=${encodeURIComponent(Z)}`);j(ge)}catch{j(null)}}async function A(R){const de=R??e;if(de.trim()){l("Analysiere HuggingFace Repository..."),j(null);try{const Z=await Me(`/api/hf/quants?repo=${encodeURIComponent(de)}`);t(Z.repo),n(Z.quants);const ge=Z.quants.length?Z.quants.includes("Q4_K_M")?"Q4_K_M":Z.quants[0]:a;Z.quants.length&&o(ge),l(Z.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),Z.quants.length&&_(Z.repo,ge,f)}catch(Z){l(`Fehler: ${Z}`)}}}function I(R){o(R),_(e,R,f)}function $(R){h(R),r.length&&_(e,a,R)}async function B(){if(p.trim()){l("Durchsuche HuggingFace...");try{const R=await Me(`/api/hf/search?q=${encodeURIComponent(p)}`);b(R.results),l(R.results.length?"":"Keine Ergebnisse gefunden.")}catch(R){l(`Suche fehlgeschlagen: ${R}`)}}}async function K(){if(e.trim()){if((k==null?void 0:k.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(C?` „${f}" wurde von ${C.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(R){l(`Download-Fehler: ${R}`)}}}const q=(k==null?void 0:k.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(k==null?void 0:k.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return c.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[c.jsx("input",{value:e,onChange:R=>{t(R.target.value),j(null),N(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>A(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("select",{value:a,onChange:R=>I(R.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))}),c.jsxs("select",{value:f,onChange:R=>$(R.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[c.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),P.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))]}),c.jsx("button",{onClick:K,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?c.jsxs(c.Fragment,{children:[c.jsx(Cs,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):c.jsxs(c.Fragment,{children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),k&&c.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${q}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-wide",children:k.fit.text}),c.jsxs("span",{className:"font-mono opacity-90",children:["~",k.params_b,"B · ~",k.fit.req_gb," GB / ",k.sys_ram_gb," GB RAM · ~",k.fit.tps," t/s"]}),k.fit.level!=="too_tight"&&c.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${k.budget.gtt_gb} GB − reserviert ${k.budget.reserved_gb} GB (${k.budget.mode}) → ${k.budget.budget_gb} GB frei`,children:["ctx → ",(k.assigned_ctx/1024).toFixed(0),"k"]}),k.fit.level==="too_tight"&&c.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),C&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[c.jsx(Cs,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("span",{children:["Rolle ",c.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",c.jsx("strong",{children:C.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",C.name," bleibt installiert, verliert sie aber."]})]}),c.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:p,onChange:R=>v(R.target.value),onKeyDown:R=>R.key==="Enter"&&B(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(oy,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsx("button",{onClick:B,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),x.length>0&&c.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:x.map(R=>c.jsxs("button",{onClick:()=>{t(R.repo),b([]),v(""),A(R.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[c.jsx("span",{className:"font-semibold truncate",children:R.repo}),c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[c.jsx(no,{className:"h-3 w-3"})," ",R.downloads.toLocaleString()]})]},R.repo))}),u&&c.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:u})]})}const tY={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ls},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:yu},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Gv},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:qv},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Vv}};function rY(){const{data:e,isLoading:t,error:r}=z3(),{data:n}=vo(),{data:a}=hy(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[l,f]=y.useState({}),[h,p]=y.useState({}),[v,x]=y.useState(!1);async function b(k,j,S,N){f(P=>({...P,[k]:"Starte..."}));try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:k,role:j,quant:S,jinja:N})}),f(P=>({...P,[k]:"Download läuft"}))}catch{f(O=>({...O,[k]:"Fehler"}))}}return t?c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[c.jsxs("div",{children:["Modell-Registry geladen für ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(n2,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),c.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(k=>{const j=tY[k.role]||{title:k.title||k.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:bu},S=j.icon,N=o.find(I=>I.role===k.role),P=a==null?void 0:a.model_list.find(I=>I.role===k.role),O=k.models.find(I=>I.repo===k.recommended)||k.models[0];if(!O)return null;const C=l[O.repo],_=k.models.filter(I=>I.repo!==k.recommended),A=!!h[k.role];return c.jsxs("div",{className:fe("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:c.jsx(S,{className:"h-5.5 w-5.5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:j.title}),c.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",k.role]})]})]}),N?c.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):c.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.desc}),c.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[c.jsxs("span",{children:["Größe: ",tg(N.size_bytes||0)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{children:["Ersteller: ",O.author]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",O.quant]})]}),c.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:c.jsx(w4,{fit:O.fit})})]})}),c.jsx("div",{className:"pt-1",children:N?P?c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),c.jsxs("span",{children:["Bessere Version in der Registry: ",P.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>b(P.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[P.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),l[P.repo]||"Auf neue Version aktualisieren"]})]}):c.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[c.jsx(Cn,{className:"h-4 w-4"})," Auf neuestem Stand"]}):c.jsxs("button",{onClick:()=>b(O.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!C,className:fe("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",C?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"}),C||"Optimales Modell einsetzen"]})})]}),_.length>0&&c.jsxs("div",{className:"border-t border-border/20 pt-3",children:[c.jsxs("button",{onClick:()=>p(I=>({...I,[k.role]:!A})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[A?c.jsx(nI,{className:"h-3 w-3"}):c.jsx(tI,{className:"h-3 w-3"}),c.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),A&&c.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>c.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),c.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[c.jsxs("span",{children:["Quant: ",I.quant]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:I.fit.text})]})]}),c.jsx("button",{onClick:()=>b(I.repo,k.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!l[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:l[I.repo]||"Installieren"})]},I.repo))})]})]},k.role)})}),c.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[c.jsxs("button",{onClick:()=>x(!v),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oy,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),c.jsx("span",{className:"text-[10px] text-primary hover:underline",children:v?"Ausblenden ▲":"Anzeigen ▼"})]}),v&&c.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:c.jsx(eY,{})})]})]})}function nY(){const[e,t]=y.useState("cockpit");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),c.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>c.jsx("button",{onClick:()=>t(r),className:fe("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),c.jsx(XQ,{}),c.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?c.jsx(JQ,{}):c.jsx(rY,{})})]})}function iY(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=y.useState("cline"),[u,l]=y.useState(!1),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=L2(f.toString()),v=p?String(p):"";function x(S){t(S),S&&localStorage.setItem("mc_host",S)}function b(S){n(S),localStorage.setItem("mc_mcp_path",S)}const k=h==null?void 0:h.tools[a];async function j(){k&&(await navigator.clipboard.writeText(k.snippet),l(!0),setTimeout(()=>l(!1),1500))}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(uI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),c.jsx("input",{value:e,onChange:S=>x(S.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(lI,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),c.jsx("input",{value:r,onChange:S=>b(S.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),v&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",v]}),h&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(h.tools).map(([S,N])=>c.jsx("button",{onClick:()=>o(S),className:fe("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:N.label},S))}),k&&c.jsxs("div",{className:"space-y-3",children:[k.note&&c.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[c.jsx(cI,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),c.jsx("span",{children:k.note})]}),c.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[c.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[c.jsx(nf,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{children:a==="cline"||a==="cursor"?"config.json":"settings.json"})]}),c.jsxs("button",{onClick:j,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[u?c.jsx(Cn,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(JN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:u?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:c.jsx("code",{children:k.snippet})})]})]})]})]})}const aY="modulepreload",oY=function(e){return"/"+e},jN={},sY=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=u(r.map(h=>{if(h=oY(h),h in jN)return;jN[h]=!0;const p=h.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${v}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":aY,p||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),p)return new Promise((b,k)=>{x.addEventListener("load",b),x.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=u,window.dispatchEvent(l),!l.defaultPrevented)throw u}return a.then(u=>{for(const l of u||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};class lY extends y.Component{constructor(){super(...arguments);Kl(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?c.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[c.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),c.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const uY=y.lazy(()=>sY(()=>import("./GraphView-C2Rr5maK.js"),[]).then(e=>({default:e.GraphView}))),SN=["user","instruction","stable","versioned","ephemeral"],Av=new Set(["auto","agent"]),Ov={user:{label:"User",icon:SI,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:bI,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:wu,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:jI,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:aI,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},NN={label:"Gedächtnis",icon:XN,bg:"bg-muted/10",text:"text-muted-foreground"},cY={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function dY(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[a,o]=y.useState(""),[u,l]=y.useState("stable"),[f,h]=y.useState(!1),[p,v]=y.useState("liste"),x=po(),{showAlert:b,showConfirm:k,dialogElement:j}=el(),{data:S=[],error:N}=z2({q:r,category:e}),{data:P}=I3(p==="graph"),O=N?String(N):"",C=()=>{x.invalidateQueries({queryKey:["memory"]}),x.invalidateQueries({queryKey:["memory-graph"]})};async function _(){a.trim()&&(await Me("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),C())}async function A($){await Me(`/api/memory/${$}`,{method:"DELETE"}),C()}async function I(){h(!0);try{const $=await Me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if($.duplicate_count===0){b("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}k("Deduplizierung bestätigen",`${$.duplicate_count} Dublette(n) in ${$.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),C()}catch(B){b("Fehler",`Fehler beim Löschen: ${B.message}`)}})}catch($){b("Fehler",`Fehler bei der Deduplizierung: ${$.message}`)}finally{h(!1)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 self-start",children:[c.jsxs("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[c.jsxs("button",{onClick:()=>v("liste"),className:fe("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",p==="liste"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(hI,{className:"h-3.5 w-3.5"})," Liste"]}),c.jsxs("button",{onClick:()=>v("graph"),className:fe("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",p==="graph"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(wI,{className:"h-3.5 w-3.5"})," Graph"]})]}),c.jsxs("button",{onClick:I,disabled:f,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",children:[c.jsx(Y1,{className:"h-4 w-4 text-primary animate-pulse"}),c.jsx("span",{children:"Deduplizieren"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),c.jsx("textarea",{value:a,onChange:$=>o($.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),c.jsx("select",{value:u,onChange:$=>l($.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:SN.map($=>{var B;return c.jsx("option",{value:$,className:"bg-popover text-foreground",children:((B=Ov[$])==null?void 0:B.label)||$},$)})})]}),c.jsxs("button",{onClick:_,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(e2,{className:"h-4 w-4"})," Speichern"]})]})]}),p==="graph"?c.jsx(lY,{children:c.jsx(y.Suspense,{fallback:c.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:c.jsx(uY,{data:P??{nodes:[],edges:[]},onDelete:A})})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:r,onChange:$=>n($.target.value),placeholder:"Semantisch durchsuchen (nach Bedeutung, nicht nur Stichwort)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(oy,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[c.jsx("button",{onClick:()=>t(""),className:fe("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),SN.map($=>{const B=Ov[$]||NN,K=B.icon;return c.jsxs("button",{onClick:()=>t($),className:fe("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",e===$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(K,{className:"h-3 w-3"}),c.jsx("span",{children:B.label})]},$)})]})]}),O&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",O]}),c.jsx("div",{className:"space-y-3",children:S.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):S.map($=>{const B=Ov[$.category]||NN,K=B.icon;return c.jsxs("div",{className:fe("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",cY[$.category]||"border-l-muted"),children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("span",{className:fe("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",B.bg,B.text),children:[c.jsx(K,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:B.label})]}),c.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:$.content})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[typeof $.score=="number"&&c.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded uppercase tracking-wider",title:"Relevanz der semantischen Suche",children:[Math.round($.score*100),"%"]}),c.jsxs("span",{className:fe("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded uppercase tracking-wider",Av.has($.source)?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:Av.has($.source)?"Automatisch gelernt":"Manuell angelegt",children:[Av.has($.source)&&c.jsx(Y1,{className:"h-2.5 w-2.5"}),$.source]}),c.jsx("button",{onClick:()=>A($.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:c.jsx(Qv,{className:"h-3.5 w-3.5"})})]})]},$.id)})})]}),j]})}function Gd({label:e,ok:t,detail:r,icon:n,onClick:a}){return c.jsxs("div",{onClick:a,className:fe("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),c.jsx(n,{className:fe("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:fe("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&c.jsxs("button",{onClick:o=>{o.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[c.jsx(_n,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Gehirn wechseln"})]})]})}function fY(){const{data:e,error:t}=fy(5e3),{data:r}=vo(),{showAlert:n,dialogElement:a}=el(),o=po(),u=t?String(t):"",l=y.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var A;return((A=_.name.split("/").pop())==null?void 0:A.replace(".gguf",""))||_.name})],[r]),[f,h]=y.useState(null),[p,v]=y.useState(!1),[x,b]=y.useState({width:800,height:360}),k=y.useRef(null),j=y.useCallback(C=>{if(k.current&&(k.current.disconnect(),k.current=null),C){const _=new ResizeObserver(A=>{if(!A||A.length===0)return;const I=A[0].contentRect;b({width:I.width,height:I.height})});_.observe(C),k.current=_}},[]),S=x.width,N=x.height,P=(C,_,A,I)=>{const $=(C+A)/2;return`M ${C} ${_} C ${$} ${_}, ${$} ${I}, ${A} ${I}`};async function O(C){try{await Me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:C})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${C}' geändert. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:wt.agentStatus}),v(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",c.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&c.jsxs("a",{href:_s(e.terminal_url),target:"_blank",rel:"noopener",className:fe("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[c.jsx(xu,{className:"h-4 w-4"}),c.jsx("span",{children:"Terminal öffnen"})]})]}),u&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Gd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:Ps}),c.jsx(Gd,{label:"Terminal",ok:e.terminal_reachable,detail:"Web-Terminal (hermes chat)",icon:gu}),c.jsx(Gd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:_n,onClick:()=>v(!0)}),c.jsx(Gd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:ku})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),c.jsxs("div",{ref:j,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="terminal"||e.terminal_reachable)&&c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("terminal"),onMouseLeave:()=>h(null),onClick:()=>e.terminal_reachable&&window.open(_s(e.terminal_url),"_blank"),title:e.terminal_reachable?"Klicken um das Hermes-Terminal zu öffnen":"Terminal offline",children:[c.jsx(gu,{className:fe("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),c.jsx("span",{children:"Terminal"}),c.jsx("span",{className:fe("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),c.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Ps,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),c.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),c.jsx("div",{className:fe("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),c.jsxs("div",{className:fe("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>v(!0),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(_n,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),c.jsxs("div",{className:fe("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(ku,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[c.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),c.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),c.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(pI,{className:"h-5 w-5 text-primary"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:fe("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("p",{children:["Der ",c.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),c.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),c.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?c.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[c.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),c.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",c.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",c.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",c.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),c.jsxs("p",{children:["Starte ",c.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",c.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),c.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(wu,{className:"h-5 w-5 text-amber-500"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[c.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),c.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",c.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),c.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[c.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),c.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",c.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&p&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md 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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>v(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(C=>{const _=["auto","fast","heavy"].includes(C);return c.jsxs("button",{onClick:()=>O(C),className:fe("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===C||!e.brain_model&&C==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:C}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===C||!e.brain_model&&C==="auto")&&c.jsx(Cn,{className:"h-4 w-4 shrink-0 text-primary"})]},C)})})]})}),a]})}function hY(){const{data:e}=fy(5e3),t=e!=null&&e.terminal_url?_s(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return c.jsxs("div",{className:"flex h-full flex-col gap-4",children:[c.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[c.jsxs("div",{children:[c.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:"Hermes Terminal"}),c.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",c.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&c.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[c.jsx(xu,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?c.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&c.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[c.jsx(Cs,{className:"h-8 w-8 text-amber-400"}),c.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),c.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",c.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",c.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),c.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):c.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[c.jsx(r2,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}function pY(){const[e,t]=y.useState("connect"),[r,n]=y.useState("roocode"),[a,o]=y.useState(null),u="192.168.178.151",[l,f]=y.useState(!1),[h,p]=y.useState(null);function v(){f(!0),Me("/api/health").then(x=>{o(x),p(x.engine_reachable?"success":"partial")}).catch(()=>{o(null),p("fail")}).finally(()=>f(!1))}return y.useEffect(()=>{v()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),c.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[c.jsx("button",{onClick:()=>t("connect"),className:fe("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),c.jsx("button",{onClick:()=>t("concepts"),className:fe("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),e==="connect"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:fe("h-3 w-3 rounded-full ring-2 ring-black/40",h==="success"&&"bg-emerald-500 animate-pulse",h==="partial"&&"bg-amber-500",h==="fail"&&"bg-red-500",!h&&"bg-muted")}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[h==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,h==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",h==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!h&&"Verbindung wird geprüft..."]})]})]}),c.jsxs("button",{onClick:v,disabled:l,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[c.jsx(cu,{className:fe("h-3.5 w-3.5",l&&"animate-spin")}),c.jsx("span",{children:"Testen"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(XN,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4 text-cyan-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(bu,{className:"h-4 w-4 text-violet-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",c.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(yu,{className:"h-4 w-4 text-indigo-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(Gv,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),c.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[c.jsxs("button",{onClick:()=>n("roocode"),className:fe("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",r==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[c.jsx(n2,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),c.jsx("button",{onClick:()=>n("cursor"),className:fe("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),c.jsx("button",{onClick:()=>n("opencode"),className:fe("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r==="roocode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),c.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),c.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),c.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),c.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",c.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",c.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),r==="cursor"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),c.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),c.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",c.jsx("strong",{children:"Models"}),"."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),c.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",c.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),c.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",c.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),r==="opencode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),c.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),c.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),c.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),c.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nf,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),c.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue in der ",c.jsx("strong",{children:"Zentrale"})," unter ",c.jsx("strong",{children:"Dienste"}),", ob `llama-swap` aktiv (grün) ist. Wenn nicht, klicke daneben auf ",c.jsx("strong",{children:"Restart"}),"."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte im ",c.jsx("strong",{children:"Terminal"})," eine frische Session (neuer `hermes chat`). Ältere Sessions sammeln Kontext-Müll an."]})]})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[c.jsx(Vv,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(bu,{className:"h-5 w-5 text-cyan-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),c.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",c.jsx("em",{children:"Experts"}),"). Ein intelligenter ",c.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[c.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Vv,{className:"h-5 w-5 text-violet-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),c.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(yu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",c.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",c.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),c.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- -name: tdd-pro -description: Drive development with strict TDD practices ---- -# Instructions -...`}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",c.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",c.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills find"}),c.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Globaler Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",c.jsx("i",{children:"code-simplification"}),", ",c.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Projekt-Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",c.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(_n,{className:"h-5 w-5 text-indigo-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),c.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),c.jsx("p",{children:c.jsx("strong",{children:"Best Practices für Hermes:"})}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",c.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (`~/.hermes/SOUL.md` / Config), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(ku,{className:"h-5 w-5 text-amber-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),c.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(nf,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),c.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",c.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(Gv,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),c.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",c.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(ku,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),c.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(wu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[c.jsxs("p",{children:["Mission Control 2 ist als ",c.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(q1,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),c.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),c.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(q1,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),c.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[c.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function mY({title:e,hint:t}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[c.jsx(sI,{className:"h-8 w-8 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const vY=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user"}];function _v(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function gY({open:e,onClose:t,defaultTab:r="maintenance"}){const[n,a]=y.useState(null),[o,u]=y.useState([]),[l,f]=y.useState("llama-swap"),[h,p]=y.useState(""),[v,x]=y.useState(!1),[b,k]=y.useState(null),[j,S]=y.useState({}),[N,P]=y.useState("maintenance"),[O,C]=y.useState(!1),[_,A]=y.useState(""),[I,$]=y.useState(!1),[B,K]=y.useState(null);function q(Y,ce,tt){K({type:"alert",title:Y,message:ce,onConfirm:()=>{K(null),tt&&tt()}})}function R(Y,ce,tt){K({type:"confirm",title:Y,message:ce,onConfirm:()=>{K(null),tt()},onCancel:()=>K(null)})}function de(Y){return Y?new Date(Y*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[Z,ge]=y.useState(""),[ke,me]=y.useState(""),[Q,oe]=y.useState(!1),[X,L]=y.useState(!1);y.useEffect(()=>{e&&(ge(localStorage.getItem("mc_sudo_password")||""),me(localStorage.getItem("mc_hf_token")||""))},[e]),y.useEffect(()=>{e&&r&&P(r)},[e,r]);const T=y.useRef(null);function ee(){Me("/api/maintenance/updates").then(a).catch(Y=>console.error("Error loading updates",Y))}function ne(){Me("/api/jobs").then(Y=>u(Y.jobs||[])).catch(Y=>console.error("Error loading jobs",Y))}function te(Y){x(!0),k(null),Me(`/api/maintenance/logs?service=${Y}&lines=150`).then(ce=>{ce.ok?p(ce.text):(p(`Fehler beim Laden der Logs: ${ce.err||"Unbekannter Fehler"}`),(ce.status==="incorrect_password"||ce.status==="password_required")&&k(ce.status))}).catch(ce=>p(`Fehler: ${ce.message}`)).finally(()=>{x(!1),setTimeout(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},50)})}y.useEffect(()=>{if(!e)return;ee(),ne();const Y=setInterval(()=>{ne(),ee()},3e3);return()=>clearInterval(Y)},[e]),y.useEffect(()=>{!e||N!=="logs"||te(l)},[e,N,l]);async function ue(){try{await Me("/api/maintenance/os-update",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler beim Starten des OS-Updates: ${Y.message}`)}}async function pe(){try{await Me("/api/maintenance/engine-update",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler beim Engine-Update: ${Y.message}`)}}async function Oe(){C(!0);try{await Me("/api/maintenance/check-updates",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler bei der Update-Suche: ${Y.message}`)}finally{C(!1)}}async function J(Y,ce){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:Y,role:ce})}),q("Gestartet",`Modell-Upgrade für '${ce}' (${Y}) gestartet.`),ne(),P("maintenance")}catch(tt){q("Fehler",`Fehler beim Starten des Modell-Upgrades: ${tt.message}`)}}async function je(){R("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Me("/api/maintenance/reboot",{method:"POST"}),q("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(Y){q("Fehler",`Fehler beim Reboot: ${Y.message}`)}})}async function _e(){$(!0),A("Snapshot wird erzeugt...");try{const Y=await Me("/api/system/backup",{method:"POST"});A(Y.ok?`Snapshot erzeugt: ${Y.snapshot} (${Y.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(Y){A(`Fehler: ${Y.message}`)}finally{$(!1)}}async function ae(Y){S(ce=>({...ce,[Y]:!0}));try{const ce=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:Y})});ce.ok?q("Dienst neu gestartet",`Dienst ${Y} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===Y&&te(Y)}):q("Fehler",`Fehler beim Neustart: ${ce.err||"Unbekannter Fehler"}`)}catch(ce){q("Fehler",`Fehler beim Neustart: ${ce.message}`)}finally{S(ce=>({...ce,[Y]:!1}))}}async function Xe(Y){try{await Me(`/api/jobs/${Y}/cancel`,{method:"POST"}),ne()}catch(ce){q("Fehler",`Fehler beim Abbrechen: ${ce.message}`)}}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:fe("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),c.jsxs("div",{className:fe("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[c.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),c.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[c.jsx("button",{onClick:()=>P("maintenance"),className:fe("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),c.jsx("button",{onClick:()=>P("logs"),className:fe("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),c.jsx("button",{onClick:()=>P("settings"),className:fe("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),c.jsxs("div",{className:"flex items-center gap-2",children:[(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",de(n.last_check)]}),c.jsxs("button",{onClick:Oe,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[c.jsx(cu,{className:fe("h-3 w-3",O&&"animate-spin")}),"Nach Updates suchen"]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{onClick:ue,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(wu,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.os?`${n.os} Updates verfügbar`:"Auf neuestem Stand"})]}),c.jsxs("button",{onClick:pe,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(t2,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),c.jsxs("button",{onClick:je,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[c.jsx(yI,{className:"h-4.5 w-4.5"}),c.jsxs("div",{children:[c.jsx("div",{children:"Host-System neu starten (Reboot)"}),c.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"System-Backup & Snapshot"}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-background/20 space-y-3",children:[c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Git-Snapshot der aktuellen Konfigurationen und des System-Zustands erzeugen."}),c.jsxs("button",{onClick:_e,disabled:I,className:"w-full h-9 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shadow-md shadow-primary/10",children:[c.jsx(xI,{className:fe("h-4 w-4",I&&"animate-pulse")})," Snapshot erstellen"]}),_&&c.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]})]}),(n==null?void 0:n.model_list)&&n.model_list.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",de(n.last_check)]})]}),c.jsx("div",{className:"space-y-2",children:n.model_list.map(Y=>c.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold",children:Y.title}),c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:Y.repo}),c.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",Y.role]})]}),c.jsxs("button",{onClick:()=>J(Y.repo,Y.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},Y.role))})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),c.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(Y=>Y.state==="running"||Y.state==="queued").length," Aktiv"]})]}),c.jsx("div",{className:"space-y-3",children:o.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(Y=>{const ce=Y.state==="running"||Y.state==="queued";return c.jsxs("div",{className:fe("p-3 rounded-xl border transition-all duration-300",ce?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[ce&&c.jsxs("span",{className:"flex h-2 w-2 relative",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),Y.label]}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[c.jsxs("span",{children:["ID: ",Y.id]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:fe(Y.state==="done"&&"text-emerald-400",Y.state==="failed"&&"text-red-400",Y.state==="running"&&"text-primary",Y.state==="queued"&&"text-amber-400",Y.state==="canceled"&&"text-muted-foreground"),children:Y.state})]})]}),ce&&c.jsx("button",{onClick:()=>Xe(Y.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),Y.state==="running"&&c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${Y.progress??0}%`}})}),c.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[c.jsxs("span",{children:[Y.progress??0,"%"]}),Y.done_bytes!=null&&Y.total_bytes!=null&&c.jsxs("span",{children:[_v(Y.done_bytes)," / ",_v(Y.total_bytes),Y.rate_bps!=null&&` (${_v(Y.rate_bps)}/s)`]}),Y.eta_s!=null&&c.jsxs("span",{children:["ETA: ",Y.eta_s,"s"]})]})]})]},Y.id)})})]})]}),N==="logs"&&c.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:l,onChange:Y=>f(Y.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:vY.map(Y=>c.jsxs("option",{value:Y.id,children:[Y.label," (",Y.type==="system"?"systemd-root":"user",")"]},Y.id))}),c.jsxs("button",{onClick:()=>ae(l),disabled:j[l],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[c.jsx(cu,{className:fe("h-3.5 w-3.5",j[l]&&"animate-spin")}),"Restart"]})]}),c.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[c.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[c.jsx(nf,{className:"h-3 w-3 text-primary"}),c.jsxs("span",{children:["stdout/stderr - ",l]})]}),c.jsx("button",{onClick:()=>te(l),disabled:v,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.jsx(cu,{className:fe("h-3 w-3",v&&"animate-spin")})})]}),c.jsx("pre",{ref:T,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[c.jsx(Cs,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),c.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),c.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),c.jsx("button",{onClick:()=>P("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):v&&!h?c.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||c.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(wu,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:Q?"text":"password",value:Z,onChange:Y=>ge(Y.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>oe(!Q),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Q?c.jsx(Q1,{className:"h-4 w-4"}):c.jsx(qv,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(dI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:X?"text":"password",value:ke,onChange:Y=>me(Y.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>L(!X),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:X?c.jsx(Q1,{className:"h-4 w-4"}):c.jsx(qv,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),c.jsxs("div",{className:"flex gap-3 pt-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",Z),localStorage.setItem("mc_hf_token",ke),q("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),c.jsx("button",{onClick:()=>{ge(""),me(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),q("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 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:"Zurücksetzen"})]})]})]})]}),B&&c.jsx(o_,{type:B.type,title:B.title,message:B.message,onConfirm:B.onConfirm,onCancel:B.onCancel})]})}function yY(){var v,x,b,k,j;P4();const[e,t]=y.useState("dashboard"),[r,n]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,o]=y.useState(!1),[u,l]=y.useState("maintenance"),{data:f}=T3(),{data:h}=oh(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),o(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]);const p=Yv.find(S=>S.id===e);return c.jsxs("div",{className:"flex h-full relative",children:[c.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[c.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),c.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),c.jsx(M3,{onNavigate:t}),c.jsx(gY,{open:a,onClose:()=>o(!1),defaultTab:u}),c.jsxs("aside",{className:fe("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[c.jsxs("div",{className:fe("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[c.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&c.jsxs("div",{className:"leading-tight",children:[c.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),c.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?c.jsx(ZN,{className:"h-4 w-4"}):c.jsx(rI,{className:"h-4 w-4"})})]}),c.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Yv.map(S=>c.jsxs("button",{onClick:()=>t(S.id),className:fe("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[c.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&c.jsx("span",{className:"truncate",children:S.label})]},S.id))}),c.jsx("div",{className:fe("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?c.jsx("div",{className:"flex justify-center",children:c.jsx("span",{className:fe("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):c.jsxs("div",{className:"space-y-2 text-left",children:[f?c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:fe("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),c.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",c.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&c.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[c.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:((v=h.versions.engine)==null?void 0:v.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((x=h.versions.engine)==null?void 0:x.version_text)||"unbekannt",children:[c.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((j=(k=h.versions.engine)==null?void 0:k.version_text)==null?void 0:j.split(" ").pop())||"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"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"}),c.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},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:[c.jsx(oI,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Suchen"}),c.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),c.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&c.jsx(YQ,{}),e==="models"&&c.jsx(nY,{}),e==="connect"&&c.jsx(iY,{}),e==="memory"&&c.jsx(dY,{}),e==="agent"&&c.jsx(fY,{}),e==="terminal"&&c.jsx(hY,{}),e==="guide"&&c.jsx(pY,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&c.jsx(mY,{title:p.label,hint:p.hint})]})]})]})}const xY=new LM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});fM.createRoot(document.getElementById("root")).render(c.jsx(RN.StrictMode,{children:c.jsx(zM,{client:xY,children:c.jsx(yY,{})})}));export{RN as R,Y1 as S,Qv as T,Fs as a,wI as b,dM as c,ty as g,c as j,dC as l,y as r}; diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 5f15240..685c232 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/views/MemoryView.tsx b/frontend/src/views/MemoryView.tsx index d3d8638..0a6eb1c 100644 --- a/frontend/src/views/MemoryView.tsx +++ b/frontend/src/views/MemoryView.tsx @@ -1,49 +1,60 @@ -import { useState, lazy, Suspense } from "react" -import { Trash2, Sparkles, User, Scroll, Shield, Tag, Clock, Search, Plus, BookOpen, Share2, List } from "lucide-react" +import { useState, useMemo, lazy, Suspense } from "react" +import { + Trash2, Sparkles, User, Scroll, Shield, Tag, Clock, Search, Plus, BookOpen, + Share2, List, Brain, X, Wand2, +} from "lucide-react" import { api, type DedupeResult } from "@/lib/api" import { useMemory, useMemoryGraph, useQueryClient } from "@/lib/queries" import { useDialog } from "@/lib/useDialog" import { cn } from "@/lib/utils" - import { GraphErrorBoundary } from "./GraphErrorBoundary" // reagraph + three.js sind schwer → erst laden, wenn der Graph-Tab geöffnet wird. const GraphView = lazy(() => import("./GraphView").then((m) => ({ default: m.GraphView }))) - const CATEGORIES = ["user", "instruction", "stable", "versioned", "ephemeral"] -// Herkunft: automatisch gelernt (Mem0-Extraktion / Agent) vs. manuell angelegt. -const AUTO_SOURCES = new Set(["auto", "agent"]) +// Herkunft: automatisch gelernt (Mem0-Extraktion / Agent / Hermes) vs. manuell/Vorlage. +const AUTO_SOURCES = new Set(["auto", "agent", "hermes"]) -const CAT_CONFIG: Record = { - user: { label: "User", icon: User, color: "text-cyan-400", border: "border-cyan-500/30", bg: "bg-cyan-500/10", text: "text-cyan-400" }, - instruction: { label: "Regel", icon: Scroll, color: "text-violet-400", border: "border-violet-500/30", bg: "bg-violet-500/10", text: "text-violet-400" }, - stable: { label: "Fakt", icon: Shield, color: "text-indigo-400", border: "border-indigo-500/30", bg: "bg-indigo-500/10", text: "text-indigo-400" }, - versioned: { label: "Version", icon: Tag, color: "text-amber-400", border: "border-amber-500/30", bg: "bg-amber-500/10", text: "text-amber-400" }, - ephemeral: { label: "Temporär", icon: Clock, color: "text-pink-400", border: "border-pink-500/30", bg: "bg-pink-500/10", text: "text-pink-400" }, +const CAT_CONFIG: Record = { + user: { label: "User", icon: User, bg: "bg-cyan-500/10", text: "text-cyan-400" }, + instruction: { label: "Regel", icon: Scroll, bg: "bg-violet-500/10", text: "text-violet-400" }, + stable: { label: "Fakt", icon: Shield, bg: "bg-indigo-500/10", text: "text-indigo-400" }, + versioned: { label: "Version", icon: Tag, bg: "bg-amber-500/10", text: "text-amber-400" }, + ephemeral: { label: "Temporär", icon: Clock, bg: "bg-pink-500/10", text: "text-pink-400" }, } - -const DEFAULT_CAT = { label: "Gedächtnis", icon: BookOpen, color: "text-muted-foreground", border: "border-border/40", bg: "bg-muted/10", text: "text-muted-foreground" } +const DEFAULT_CAT = { label: "Gedächtnis", icon: BookOpen, bg: "bg-muted/10", text: "text-muted-foreground" } const BORDER_CLASSES: Record = { - user: "border-l-cyan-500/80", - instruction: "border-l-violet-500/80", - stable: "border-l-indigo-500/80", - versioned: "border-l-amber-500/80", - ephemeral: "border-l-pink-500/80", + user: "border-l-cyan-500/80", instruction: "border-l-violet-500/80", stable: "border-l-indigo-500/80", + versioned: "border-l-amber-500/80", ephemeral: "border-l-pink-500/80", } +// Starter-Vorlage („Beginner Template"): wird NUR auf Knopfdruck eingefügt (source=template), +// jeder Eintrag einzeln editier-/löschbar. Bewusst knapp & atomar gehalten. +const STARTER_TEMPLATE: { content: string; category: string }[] = [ + { content: "Der Nutzer heißt Tobi — Homelab-Entwickler, bevorzugt pragmatische Lösungen.", category: "user" }, + { content: "Bevorzugt knappe, deutsche Antworten.", category: "user" }, + { content: "Deploy nur via PowerShell-Push (Git Credential Manager).", category: "instruction" }, + { content: "Tests bei Deployments nie überspringen.", category: "instruction" }, + { content: "AI-Box: 192.168.178.151 (Ryzen AI MAX+ 395, 122 GB Unified-RAM).", category: "stable" }, + { content: "Agent-Hirn = fast (Qwen3.6-35B-A3B), immer warm.", category: "stable" }, +] + export function MemoryView() { const [filter, setFilter] = useState("") const [q, setQ] = useState("") const [content, setContent] = useState("") const [category, setCategory] = useState("stable") const [deduping, setDeduping] = useState(false) - const [view, setView] = useState<"liste" | "graph">("liste") + const [seeding, setSeeding] = useState(false) + const [view, setView] = useState<"liste" | "graph">("graph") + const [showAdd, setShowAdd] = useState(false) const qc = useQueryClient() const { showAlert, showConfirm, dialogElement } = useDialog() + const { data: allItems = [] } = useMemory({}) const { data: items = [], error: itemsErr } = useMemory({ q, category: filter }) const { data: graph } = useMemoryGraph(view === "graph") const error = itemsErr ? String(itemsErr) : "" @@ -53,14 +64,27 @@ export function MemoryView() { qc.invalidateQueries({ queryKey: ["memory-graph"] }) } + const stats = useMemo(() => { + const total = allItems.length + const auto = allItems.filter((m) => AUTO_SOURCES.has(m.source)).length + return { total, auto, manual: total - auto, cats: new Set(allItems.map((m) => m.category)).size } + }, [allItems]) + const empty = allItems.length === 0 + + // Graph clientseitig nach Suchtext filtern (Knoten + deren Kanten). + const graphData = useMemo(() => { + const g = graph ?? { nodes: [], edges: [] } + if (!q.trim()) return g + const ql = q.toLowerCase() + const ns = g.nodes.filter((n) => n.content.toLowerCase().includes(ql)) + const ids = new Set(ns.map((n) => n.id)) + return { nodes: ns, edges: g.edges.filter((e) => ids.has(e.source) && ids.has(e.target)) } + }, [graph, q]) + async function add() { if (!content.trim()) return - await api("/api/memory", { - method: "POST", - body: JSON.stringify({ content, category, source: "ui" }) - }) - setContent("") - reloadMemory() + await api("/api/memory", { method: "POST", body: JSON.stringify({ content, category, source: "ui" }) }) + setContent(""); setShowAdd(false); reloadMemory() } async function del(id: string) { @@ -68,239 +92,232 @@ export function MemoryView() { reloadMemory() } + function applyTemplate() { + showConfirm( + "Starter-Vorlage einfügen", + `${STARTER_TEMPLATE.length} Beispiel-Fakten über dein Setup einfügen? Du kannst jeden einzeln bearbeiten oder löschen.`, + async () => { + setSeeding(true) + try { + for (const t of STARTER_TEMPLATE) { + await api("/api/memory", { method: "POST", body: JSON.stringify({ content: t.content, category: t.category, source: "template" }) }) + } + reloadMemory() + } catch (e: any) { + showAlert("Fehler", `Vorlage konnte nicht eingefügt werden: ${e.message}`) + } finally { + setSeeding(false) + } + }, + ) + } + async function cleanup() { setDeduping(true) try { - const dry = await api("/api/memory/dedupe", { - method: "POST", - body: JSON.stringify({ apply: false }), - }) - if (dry.duplicate_count === 0) { - showAlert("Ergebnis", "Keine Dubletten gefunden — alles sauber.") - return - } - showConfirm( - "Deduplizierung bestätigen", + const dry = await api("/api/memory/dedupe", { method: "POST", body: JSON.stringify({ apply: false }) }) + if (dry.duplicate_count === 0) { showAlert("Ergebnis", "Keine Dubletten gefunden — alles sauber."); return } + showConfirm("Deduplizierung bestätigen", `${dry.duplicate_count} Dublette(n) in ${dry.groups.length} Gruppe(n) gefunden. Entfernen?`, async () => { - try { - await api("/api/memory/dedupe", { - method: "POST", - body: JSON.stringify({ apply: true }) - }) - reloadMemory() - } catch (e: any) { - showAlert("Fehler", `Fehler beim Löschen: ${e.message}`) - } - } - ) + try { await api("/api/memory/dedupe", { method: "POST", body: JSON.stringify({ apply: true }) }); reloadMemory() } + catch (e: any) { showAlert("Fehler", `Fehler beim Löschen: ${e.message}`) } + }) } catch (e: any) { showAlert("Fehler", `Fehler bei der Deduplizierung: ${e.message}`) - } finally { - setDeduping(false) - } + } finally { setDeduping(false) } } + const StatChip = ({ value, label, accent }: { value: number; label: string; accent?: "auto" }) => ( + + {accent === "auto" && } + {value} {label} + + ) + return ( -
- {/* Header */} -
+
+ {/* Kopf / Werkzeugleiste */} +

- Gedächtnis-Pool (Memory) + Gedächtnis-Pool

- Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll. + Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP.

-
+
+
+ setQ(e.target.value)} + placeholder="Semantisch suchen…" + className="w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground" + /> + +
+
- - -
- -
-
- - {/* Add New Fact Box */} -
-
Neuen Eintrag anlegen
- -