Files
mission-control-v2/frontend/dist/assets/index-B0tHcMp_.js
T
Hitonabi 8a2db70f3c MC2 Final (D16 c+e): System-Logs mit Fehler-Farben/Filter + Auto-Dedupe
c) System-Logs ausgebaut: neue LogConsole-Komponente färbt Fehler (rot) und
   Warnungen (amber) ein, "Nur Probleme"-Filter mit Zähler, Zeilen-Suche;
   voice-service in die Dienst-Liste aufgenommen (war nur backend-seitig).
e) Mem0-Dubletten automatisch: deterministischer Auto-Dedupe-Loop (täglich,
   apply=True, Schwelle 0.9 > manueller 0.85 da ohne Review) als Backend-
   Hintergrund-Task — kein Memory-Bloat mehr ohne Zutun. Knopf bleibt on-demand.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 20:12:11 +02:00

665 lines
888 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var XM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var ZM=(e,t,r)=>t in e?XM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qo=(e,t,r)=>ZM(e,typeof t!="symbol"?t+"":t,r),Bp=(e,t,r)=>t.has(e)||V1("Cannot "+r);var L=(e,t,r)=>(Bp(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?V1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Bp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(Bp(e,t,"access private method"),r);var md=(e,t,r,n)=>({set _(i){ye(e,t,i,r)},get _(){return L(e,t,n)}});function JM(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)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(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function cy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Up={exports:{}},Hl={},Hp={exports:{}},Fe={};/**
* @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 q1;function e3(){if(q1)return Fe;q1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}S.prototype.isReactComponent={},S.prototype.setState=function(I,M){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,M,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}var A=E.prototype=new N;A.constructor=E,j(A,S.prototype),A.isPureReactComponent=!0;var P=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B(I,M,H){var ne,Z={},me=null,pe=null;if(M!=null)for(ne in M.ref!==void 0&&(pe=M.ref),M.key!==void 0&&(me=""+M.key),M)_.call(M,ne)&&!D.hasOwnProperty(ne)&&(Z[ne]=M[ne]);var Oe=arguments.length-2;if(Oe===1)Z.children=H;else if(1<Oe){for(var re=Array(Oe),we=0;we<Oe;we++)re[we]=arguments[we+2];Z.children=re}if(I&&I.defaultProps)for(ne in Oe=I.defaultProps,Oe)Z[ne]===void 0&&(Z[ne]=Oe[ne]);return{$$typeof:e,type:I,key:me,ref:pe,props:Z,_owner:O.current}}function F(I,M){return{$$typeof:e,type:I.type,key:M,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Y(I){var M={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(H){return M[H]})}var U=/\/+/g;function he(I,M){return typeof I=="object"&&I!==null&&I.key!=null?Y(""+I.key):M.toString(36)}function ue(I,M,H,ne,Z){var me=typeof I;(me==="undefined"||me==="boolean")&&(I=null);var pe=!1;if(I===null)pe=!0;else switch(me){case"string":case"number":pe=!0;break;case"object":switch(I.$$typeof){case e:case t:pe=!0}}if(pe)return pe=I,Z=Z(pe),I=ne===""?"."+he(pe,0):ne,P(Z)?(H="",I!=null&&(H=I.replace(U,"$&/")+"/"),ue(Z,M,H,"",function(we){return we})):Z!=null&&(z(Z)&&(Z=F(Z,H+(!Z.key||pe&&pe.key===Z.key?"":(""+Z.key).replace(U,"$&/")+"/")+I)),M.push(Z)),1;if(pe=0,ne=ne===""?".":ne+":",P(I))for(var Oe=0;Oe<I.length;Oe++){me=I[Oe];var re=ne+he(me,Oe);pe+=ue(me,M,H,re,Z)}else if(re=v(I),typeof re=="function")for(I=re.call(I),Oe=0;!(me=I.next()).done;)me=me.value,re=ne+he(me,Oe++),pe+=ue(me,M,H,re,Z);else if(me==="object")throw M=String(I),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return pe}function ge(I,M,H){if(I==null)return I;var ne=[],Z=0;return ue(I,ne,"","",function(me){return M.call(H,me,Z++)}),ne}function ie(I){if(I._status===-1){var M=I._result;M=M(),M.then(function(H){(I._status===0||I._status===-1)&&(I._status=1,I._result=H)},function(H){(I._status===0||I._status===-1)&&(I._status=2,I._result=H)}),I._status===-1&&(I._status=0,I._result=M)}if(I._status===1)return I._result.default;throw I._result}var se={current:null},X={transition:null},te={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:X,ReactCurrentOwner:O};function J(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ge,forEach:function(I,M,H){ge(I,function(){M.apply(this,arguments)},H)},count:function(I){var M=0;return ge(I,function(){M++}),M},toArray:function(I){return ge(I,function(M){return M})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Fe.Component=S,Fe.Fragment=r,Fe.Profiler=i,Fe.PureComponent=E,Fe.StrictMode=n,Fe.Suspense=f,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Fe.act=J,Fe.cloneElement=function(I,M,H){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ne=j({},I.props),Z=I.key,me=I.ref,pe=I._owner;if(M!=null){if(M.ref!==void 0&&(me=M.ref,pe=O.current),M.key!==void 0&&(Z=""+M.key),I.type&&I.type.defaultProps)var Oe=I.type.defaultProps;for(re in M)_.call(M,re)&&!D.hasOwnProperty(re)&&(ne[re]=M[re]===void 0&&Oe!==void 0?Oe[re]:M[re])}var re=arguments.length-2;if(re===1)ne.children=H;else if(1<re){Oe=Array(re);for(var we=0;we<re;we++)Oe[we]=arguments[we+2];ne.children=Oe}return{$$typeof:e,type:I.type,key:Z,ref:me,props:ne,_owner:pe}},Fe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:o,_context:I},I.Consumer=I},Fe.createElement=B,Fe.createFactory=function(I){var M=B.bind(null,I);return M.type=I,M},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(I){return{$$typeof:c,render:I}},Fe.isValidElement=z,Fe.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:ie}},Fe.memo=function(I,M){return{$$typeof:h,type:I,compare:M===void 0?null:M}},Fe.startTransition=function(I){var M=X.transition;X.transition={};try{I()}finally{X.transition=M}},Fe.unstable_act=J,Fe.useCallback=function(I,M){return se.current.useCallback(I,M)},Fe.useContext=function(I){return se.current.useContext(I)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(I){return se.current.useDeferredValue(I)},Fe.useEffect=function(I,M){return se.current.useEffect(I,M)},Fe.useId=function(){return se.current.useId()},Fe.useImperativeHandle=function(I,M,H){return se.current.useImperativeHandle(I,M,H)},Fe.useInsertionEffect=function(I,M){return se.current.useInsertionEffect(I,M)},Fe.useLayoutEffect=function(I,M){return se.current.useLayoutEffect(I,M)},Fe.useMemo=function(I,M){return se.current.useMemo(I,M)},Fe.useReducer=function(I,M,H){return se.current.useReducer(I,M,H)},Fe.useRef=function(I){return se.current.useRef(I)},Fe.useState=function(I){return se.current.useState(I)},Fe.useSyncExternalStore=function(I,M,H){return se.current.useSyncExternalStore(I,M,H)},Fe.useTransition=function(){return se.current.useTransition()},Fe.version="18.3.1",Fe}var Q1;function Ws(){return Q1||(Q1=1,Hp.exports=e3()),Hp.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Y1;function t3(){if(Y1)return Hl;Y1=1;var e=Ws(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:c,key:v,ref:b,props:g,_owner:i.current}}return Hl.Fragment=r,Hl.jsx=u,Hl.jsxs=u,Hl}var X1;function r3(){return X1||(X1=1,Up.exports=t3()),Up.exports}var l=r3(),y=Ws();const dy=cy(y),Zf=JM({__proto__:null,default:dy},[y]);var pd={},Wp={exports:{}},br={},Kp={exports:{}},Gp={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Z1;function n3(){return Z1||(Z1=1,(function(e){function t(X,te){var J=X.length;X.push(te);e:for(;0<J;){var I=J-1>>>1,M=X[I];if(0<i(M,te))X[I]=te,X[J]=M,J=I;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var te=X[0],J=X.pop();if(J!==te){X[0]=J;e:for(var I=0,M=X.length,H=M>>>1;I<H;){var ne=2*(I+1)-1,Z=X[ne],me=ne+1,pe=X[me];if(0>i(Z,J))me<M&&0>i(pe,Z)?(X[I]=pe,X[me]=J,I=me):(X[I]=Z,X[ne]=J,I=ne);else if(me<M&&0>i(pe,J))X[I]=pe,X[me]=J,I=me;else break e}}return te}function i(X,te){var J=X.sortIndex-te.sortIndex;return J!==0?J:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=X)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,ie(_);else{var te=r(h);te!==null&&se(P,te.startTime-X)}}function _(X,te){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var J=v;try{for(A(te),g=r(f);g!==null&&(!(g.expirationTime>te)||X&&!Y());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var M=I(g.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?g.callback=M:g===r(f)&&n(f),A(te)}else n(f);g=r(f)}if(g!==null)var H=!0;else{var ne=r(h);ne!==null&&se(P,ne.startTime-te),H=!1}return H}finally{g=null,v=J,b=!1}}var O=!1,D=null,B=-1,F=5,z=-1;function Y(){return!(e.unstable_now()-z<F)}function U(){if(D!==null){var X=e.unstable_now();z=X;var te=!0;try{te=D(!0,X)}finally{te?he():(O=!1,D=null)}}else O=!1}var he;if(typeof E=="function")he=function(){E(U)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=U,he=function(){ge.postMessage(null)}}else he=function(){S(U,0)};function ie(X){D=X,O||(O=!0,he())}function se(X,te){B=S(function(){X(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){j||b||(j=!0,ie(_))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var J=v;v=te;try{return X()}finally{v=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,te){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var J=v;v=X;try{return te()}finally{v=J}},e.unstable_scheduleCallback=function(X,te,J){var I=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?I+J:I):J=I,X){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=J+M,X={id:m++,callback:te,priorityLevel:X,startTime:J,expirationTime:M,sortIndex:-1},J>I?(X.sortIndex=J,t(h,X),r(f)===null&&X===r(h)&&(k?(N(B),B=-1):k=!0,se(P,J-I))):(X.sortIndex=M,t(f,X),j||b||(j=!0,ie(_))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var te=v;return function(){var J=v;v=te;try{return X.apply(this,arguments)}finally{v=J}}}})(Gp)),Gp}var J1;function i3(){return J1||(J1=1,Kp.exports=n3()),Kp.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 ew;function a3(){if(ew)return br;ew=1;var e=Ws(),t=i3();function r(a){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(a,s){u(a,s),u(a+"Capture",s)}function u(a,s){for(i[a]=s,a=0;a<s.length;a++)n.add(s[a])}var c=!(typeof window>"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]*$/,m={},g={};function v(a){return f.call(g,a)?!0:f.call(m,a)?!1:h.test(a)?g[a]=!0:(m[a]=!0,!1)}function b(a,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function j(a,s,d,p){if(s===null||typeof s>"u"||b(a,s,d,p))return!0;if(p)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(a,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var s=a[0];S[s]=new k(s,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new k(a,2,!1,a,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(a){S[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(a){return a[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(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new k(a,1,!1,a.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(a){S[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,d,x,p)&&(d=null),p||x===null?v(s)&&(d===null?a.removeAttribute(s):a.setAttribute(s,""+d)):x.mustUseProperty?a[x.propertyName]=d===null?x.type===3?!1:"":d:(s=x.attributeName,p=x.attributeNamespace,d===null?a.removeAttribute(s):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,p?a.setAttributeNS(p,s,d):a.setAttribute(s,d))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),O=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),Y=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),X=Symbol.iterator;function te(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var J=Object.assign,I;function M(a){if(I===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
`+I+a}var H=!1;function ne(a,s){if(!a||H)return"";H=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Q){var p=Q}Reflect.construct(a,[],s)}else{try{s.call()}catch(Q){p=Q}a.call(s.prototype)}else{try{throw Error()}catch(Q){p=Q}a()}}catch(Q){if(Q&&p&&typeof Q.stack=="string"){for(var x=Q.stack.split(`
`),w=p.stack.split(`
`),C=x.length-1,T=w.length-1;1<=C&&0<=T&&x[C]!==w[T];)T--;for(;1<=C&&0<=T;C--,T--)if(x[C]!==w[T]){if(C!==1||T!==1)do if(C--,T--,0>T||x[C]!==w[T]){var R=`
`+x[C].replace(" at new "," at ");return a.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",a.displayName)),R}while(1<=C&&0<=T);break}}}finally{H=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function Z(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=ne(a.type,!1),a;case 11:return a=ne(a.type.render,!1),a;case 1:return a=ne(a.type,!0),a;default:return""}}function me(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case D:return"Fragment";case O:return"Portal";case F:return"Profiler";case B:return"StrictMode";case he:return"Suspense";case ue:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Y:return(a.displayName||"Context")+".Consumer";case z:return(a._context.displayName||"Context")+".Provider";case U:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ge:return s=a.displayName||null,s!==null?s:me(a.type)||"Memo";case ie:s=a._payload,a=a._init;try{return me(a(s))}catch{}}return null}function pe(a){var s=a.type;switch(a.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 a=s.render,a=a.displayName||a.name||"",s.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(s);case 8:return s===B?"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(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function re(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(a){var s=re(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),p=""+a[s];if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function _e(a){a._valueTracker||(a._valueTracker=we(a))}function ae(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return a&&(p=re(a)?a.checked?"true":"false":a.value),a=p,a!==d?(s.setValue(a),!0):!1}function et(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Be(a,s){var d=s.checked;return J({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function Pe(a,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=Oe(s.value!=null?s.value:d),a._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function vt(a,s){s=s.checked,s!=null&&A(a,"checked",s,!1)}function Yt(a,s){vt(a,s);var d=Oe(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}s.hasOwnProperty("value")?Ae(a,s.type,d):s.hasOwnProperty("defaultValue")&&Ae(a,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function K(a,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+a._wrapperState.initialValue,d||s===a.value||(a.value=s),a.defaultValue=s}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ae(a,s,d){(s!=="number"||et(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Se=Array.isArray;function qe(a,s,d,p){if(a=a.options,s){s={};for(var x=0;x<d.length;x++)s["$"+d[x]]=!0;for(d=0;d<a.length;d++)x=s.hasOwnProperty("$"+a[d].value),a[d].selected!==x&&(a[d].selected=x),x&&p&&(a[d].defaultSelected=!0)}else{for(d=""+Oe(d),s=null,x=0;x<a.length;x++){if(a[x].value===d){a[x].selected=!0,p&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function G(a,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return J({},s,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ie(a,s){var d=s.value;if(d==null){if(d=s.children,s=s.defaultValue,d!=null){if(s!=null)throw Error(r(92));if(Se(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}a._wrapperState={initialValue:Oe(d)}}function Xt(a,s){var d=Oe(s.value),p=Oe(s.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),s.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),p!=null&&(a.defaultValue=""+p)}function ax(a){var s=a.textContent;s===a._wrapperState.initialValue&&s!==""&&s!==null&&(a.value=s)}function ox(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Zh(a,s){return a==null||a==="http://www.w3.org/1999/xhtml"?ox(s):a==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var oc,sx=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,p,x){MSApp.execUnsafeLocalFunction(function(){return a(s,d,p,x)})}:a})(function(a,s){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=s;else{for(oc=oc||document.createElement("div"),oc.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=oc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;s.firstChild;)a.appendChild(s.firstChild)}});function al(a,s){if(s){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=s;return}}a.textContent=s}var ol={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},t_=["Webkit","ms","Moz","O"];Object.keys(ol).forEach(function(a){t_.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),ol[s]=ol[a]})});function lx(a,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ol.hasOwnProperty(a)&&ol[a]?(""+s).trim():s+"px"}function ux(a,s){a=a.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=lx(d,s[d],p);d==="float"&&(d="cssFloat"),p?a.setProperty(d,x):a[d]=x}}var r_=J({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 Jh(a,s){if(s){if(r_[a]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,a));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 em(a,s){if(a.indexOf("-")===-1)return typeof s.is=="string";switch(a){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 tm=null;function rm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var nm=null,So=null,No=null;function cx(a){if(a=Cl(a)){if(typeof nm!="function")throw Error(r(280));var s=a.stateNode;s&&(s=Pc(s),nm(a.stateNode,a.type,s))}}function dx(a){So?No?No.push(a):No=[a]:So=a}function fx(){if(So){var a=So,s=No;if(No=So=null,cx(a),s)for(a=0;a<s.length;a++)cx(s[a])}}function hx(a,s){return a(s)}function mx(){}var im=!1;function px(a,s,d){if(im)return a(s,d);im=!0;try{return hx(a,s,d)}finally{im=!1,(So!==null||No!==null)&&(mx(),fx())}}function sl(a,s){var d=a.stateNode;if(d===null)return null;var p=Pc(d);if(p===null)return null;d=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var am=!1;if(c)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){am=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{am=!1}function n_(a,s,d,p,x,w,C,T,R){var Q=Array.prototype.slice.call(arguments,3);try{s.apply(d,Q)}catch(le){this.onError(le)}}var ul=!1,sc=null,lc=!1,om=null,i_={onError:function(a){ul=!0,sc=a}};function a_(a,s,d,p,x,w,C,T,R){ul=!1,sc=null,n_.apply(i_,arguments)}function o_(a,s,d,p,x,w,C,T,R){if(a_.apply(this,arguments),ul){if(ul){var Q=sc;ul=!1,sc=null}else throw Error(r(198));lc||(lc=!0,om=Q)}}function xa(a){var s=a,d=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(d=s.return),a=s.return;while(a)}return s.tag===3?d:null}function gx(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function vx(a){if(xa(a)!==a)throw Error(r(188))}function s_(a){var s=a.alternate;if(!s){if(s=xa(a),s===null)throw Error(r(188));return s!==a?null:a}for(var d=a,p=s;;){var x=d.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){d=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===d)return vx(x),a;if(w===p)return vx(x),s;w=w.sibling}throw Error(r(188))}if(d.return!==p.return)d=x,p=w;else{for(var C=!1,T=x.child;T;){if(T===d){C=!0,d=x,p=w;break}if(T===p){C=!0,p=x,d=w;break}T=T.sibling}if(!C){for(T=w.child;T;){if(T===d){C=!0,d=w,p=x;break}if(T===p){C=!0,p=w,d=x;break}T=T.sibling}if(!C)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:s}function yx(a){return a=s_(a),a!==null?xx(a):null}function xx(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var s=xx(a);if(s!==null)return s;a=a.sibling}return null}var bx=t.unstable_scheduleCallback,wx=t.unstable_cancelCallback,l_=t.unstable_shouldYield,u_=t.unstable_requestPaint,yt=t.unstable_now,c_=t.unstable_getCurrentPriorityLevel,sm=t.unstable_ImmediatePriority,kx=t.unstable_UserBlockingPriority,uc=t.unstable_NormalPriority,d_=t.unstable_LowPriority,jx=t.unstable_IdlePriority,cc=null,wn=null;function f_(a){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(cc,a,void 0,(a.current.flags&128)===128)}catch{}}var rn=Math.clz32?Math.clz32:p_,h_=Math.log,m_=Math.LN2;function p_(a){return a>>>=0,a===0?32:31-(h_(a)/m_|0)|0}var dc=64,fc=4194304;function cl(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function hc(a,s){var d=a.pendingLanes;if(d===0)return 0;var p=0,x=a.suspendedLanes,w=a.pingedLanes,C=d&268435455;if(C!==0){var T=C&~x;T!==0?p=cl(T):(w&=C,w!==0&&(p=cl(w)))}else C=d&~x,C!==0?p=cl(C):w!==0&&(p=cl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=a.entangledLanes,s!==0)for(a=a.entanglements,s&=p;0<s;)d=31-rn(s),x=1<<d,p|=a[d],s&=~x;return p}function g_(a,s){switch(a){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function v_(a,s){for(var d=a.suspendedLanes,p=a.pingedLanes,x=a.expirationTimes,w=a.pendingLanes;0<w;){var C=31-rn(w),T=1<<C,R=x[C];R===-1?((T&d)===0||(T&p)!==0)&&(x[C]=g_(T,s)):R<=s&&(a.expiredLanes|=T),w&=~T}}function lm(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Sx(){var a=dc;return dc<<=1,(dc&4194240)===0&&(dc=64),a}function um(a){for(var s=[],d=0;31>d;d++)s.push(a);return s}function dl(a,s,d){a.pendingLanes|=s,s!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,s=31-rn(s),a[s]=d}function y_(a,s){var d=a.pendingLanes&~s;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=s,a.mutableReadLanes&=s,a.entangledLanes&=s,s=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0<d;){var x=31-rn(d),w=1<<x;s[x]=0,p[x]=-1,a[x]=-1,d&=~w}}function cm(a,s){var d=a.entangledLanes|=s;for(a=a.entanglements;d;){var p=31-rn(d),x=1<<p;x&s|a[p]&s&&(a[p]|=s),d&=~x}}var Ze=0;function Nx(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var Ex,dm,Ax,Cx,Px,fm=!1,mc=[],Ei=null,Ai=null,Ci=null,fl=new Map,hl=new Map,Pi=[],x_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ox(a,s){switch(a){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Ci=null;break;case"pointerover":case"pointerout":fl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(s.pointerId)}}function ml(a,s,d,p,x,w){return a===null||a.nativeEvent!==w?(a={blockedOn:s,domEventName:d,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},s!==null&&(s=Cl(s),s!==null&&dm(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function b_(a,s,d,p,x){switch(s){case"focusin":return Ei=ml(Ei,a,s,d,p,x),!0;case"dragenter":return Ai=ml(Ai,a,s,d,p,x),!0;case"mouseover":return Ci=ml(Ci,a,s,d,p,x),!0;case"pointerover":var w=x.pointerId;return fl.set(w,ml(fl.get(w)||null,a,s,d,p,x)),!0;case"gotpointercapture":return w=x.pointerId,hl.set(w,ml(hl.get(w)||null,a,s,d,p,x)),!0}return!1}function _x(a){var s=ba(a.target);if(s!==null){var d=xa(s);if(d!==null){if(s=d.tag,s===13){if(s=gx(d),s!==null){a.blockedOn=s,Px(a.priority,function(){Ax(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function pc(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var d=mm(a.domEventName,a.eventSystemFlags,s[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var p=new d.constructor(d.type,d);tm=p,d.target.dispatchEvent(p),tm=null}else return s=Cl(d),s!==null&&dm(s),a.blockedOn=d,!1;s.shift()}return!0}function Mx(a,s,d){pc(a)&&d.delete(s)}function w_(){fm=!1,Ei!==null&&pc(Ei)&&(Ei=null),Ai!==null&&pc(Ai)&&(Ai=null),Ci!==null&&pc(Ci)&&(Ci=null),fl.forEach(Mx),hl.forEach(Mx)}function pl(a,s){a.blockedOn===s&&(a.blockedOn=null,fm||(fm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,w_)))}function gl(a){function s(x){return pl(x,a)}if(0<mc.length){pl(mc[0],a);for(var d=1;d<mc.length;d++){var p=mc[d];p.blockedOn===a&&(p.blockedOn=null)}}for(Ei!==null&&pl(Ei,a),Ai!==null&&pl(Ai,a),Ci!==null&&pl(Ci,a),fl.forEach(s),hl.forEach(s),d=0;d<Pi.length;d++)p=Pi[d],p.blockedOn===a&&(p.blockedOn=null);for(;0<Pi.length&&(d=Pi[0],d.blockedOn===null);)_x(d),d.blockedOn===null&&Pi.shift()}var Eo=P.ReactCurrentBatchConfig,gc=!0;function k_(a,s,d,p){var x=Ze,w=Eo.transition;Eo.transition=null;try{Ze=1,hm(a,s,d,p)}finally{Ze=x,Eo.transition=w}}function j_(a,s,d,p){var x=Ze,w=Eo.transition;Eo.transition=null;try{Ze=4,hm(a,s,d,p)}finally{Ze=x,Eo.transition=w}}function hm(a,s,d,p){if(gc){var x=mm(a,s,d,p);if(x===null)_m(a,s,p,vc,d),Ox(a,p);else if(b_(x,a,s,d,p))p.stopPropagation();else if(Ox(a,p),s&4&&-1<x_.indexOf(a)){for(;x!==null;){var w=Cl(x);if(w!==null&&Ex(w),w=mm(a,s,d,p),w===null&&_m(a,s,p,vc,d),w===x)break;x=w}x!==null&&p.stopPropagation()}else _m(a,s,p,null,d)}}var vc=null;function mm(a,s,d,p){if(vc=null,a=rm(p),a=ba(a),a!==null)if(s=xa(a),s===null)a=null;else if(d=s.tag,d===13){if(a=gx(s),a!==null)return a;a=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null);return vc=a,null}function Ix(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(c_()){case sm:return 1;case kx:return 4;case uc:case d_:return 16;case jx:return 536870912;default:return 16}default:return 16}}var Oi=null,pm=null,yc=null;function Tx(){if(yc)return yc;var a,s=pm,d=s.length,p,x="value"in Oi?Oi.value:Oi.textContent,w=x.length;for(a=0;a<d&&s[a]===x[a];a++);var C=d-a;for(p=1;p<=C&&s[d-p]===x[w-p];p++);return yc=x.slice(a,1<p?1-p:void 0)}function xc(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function bc(){return!0}function Dx(){return!1}function Er(a){function s(d,p,x,w,C){this._reactName=d,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var T in a)a.hasOwnProperty(T)&&(d=a[T],this[T]=d?d(w):w[T]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?bc:Dx,this.isPropagationStopped=Dx,this}return J(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=bc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=bc)},persist:function(){},isPersistent:bc}),s}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gm=Er(Ao),vl=J({},Ao,{view:0,detail:0}),S_=Er(vl),vm,ym,yl,wc=J({},vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==yl&&(yl&&a.type==="mousemove"?(vm=a.screenX-yl.screenX,ym=a.screenY-yl.screenY):ym=vm=0,yl=a),vm)},movementY:function(a){return"movementY"in a?a.movementY:ym}}),Rx=Er(wc),N_=J({},wc,{dataTransfer:0}),E_=Er(N_),A_=J({},vl,{relatedTarget:0}),xm=Er(A_),C_=J({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),P_=Er(C_),O_=J({},Ao,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),__=Er(O_),M_=J({},Ao,{data:0}),Lx=Er(M_),I_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},D_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R_(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=D_[a])?!!s[a]:!1}function bm(){return R_}var L_=J({},vl,{key:function(a){if(a.key){var s=I_[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=xc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?T_[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(a){return a.type==="keypress"?xc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?xc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),$_=Er(L_),z_=J({},wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$x=Er(z_),F_=J({},vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),B_=Er(F_),U_=J({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),H_=Er(U_),W_=J({},wc,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),K_=Er(W_),G_=[9,13,27,32],wm=c&&"CompositionEvent"in window,xl=null;c&&"documentMode"in document&&(xl=document.documentMode);var V_=c&&"TextEvent"in window&&!xl,zx=c&&(!wm||xl&&8<xl&&11>=xl),Fx=" ",Bx=!1;function Ux(a,s){switch(a){case"keyup":return G_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hx(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Co=!1;function q_(a,s){switch(a){case"compositionend":return Hx(s);case"keypress":return s.which!==32?null:(Bx=!0,Fx);case"textInput":return a=s.data,a===Fx&&Bx?null:a;default:return null}}function Q_(a,s){if(Co)return a==="compositionend"||!wm&&Ux(a,s)?(a=Tx(),yc=pm=Oi=null,Co=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zx&&s.locale!=="ko"?null:s.data;default:return null}}var Y_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wx(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!Y_[a.type]:s==="textarea"}function Kx(a,s,d,p){dx(p),s=Ec(s,"onChange"),0<s.length&&(d=new gm("onChange","change",null,d,p),a.push({event:d,listeners:s}))}var bl=null,wl=null;function X_(a){ub(a,0)}function kc(a){var s=Io(a);if(ae(s))return a}function Z_(a,s){if(a==="change")return s}var Gx=!1;if(c){var km;if(c){var jm="oninput"in document;if(!jm){var Vx=document.createElement("div");Vx.setAttribute("oninput","return;"),jm=typeof Vx.oninput=="function"}km=jm}else km=!1;Gx=km&&(!document.documentMode||9<document.documentMode)}function qx(){bl&&(bl.detachEvent("onpropertychange",Qx),wl=bl=null)}function Qx(a){if(a.propertyName==="value"&&kc(wl)){var s=[];Kx(s,wl,a,rm(a)),px(X_,s)}}function J_(a,s,d){a==="focusin"?(qx(),bl=s,wl=d,bl.attachEvent("onpropertychange",Qx)):a==="focusout"&&qx()}function eM(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return kc(wl)}function tM(a,s){if(a==="click")return kc(s)}function rM(a,s){if(a==="input"||a==="change")return kc(s)}function nM(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var nn=typeof Object.is=="function"?Object.is:nM;function kl(a,s){if(nn(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var d=Object.keys(a),p=Object.keys(s);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var x=d[p];if(!f.call(s,x)||!nn(a[x],s[x]))return!1}return!0}function Yx(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Xx(a,s){var d=Yx(a);a=0;for(var p;d;){if(d.nodeType===3){if(p=a+d.textContent.length,a<=s&&p>=s)return{node:d,offset:s-a};a=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Yx(d)}}function Zx(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Zx(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Jx(){for(var a=window,s=et();s instanceof a.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)a=s.contentWindow;else break;s=et(a.document)}return s}function Sm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function iM(a){var s=Jx(),d=a.focusedElem,p=a.selectionRange;if(s!==d&&d&&d.ownerDocument&&Zx(d.ownerDocument.documentElement,d)){if(p!==null&&Sm(d)){if(s=p.start,a=p.end,a===void 0&&(a=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(a,d.value.length);else if(a=(s=d.ownerDocument||document)&&s.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!a.extend&&w>p&&(x=p,p=w,w=x),x=Xx(d,w);var C=Xx(d,p);x&&C&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==C.node||a.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),a.removeAllRanges(),w>p?(a.addRange(s),a.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),a.addRange(s)))}}for(s=[],a=d;a=a.parentNode;)a.nodeType===1&&s.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<s.length;d++)a=s[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var aM=c&&"documentMode"in document&&11>=document.documentMode,Po=null,Nm=null,jl=null,Em=!1;function eb(a,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Em||Po==null||Po!==et(p)||(p=Po,"selectionStart"in p&&Sm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),jl&&kl(jl,p)||(jl=p,p=Ec(Nm,"onSelect"),0<p.length&&(s=new gm("onSelect","select",null,s,d),a.push({event:s,listeners:p}),s.target=Po)))}function jc(a,s){var d={};return d[a.toLowerCase()]=s.toLowerCase(),d["Webkit"+a]="webkit"+s,d["Moz"+a]="moz"+s,d}var Oo={animationend:jc("Animation","AnimationEnd"),animationiteration:jc("Animation","AnimationIteration"),animationstart:jc("Animation","AnimationStart"),transitionend:jc("Transition","TransitionEnd")},Am={},tb={};c&&(tb=document.createElement("div").style,"AnimationEvent"in window||(delete Oo.animationend.animation,delete Oo.animationiteration.animation,delete Oo.animationstart.animation),"TransitionEvent"in window||delete Oo.transitionend.transition);function Sc(a){if(Am[a])return Am[a];if(!Oo[a])return a;var s=Oo[a],d;for(d in s)if(s.hasOwnProperty(d)&&d in tb)return Am[a]=s[d];return a}var rb=Sc("animationend"),nb=Sc("animationiteration"),ib=Sc("animationstart"),ab=Sc("transitionend"),ob=new Map,sb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _i(a,s){ob.set(a,s),o(s,[a])}for(var Cm=0;Cm<sb.length;Cm++){var Pm=sb[Cm],oM=Pm.toLowerCase(),sM=Pm[0].toUpperCase()+Pm.slice(1);_i(oM,"on"+sM)}_i(rb,"onAnimationEnd"),_i(nb,"onAnimationIteration"),_i(ib,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(ab,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sl));function lb(a,s,d){var p=a.type||"unknown-event";a.currentTarget=d,o_(p,s,void 0,a),a.currentTarget=null}function ub(a,s){s=(s&4)!==0;for(var d=0;d<a.length;d++){var p=a[d],x=p.event;p=p.listeners;e:{var w=void 0;if(s)for(var C=p.length-1;0<=C;C--){var T=p[C],R=T.instance,Q=T.currentTarget;if(T=T.listener,R!==w&&x.isPropagationStopped())break e;lb(x,T,Q),w=R}else for(C=0;C<p.length;C++){if(T=p[C],R=T.instance,Q=T.currentTarget,T=T.listener,R!==w&&x.isPropagationStopped())break e;lb(x,T,Q),w=R}}}if(lc)throw a=om,lc=!1,om=null,a}function nt(a,s){var d=s[Lm];d===void 0&&(d=s[Lm]=new Set);var p=a+"__bubble";d.has(p)||(cb(s,a,2,!1),d.add(p))}function Om(a,s,d){var p=0;s&&(p|=4),cb(d,a,p,s)}var Nc="_reactListening"+Math.random().toString(36).slice(2);function Nl(a){if(!a[Nc]){a[Nc]=!0,n.forEach(function(d){d!=="selectionchange"&&(lM.has(d)||Om(d,!1,a),Om(d,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Nc]||(s[Nc]=!0,Om("selectionchange",!1,s))}}function cb(a,s,d,p){switch(Ix(s)){case 1:var x=k_;break;case 4:x=j_;break;default:x=hm}d=x.bind(null,s,d,a),x=void 0,!am||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?a.addEventListener(s,d,{capture:!0,passive:x}):a.addEventListener(s,d,!0):x!==void 0?a.addEventListener(s,d,{passive:x}):a.addEventListener(s,d,!1)}function _m(a,s,d,p,x){var w=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var T=p.stateNode.containerInfo;if(T===x||T.nodeType===8&&T.parentNode===x)break;if(C===4)for(C=p.return;C!==null;){var R=C.tag;if((R===3||R===4)&&(R=C.stateNode.containerInfo,R===x||R.nodeType===8&&R.parentNode===x))return;C=C.return}for(;T!==null;){if(C=ba(T),C===null)return;if(R=C.tag,R===5||R===6){p=w=C;continue e}T=T.parentNode}}p=p.return}px(function(){var Q=w,le=rm(d),ce=[];e:{var oe=ob.get(a);if(oe!==void 0){var ve=gm,ke=a;switch(a){case"keypress":if(xc(d)===0)break e;case"keydown":case"keyup":ve=$_;break;case"focusin":ke="focus",ve=xm;break;case"focusout":ke="blur",ve=xm;break;case"beforeblur":case"afterblur":ve=xm;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=Rx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=E_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=B_;break;case rb:case nb:case ib:ve=P_;break;case ab:ve=H_;break;case"scroll":ve=S_;break;case"wheel":ve=K_;break;case"copy":case"cut":case"paste":ve=__;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=$x}var Ne=(s&4)!==0,xt=!Ne&&a==="scroll",W=Ne?oe!==null?oe+"Capture":null:oe;Ne=[];for(var $=Q,V;$!==null;){V=$;var fe=V.stateNode;if(V.tag===5&&fe!==null&&(V=fe,W!==null&&(fe=sl($,W),fe!=null&&Ne.push(El($,fe,V)))),xt)break;$=$.return}0<Ne.length&&(oe=new ve(oe,ke,null,d,le),ce.push({event:oe,listeners:Ne}))}}if((s&7)===0){e:{if(oe=a==="mouseover"||a==="pointerover",ve=a==="mouseout"||a==="pointerout",oe&&d!==tm&&(ke=d.relatedTarget||d.fromElement)&&(ba(ke)||ke[qn]))break e;if((ve||oe)&&(oe=le.window===le?le:(oe=le.ownerDocument)?oe.defaultView||oe.parentWindow:window,ve?(ke=d.relatedTarget||d.toElement,ve=Q,ke=ke?ba(ke):null,ke!==null&&(xt=xa(ke),ke!==xt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(ve=null,ke=Q),ve!==ke)){if(Ne=Rx,fe="onMouseLeave",W="onMouseEnter",$="mouse",(a==="pointerout"||a==="pointerover")&&(Ne=$x,fe="onPointerLeave",W="onPointerEnter",$="pointer"),xt=ve==null?oe:Io(ve),V=ke==null?oe:Io(ke),oe=new Ne(fe,$+"leave",ve,d,le),oe.target=xt,oe.relatedTarget=V,fe=null,ba(le)===Q&&(Ne=new Ne(W,$+"enter",ke,d,le),Ne.target=V,Ne.relatedTarget=xt,fe=Ne),xt=fe,ve&&ke)t:{for(Ne=ve,W=ke,$=0,V=Ne;V;V=_o(V))$++;for(V=0,fe=W;fe;fe=_o(fe))V++;for(;0<$-V;)Ne=_o(Ne),$--;for(;0<V-$;)W=_o(W),V--;for(;$--;){if(Ne===W||W!==null&&Ne===W.alternate)break t;Ne=_o(Ne),W=_o(W)}Ne=null}else Ne=null;ve!==null&&db(ce,oe,ve,Ne,!1),ke!==null&&xt!==null&&db(ce,xt,ke,Ne,!0)}}e:{if(oe=Q?Io(Q):window,ve=oe.nodeName&&oe.nodeName.toLowerCase(),ve==="select"||ve==="input"&&oe.type==="file")var Ce=Z_;else if(Wx(oe))if(Gx)Ce=rM;else{Ce=eM;var Te=J_}else(ve=oe.nodeName)&&ve.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ce=tM);if(Ce&&(Ce=Ce(a,Q))){Kx(ce,Ce,d,le);break e}Te&&Te(a,oe,Q),a==="focusout"&&(Te=oe._wrapperState)&&Te.controlled&&oe.type==="number"&&Ae(oe,"number",oe.value)}switch(Te=Q?Io(Q):window,a){case"focusin":(Wx(Te)||Te.contentEditable==="true")&&(Po=Te,Nm=Q,jl=null);break;case"focusout":jl=Nm=Po=null;break;case"mousedown":Em=!0;break;case"contextmenu":case"mouseup":case"dragend":Em=!1,eb(ce,d,le);break;case"selectionchange":if(aM)break;case"keydown":case"keyup":eb(ce,d,le)}var De;if(wm)e:{switch(a){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Co?Ux(a,d)&&(Le="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(Le="onCompositionStart");Le&&(zx&&d.locale!=="ko"&&(Co||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Co&&(De=Tx()):(Oi=le,pm="value"in Oi?Oi.value:Oi.textContent,Co=!0)),Te=Ec(Q,Le),0<Te.length&&(Le=new Lx(Le,a,null,d,le),ce.push({event:Le,listeners:Te}),De?Le.data=De:(De=Hx(d),De!==null&&(Le.data=De)))),(De=V_?q_(a,d):Q_(a,d))&&(Q=Ec(Q,"onBeforeInput"),0<Q.length&&(le=new Lx("onBeforeInput","beforeinput",null,d,le),ce.push({event:le,listeners:Q}),le.data=De))}ub(ce,s)})}function El(a,s,d){return{instance:a,listener:s,currentTarget:d}}function Ec(a,s){for(var d=s+"Capture",p=[];a!==null;){var x=a,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=sl(a,d),w!=null&&p.unshift(El(a,w,x)),w=sl(a,s),w!=null&&p.push(El(a,w,x))),a=a.return}return p}function _o(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function db(a,s,d,p,x){for(var w=s._reactName,C=[];d!==null&&d!==p;){var T=d,R=T.alternate,Q=T.stateNode;if(R!==null&&R===p)break;T.tag===5&&Q!==null&&(T=Q,x?(R=sl(d,w),R!=null&&C.unshift(El(d,R,T))):x||(R=sl(d,w),R!=null&&C.push(El(d,R,T)))),d=d.return}C.length!==0&&a.push({event:s,listeners:C})}var uM=/\r\n?/g,cM=/\u0000|\uFFFD/g;function fb(a){return(typeof a=="string"?a:""+a).replace(uM,`
`).replace(cM,"")}function Ac(a,s,d){if(s=fb(s),fb(a)!==s&&d)throw Error(r(425))}function Cc(){}var Mm=null,Im=null;function Tm(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Dm=typeof setTimeout=="function"?setTimeout:void 0,dM=typeof clearTimeout=="function"?clearTimeout:void 0,hb=typeof Promise=="function"?Promise:void 0,fM=typeof queueMicrotask=="function"?queueMicrotask:typeof hb<"u"?function(a){return hb.resolve(null).then(a).catch(hM)}:Dm;function hM(a){setTimeout(function(){throw a})}function Rm(a,s){var d=s,p=0;do{var x=d.nextSibling;if(a.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(p===0){a.removeChild(x),gl(s);return}p--}else d!=="$"&&d!=="$?"&&d!=="$!"||p++;d=x}while(d);gl(s)}function Mi(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return a}function mb(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(s===0)return a;s--}else d==="/$"&&s++}a=a.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),kn="__reactFiber$"+Mo,Al="__reactProps$"+Mo,qn="__reactContainer$"+Mo,Lm="__reactEvents$"+Mo,mM="__reactListeners$"+Mo,pM="__reactHandles$"+Mo;function ba(a){var s=a[kn];if(s)return s;for(var d=a.parentNode;d;){if(s=d[qn]||d[kn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(a=mb(a);a!==null;){if(d=a[kn])return d;a=mb(a)}return s}a=d,d=a.parentNode}return null}function Cl(a){return a=a[kn]||a[qn],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Io(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(r(33))}function Pc(a){return a[Al]||null}var $m=[],To=-1;function Ii(a){return{current:a}}function it(a){0>To||(a.current=$m[To],$m[To]=null,To--)}function tt(a,s){To++,$m[To]=a.current,a.current=s}var Ti={},Zt=Ii(Ti),pr=Ii(!1),wa=Ti;function Do(a,s){var d=a.type.contextTypes;if(!d)return Ti;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=s,a.__reactInternalMemoizedMaskedChildContext=x),x}function gr(a){return a=a.childContextTypes,a!=null}function Oc(){it(pr),it(Zt)}function pb(a,s,d){if(Zt.current!==Ti)throw Error(r(168));tt(Zt,s),tt(pr,d)}function gb(a,s,d){var p=a.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,pe(a)||"Unknown",x));return J({},d,p)}function _c(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ti,wa=Zt.current,tt(Zt,a),tt(pr,pr.current),!0}function vb(a,s,d){var p=a.stateNode;if(!p)throw Error(r(169));d?(a=gb(a,s,wa),p.__reactInternalMemoizedMergedChildContext=a,it(pr),it(Zt),tt(Zt,a)):it(pr),tt(pr,d)}var Qn=null,Mc=!1,zm=!1;function yb(a){Qn===null?Qn=[a]:Qn.push(a)}function gM(a){Mc=!0,yb(a)}function Di(){if(!zm&&Qn!==null){zm=!0;var a=0,s=Ze;try{var d=Qn;for(Ze=1;a<d.length;a++){var p=d[a];do p=p(!0);while(p!==null)}Qn=null,Mc=!1}catch(x){throw Qn!==null&&(Qn=Qn.slice(a+1)),bx(sm,Di),x}finally{Ze=s,zm=!1}}return null}var Ro=[],Lo=0,Ic=null,Tc=0,zr=[],Fr=0,ka=null,Yn=1,Xn="";function ja(a,s){Ro[Lo++]=Tc,Ro[Lo++]=Ic,Ic=a,Tc=s}function xb(a,s,d){zr[Fr++]=Yn,zr[Fr++]=Xn,zr[Fr++]=ka,ka=a;var p=Yn;a=Xn;var x=32-rn(p)-1;p&=~(1<<x),d+=1;var w=32-rn(s)+x;if(30<w){var C=x-x%5;w=(p&(1<<C)-1).toString(32),p>>=C,x-=C,Yn=1<<32-rn(s)+x|d<<x|p,Xn=w+a}else Yn=1<<w|d<<x|p,Xn=a}function Fm(a){a.return!==null&&(ja(a,1),xb(a,1,0))}function Bm(a){for(;a===Ic;)Ic=Ro[--Lo],Ro[Lo]=null,Tc=Ro[--Lo],Ro[Lo]=null;for(;a===ka;)ka=zr[--Fr],zr[Fr]=null,Xn=zr[--Fr],zr[Fr]=null,Yn=zr[--Fr],zr[Fr]=null}var Ar=null,Cr=null,lt=!1,an=null;function bb(a,s){var d=Wr(5,null,null,0);d.elementType="DELETED",d.stateNode=s,d.return=a,s=a.deletions,s===null?(a.deletions=[d],a.flags|=16):s.push(d)}function wb(a,s){switch(a.tag){case 5:var d=a.type;return s=s.nodeType!==1||d.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(a.stateNode=s,Ar=a,Cr=Mi(s.firstChild),!0):!1;case 6:return s=a.pendingProps===""||s.nodeType!==3?null:s,s!==null?(a.stateNode=s,Ar=a,Cr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=ka!==null?{id:Yn,overflow:Xn}:null,a.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Wr(18,null,null,0),d.stateNode=s,d.return=a,a.child=d,Ar=a,Cr=null,!0):!1;default:return!1}}function Um(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Hm(a){if(lt){var s=Cr;if(s){var d=s;if(!wb(a,s)){if(Um(a))throw Error(r(418));s=Mi(d.nextSibling);var p=Ar;s&&wb(a,s)?bb(p,d):(a.flags=a.flags&-4097|2,lt=!1,Ar=a)}}else{if(Um(a))throw Error(r(418));a.flags=a.flags&-4097|2,lt=!1,Ar=a}}}function kb(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Ar=a}function Dc(a){if(a!==Ar)return!1;if(!lt)return kb(a),lt=!0,!1;var s;if((s=a.tag!==3)&&!(s=a.tag!==5)&&(s=a.type,s=s!=="head"&&s!=="body"&&!Tm(a.type,a.memoizedProps)),s&&(s=Cr)){if(Um(a))throw jb(),Error(r(418));for(;s;)bb(a,s),s=Mi(s.nextSibling)}if(kb(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(s===0){Cr=Mi(a.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}a=a.nextSibling}Cr=null}}else Cr=Ar?Mi(a.stateNode.nextSibling):null;return!0}function jb(){for(var a=Cr;a;)a=Mi(a.nextSibling)}function $o(){Cr=Ar=null,lt=!1}function Wm(a){an===null?an=[a]:an.push(a)}var vM=P.ReactCurrentBatchConfig;function Pl(a,s,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var p=d.stateNode}if(!p)throw Error(r(147,a));var x=p,w=""+a;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var T=x.refs;C===null?delete T[w]:T[w]=C},s._stringRef=w,s)}if(typeof a!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,a))}return a}function Rc(a,s){throw a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a))}function Sb(a){var s=a._init;return s(a._payload)}function Nb(a){function s(W,$){if(a){var V=W.deletions;V===null?(W.deletions=[$],W.flags|=16):V.push($)}}function d(W,$){if(!a)return null;for(;$!==null;)s(W,$),$=$.sibling;return null}function p(W,$){for(W=new Map;$!==null;)$.key!==null?W.set($.key,$):W.set($.index,$),$=$.sibling;return W}function x(W,$){return W=Hi(W,$),W.index=0,W.sibling=null,W}function w(W,$,V){return W.index=V,a?(V=W.alternate,V!==null?(V=V.index,V<$?(W.flags|=2,$):V):(W.flags|=2,$)):(W.flags|=1048576,$)}function C(W){return a&&W.alternate===null&&(W.flags|=2),W}function T(W,$,V,fe){return $===null||$.tag!==6?($=Dp(V,W.mode,fe),$.return=W,$):($=x($,V),$.return=W,$)}function R(W,$,V,fe){var Ce=V.type;return Ce===D?le(W,$,V.props.children,fe,V.key):$!==null&&($.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ie&&Sb(Ce)===$.type)?(fe=x($,V.props),fe.ref=Pl(W,$,V),fe.return=W,fe):(fe=od(V.type,V.key,V.props,null,W.mode,fe),fe.ref=Pl(W,$,V),fe.return=W,fe)}function Q(W,$,V,fe){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Rp(V,W.mode,fe),$.return=W,$):($=x($,V.children||[]),$.return=W,$)}function le(W,$,V,fe,Ce){return $===null||$.tag!==7?($=_a(V,W.mode,fe,Ce),$.return=W,$):($=x($,V),$.return=W,$)}function ce(W,$,V){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Dp(""+$,W.mode,V),$.return=W,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return V=od($.type,$.key,$.props,null,W.mode,V),V.ref=Pl(W,null,$),V.return=W,V;case O:return $=Rp($,W.mode,V),$.return=W,$;case ie:var fe=$._init;return ce(W,fe($._payload),V)}if(Se($)||te($))return $=_a($,W.mode,V,null),$.return=W,$;Rc(W,$)}return null}function oe(W,$,V,fe){var Ce=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ce!==null?null:T(W,$,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return V.key===Ce?R(W,$,V,fe):null;case O:return V.key===Ce?Q(W,$,V,fe):null;case ie:return Ce=V._init,oe(W,$,Ce(V._payload),fe)}if(Se(V)||te(V))return Ce!==null?null:le(W,$,V,fe,null);Rc(W,V)}return null}function ve(W,$,V,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return W=W.get(V)||null,T($,W,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case _:return W=W.get(fe.key===null?V:fe.key)||null,R($,W,fe,Ce);case O:return W=W.get(fe.key===null?V:fe.key)||null,Q($,W,fe,Ce);case ie:var Te=fe._init;return ve(W,$,V,Te(fe._payload),Ce)}if(Se(fe)||te(fe))return W=W.get(V)||null,le($,W,fe,Ce,null);Rc($,fe)}return null}function ke(W,$,V,fe){for(var Ce=null,Te=null,De=$,Le=$=0,Mt=null;De!==null&&Le<V.length;Le++){De.index>Le?(Mt=De,De=null):Mt=De.sibling;var Qe=oe(W,De,V[Le],fe);if(Qe===null){De===null&&(De=Mt);break}a&&De&&Qe.alternate===null&&s(W,De),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe,De=Mt}if(Le===V.length)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;Le<V.length;Le++)De=ce(W,V[Le],fe),De!==null&&($=w(De,$,Le),Te===null?Ce=De:Te.sibling=De,Te=De);return lt&&ja(W,Le),Ce}for(De=p(W,De);Le<V.length;Le++)Mt=ve(De,W,Le,V[Le],fe),Mt!==null&&(a&&Mt.alternate!==null&&De.delete(Mt.key===null?Le:Mt.key),$=w(Mt,$,Le),Te===null?Ce=Mt:Te.sibling=Mt,Te=Mt);return a&&De.forEach(function(Wi){return s(W,Wi)}),lt&&ja(W,Le),Ce}function Ne(W,$,V,fe){var Ce=te(V);if(typeof Ce!="function")throw Error(r(150));if(V=Ce.call(V),V==null)throw Error(r(151));for(var Te=Ce=null,De=$,Le=$=0,Mt=null,Qe=V.next();De!==null&&!Qe.done;Le++,Qe=V.next()){De.index>Le?(Mt=De,De=null):Mt=De.sibling;var Wi=oe(W,De,Qe.value,fe);if(Wi===null){De===null&&(De=Mt);break}a&&De&&Wi.alternate===null&&s(W,De),$=w(Wi,$,Le),Te===null?Ce=Wi:Te.sibling=Wi,Te=Wi,De=Mt}if(Qe.done)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;!Qe.done;Le++,Qe=V.next())Qe=ce(W,Qe.value,fe),Qe!==null&&($=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return lt&&ja(W,Le),Ce}for(De=p(W,De);!Qe.done;Le++,Qe=V.next())Qe=ve(De,W,Le,Qe.value,fe),Qe!==null&&(a&&Qe.alternate!==null&&De.delete(Qe.key===null?Le:Qe.key),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return a&&De.forEach(function(YM){return s(W,YM)}),lt&&ja(W,Le),Ce}function xt(W,$,V,fe){if(typeof V=="object"&&V!==null&&V.type===D&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Ce=V.key,Te=$;Te!==null;){if(Te.key===Ce){if(Ce=V.type,Ce===D){if(Te.tag===7){d(W,Te.sibling),$=x(Te,V.props.children),$.return=W,W=$;break e}}else if(Te.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ie&&Sb(Ce)===Te.type){d(W,Te.sibling),$=x(Te,V.props),$.ref=Pl(W,Te,V),$.return=W,W=$;break e}d(W,Te);break}else s(W,Te);Te=Te.sibling}V.type===D?($=_a(V.props.children,W.mode,fe,V.key),$.return=W,W=$):(fe=od(V.type,V.key,V.props,null,W.mode,fe),fe.ref=Pl(W,$,V),fe.return=W,W=fe)}return C(W);case O:e:{for(Te=V.key;$!==null;){if($.key===Te)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){d(W,$.sibling),$=x($,V.children||[]),$.return=W,W=$;break e}else{d(W,$);break}else s(W,$);$=$.sibling}$=Rp(V,W.mode,fe),$.return=W,W=$}return C(W);case ie:return Te=V._init,xt(W,$,Te(V._payload),fe)}if(Se(V))return ke(W,$,V,fe);if(te(V))return Ne(W,$,V,fe);Rc(W,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,$!==null&&$.tag===6?(d(W,$.sibling),$=x($,V),$.return=W,W=$):(d(W,$),$=Dp(V,W.mode,fe),$.return=W,W=$),C(W)):d(W,$)}return xt}var zo=Nb(!0),Eb=Nb(!1),Lc=Ii(null),$c=null,Fo=null,Km=null;function Gm(){Km=Fo=$c=null}function Vm(a){var s=Lc.current;it(Lc),a._currentValue=s}function qm(a,s,d){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===d)break;a=a.return}}function Bo(a,s){$c=a,Km=Fo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&s)!==0&&(vr=!0),a.firstContext=null)}function Br(a){var s=a._currentValue;if(Km!==a)if(a={context:a,memoizedValue:s,next:null},Fo===null){if($c===null)throw Error(r(308));Fo=a,$c.dependencies={lanes:0,firstContext:a}}else Fo=Fo.next=a;return s}var Sa=null;function Qm(a){Sa===null?Sa=[a]:Sa.push(a)}function Ab(a,s,d,p){var x=s.interleaved;return x===null?(d.next=d,Qm(s)):(d.next=x.next,x.next=d),s.interleaved=d,Zn(a,p)}function Zn(a,s){a.lanes|=s;var d=a.alternate;for(d!==null&&(d.lanes|=s),d=a,a=a.return;a!==null;)a.childLanes|=s,d=a.alternate,d!==null&&(d.childLanes|=s),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Ri=!1;function Ym(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cb(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Jn(a,s){return{eventTime:a,lane:s,tag:0,payload:null,callback:null,next:null}}function Li(a,s,d){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(Ve&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,Zn(a,d)}return x=p.interleaved,x===null?(s.next=s,Qm(p)):(s.next=x.next,x.next=s),p.interleaved=s,Zn(a,d)}function zc(a,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,cm(a,d)}}function Pb(a,s){var d=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=s}function Fc(a,s,d,p){var x=a.updateQueue;Ri=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,T=x.shared.pending;if(T!==null){x.shared.pending=null;var R=T,Q=R.next;R.next=null,C===null?w=Q:C.next=Q,C=R;var le=a.alternate;le!==null&&(le=le.updateQueue,T=le.lastBaseUpdate,T!==C&&(T===null?le.firstBaseUpdate=Q:T.next=Q,le.lastBaseUpdate=R))}if(w!==null){var ce=x.baseState;C=0,le=Q=R=null,T=w;do{var oe=T.lane,ve=T.eventTime;if((p&oe)===oe){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ke=a,Ne=T;switch(oe=s,ve=d,Ne.tag){case 1:if(ke=Ne.payload,typeof ke=="function"){ce=ke.call(ve,ce,oe);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ne.payload,oe=typeof ke=="function"?ke.call(ve,ce,oe):ke,oe==null)break e;ce=J({},ce,oe);break e;case 2:Ri=!0}}T.callback!==null&&T.lane!==0&&(a.flags|=64,oe=x.effects,oe===null?x.effects=[T]:oe.push(T))}else ve={eventTime:ve,lane:oe,tag:T.tag,payload:T.payload,callback:T.callback,next:null},le===null?(Q=le=ve,R=ce):le=le.next=ve,C|=oe;if(T=T.next,T===null){if(T=x.shared.pending,T===null)break;oe=T,T=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);if(le===null&&(R=ce),x.baseState=R,x.firstBaseUpdate=Q,x.lastBaseUpdate=le,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);Aa|=C,a.lanes=C,a.memoizedState=ce}}function Ob(a,s,d){if(a=s.effects,s.effects=null,a!==null)for(s=0;s<a.length;s++){var p=a[s],x=p.callback;if(x!==null){if(p.callback=null,p=d,typeof x!="function")throw Error(r(191,x));x.call(p)}}}var Ol={},jn=Ii(Ol),_l=Ii(Ol),Ml=Ii(Ol);function Na(a){if(a===Ol)throw Error(r(174));return a}function Xm(a,s){switch(tt(Ml,s),tt(_l,a),tt(jn,Ol),a=s.nodeType,a){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Zh(null,"");break;default:a=a===8?s.parentNode:s,s=a.namespaceURI||null,a=a.tagName,s=Zh(s,a)}it(jn),tt(jn,s)}function Uo(){it(jn),it(_l),it(Ml)}function _b(a){Na(Ml.current);var s=Na(jn.current),d=Zh(s,a.type);s!==d&&(tt(_l,a),tt(jn,d))}function Zm(a){_l.current===a&&(it(jn),it(_l))}var dt=Ii(0);function Bc(a){for(var s=a;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Jm=[];function ep(){for(var a=0;a<Jm.length;a++)Jm[a]._workInProgressVersionPrimary=null;Jm.length=0}var Uc=P.ReactCurrentDispatcher,tp=P.ReactCurrentBatchConfig,Ea=0,ft=null,St=null,Ot=null,Hc=!1,Il=!1,Tl=0,yM=0;function Jt(){throw Error(r(321))}function rp(a,s){if(s===null)return!1;for(var d=0;d<s.length&&d<a.length;d++)if(!nn(a[d],s[d]))return!1;return!0}function np(a,s,d,p,x,w){if(Ea=w,ft=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Uc.current=a===null||a.memoizedState===null?kM:jM,a=d(p,x),Il){w=0;do{if(Il=!1,Tl=0,25<=w)throw Error(r(301));w+=1,Ot=St=null,s.updateQueue=null,Uc.current=SM,a=d(p,x)}while(Il)}if(Uc.current=Gc,s=St!==null&&St.next!==null,Ea=0,Ot=St=ft=null,Hc=!1,s)throw Error(r(300));return a}function ip(){var a=Tl!==0;return Tl=0,a}function Sn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?ft.memoizedState=Ot=a:Ot=Ot.next=a,Ot}function Ur(){if(St===null){var a=ft.alternate;a=a!==null?a.memoizedState:null}else a=St.next;var s=Ot===null?ft.memoizedState:Ot.next;if(s!==null)Ot=s,St=a;else{if(a===null)throw Error(r(310));St=a,a={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Ot===null?ft.memoizedState=Ot=a:Ot=Ot.next=a}return Ot}function Dl(a,s){return typeof s=="function"?s(a):s}function ap(a){var s=Ur(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var p=St,x=p.baseQueue,w=d.pending;if(w!==null){if(x!==null){var C=x.next;x.next=w.next,w.next=C}p.baseQueue=x=w,d.pending=null}if(x!==null){w=x.next,p=p.baseState;var T=C=null,R=null,Q=w;do{var le=Q.lane;if((Ea&le)===le)R!==null&&(R=R.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),p=Q.hasEagerState?Q.eagerState:a(p,Q.action);else{var ce={lane:le,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};R===null?(T=R=ce,C=p):R=R.next=ce,ft.lanes|=le,Aa|=le}Q=Q.next}while(Q!==null&&Q!==w);R===null?C=p:R.next=T,nn(p,s.memoizedState)||(vr=!0),s.memoizedState=p,s.baseState=C,s.baseQueue=R,d.lastRenderedState=p}if(a=d.interleaved,a!==null){x=a;do w=x.lane,ft.lanes|=w,Aa|=w,x=x.next;while(x!==a)}else x===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function op(a){var s=Ur(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var p=d.dispatch,x=d.pending,w=s.memoizedState;if(x!==null){d.pending=null;var C=x=x.next;do w=a(w,C.action),C=C.next;while(C!==x);nn(w,s.memoizedState)||(vr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,p]}function Mb(){}function Ib(a,s){var d=ft,p=Ur(),x=s(),w=!nn(p.memoizedState,x);if(w&&(p.memoizedState=x,vr=!0),p=p.queue,sp(Rb.bind(null,d,p,a),[a]),p.getSnapshot!==s||w||Ot!==null&&Ot.memoizedState.tag&1){if(d.flags|=2048,Rl(9,Db.bind(null,d,p,x,s),void 0,null),_t===null)throw Error(r(349));(Ea&30)!==0||Tb(d,s,x)}return x}function Tb(a,s,d){a.flags|=16384,a={getSnapshot:s,value:d},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.stores=[a]):(d=s.stores,d===null?s.stores=[a]:d.push(a))}function Db(a,s,d,p){s.value=d,s.getSnapshot=p,Lb(s)&&$b(a)}function Rb(a,s,d){return d(function(){Lb(s)&&$b(a)})}function Lb(a){var s=a.getSnapshot;a=a.value;try{var d=s();return!nn(a,d)}catch{return!0}}function $b(a){var s=Zn(a,1);s!==null&&un(s,a,1,-1)}function zb(a){var s=Sn();return typeof a=="function"&&(a=a()),s.memoizedState=s.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:a},s.queue=a,a=a.dispatch=wM.bind(null,ft,a),[s.memoizedState,a]}function Rl(a,s,d,p){return a={tag:a,create:s,destroy:d,deps:p,next:null},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.lastEffect=a.next=a):(d=s.lastEffect,d===null?s.lastEffect=a.next=a:(p=d.next,d.next=a,a.next=p,s.lastEffect=a)),a}function Fb(){return Ur().memoizedState}function Wc(a,s,d,p){var x=Sn();ft.flags|=a,x.memoizedState=Rl(1|s,d,void 0,p===void 0?null:p)}function Kc(a,s,d,p){var x=Ur();p=p===void 0?null:p;var w=void 0;if(St!==null){var C=St.memoizedState;if(w=C.destroy,p!==null&&rp(p,C.deps)){x.memoizedState=Rl(s,d,w,p);return}}ft.flags|=a,x.memoizedState=Rl(1|s,d,w,p)}function Bb(a,s){return Wc(8390656,8,a,s)}function sp(a,s){return Kc(2048,8,a,s)}function Ub(a,s){return Kc(4,2,a,s)}function Hb(a,s){return Kc(4,4,a,s)}function Wb(a,s){if(typeof s=="function")return a=a(),s(a),function(){s(null)};if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function Kb(a,s,d){return d=d!=null?d.concat([a]):null,Kc(4,4,Wb.bind(null,s,a),d)}function lp(){}function Gb(a,s){var d=Ur();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&rp(s,p[1])?p[0]:(d.memoizedState=[a,s],a)}function Vb(a,s){var d=Ur();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&rp(s,p[1])?p[0]:(a=a(),d.memoizedState=[a,s],a)}function qb(a,s,d){return(Ea&21)===0?(a.baseState&&(a.baseState=!1,vr=!0),a.memoizedState=d):(nn(d,s)||(d=Sx(),ft.lanes|=d,Aa|=d,a.baseState=!0),s)}function xM(a,s){var d=Ze;Ze=d!==0&&4>d?d:4,a(!0);var p=tp.transition;tp.transition={};try{a(!1),s()}finally{Ze=d,tp.transition=p}}function Qb(){return Ur().memoizedState}function bM(a,s,d){var p=Bi(a);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},Yb(a))Xb(s,d);else if(d=Ab(a,s,d,p),d!==null){var x=ur();un(d,a,p,x),Zb(d,s,p)}}function wM(a,s,d){var p=Bi(a),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(Yb(a))Xb(s,x);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,T=w(C,d);if(x.hasEagerState=!0,x.eagerState=T,nn(T,C)){var R=s.interleaved;R===null?(x.next=x,Qm(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=Ab(a,s,x,p),d!==null&&(x=ur(),un(d,a,p,x),Zb(d,s,p))}}function Yb(a){var s=a.alternate;return a===ft||s!==null&&s===ft}function Xb(a,s){Il=Hc=!0;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}function Zb(a,s,d){if((d&4194240)!==0){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,cm(a,d)}}var Gc={readContext:Br,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},kM={readContext:Br,useCallback:function(a,s){return Sn().memoizedState=[a,s===void 0?null:s],a},useContext:Br,useEffect:Bb,useImperativeHandle:function(a,s,d){return d=d!=null?d.concat([a]):null,Wc(4194308,4,Wb.bind(null,s,a),d)},useLayoutEffect:function(a,s){return Wc(4194308,4,a,s)},useInsertionEffect:function(a,s){return Wc(4,2,a,s)},useMemo:function(a,s){var d=Sn();return s=s===void 0?null:s,a=a(),d.memoizedState=[a,s],a},useReducer:function(a,s,d){var p=Sn();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:s},p.queue=a,a=a.dispatch=bM.bind(null,ft,a),[p.memoizedState,a]},useRef:function(a){var s=Sn();return a={current:a},s.memoizedState=a},useState:zb,useDebugValue:lp,useDeferredValue:function(a){return Sn().memoizedState=a},useTransition:function(){var a=zb(!1),s=a[0];return a=xM.bind(null,a[1]),Sn().memoizedState=a,[s,a]},useMutableSource:function(){},useSyncExternalStore:function(a,s,d){var p=ft,x=Sn();if(lt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),_t===null)throw Error(r(349));(Ea&30)!==0||Tb(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,Bb(Rb.bind(null,p,w,a),[a]),p.flags|=2048,Rl(9,Db.bind(null,p,w,d,s),void 0,null),d},useId:function(){var a=Sn(),s=_t.identifierPrefix;if(lt){var d=Xn,p=Yn;d=(p&~(1<<32-rn(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=Tl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=yM++,s=":"+s+"r"+d.toString(32)+":";return a.memoizedState=s},unstable_isNewReconciler:!1},jM={readContext:Br,useCallback:Gb,useContext:Br,useEffect:sp,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:Hb,useMemo:Vb,useReducer:ap,useRef:Fb,useState:function(){return ap(Dl)},useDebugValue:lp,useDeferredValue:function(a){var s=Ur();return qb(s,St.memoizedState,a)},useTransition:function(){var a=ap(Dl)[0],s=Ur().memoizedState;return[a,s]},useMutableSource:Mb,useSyncExternalStore:Ib,useId:Qb,unstable_isNewReconciler:!1},SM={readContext:Br,useCallback:Gb,useContext:Br,useEffect:sp,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:Hb,useMemo:Vb,useReducer:op,useRef:Fb,useState:function(){return op(Dl)},useDebugValue:lp,useDeferredValue:function(a){var s=Ur();return St===null?s.memoizedState=a:qb(s,St.memoizedState,a)},useTransition:function(){var a=op(Dl)[0],s=Ur().memoizedState;return[a,s]},useMutableSource:Mb,useSyncExternalStore:Ib,useId:Qb,unstable_isNewReconciler:!1};function on(a,s){if(a&&a.defaultProps){s=J({},s),a=a.defaultProps;for(var d in a)s[d]===void 0&&(s[d]=a[d]);return s}return s}function up(a,s,d,p){s=a.memoizedState,d=d(p,s),d=d==null?s:J({},s,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var Vc={isMounted:function(a){return(a=a._reactInternals)?xa(a)===a:!1},enqueueSetState:function(a,s,d){a=a._reactInternals;var p=ur(),x=Bi(a),w=Jn(p,x);w.payload=s,d!=null&&(w.callback=d),s=Li(a,w,x),s!==null&&(un(s,a,x,p),zc(s,a,x))},enqueueReplaceState:function(a,s,d){a=a._reactInternals;var p=ur(),x=Bi(a),w=Jn(p,x);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Li(a,w,x),s!==null&&(un(s,a,x,p),zc(s,a,x))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var d=ur(),p=Bi(a),x=Jn(d,p);x.tag=2,s!=null&&(x.callback=s),s=Li(a,x,p),s!==null&&(un(s,a,p,d),zc(s,a,p))}};function Jb(a,s,d,p,x,w,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,w,C):s.prototype&&s.prototype.isPureReactComponent?!kl(d,p)||!kl(x,w):!0}function e1(a,s,d){var p=!1,x=Ti,w=s.contextType;return typeof w=="object"&&w!==null?w=Br(w):(x=gr(s)?wa:Zt.current,p=s.contextTypes,w=(p=p!=null)?Do(a,x):Ti),s=new s(d,w),a.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Vc,a.stateNode=s,s._reactInternals=a,p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=x,a.__reactInternalMemoizedMaskedChildContext=w),s}function t1(a,s,d,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,p),s.state!==a&&Vc.enqueueReplaceState(s,s.state,null)}function cp(a,s,d,p){var x=a.stateNode;x.props=d,x.state=a.memoizedState,x.refs={},Ym(a);var w=s.contextType;typeof w=="object"&&w!==null?x.context=Br(w):(w=gr(s)?wa:Zt.current,x.context=Do(a,w)),x.state=a.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(up(a,s,w,d),x.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(s=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),s!==x.state&&Vc.enqueueReplaceState(x,x.state,null),Fc(a,d,x,p),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308)}function Ho(a,s){try{var d="",p=s;do d+=Z(p),p=p.return;while(p);var x=d}catch(w){x=`
Error generating stack: `+w.message+`
`+w.stack}return{value:a,source:s,stack:x,digest:null}}function dp(a,s,d){return{value:a,source:null,stack:d??null,digest:s??null}}function fp(a,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var NM=typeof WeakMap=="function"?WeakMap:Map;function r1(a,s,d){d=Jn(-1,d),d.tag=3,d.payload={element:null};var p=s.value;return d.callback=function(){ed||(ed=!0,Ap=p),fp(a,s)},d}function n1(a,s,d){d=Jn(-1,d),d.tag=3;var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var x=s.value;d.payload=function(){return p(x)},d.callback=function(){fp(a,s)}}var w=a.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){fp(a,s),typeof p!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),d}function i1(a,s,d){var p=a.pingCache;if(p===null){p=a.pingCache=new NM;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(d)||(x.add(d),a=zM.bind(null,a,s,d),s.then(a,a))}function a1(a){do{var s;if((s=a.tag===13)&&(s=a.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return a;a=a.return}while(a!==null);return null}function o1(a,s,d,p,x){return(a.mode&1)===0?(a===s?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=Jn(-1,1),s.tag=2,Li(d,s,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=x,a)}var EM=P.ReactCurrentOwner,vr=!1;function lr(a,s,d,p){s.child=a===null?Eb(s,null,d,p):zo(s,a.child,d,p)}function s1(a,s,d,p,x){d=d.render;var w=s.ref;return Bo(s,x),p=np(a,s,d,p,w,x),d=ip(),a!==null&&!vr?(s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~x,ei(a,s,x)):(lt&&d&&Fm(s),s.flags|=1,lr(a,s,p,x),s.child)}function l1(a,s,d,p,x){if(a===null){var w=d.type;return typeof w=="function"&&!Tp(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,u1(a,s,w,p,x)):(a=od(d.type,null,p,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(w=a.child,(a.lanes&x)===0){var C=w.memoizedProps;if(d=d.compare,d=d!==null?d:kl,d(C,p)&&a.ref===s.ref)return ei(a,s,x)}return s.flags|=1,a=Hi(w,p),a.ref=s.ref,a.return=s,s.child=a}function u1(a,s,d,p,x){if(a!==null){var w=a.memoizedProps;if(kl(w,p)&&a.ref===s.ref)if(vr=!1,s.pendingProps=p=w,(a.lanes&x)!==0)(a.flags&131072)!==0&&(vr=!0);else return s.lanes=a.lanes,ei(a,s,x)}return hp(a,s,d,p,x)}function c1(a,s,d){var p=s.pendingProps,x=p.children,w=a!==null?a.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Ko,Pr),Pr|=d;else{if((d&1073741824)===0)return a=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:a,cachePool:null,transitions:null},s.updateQueue=null,tt(Ko,Pr),Pr|=a,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:d,tt(Ko,Pr),Pr|=p}else w!==null?(p=w.baseLanes|d,s.memoizedState=null):p=d,tt(Ko,Pr),Pr|=p;return lr(a,s,x,d),s.child}function d1(a,s){var d=s.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function hp(a,s,d,p,x){var w=gr(d)?wa:Zt.current;return w=Do(s,w),Bo(s,x),d=np(a,s,d,p,w,x),p=ip(),a!==null&&!vr?(s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~x,ei(a,s,x)):(lt&&p&&Fm(s),s.flags|=1,lr(a,s,d,x),s.child)}function f1(a,s,d,p,x){if(gr(d)){var w=!0;_c(s)}else w=!1;if(Bo(s,x),s.stateNode===null)Qc(a,s),e1(s,d,p),cp(s,d,p,x),p=!0;else if(a===null){var C=s.stateNode,T=s.memoizedProps;C.props=T;var R=C.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Br(Q):(Q=gr(d)?wa:Zt.current,Q=Do(s,Q));var le=d.getDerivedStateFromProps,ce=typeof le=="function"||typeof C.getSnapshotBeforeUpdate=="function";ce||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==p||R!==Q)&&t1(s,C,p,Q),Ri=!1;var oe=s.memoizedState;C.state=oe,Fc(s,p,C,x),R=s.memoizedState,T!==p||oe!==R||pr.current||Ri?(typeof le=="function"&&(up(s,d,le,p),R=s.memoizedState),(T=Ri||Jb(s,d,T,p,oe,R,Q))?(ce||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=R),C.props=p,C.state=R,C.context=Q,p=T):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{C=s.stateNode,Cb(a,s),T=s.memoizedProps,Q=s.type===s.elementType?T:on(s.type,T),C.props=Q,ce=s.pendingProps,oe=C.context,R=d.contextType,typeof R=="object"&&R!==null?R=Br(R):(R=gr(d)?wa:Zt.current,R=Do(s,R));var ve=d.getDerivedStateFromProps;(le=typeof ve=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==ce||oe!==R)&&t1(s,C,p,R),Ri=!1,oe=s.memoizedState,C.state=oe,Fc(s,p,C,x);var ke=s.memoizedState;T!==ce||oe!==ke||pr.current||Ri?(typeof ve=="function"&&(up(s,d,ve,p),ke=s.memoizedState),(Q=Ri||Jb(s,d,Q,p,oe,ke,R)||!1)?(le||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,ke,R),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,ke,R)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||T===a.memoizedProps&&oe===a.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&oe===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ke),C.props=p,C.state=ke,C.context=R,p=Q):(typeof C.componentDidUpdate!="function"||T===a.memoizedProps&&oe===a.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&oe===a.memoizedState||(s.flags|=1024),p=!1)}return mp(a,s,d,p,w,x)}function mp(a,s,d,p,x,w){d1(a,s);var C=(s.flags&128)!==0;if(!p&&!C)return x&&vb(s,d,!1),ei(a,s,w);p=s.stateNode,EM.current=s;var T=C&&typeof d.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,a!==null&&C?(s.child=zo(s,a.child,null,w),s.child=zo(s,null,T,w)):lr(a,s,T,w),s.memoizedState=p.state,x&&vb(s,d,!0),s.child}function h1(a){var s=a.stateNode;s.pendingContext?pb(a,s.pendingContext,s.pendingContext!==s.context):s.context&&pb(a,s.context,!1),Xm(a,s.containerInfo)}function m1(a,s,d,p,x){return $o(),Wm(x),s.flags|=256,lr(a,s,d,p),s.child}var pp={dehydrated:null,treeContext:null,retryLane:0};function gp(a){return{baseLanes:a,cachePool:null,transitions:null}}function p1(a,s,d){var p=s.pendingProps,x=dt.current,w=!1,C=(s.flags&128)!==0,T;if((T=C)||(T=a!==null&&a.memoizedState===null?!1:(x&2)!==0),T?(w=!0,s.flags&=-129):(a===null||a.memoizedState!==null)&&(x|=1),tt(dt,x&1),a===null)return Hm(s),a=s.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((s.mode&1)===0?s.lanes=1:a.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=p.children,a=p.fallback,w?(p=s.mode,w=s.child,C={mode:"hidden",children:C},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=sd(C,p,0,null),a=_a(a,p,d,null),w.return=s,a.return=s,w.sibling=a,s.child=w,s.child.memoizedState=gp(d),s.memoizedState=pp,a):vp(s,C));if(x=a.memoizedState,x!==null&&(T=x.dehydrated,T!==null))return AM(a,s,C,p,T,x,d);if(w){w=p.fallback,C=s.mode,x=a.child,T=x.sibling;var R={mode:"hidden",children:p.children};return(C&1)===0&&s.child!==x?(p=s.child,p.childLanes=0,p.pendingProps=R,s.deletions=null):(p=Hi(x,R),p.subtreeFlags=x.subtreeFlags&14680064),T!==null?w=Hi(T,w):(w=_a(w,C,d,null),w.flags|=2),w.return=s,p.return=s,p.sibling=w,s.child=p,p=w,w=s.child,C=a.child.memoizedState,C=C===null?gp(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=a.childLanes&~d,s.memoizedState=pp,p}return w=a.child,a=w.sibling,p=Hi(w,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=d),p.return=s,p.sibling=null,a!==null&&(d=s.deletions,d===null?(s.deletions=[a],s.flags|=16):d.push(a)),s.child=p,s.memoizedState=null,p}function vp(a,s){return s=sd({mode:"visible",children:s},a.mode,0,null),s.return=a,a.child=s}function qc(a,s,d,p){return p!==null&&Wm(p),zo(s,a.child,null,d),a=vp(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function AM(a,s,d,p,x,w,C){if(d)return s.flags&256?(s.flags&=-257,p=dp(Error(r(422))),qc(a,s,C,p)):s.memoizedState!==null?(s.child=a.child,s.flags|=128,null):(w=p.fallback,x=s.mode,p=sd({mode:"visible",children:p.children},x,0,null),w=_a(w,x,C,null),w.flags|=2,p.return=s,w.return=s,p.sibling=w,s.child=p,(s.mode&1)!==0&&zo(s,a.child,null,C),s.child.memoizedState=gp(C),s.memoizedState=pp,w);if((s.mode&1)===0)return qc(a,s,C,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var T=p.dgst;return p=T,w=Error(r(419)),p=dp(w,p,void 0),qc(a,s,C,p)}if(T=(C&a.childLanes)!==0,vr||T){if(p=_t,p!==null){switch(C&-C){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|C))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Zn(a,x),un(p,a,x,-1))}return Ip(),p=dp(Error(r(421))),qc(a,s,C,p)}return x.data==="$?"?(s.flags|=128,s.child=a.child,s=FM.bind(null,a),x._reactRetry=s,null):(a=w.treeContext,Cr=Mi(x.nextSibling),Ar=s,lt=!0,an=null,a!==null&&(zr[Fr++]=Yn,zr[Fr++]=Xn,zr[Fr++]=ka,Yn=a.id,Xn=a.overflow,ka=s),s=vp(s,p.children),s.flags|=4096,s)}function g1(a,s,d){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),qm(a.return,s,d)}function yp(a,s,d,p,x){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=x)}function v1(a,s,d){var p=s.pendingProps,x=p.revealOrder,w=p.tail;if(lr(a,s,p.children,d),p=dt.current,(p&2)!==0)p=p&1|2,s.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&g1(a,d,s);else if(a.tag===19)g1(a,d,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}p&=1}if(tt(dt,p),(s.mode&1)===0)s.memoizedState=null;else switch(x){case"forwards":for(d=s.child,x=null;d!==null;)a=d.alternate,a!==null&&Bc(a)===null&&(x=d),d=d.sibling;d=x,d===null?(x=s.child,s.child=null):(x=d.sibling,d.sibling=null),yp(s,!1,x,d,w);break;case"backwards":for(d=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&Bc(a)===null){s.child=x;break}a=x.sibling,x.sibling=d,d=x,x=a}yp(s,!0,d,null,w);break;case"together":yp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Qc(a,s){(s.mode&1)===0&&a!==null&&(a.alternate=null,s.alternate=null,s.flags|=2)}function ei(a,s,d){if(a!==null&&(s.dependencies=a.dependencies),Aa|=s.lanes,(d&s.childLanes)===0)return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,d=Hi(a,a.pendingProps),s.child=d,d.return=s;a.sibling!==null;)a=a.sibling,d=d.sibling=Hi(a,a.pendingProps),d.return=s;d.sibling=null}return s.child}function CM(a,s,d){switch(s.tag){case 3:h1(s),$o();break;case 5:_b(s);break;case 1:gr(s.type)&&_c(s);break;case 4:Xm(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,x=s.memoizedProps.value;tt(Lc,p._currentValue),p._currentValue=x;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(tt(dt,dt.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?p1(a,s,d):(tt(dt,dt.current&1),a=ei(a,s,d),a!==null?a.sibling:null);tt(dt,dt.current&1);break;case 19:if(p=(d&s.childLanes)!==0,(a.flags&128)!==0){if(p)return v1(a,s,d);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),tt(dt,dt.current),p)break;return null;case 22:case 23:return s.lanes=0,c1(a,s,d)}return ei(a,s,d)}var y1,xp,x1,b1;y1=function(a,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)break;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},xp=function(){},x1=function(a,s,d,p){var x=a.memoizedProps;if(x!==p){a=s.stateNode,Na(jn.current);var w=null;switch(d){case"input":x=Be(a,x),p=Be(a,p),w=[];break;case"select":x=J({},x,{value:void 0}),p=J({},p,{value:void 0}),w=[];break;case"textarea":x=G(a,x),p=G(a,p),w=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(a.onclick=Cc)}Jh(d,p);var C;d=null;for(Q in x)if(!p.hasOwnProperty(Q)&&x.hasOwnProperty(Q)&&x[Q]!=null)if(Q==="style"){var T=x[Q];for(C in T)T.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(i.hasOwnProperty(Q)?w||(w=[]):(w=w||[]).push(Q,null));for(Q in p){var R=p[Q];if(T=x!=null?x[Q]:void 0,p.hasOwnProperty(Q)&&R!==T&&(R!=null||T!=null))if(Q==="style")if(T){for(C in T)!T.hasOwnProperty(C)||R&&R.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in R)R.hasOwnProperty(C)&&T[C]!==R[C]&&(d||(d={}),d[C]=R[C])}else d||(w||(w=[]),w.push(Q,d)),d=R;else Q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(w=w||[]).push(Q,R)):Q==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(Q,""+R):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(i.hasOwnProperty(Q)?(R!=null&&Q==="onScroll"&&nt("scroll",a),w||T===R||(w=[])):(w=w||[]).push(Q,R))}d&&(w=w||[]).push("style",d);var Q=w;(s.updateQueue=Q)&&(s.flags|=4)}},b1=function(a,s,d,p){d!==p&&(s.flags|=4)};function Ll(a,s){if(!lt)switch(a.tailMode){case"hidden":s=a.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function er(a){var s=a.alternate!==null&&a.alternate.child===a.child,d=0,p=0;if(s)for(var x=a.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=p,a.childLanes=d,s}function PM(a,s,d){var p=s.pendingProps;switch(Bm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(s),null;case 1:return gr(s.type)&&Oc(),er(s),null;case 3:return p=s.stateNode,Uo(),it(pr),it(Zt),ep(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(a===null||a.child===null)&&(Dc(s)?s.flags|=4:a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,an!==null&&(Op(an),an=null))),xp(a,s),er(s),null;case 5:Zm(s);var x=Na(Ml.current);if(d=s.type,a!==null&&s.stateNode!=null)x1(a,s,d,p,x),a.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(r(166));return er(s),null}if(a=Na(jn.current),Dc(s)){p=s.stateNode,d=s.type;var w=s.memoizedProps;switch(p[kn]=s,p[Al]=w,a=(s.mode&1)!==0,d){case"dialog":nt("cancel",p),nt("close",p);break;case"iframe":case"object":case"embed":nt("load",p);break;case"video":case"audio":for(x=0;x<Sl.length;x++)nt(Sl[x],p);break;case"source":nt("error",p);break;case"img":case"image":case"link":nt("error",p),nt("load",p);break;case"details":nt("toggle",p);break;case"input":Pe(p,w),nt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!w.multiple},nt("invalid",p);break;case"textarea":Ie(p,w),nt("invalid",p)}Jh(d,w),x=null;for(var C in w)if(w.hasOwnProperty(C)){var T=w[C];C==="children"?typeof T=="string"?p.textContent!==T&&(w.suppressHydrationWarning!==!0&&Ac(p.textContent,T,a),x=["children",T]):typeof T=="number"&&p.textContent!==""+T&&(w.suppressHydrationWarning!==!0&&Ac(p.textContent,T,a),x=["children",""+T]):i.hasOwnProperty(C)&&T!=null&&C==="onScroll"&&nt("scroll",p)}switch(d){case"input":_e(p),K(p,w,!0);break;case"textarea":_e(p),ax(p);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(p.onclick=Cc)}p=x,s.updateQueue=p,p!==null&&(s.flags|=4)}else{C=x.nodeType===9?x:x.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=ox(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=C.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=C.createElement(d,{is:p.is}):(a=C.createElement(d),d==="select"&&(C=a,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):a=C.createElementNS(a,d),a[kn]=s,a[Al]=p,y1(a,s,!1,!1),s.stateNode=a;e:{switch(C=em(d,p),d){case"dialog":nt("cancel",a),nt("close",a),x=p;break;case"iframe":case"object":case"embed":nt("load",a),x=p;break;case"video":case"audio":for(x=0;x<Sl.length;x++)nt(Sl[x],a);x=p;break;case"source":nt("error",a),x=p;break;case"img":case"image":case"link":nt("error",a),nt("load",a),x=p;break;case"details":nt("toggle",a),x=p;break;case"input":Pe(a,p),x=Be(a,p),nt("invalid",a);break;case"option":x=p;break;case"select":a._wrapperState={wasMultiple:!!p.multiple},x=J({},p,{value:void 0}),nt("invalid",a);break;case"textarea":Ie(a,p),x=G(a,p),nt("invalid",a);break;default:x=p}Jh(d,x),T=x;for(w in T)if(T.hasOwnProperty(w)){var R=T[w];w==="style"?ux(a,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&sx(a,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&al(a,R):typeof R=="number"&&al(a,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?R!=null&&w==="onScroll"&&nt("scroll",a):R!=null&&A(a,w,R,C))}switch(d){case"input":_e(a),K(a,p,!1);break;case"textarea":_e(a),ax(a);break;case"option":p.value!=null&&a.setAttribute("value",""+Oe(p.value));break;case"select":a.multiple=!!p.multiple,w=p.value,w!=null?qe(a,!!p.multiple,w,!1):p.defaultValue!=null&&qe(a,!!p.multiple,p.defaultValue,!0);break;default:typeof x.onClick=="function"&&(a.onclick=Cc)}switch(d){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return er(s),null;case 6:if(a&&s.stateNode!=null)b1(a,s,a.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(d=Na(Ml.current),Na(jn.current),Dc(s)){if(p=s.stateNode,d=s.memoizedProps,p[kn]=s,(w=p.nodeValue!==d)&&(a=Ar,a!==null))switch(a.tag){case 3:Ac(p.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Ac(p.nodeValue,d,(a.mode&1)!==0)}w&&(s.flags|=4)}else p=(d.nodeType===9?d:d.ownerDocument).createTextNode(p),p[kn]=s,s.stateNode=p}return er(s),null;case 13:if(it(dt),p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(lt&&Cr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)jb(),$o(),s.flags|=98560,w=!1;else if(w=Dc(s),p!==null&&p.dehydrated!==null){if(a===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[kn]=s}else $o(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;er(s),w=!1}else an!==null&&(Op(an),an=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(p=p!==null,p!==(a!==null&&a.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(a===null||(dt.current&1)!==0?Nt===0&&(Nt=3):Ip())),s.updateQueue!==null&&(s.flags|=4),er(s),null);case 4:return Uo(),xp(a,s),a===null&&Nl(s.stateNode.containerInfo),er(s),null;case 10:return Vm(s.type._context),er(s),null;case 17:return gr(s.type)&&Oc(),er(s),null;case 19:if(it(dt),w=s.memoizedState,w===null)return er(s),null;if(p=(s.flags&128)!==0,C=w.rendering,C===null)if(p)Ll(w,!1);else{if(Nt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(C=Bc(a),C!==null){for(s.flags|=128,Ll(w,!1),p=C.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=d,d=s.child;d!==null;)w=d,a=p,w.flags&=14680066,C=w.alternate,C===null?(w.childLanes=0,w.lanes=a,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,a=C.dependencies,w.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return tt(dt,dt.current&1|2),s.child}a=a.sibling}w.tail!==null&&yt()>Go&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304)}else{if(!p)if(a=Bc(C),a!==null){if(s.flags|=128,p=!0,d=a.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Ll(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!lt)return er(s),null}else 2*yt()-w.renderingStartTime>Go&&d!==1073741824&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=yt(),s.sibling=null,d=dt.current,tt(dt,p?d&1|2:d&1),s):(er(s),null);case 22:case 23:return Mp(),p=s.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Pr&1073741824)!==0&&(er(s),s.subtreeFlags&6&&(s.flags|=8192)):er(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function OM(a,s){switch(Bm(s),s.tag){case 1:return gr(s.type)&&Oc(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Uo(),it(pr),it(Zt),ep(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 5:return Zm(s),null;case 13:if(it(dt),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));$o()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return it(dt),null;case 4:return Uo(),null;case 10:return Vm(s.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Yc=!1,tr=!1,_M=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Wo(a,s){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){ht(a,s,p)}else d.current=null}function bp(a,s,d){try{d()}catch(p){ht(a,s,p)}}var w1=!1;function MM(a,s){if(Mm=gc,a=Jx(),Sm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,T=-1,R=-1,Q=0,le=0,ce=a,oe=null;t:for(;;){for(var ve;ce!==d||x!==0&&ce.nodeType!==3||(T=C+x),ce!==w||p!==0&&ce.nodeType!==3||(R=C+p),ce.nodeType===3&&(C+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)oe=ce,ce=ve;for(;;){if(ce===a)break t;if(oe===d&&++Q===x&&(T=C),oe===w&&++le===p&&(R=C),(ve=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ve}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Im={focusedElem:a,selectionRange:d},gc=!1,xe=s;xe!==null;)if(s=xe,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,xe=a;else for(;xe!==null;){s=xe;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Ne=ke.memoizedProps,xt=ke.memoizedState,W=s.stateNode,$=W.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:on(s.type,Ne),xt);W.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){ht(s,s.return,fe)}if(a=s.sibling,a!==null){a.return=s.return,xe=a;break}xe=s.return}return ke=w1,w1=!1,ke}function $l(a,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&a)===a){var w=x.destroy;x.destroy=void 0,w!==void 0&&bp(s,d,w)}x=x.next}while(x!==p)}}function Xc(a,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&a)===a){var p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function wp(a){var s=a.ref;if(s!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof s=="function"?s(a):s.current=a}}function k1(a){var s=a.alternate;s!==null&&(a.alternate=null,k1(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&(delete s[kn],delete s[Al],delete s[Lm],delete s[mM],delete s[pM])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function j1(a){return a.tag===5||a.tag===3||a.tag===4}function S1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||j1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function kp(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(a,s):d.insertBefore(a,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(a,d)):(s=d,s.appendChild(a)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Cc));else if(p!==4&&(a=a.child,a!==null))for(kp(a,s,d),a=a.sibling;a!==null;)kp(a,s,d),a=a.sibling}function jp(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.insertBefore(a,s):d.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(jp(a,s,d),a=a.sibling;a!==null;)jp(a,s,d),a=a.sibling}var Ft=null,sn=!1;function $i(a,s,d){for(d=d.child;d!==null;)N1(a,s,d),d=d.sibling}function N1(a,s,d){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(cc,d)}catch{}switch(d.tag){case 5:tr||Wo(d,s);case 6:var p=Ft,x=sn;Ft=null,$i(a,s,d),Ft=p,sn=x,Ft!==null&&(sn?(a=Ft,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Ft.removeChild(d.stateNode));break;case 18:Ft!==null&&(sn?(a=Ft,d=d.stateNode,a.nodeType===8?Rm(a.parentNode,d):a.nodeType===1&&Rm(a,d),gl(a)):Rm(Ft,d.stateNode));break;case 4:p=Ft,x=sn,Ft=d.stateNode.containerInfo,sn=!0,$i(a,s,d),Ft=p,sn=x;break;case 0:case 11:case 14:case 15:if(!tr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&bp(d,s,C),x=x.next}while(x!==p)}$i(a,s,d);break;case 1:if(!tr&&(Wo(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(T){ht(d,s,T)}$i(a,s,d);break;case 21:$i(a,s,d);break;case 22:d.mode&1?(tr=(p=tr)||d.memoizedState!==null,$i(a,s,d),tr=p):$i(a,s,d);break;default:$i(a,s,d)}}function E1(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new _M),s.forEach(function(p){var x=BM.bind(null,a,p);d.has(p)||(d.add(p),p.then(x,x))})}}function ln(a,s){var d=s.deletions;if(d!==null)for(var p=0;p<d.length;p++){var x=d[p];try{var w=a,C=s,T=C;e:for(;T!==null;){switch(T.tag){case 5:Ft=T.stateNode,sn=!1;break e;case 3:Ft=T.stateNode.containerInfo,sn=!0;break e;case 4:Ft=T.stateNode.containerInfo,sn=!0;break e}T=T.return}if(Ft===null)throw Error(r(160));N1(w,C,x),Ft=null,sn=!1;var R=x.alternate;R!==null&&(R.return=null),x.return=null}catch(Q){ht(x,s,Q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)A1(s,a),s=s.sibling}function A1(a,s){var d=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(ln(s,a),Nn(a),p&4){try{$l(3,a,a.return),Xc(3,a)}catch(Ne){ht(a,a.return,Ne)}try{$l(5,a,a.return)}catch(Ne){ht(a,a.return,Ne)}}break;case 1:ln(s,a),Nn(a),p&512&&d!==null&&Wo(d,d.return);break;case 5:if(ln(s,a),Nn(a),p&512&&d!==null&&Wo(d,d.return),a.flags&32){var x=a.stateNode;try{al(x,"")}catch(Ne){ht(a,a.return,Ne)}}if(p&4&&(x=a.stateNode,x!=null)){var w=a.memoizedProps,C=d!==null?d.memoizedProps:w,T=a.type,R=a.updateQueue;if(a.updateQueue=null,R!==null)try{T==="input"&&w.type==="radio"&&w.name!=null&&vt(x,w),em(T,C);var Q=em(T,w);for(C=0;C<R.length;C+=2){var le=R[C],ce=R[C+1];le==="style"?ux(x,ce):le==="dangerouslySetInnerHTML"?sx(x,ce):le==="children"?al(x,ce):A(x,le,ce,Q)}switch(T){case"input":Yt(x,w);break;case"textarea":Xt(x,w);break;case"select":var oe=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var ve=w.value;ve!=null?qe(x,!!w.multiple,ve,!1):oe!==!!w.multiple&&(w.defaultValue!=null?qe(x,!!w.multiple,w.defaultValue,!0):qe(x,!!w.multiple,w.multiple?[]:"",!1))}x[Al]=w}catch(Ne){ht(a,a.return,Ne)}}break;case 6:if(ln(s,a),Nn(a),p&4){if(a.stateNode===null)throw Error(r(162));x=a.stateNode,w=a.memoizedProps;try{x.nodeValue=w}catch(Ne){ht(a,a.return,Ne)}}break;case 3:if(ln(s,a),Nn(a),p&4&&d!==null&&d.memoizedState.isDehydrated)try{gl(s.containerInfo)}catch(Ne){ht(a,a.return,Ne)}break;case 4:ln(s,a),Nn(a);break;case 13:ln(s,a),Nn(a),x=a.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(Ep=yt())),p&4&&E1(a);break;case 22:if(le=d!==null&&d.memoizedState!==null,a.mode&1?(tr=(Q=tr)||le,ln(s,a),tr=Q):ln(s,a),Nn(a),p&8192){if(Q=a.memoizedState!==null,(a.stateNode.isHidden=Q)&&!le&&(a.mode&1)!==0)for(xe=a,le=a.child;le!==null;){for(ce=xe=le;xe!==null;){switch(oe=xe,ve=oe.child,oe.tag){case 0:case 11:case 14:case 15:$l(4,oe,oe.return);break;case 1:Wo(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){p=oe,d=oe.return;try{s=p,ke.props=s.memoizedProps,ke.state=s.memoizedState,ke.componentWillUnmount()}catch(Ne){ht(p,d,Ne)}}break;case 5:Wo(oe,oe.return);break;case 22:if(oe.memoizedState!==null){O1(ce);continue}}ve!==null?(ve.return=oe,xe=ve):O1(ce)}le=le.sibling}e:for(le=null,ce=a;;){if(ce.tag===5){if(le===null){le=ce;try{x=ce.stateNode,Q?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(T=ce.stateNode,R=ce.memoizedProps.style,C=R!=null&&R.hasOwnProperty("display")?R.display:null,T.style.display=lx("display",C))}catch(Ne){ht(a,a.return,Ne)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=Q?"":ce.memoizedProps}catch(Ne){ht(a,a.return,Ne)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===a)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===a)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===a)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:ln(s,a),Nn(a),p&4&&E1(a);break;case 21:break;default:ln(s,a),Nn(a)}}function Nn(a){var s=a.flags;if(s&2){try{e:{for(var d=a.return;d!==null;){if(j1(d)){var p=d;break e}d=d.return}throw Error(r(160))}switch(p.tag){case 5:var x=p.stateNode;p.flags&32&&(al(x,""),p.flags&=-33);var w=S1(a);jp(a,w,x);break;case 3:case 4:var C=p.stateNode.containerInfo,T=S1(a);kp(a,T,C);break;default:throw Error(r(161))}}catch(R){ht(a,a.return,R)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function IM(a,s,d){xe=a,C1(a)}function C1(a,s,d){for(var p=(a.mode&1)!==0;xe!==null;){var x=xe,w=x.child;if(x.tag===22&&p){var C=x.memoizedState!==null||Yc;if(!C){var T=x.alternate,R=T!==null&&T.memoizedState!==null||tr;T=Yc;var Q=tr;if(Yc=C,(tr=R)&&!Q)for(xe=x;xe!==null;)C=xe,R=C.child,C.tag===22&&C.memoizedState!==null?_1(x):R!==null?(R.return=C,xe=R):_1(x);for(;w!==null;)xe=w,C1(w),w=w.sibling;xe=x,Yc=T,tr=Q}P1(a)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,xe=w):P1(a)}}function P1(a){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var d=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tr||Xc(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!tr)if(d===null)p.componentDidMount();else{var x=s.elementType===s.type?d.memoizedProps:on(s.type,d.memoizedProps);p.componentDidUpdate(x,d.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Ob(s,w,p);break;case 3:var C=s.updateQueue;if(C!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}Ob(s,C,d)}break;case 5:var T=s.stateNode;if(d===null&&s.flags&4){d=T;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&d.focus();break;case"img":R.src&&(d.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Q=s.alternate;if(Q!==null){var le=Q.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&gl(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}tr||s.flags&512&&wp(s)}catch(oe){ht(s,s.return,oe)}}if(s===a){xe=null;break}if(d=s.sibling,d!==null){d.return=s.return,xe=d;break}xe=s.return}}function O1(a){for(;xe!==null;){var s=xe;if(s===a){xe=null;break}var d=s.sibling;if(d!==null){d.return=s.return,xe=d;break}xe=s.return}}function _1(a){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{Xc(4,s)}catch(R){ht(s,d,R)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var x=s.return;try{p.componentDidMount()}catch(R){ht(s,x,R)}}var w=s.return;try{wp(s)}catch(R){ht(s,w,R)}break;case 5:var C=s.return;try{wp(s)}catch(R){ht(s,C,R)}}}catch(R){ht(s,s.return,R)}if(s===a){xe=null;break}var T=s.sibling;if(T!==null){T.return=s.return,xe=T;break}xe=s.return}}var TM=Math.ceil,Zc=P.ReactCurrentDispatcher,Sp=P.ReactCurrentOwner,Hr=P.ReactCurrentBatchConfig,Ve=0,_t=null,wt=null,Bt=0,Pr=0,Ko=Ii(0),Nt=0,zl=null,Aa=0,Jc=0,Np=0,Fl=null,yr=null,Ep=0,Go=1/0,ti=null,ed=!1,Ap=null,zi=null,td=!1,Fi=null,rd=0,Bl=0,Cp=null,nd=-1,id=0;function ur(){return(Ve&6)!==0?yt():nd!==-1?nd:nd=yt()}function Bi(a){return(a.mode&1)===0?1:(Ve&2)!==0&&Bt!==0?Bt&-Bt:vM.transition!==null?(id===0&&(id=Sx()),id):(a=Ze,a!==0||(a=window.event,a=a===void 0?16:Ix(a.type)),a)}function un(a,s,d,p){if(50<Bl)throw Bl=0,Cp=null,Error(r(185));dl(a,d,p),((Ve&2)===0||a!==_t)&&(a===_t&&((Ve&2)===0&&(Jc|=d),Nt===4&&Ui(a,Bt)),xr(a,p),d===1&&Ve===0&&(s.mode&1)===0&&(Go=yt()+500,Mc&&Di()))}function xr(a,s){var d=a.callbackNode;v_(a,s);var p=hc(a,a===_t?Bt:0);if(p===0)d!==null&&wx(d),a.callbackNode=null,a.callbackPriority=0;else if(s=p&-p,a.callbackPriority!==s){if(d!=null&&wx(d),s===1)a.tag===0?gM(I1.bind(null,a)):yb(I1.bind(null,a)),fM(function(){(Ve&6)===0&&Di()}),d=null;else{switch(Nx(p)){case 1:d=sm;break;case 4:d=kx;break;case 16:d=uc;break;case 536870912:d=jx;break;default:d=uc}d=B1(d,M1.bind(null,a))}a.callbackPriority=s,a.callbackNode=d}}function M1(a,s){if(nd=-1,id=0,(Ve&6)!==0)throw Error(r(327));var d=a.callbackNode;if(Vo()&&a.callbackNode!==d)return null;var p=hc(a,a===_t?Bt:0);if(p===0)return null;if((p&30)!==0||(p&a.expiredLanes)!==0||s)s=ad(a,p);else{s=p;var x=Ve;Ve|=2;var w=D1();(_t!==a||Bt!==s)&&(ti=null,Go=yt()+500,Pa(a,s));do try{LM();break}catch(T){T1(a,T)}while(!0);Gm(),Zc.current=w,Ve=x,wt!==null?s=0:(_t=null,Bt=0,s=Nt)}if(s!==0){if(s===2&&(x=lm(a),x!==0&&(p=x,s=Pp(a,x))),s===1)throw d=zl,Pa(a,0),Ui(a,p),xr(a,yt()),d;if(s===6)Ui(a,p);else{if(x=a.current.alternate,(p&30)===0&&!DM(x)&&(s=ad(a,p),s===2&&(w=lm(a),w!==0&&(p=w,s=Pp(a,w))),s===1))throw d=zl,Pa(a,0),Ui(a,p),xr(a,yt()),d;switch(a.finishedWork=x,a.finishedLanes=p,s){case 0:case 1:throw Error(r(345));case 2:Oa(a,yr,ti);break;case 3:if(Ui(a,p),(p&130023424)===p&&(s=Ep+500-yt(),10<s)){if(hc(a,0)!==0)break;if(x=a.suspendedLanes,(x&p)!==p){ur(),a.pingedLanes|=a.suspendedLanes&x;break}a.timeoutHandle=Dm(Oa.bind(null,a,yr,ti),s);break}Oa(a,yr,ti);break;case 4:if(Ui(a,p),(p&4194240)===p)break;for(s=a.eventTimes,x=-1;0<p;){var C=31-rn(p);w=1<<C,C=s[C],C>x&&(x=C),p&=~w}if(p=x,p=yt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*TM(p/1960))-p,10<p){a.timeoutHandle=Dm(Oa.bind(null,a,yr,ti),p);break}Oa(a,yr,ti);break;case 5:Oa(a,yr,ti);break;default:throw Error(r(329))}}}return xr(a,yt()),a.callbackNode===d?M1.bind(null,a):null}function Pp(a,s){var d=Fl;return a.current.memoizedState.isDehydrated&&(Pa(a,s).flags|=256),a=ad(a,s),a!==2&&(s=yr,yr=d,s!==null&&Op(s)),a}function Op(a){yr===null?yr=a:yr.push.apply(yr,a)}function DM(a){for(var s=a;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var p=0;p<d.length;p++){var x=d[p],w=x.getSnapshot;x=x.value;try{if(!nn(w(),x))return!1}catch{return!1}}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ui(a,s){for(s&=~Np,s&=~Jc,a.suspendedLanes|=s,a.pingedLanes&=~s,a=a.expirationTimes;0<s;){var d=31-rn(s),p=1<<d;a[d]=-1,s&=~p}}function I1(a){if((Ve&6)!==0)throw Error(r(327));Vo();var s=hc(a,0);if((s&1)===0)return xr(a,yt()),null;var d=ad(a,s);if(a.tag!==0&&d===2){var p=lm(a);p!==0&&(s=p,d=Pp(a,p))}if(d===1)throw d=zl,Pa(a,0),Ui(a,s),xr(a,yt()),d;if(d===6)throw Error(r(345));return a.finishedWork=a.current.alternate,a.finishedLanes=s,Oa(a,yr,ti),xr(a,yt()),null}function _p(a,s){var d=Ve;Ve|=1;try{return a(s)}finally{Ve=d,Ve===0&&(Go=yt()+500,Mc&&Di())}}function Ca(a){Fi!==null&&Fi.tag===0&&(Ve&6)===0&&Vo();var s=Ve;Ve|=1;var d=Hr.transition,p=Ze;try{if(Hr.transition=null,Ze=1,a)return a()}finally{Ze=p,Hr.transition=d,Ve=s,(Ve&6)===0&&Di()}}function Mp(){Pr=Ko.current,it(Ko)}function Pa(a,s){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,dM(d)),wt!==null)for(d=wt.return;d!==null;){var p=d;switch(Bm(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Oc();break;case 3:Uo(),it(pr),it(Zt),ep();break;case 5:Zm(p);break;case 4:Uo();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Vm(p.type._context);break;case 22:case 23:Mp()}d=d.return}if(_t=a,wt=a=Hi(a.current,null),Bt=Pr=s,Nt=0,zl=null,Np=Jc=Aa=0,yr=Fl=null,Sa!==null){for(s=0;s<Sa.length;s++)if(d=Sa[s],p=d.interleaved,p!==null){d.interleaved=null;var x=p.next,w=d.pending;if(w!==null){var C=w.next;w.next=x,p.next=C}d.pending=p}Sa=null}return a}function T1(a,s){do{var d=wt;try{if(Gm(),Uc.current=Gc,Hc){for(var p=ft.memoizedState;p!==null;){var x=p.queue;x!==null&&(x.pending=null),p=p.next}Hc=!1}if(Ea=0,Ot=St=ft=null,Il=!1,Tl=0,Sp.current=null,d===null||d.return===null){Nt=1,zl=s,wt=null;break}e:{var w=a,C=d.return,T=d,R=s;if(s=Bt,T.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var Q=R,le=T,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var oe=le.alternate;oe?(le.updateQueue=oe.updateQueue,le.memoizedState=oe.memoizedState,le.lanes=oe.lanes):(le.updateQueue=null,le.memoizedState=null)}var ve=a1(C);if(ve!==null){ve.flags&=-257,o1(ve,C,T,w,s),ve.mode&1&&i1(w,Q,s),s=ve,R=Q;var ke=s.updateQueue;if(ke===null){var Ne=new Set;Ne.add(R),s.updateQueue=Ne}else ke.add(R);break e}else{if((s&1)===0){i1(w,Q,s),Ip();break e}R=Error(r(426))}}else if(lt&&T.mode&1){var xt=a1(C);if(xt!==null){(xt.flags&65536)===0&&(xt.flags|=256),o1(xt,C,T,w,s),Wm(Ho(R,T));break e}}w=R=Ho(R,T),Nt!==4&&(Nt=2),Fl===null?Fl=[w]:Fl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var W=r1(w,R,s);Pb(w,W);break e;case 1:T=R;var $=w.type,V=w.stateNode;if((w.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(zi===null||!zi.has(V)))){w.flags|=65536,s&=-s,w.lanes|=s;var fe=n1(w,T,s);Pb(w,fe);break e}}w=w.return}while(w!==null)}L1(d)}catch(Ce){s=Ce,wt===d&&d!==null&&(wt=d=d.return);continue}break}while(!0)}function D1(){var a=Zc.current;return Zc.current=Gc,a===null?Gc:a}function Ip(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),_t===null||(Aa&268435455)===0&&(Jc&268435455)===0||Ui(_t,Bt)}function ad(a,s){var d=Ve;Ve|=2;var p=D1();(_t!==a||Bt!==s)&&(ti=null,Pa(a,s));do try{RM();break}catch(x){T1(a,x)}while(!0);if(Gm(),Ve=d,Zc.current=p,wt!==null)throw Error(r(261));return _t=null,Bt=0,Nt}function RM(){for(;wt!==null;)R1(wt)}function LM(){for(;wt!==null&&!l_();)R1(wt)}function R1(a){var s=F1(a.alternate,a,Pr);a.memoizedProps=a.pendingProps,s===null?L1(a):wt=s,Sp.current=null}function L1(a){var s=a;do{var d=s.alternate;if(a=s.return,(s.flags&32768)===0){if(d=PM(d,s,Pr),d!==null){wt=d;return}}else{if(d=OM(d,s),d!==null){d.flags&=32767,wt=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Nt=6,wt=null;return}}if(s=s.sibling,s!==null){wt=s;return}wt=s=a}while(s!==null);Nt===0&&(Nt=5)}function Oa(a,s,d){var p=Ze,x=Hr.transition;try{Hr.transition=null,Ze=1,$M(a,s,d,p)}finally{Hr.transition=x,Ze=p}return null}function $M(a,s,d,p){do Vo();while(Fi!==null);if((Ve&6)!==0)throw Error(r(327));d=a.finishedWork;var x=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(r(177));a.callbackNode=null,a.callbackPriority=0;var w=d.lanes|d.childLanes;if(y_(a,w),a===_t&&(wt=_t=null,Bt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||td||(td=!0,B1(uc,function(){return Vo(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Hr.transition,Hr.transition=null;var C=Ze;Ze=1;var T=Ve;Ve|=4,Sp.current=null,MM(a,d),A1(d,a),iM(Im),gc=!!Mm,Im=Mm=null,a.current=d,IM(d),u_(),Ve=T,Ze=C,Hr.transition=w}else a.current=d;if(td&&(td=!1,Fi=a,rd=x),w=a.pendingLanes,w===0&&(zi=null),f_(d.stateNode),xr(a,yt()),s!==null)for(p=a.onRecoverableError,d=0;d<s.length;d++)x=s[d],p(x.value,{componentStack:x.stack,digest:x.digest});if(ed)throw ed=!1,a=Ap,Ap=null,a;return(rd&1)!==0&&a.tag!==0&&Vo(),w=a.pendingLanes,(w&1)!==0?a===Cp?Bl++:(Bl=0,Cp=a):Bl=0,Di(),null}function Vo(){if(Fi!==null){var a=Nx(rd),s=Hr.transition,d=Ze;try{if(Hr.transition=null,Ze=16>a?16:a,Fi===null)var p=!1;else{if(a=Fi,Fi=null,rd=0,(Ve&6)!==0)throw Error(r(331));var x=Ve;for(Ve|=4,xe=a.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var T=w.deletions;if(T!==null){for(var R=0;R<T.length;R++){var Q=T[R];for(xe=Q;xe!==null;){var le=xe;switch(le.tag){case 0:case 11:case 15:$l(8,le,w)}var ce=le.child;if(ce!==null)ce.return=le,xe=ce;else for(;xe!==null;){le=xe;var oe=le.sibling,ve=le.return;if(k1(le),le===Q){xe=null;break}if(oe!==null){oe.return=ve,xe=oe;break}xe=ve}}}var ke=w.alternate;if(ke!==null){var Ne=ke.child;if(Ne!==null){ke.child=null;do{var xt=Ne.sibling;Ne.sibling=null,Ne=xt}while(Ne!==null)}}xe=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,xe=C;else e:for(;xe!==null;){if(w=xe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:$l(9,w,w.return)}var W=w.sibling;if(W!==null){W.return=w.return,xe=W;break e}xe=w.return}}var $=a.current;for(xe=$;xe!==null;){C=xe;var V=C.child;if((C.subtreeFlags&2064)!==0&&V!==null)V.return=C,xe=V;else e:for(C=$;xe!==null;){if(T=xe,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:Xc(9,T)}}catch(Ce){ht(T,T.return,Ce)}if(T===C){xe=null;break e}var fe=T.sibling;if(fe!==null){fe.return=T.return,xe=fe;break e}xe=T.return}}if(Ve=x,Di(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(cc,a)}catch{}p=!0}return p}finally{Ze=d,Hr.transition=s}}return!1}function $1(a,s,d){s=Ho(d,s),s=r1(a,s,1),a=Li(a,s,1),s=ur(),a!==null&&(dl(a,1,s),xr(a,s))}function ht(a,s,d){if(a.tag===3)$1(a,a,d);else for(;s!==null;){if(s.tag===3){$1(s,a,d);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(zi===null||!zi.has(p))){a=Ho(d,a),a=n1(s,a,1),s=Li(s,a,1),a=ur(),s!==null&&(dl(s,1,a),xr(s,a));break}}s=s.return}}function zM(a,s,d){var p=a.pingCache;p!==null&&p.delete(s),s=ur(),a.pingedLanes|=a.suspendedLanes&d,_t===a&&(Bt&d)===d&&(Nt===4||Nt===3&&(Bt&130023424)===Bt&&500>yt()-Ep?Pa(a,0):Np|=d),xr(a,s)}function z1(a,s){s===0&&((a.mode&1)===0?s=1:(s=fc,fc<<=1,(fc&130023424)===0&&(fc=4194304)));var d=ur();a=Zn(a,s),a!==null&&(dl(a,s,d),xr(a,d))}function FM(a){var s=a.memoizedState,d=0;s!==null&&(d=s.retryLane),z1(a,d)}function BM(a,s){var d=0;switch(a.tag){case 13:var p=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),z1(a,d)}var F1;F1=function(a,s,d){if(a!==null)if(a.memoizedProps!==s.pendingProps||pr.current)vr=!0;else{if((a.lanes&d)===0&&(s.flags&128)===0)return vr=!1,CM(a,s,d);vr=(a.flags&131072)!==0}else vr=!1,lt&&(s.flags&1048576)!==0&&xb(s,Tc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;Qc(a,s),a=s.pendingProps;var x=Do(s,Zt.current);Bo(s,d),x=np(null,s,p,a,x,d);var w=ip();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gr(p)?(w=!0,_c(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Ym(s),x.updater=Vc,s.stateNode=x,x._reactInternals=s,cp(s,p,a,d),s=mp(null,s,p,!0,w,d)):(s.tag=0,lt&&w&&Fm(s),lr(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(Qc(a,s),a=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=HM(p),a=on(p,a),x){case 0:s=hp(null,s,p,a,d);break e;case 1:s=f1(null,s,p,a,d);break e;case 11:s=s1(null,s,p,a,d);break e;case 14:s=l1(null,s,p,on(p.type,a),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),hp(a,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),f1(a,s,p,x,d);case 3:e:{if(h1(s),a===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,Cb(a,s),Fc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Ho(Error(r(423)),s),s=m1(a,s,p,d,x);break e}else if(p!==x){x=Ho(Error(r(424)),s),s=m1(a,s,p,d,x);break e}else for(Cr=Mi(s.stateNode.containerInfo.firstChild),Ar=s,lt=!0,an=null,d=Eb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if($o(),p===x){s=ei(a,s,d);break e}lr(a,s,p,d)}s=s.child}return s;case 5:return _b(s),a===null&&Hm(s),p=s.type,x=s.pendingProps,w=a!==null?a.memoizedProps:null,C=x.children,Tm(p,x)?C=null:w!==null&&Tm(p,w)&&(s.flags|=32),d1(a,s),lr(a,s,C,d),s.child;case 6:return a===null&&Hm(s),null;case 13:return p1(a,s,d);case 4:return Xm(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=zo(s,null,p,d):lr(a,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),s1(a,s,p,x,d);case 7:return lr(a,s,s.pendingProps,d),s.child;case 8:return lr(a,s,s.pendingProps.children,d),s.child;case 12:return lr(a,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,tt(Lc,p._currentValue),p._currentValue=C,w!==null)if(nn(w.value,C)){if(w.children===x.children&&!pr.current){s=ei(a,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var T=w.dependencies;if(T!==null){C=w.child;for(var R=T.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var Q=w.updateQueue;if(Q!==null){Q=Q.shared;var le=Q.pending;le===null?R.next=R:(R.next=le.next,le.next=R),Q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),qm(w.return,d,s),T.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,T=C.alternate,T!==null&&(T.lanes|=d),qm(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}lr(a,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Bo(s,d),x=Br(x),p=p(x),s.flags|=1,lr(a,s,p,d),s.child;case 14:return p=s.type,x=on(p,s.pendingProps),x=on(p.type,x),l1(a,s,p,x,d);case 15:return u1(a,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),Qc(a,s),s.tag=1,gr(p)?(a=!0,_c(s)):a=!1,Bo(s,d),e1(s,p,x),cp(s,p,x,d),mp(null,s,p,!0,a,d);case 19:return v1(a,s,d);case 22:return c1(a,s,d)}throw Error(r(156,s.tag))};function B1(a,s){return bx(a,s)}function UM(a,s,d,p){this.tag=a,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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(a,s,d,p){return new UM(a,s,d,p)}function Tp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function HM(a){if(typeof a=="function")return Tp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===ge)return 14}return 2}function Hi(a,s){var d=a.alternate;return d===null?(d=Wr(a.tag,s,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=s,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,s=a.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function od(a,s,d,p,x,w){var C=2;if(p=a,typeof a=="function")Tp(a)&&(C=1);else if(typeof a=="string")C=5;else e:switch(a){case D:return _a(d.children,x,w,s);case B:C=8,x|=8;break;case F:return a=Wr(12,d,s,x|2),a.elementType=F,a.lanes=w,a;case he:return a=Wr(13,d,s,x),a.elementType=he,a.lanes=w,a;case ue:return a=Wr(19,d,s,x),a.elementType=ue,a.lanes=w,a;case se:return sd(d,x,w,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case z:C=10;break e;case Y:C=9;break e;case U:C=11;break e;case ge:C=14;break e;case ie:C=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return s=Wr(C,d,s,x),s.elementType=a,s.type=p,s.lanes=w,s}function _a(a,s,d,p){return a=Wr(7,a,p,s),a.lanes=d,a}function sd(a,s,d,p){return a=Wr(22,a,p,s),a.elementType=se,a.lanes=d,a.stateNode={isHidden:!1},a}function Dp(a,s,d){return a=Wr(6,a,null,s),a.lanes=d,a}function Rp(a,s,d){return s=Wr(4,a.children!==null?a.children:[],a.key,s),s.lanes=d,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}function WM(a,s,d,p,x){this.tag=s,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=um(0),this.expirationTimes=um(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=um(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Lp(a,s,d,p,x,w,C,T,R){return a=new WM(a,s,d,T,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Wr(3,null,null,s),a.current=w,w.stateNode=a,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ym(w),a}function KM(a,s,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:p==null?null:""+p,children:a,containerInfo:s,implementation:d}}function U1(a){if(!a)return Ti;a=a._reactInternals;e:{if(xa(a)!==a||a.tag!==1)throw Error(r(170));var s=a;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(a.tag===1){var d=a.type;if(gr(d))return gb(a,d,s)}return s}function H1(a,s,d,p,x,w,C,T,R){return a=Lp(d,p,!0,a,x,w,C,T,R),a.context=U1(null),d=a.current,p=ur(),x=Bi(d),w=Jn(p,x),w.callback=s??null,Li(d,w,x),a.current.lanes=x,dl(a,x,p),xr(a,p),a}function ld(a,s,d,p){var x=s.current,w=ur(),C=Bi(x);return d=U1(d),s.context===null?s.context=d:s.pendingContext=d,s=Jn(w,C),s.payload={element:a},p=p===void 0?null:p,p!==null&&(s.callback=p),a=Li(x,s,C),a!==null&&(un(a,x,C,w),zc(a,x,C)),C}function ud(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function W1(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<s?d:s}}function $p(a,s){W1(a,s),(a=a.alternate)&&W1(a,s)}function GM(){return null}var K1=typeof reportError=="function"?reportError:function(a){console.error(a)};function zp(a){this._internalRoot=a}cd.prototype.render=zp.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));ld(a,s,null,null)},cd.prototype.unmount=zp.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;Ca(function(){ld(null,a,null,null)}),s[qn]=null}};function cd(a){this._internalRoot=a}cd.prototype.unstable_scheduleHydration=function(a){if(a){var s=Cx();a={blockedOn:null,target:a,priority:s};for(var d=0;d<Pi.length&&s!==0&&s<Pi[d].priority;d++);Pi.splice(d,0,a),d===0&&_x(a)}};function Fp(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function dd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function G1(){}function VM(a,s,d,p,x){if(x){if(typeof p=="function"){var w=p;p=function(){var Q=ud(C);w.call(Q)}}var C=H1(s,p,a,0,null,!1,!1,"",G1);return a._reactRootContainer=C,a[qn]=C.current,Nl(a.nodeType===8?a.parentNode:a),Ca(),C}for(;x=a.lastChild;)a.removeChild(x);if(typeof p=="function"){var T=p;p=function(){var Q=ud(R);T.call(Q)}}var R=Lp(a,0,!1,null,null,!1,!1,"",G1);return a._reactRootContainer=R,a[qn]=R.current,Nl(a.nodeType===8?a.parentNode:a),Ca(function(){ld(s,R,d,p)}),R}function fd(a,s,d,p,x){var w=d._reactRootContainer;if(w){var C=w;if(typeof x=="function"){var T=x;x=function(){var R=ud(C);T.call(R)}}ld(s,C,a,x)}else C=VM(d,s,a,x,p);return ud(C)}Ex=function(a){switch(a.tag){case 3:var s=a.stateNode;if(s.current.memoizedState.isDehydrated){var d=cl(s.pendingLanes);d!==0&&(cm(s,d|1),xr(s,yt()),(Ve&6)===0&&(Go=yt()+500,Di()))}break;case 13:Ca(function(){var p=Zn(a,1);if(p!==null){var x=ur();un(p,a,1,x)}}),$p(a,1)}},dm=function(a){if(a.tag===13){var s=Zn(a,134217728);if(s!==null){var d=ur();un(s,a,134217728,d)}$p(a,134217728)}},Ax=function(a){if(a.tag===13){var s=Bi(a),d=Zn(a,s);if(d!==null){var p=ur();un(d,a,s,p)}$p(a,s)}},Cx=function(){return Ze},Px=function(a,s){var d=Ze;try{return Ze=a,s()}finally{Ze=d}},nm=function(a,s,d){switch(s){case"input":if(Yt(a,d),s=d.name,d.type==="radio"&&s!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var p=d[s];if(p!==a&&p.form===a.form){var x=Pc(p);if(!x)throw Error(r(90));ae(p),Yt(p,x)}}}break;case"textarea":Xt(a,d);break;case"select":s=d.value,s!=null&&qe(a,!!d.multiple,s,!1)}},hx=_p,mx=Ca;var qM={usingClientEntryPoint:!1,Events:[Cl,Io,Pc,dx,fx,_p]},Ul={findFiberByHostInstance:ba,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},QM={bundleType:Ul.bundleType,version:Ul.version,rendererPackageName:Ul.rendererPackageName,rendererConfig:Ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=yx(a),a===null?null:a.stateNode},findFiberByHostInstance:Ul.findFiberByHostInstance||GM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hd.isDisabled&&hd.supportsFiber)try{cc=hd.inject(QM),wn=hd}catch{}}return br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qM,br.createPortal=function(a,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fp(s))throw Error(r(200));return KM(a,s,null,d)},br.createRoot=function(a,s){if(!Fp(a))throw Error(r(299));var d=!1,p="",x=K1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),s=Lp(a,1,!1,null,null,d,!1,p,x),a[qn]=s.current,Nl(a.nodeType===8?a.parentNode:a),new zp(s)},br.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=yx(s),a=a===null?null:a.stateNode,a},br.flushSync=function(a){return Ca(a)},br.hydrate=function(a,s,d){if(!dd(s))throw Error(r(200));return fd(null,a,s,!0,d)},br.hydrateRoot=function(a,s,d){if(!Fp(a))throw Error(r(405));var p=d!=null&&d.hydratedSources||null,x=!1,w="",C=K1;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),s=H1(s,null,a,1,d??null,x,!1,w,C),a[qn]=s.current,Nl(a),p)for(a=0;a<p.length;a++)d=p[a],x=d._getVersion,x=x(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,x]:s.mutableSourceEagerHydrationData.push(d,x);return new cd(s)},br.render=function(a,s,d){if(!dd(s))throw Error(r(200));return fd(null,a,s,!1,d)},br.unmountComponentAtNode=function(a){if(!dd(a))throw Error(r(40));return a._reactRootContainer?(Ca(function(){fd(null,null,a,!1,function(){a._reactRootContainer=null,a[qn]=null})}),!0):!1},br.unstable_batchedUpdates=_p,br.unstable_renderSubtreeIntoContainer=function(a,s,d,p){if(!dd(d))throw Error(r(200));if(a==null||a._reactInternals===void 0)throw Error(r(38));return fd(a,s,d,!1,p)},br.version="18.3.1-next-f1338f8080-20240426",br}var tw;function fN(){if(tw)return Wp.exports;tw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wp.exports=a3(),Wp.exports}var rw;function o3(){if(rw)return pd;rw=1;var e=fN();return pd.createRoot=e.createRoot,pd.hydrateRoot=e.hydrateRoot,pd}var s3=o3();const l3=cy(s3);var Bu=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(){}},Va,ea,vs,rN,u3=(rN=class extends Bu{constructor(){super();Re(this,Va);Re(this,ea);Re(this,vs);ye(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ea)||this.setEventListener(L(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ea))==null||t.call(this),ye(this,ea,void 0))}setEventListener(t){var r;ye(this,vs,t),(r=L(this,ea))==null||r.call(this),ye(this,ea,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Va)!==t&&(ye(this,Va,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Va)=="boolean"?L(this,Va):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Va=new WeakMap,ea=new WeakMap,vs=new WeakMap,rN),fy=new u3,c3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ta,uy,nN,d3=(nN=class{constructor(){Re(this,ta,c3);Re(this,uy,!1)}setTimeoutProvider(e){ye(this,ta,e)}setTimeout(e,t){return L(this,ta).setTimeout(e,t)}clearTimeout(e){L(this,ta).clearTimeout(e)}setInterval(e,t){return L(this,ta).setInterval(e,t)}clearInterval(e){L(this,ta).clearInterval(e)}},ta=new WeakMap,uy=new WeakMap,nN),Ba=new d3;function f3(e){setTimeout(e,0)}var h3=typeof window>"u"||"Deno"in globalThis;function kr(){}function m3(e,t){return typeof e=="function"?e(t):e}function Fg(e){return typeof e=="number"&&e>=0&&e!==1/0}function hN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ua(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:u,stale:c}=e;if(u){if(n){if(t.queryHash!==hy(u,t.options))return!1}else if(!pu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function iw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(o))return!1}else if(!pu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function hy(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>Ug(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>pu(e[r],t[r])):!1}var p3=Object.prototype.hasOwnProperty;function mN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=aw(e)&&aw(t);if(!n&&!(Ug(e)&&Ug(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),c=u.length,f=n?new Array(c):{};let h=0;for(let m=0;m<c;m++){const g=n?m:u[m],v=e[g],b=t[g];if(v===b){f[g]=v,(n?m<o:p3.call(e,g))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[g]=b;continue}const j=mN(v,b,r+1);f[g]=j,j===v&&h++}return o===c&&h===o?e:f}function Bg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function aw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ug(e){if(!ow(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!ow(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ow(e){return Object.prototype.toString.call(e)==="[object Object]"}function g3(e){return new Promise(t=>{Ba.setTimeout(t,e)})}function Hg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?mN(e,t):t}function v3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function y3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var my=Symbol();function pN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===my?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gN(e,t){return typeof e=="function"?e(...t):!!e}function x3(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var gu=(()=>{let e=()=>h3;return{isServer(){return e()},setIsServer(t){e=t}}})();function Wg(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var b3=f3;function w3(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=b3;const o=c=>{t?e.push(c):i(()=>{r(c)})},u=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var Kt=w3(),ys,ra,xs,iN,k3=(iN=class extends Bu{constructor(){super();Re(this,ys,!0);Re(this,ra);Re(this,xs);ye(this,xs,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,ra)||this.setEventListener(L(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ra))==null||t.call(this),ye(this,ra,void 0))}setEventListener(t){var r;ye(this,xs,t),(r=L(this,ra))==null||r.call(this),ye(this,ra,t(this.setOnline.bind(this)))}setOnline(t){L(this,ys)!==t&&(ye(this,ys,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ys)}},ys=new WeakMap,ra=new WeakMap,xs=new WeakMap,iN),Xd=new k3;function j3(e){return Math.min(1e3*2**e,3e4)}function vN(e){return(e??"online")==="online"?Xd.isOnline():!0}var Kg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yN(e){let t=!1,r=0,n;const i=Wg(),o=()=>i.status!=="pending",u=k=>{var S;if(!o()){const N=new Kg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>fy.isFocused()&&(e.networkMode==="always"||Xd.isOnline())&&e.canRun(),m=()=>vN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),i.resolve(k))},v=k=>{o()||(n==null||n(),i.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 O;if(o())return;const E=e.retry??(gu.isServer()?0:3),A=e.retryDelay??j3,P=typeof A=="function"?A(r,N):A,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!_){v(N);return}r++,(O=e.onFail)==null||O.call(e,r,N),g3(P).then(()=>h()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),i)}}var qa,aN,xN=(aN=class{constructor(){Re(this,qa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fg(this.gcTime)&&ye(this,qa,Ba.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,qa)!==void 0&&(Ba.clearTimeout(L(this,qa)),ye(this,qa,void 0))}},qa=new WeakMap,aN);function S3(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,i=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{x3(A,()=>t.signal,()=>k=!0)},N=pN(t.options,t.fetchOptions),E=async(A,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const D=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),B=await N(D),{maxPages:F}=t.options,z=_?y3:v3;return{pages:z(A.pages,B,F),pageParams:z(A.pageParams,P,F)}};if(i&&o.length){const A=i==="backward",P=A?N3:sw,_={pages:o,pageParams:u},O=P(n,_);c=await E(_,O,A)}else{const A=e??o.length;do{const P=f===0?u[0]??n.initialPageParam:sw(n,c);if(f>0&&P==null)break;c=await E(c,P),f++}while(f<A)}return c};t.options.persister?t.fetchFn=()=>{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 sw(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 N3(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 bs,Qa,ws,Gr,Ya,It,Ru,Xa,Mr,bN,ni,oN,E3=(oN=class extends xN{constructor(t){super();Re(this,Mr);Re(this,bs);Re(this,Qa);Re(this,ws);Re(this,Gr);Re(this,Ya);Re(this,It);Re(this,Ru);Re(this,Xa);ye(this,Xa,!1),ye(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Ya,t.client),ye(this,Gr,L(this,Ya).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Qa,uw(this.options)),this.state=t.state??L(this,Qa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,bs)}get promise(){var t;return(t=L(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Ru),...t},t!=null&&t._type&&ye(this,bs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=uw(this.options);r.data!==void 0&&(this.setState(lw(r.data,r.dataUpdatedAt)),ye(this,Qa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Gr).remove(this)}setData(t,r){const n=Hg(this.state.data,t,this.options);return Ue(this,Mr,ni).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ue(this,Mr,ni).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=L(this,It))==null?void 0:n.promise;return(i=L(this,It))==null||i.cancel(t),r?r.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Qa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ir(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===my||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ua(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:!hN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Gr).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,It)&&(L(this,Xa)||Ue(this,Mr,bN).call(this)?L(this,It).cancel({revert:!0}):L(this,It).cancelRetry()),this.scheduleGc()),L(this,Gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Mr,ni).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,It))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,It))return L(this,It).continueRetry(),L(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(_=>_.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,i=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ye(this,Xa,!0),n.signal)})},o=()=>{const P=pN(this.options,r),O=(()=>{const D={client:L(this,Ya),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return ye(this,Xa,!1),this.options.persister?this.options.persister(P,O,this):P(O)},c=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Ya),state:this.state,fetchFn:o};return i(P),P})(),f=L(this,bs)==="infinite"?S3(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),ye(this,ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&Ue(this,Mr,ni).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),ye(this,It,yN({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:P=>{P instanceof Kg&&P.revert&&this.setState({...L(this,ws),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{Ue(this,Mr,ni).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{Ue(this,Mr,ni).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Mr,ni).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const P=await L(this,It).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,Gr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,Gr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Kg){if(P.silent)return L(this,It).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Ue(this,Mr,ni).call(this,{type:"error",error:P}),(N=(S=L(this,Gr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,Gr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},bs=new WeakMap,Qa=new WeakMap,ws=new WeakMap,Gr=new WeakMap,Ya=new WeakMap,It=new WeakMap,Ru=new WeakMap,Xa=new WeakMap,Mr=new WeakSet,bN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ni=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,...wN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...lw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ws,t.manual?i:void 0),i;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),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Gr).notify({query:this,type:"updated",action:t})})},oN);function wN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uw(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 wr,We,Lu,cr,Za,ks,ai,na,$u,js,Ss,Ja,eo,ia,Ns,Xe,au,Gg,Vg,qg,Qg,Yg,Xg,Zg,kN,sN,A3=(sN=class extends Bu{constructor(t,r){super();Re(this,Xe);Re(this,wr);Re(this,We);Re(this,Lu);Re(this,cr);Re(this,Za);Re(this,ks);Re(this,ai);Re(this,na);Re(this,$u);Re(this,js);Re(this,Ss);Re(this,Ja);Re(this,eo);Re(this,ia);Re(this,Ns,new Set);this.options=r,ye(this,wr,t),ye(this,na,null),ye(this,ai,Wg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,We).addObserver(this),cw(L(this,We),this.options)?Ue(this,Xe,au).call(this):this.updateResult(),Ue(this,Xe,Qg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jg(L(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jg(L(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,Xe,Yg).call(this),Ue(this,Xe,Xg).call(this),L(this,We).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,We);if(this.options=L(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,L(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,Xe,Zg).call(this),L(this,We).setOptions(this.options),r._defaulted&&!Bg(this.options,r)&&L(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,We),observer:this});const i=this.hasListeners();i&&dw(L(this,We),n,this.options,r)&&Ue(this,Xe,au).call(this),this.updateResult(),i&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||ua(this.options.staleTime,L(this,We))!==ua(r.staleTime,L(this,We)))&&Ue(this,Xe,Gg).call(this);const o=Ue(this,Xe,Vg).call(this);i&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||o!==L(this,ia))&&Ue(this,Xe,qg).call(this,o)}getOptimisticResult(t){const r=L(this,wr).getQueryCache().build(L(this,wr),t),n=this.createResult(r,t);return P3(this,n)&&(ye(this,cr,n),ye(this,ks,this.options),ye(this,Za,L(this,We).state)),n}getCurrentResult(){return L(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ai).status==="pending"&&L(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){L(this,Ns).add(t)}getCurrentQuery(){return L(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,wr).defaultQueryOptions(t),n=L(this,wr).getQueryCache().build(L(this,wr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ue(this,Xe,au).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,cr)))}createResult(t,r){var F;const n=L(this,We),i=this.options,o=L(this,cr),u=L(this,Za),c=L(this,ks),h=t!==n?t.state:L(this,Lu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&cw(t,r),U=z&&dw(t,n,r,i);(Y||U)&&(g={...g,...wN(m.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 z;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(z=o.data,N=!0):z=typeof r.placeholderData=="function"?r.placeholderData((F=L(this,Ss))==null?void 0:F.state.data,L(this,Ss)):r.placeholderData,z!==void 0&&(S="success",b=Hg(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,$u))b=L(this,js);else try{ye(this,$u,r.select),b=r.select(b),b=Hg(o==null?void 0:o.data,b,r),ye(this,js,b),ye(this,na,null)}catch(z){ye(this,na,z)}L(this,na)&&(j=L(this,na),b=L(this,js),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",_=A&&E,O=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,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:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:py(t,r),refetch:this.refetch,promise:L(this,ai),isEnabled:Ir(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,Y=B.status==="error"&&!z,U=ge=>{Y?ge.reject(B.error):z&&ge.resolve(B.data)},he=()=>{const ge=ye(this,ai,B.promise=Wg());U(ge)},ue=L(this,ai);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Y||B.data!==ue.value)&&he();break;case"rejected":(!Y||B.error!==ue.reason)&&he();break}}return B}updateResult(){const t=L(this,cr),r=this.createResult(L(this,We),this.options);if(ye(this,Za,L(this,We).state),ye(this,ks,this.options),L(this,Za).data!==void 0&&ye(this,Ss,L(this,We)),Bg(r,t))return;ye(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!L(this,Ns).size)return!0;const u=new Set(o??L(this,Ns));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,cr)).some(c=>{const f=c;return L(this,cr)[f]!==t[f]&&u.has(f)})};Ue(this,Xe,kN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,Xe,Qg).call(this)}},wr=new WeakMap,We=new WeakMap,Lu=new WeakMap,cr=new WeakMap,Za=new WeakMap,ks=new WeakMap,ai=new WeakMap,na=new WeakMap,$u=new WeakMap,js=new WeakMap,Ss=new WeakMap,Ja=new WeakMap,eo=new WeakMap,ia=new WeakMap,Ns=new WeakMap,Xe=new WeakSet,au=function(t){Ue(this,Xe,Zg).call(this);let r=L(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(kr)),r},Gg=function(){Ue(this,Xe,Yg).call(this);const t=ua(this.options.staleTime,L(this,We));if(gu.isServer()||L(this,cr).isStale||!Fg(t))return;const n=hN(L(this,cr).dataUpdatedAt,t)+1;ye(this,Ja,Ba.setTimeout(()=>{L(this,cr).isStale||this.updateResult()},n))},Vg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,We)):this.options.refetchInterval)??!1},qg=function(t){Ue(this,Xe,Xg).call(this),ye(this,ia,t),!(gu.isServer()||Ir(this.options.enabled,L(this,We))===!1||!Fg(L(this,ia))||L(this,ia)===0)&&ye(this,eo,Ba.setInterval(()=>{(this.options.refetchIntervalInBackground||fy.isFocused())&&Ue(this,Xe,au).call(this)},L(this,ia)))},Qg=function(){Ue(this,Xe,Gg).call(this),Ue(this,Xe,qg).call(this,Ue(this,Xe,Vg).call(this))},Yg=function(){L(this,Ja)!==void 0&&(Ba.clearTimeout(L(this,Ja)),ye(this,Ja,void 0))},Xg=function(){L(this,eo)!==void 0&&(Ba.clearInterval(L(this,eo)),ye(this,eo,void 0))},Zg=function(){const t=L(this,wr).getQueryCache().build(L(this,wr),this.options);if(t===L(this,We))return;const r=L(this,We);ye(this,We,t),ye(this,Lu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},kN=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,cr))}),L(this,wr).getQueryCache().notify({query:L(this,We),type:"observerResultsUpdated"})})},sN);function C3(e,t){return Ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ir(t.retryOnMount,e)===!1)}function cw(e,t){return C3(e,t)||e.state.data!==void 0&&Jg(e,t,t.refetchOnMount)}function Jg(e,t,r){if(Ir(t.enabled,e)!==!1&&ua(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&py(e,t)}return!1}function dw(e,t,r,n){return(e!==t||Ir(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&py(e,r)}function py(e,t){return Ir(t.enabled,e)!==!1&&e.isStaleByTime(ua(t.staleTime,e))}function P3(e,t){return!Bg(e.getCurrentResult(),t)}var zu,On,rr,to,_n,qi,lN,O3=(lN=class extends xN{constructor(t){super();Re(this,_n);Re(this,zu);Re(this,On);Re(this,rr);Re(this,to);ye(this,zu,t.client),this.mutationId=t.mutationId,ye(this,rr,t.mutationCache),ye(this,On,[]),this.state=t.state||_3(),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,On).includes(t)||(L(this,On).push(t),this.clearGcTimeout(),L(this,rr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,On,L(this,On).filter(r=>r!==t)),this.scheduleGc(),L(this,rr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,On).length||(this.state.status==="pending"?this.scheduleGc():L(this,rr).remove(this))}continue(){var t;return((t=L(this,to))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D;const r=()=>{Ue(this,_n,qi).call(this,{type:"continue"})},n={client:L(this,zu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,to,yN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{Ue(this,_n,qi).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{Ue(this,_n,qi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,rr).canRun(this)}));const i=this.state.status==="pending",o=!L(this,to).canStart();try{if(i)r();else{Ue(this,_n,qi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,rr).config.onMutate&&await L(this,rr).config.onMutate(t,this,n);const F=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));F!==this.state.context&&Ue(this,_n,qi).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await L(this,to).start();return await((h=(f=L(this,rr).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,n)),await((b=(v=L(this,rr).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,B,null,t,this.state.context,n)),Ue(this,_n,qi).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,rr).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((_=(P=L(this,rr).config).onSettled)==null?void 0:_.call(P,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw Ue(this,_n,qi).call(this,{type:"error",error:B}),B}finally{L(this,rr).runNext(this)}}},zu=new WeakMap,On=new WeakMap,rr=new WeakMap,to=new WeakMap,_n=new WeakSet,qi=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),Kt.batch(()=>{L(this,On).forEach(n=>{n.onMutationUpdate(t)}),L(this,rr).notify({mutation:this,type:"updated",action:t})})},lN);function _3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi,dn,Fu,uN,M3=(uN=class extends Bu{constructor(t={}){super();Re(this,oi);Re(this,dn);Re(this,Fu);this.config=t,ye(this,oi,new Set),ye(this,dn,new Map),ye(this,Fu,0)}build(t,r,n){const i=new O3({client:t,mutationCache:this,mutationId:++md(this,Fu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){L(this,oi).add(t);const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);n?n.push(t):L(this,dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,oi).delete(t)){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&L(this,dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=gd(t);if(typeof r=="string"){const i=(n=L(this,dn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{L(this,oi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,oi).clear(),L(this,dn).clear()})}getAll(){return Array.from(L(this,oi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>iw(r,n))}findAll(t={}){return this.getAll().filter(r=>iw(t,r))}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(kr))))}},oi=new WeakMap,dn=new WeakMap,Fu=new WeakMap,uN);function gd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Mn,cN,I3=(cN=class extends Bu{constructor(t={}){super();Re(this,Mn);this.config=t,ye(this,Mn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??hy(i,r);let u=this.get(o);return u||(u=new E3({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){L(this,Mn).has(t.queryHash)||(L(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Mn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Mn).get(t)}getAll(){return[...L(this,Mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>nw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>nw(t,n)):r}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,cN),mt,aa,oa,Es,As,sa,Cs,Ps,dN,T3=(dN=class{constructor(e={}){Re(this,mt);Re(this,aa);Re(this,oa);Re(this,Es);Re(this,As);Re(this,sa);Re(this,Cs);Re(this,Ps);ye(this,mt,e.queryCache||new I3),ye(this,aa,e.mutationCache||new M3),ye(this,oa,e.defaultOptions||{}),ye(this,Es,new Map),ye(this,As,new Map),ye(this,sa,0)}mount(){md(this,sa)._++,L(this,sa)===1&&(ye(this,Cs,fy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onFocus())})),ye(this,Ps,Xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onOnline())})))}unmount(){var e,t;md(this,sa)._--,L(this,sa)===0&&((e=L(this,Cs))==null||e.call(this),ye(this,Cs,void 0),(t=L(this,Ps))==null||t.call(this),ye(this,Ps,void 0))}isFetching(e){return L(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,aa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ua(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=L(this,mt).get(n.queryHash),o=i==null?void 0:i.state.data,u=m3(t,o);if(u!==void 0)return L(this,mt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>L(this,mt).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,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,mt);Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,mt);return Kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Kt.batch(()=>L(this,mt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(kr).catch(kr)}invalidateQueries(e,t={}){return Kt.batch(()=>(L(this,mt).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=Kt.batch(()=>L(this,mt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(kr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,mt).build(this,t);return r.isStaleByTime(ua(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Xd.isOnline()?L(this,aa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mt)}getMutationCache(){return L(this,aa)}getDefaultOptions(){return L(this,oa)}setDefaultOptions(e){ye(this,oa,e)}setQueryDefaults(e,t){L(this,Es).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Es).values()],r={};return t.forEach(n=>{pu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,As).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,As).values()],r={};return t.forEach(n=>{pu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,oa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hy(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===my&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,oa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,mt).clear(),L(this,aa).clear()}},mt=new WeakMap,aa=new WeakMap,oa=new WeakMap,Es=new WeakMap,As=new WeakMap,sa=new WeakMap,Cs=new WeakMap,Ps=new WeakMap,dN),jN=y.createContext(void 0),Kn=e=>{const t=y.useContext(jN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},D3=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(jN.Provider,{value:e,children:t})),SN=y.createContext(!1),R3=()=>y.useContext(SN);SN.Provider;function L3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $3=y.createContext(L3()),z3=()=>y.useContext($3),F3=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?gN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},B3=e=>{y.useEffect(()=>{e.clearReset()},[e])},U3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||gN(r,[e.error,n])),H3=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},W3=(e,t)=>e.isLoading&&e.isFetching&&!t,K3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function G3(e,t,r){var b,j,k,S;const n=R3(),i=z3(),o=Kn(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const c=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,H3(u),F3(u,i,c),B3(i);const h=!o.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(o,u)),g=m.getOptimisticResult(u),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(Kt.batchCalls(N)):kr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),K3(u,g))throw fw(u,m,i);if(U3({result:g,errorResetBoundary:i,throwOnError:u.throwOnError,query:c,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&&!gu.isServer()&&W3(g,n)){const N=h?fw(u,m,i):c==null?void 0:c.promise;N==null||N.catch(kr).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function Rt(e,t){return G3(e,A3)}/**
* @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 V3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NN=(...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 q3={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 Q3=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:u,...c},f)=>y.createElement("svg",{ref:f,...q3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:NN("lucide",i),...c},[...u.map(([h,m])=>y.createElement(h,m)),...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 de=(e,t)=>{const r=y.forwardRef(({className:n,...i},o)=>y.createElement(Q3,{ref:o,iconNode:t,className:NN(`lucide-${V3(e)}`,n),...i}));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 Jf=de("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 EN=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @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 Zd=de("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 Y3=de("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
* @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=de("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ev=de("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 X3=de("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
* @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 pn=de("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 Z3=de("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @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=de("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 J3=de("BrainCircuit",[["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:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["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:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
* @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 e4=de("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["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"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/**
* @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 vo=de("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 t4=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
* @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 or=de("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 CN=de("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 r4=de("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 eh=de("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 PN=de("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 n4=de("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
* @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 ON=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i4=de("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 a4=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _N=de("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 o4=de("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
* @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 Os=de("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 s4=de("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 tv=de("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 l4=de("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 rv=de("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=de("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 u4=de("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @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 _s=de("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 Ms=de("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 hw=de("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 vu=de("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 c4=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @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 d4=de("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
* @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 f4=de("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 MN=de("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const h4=de("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
* @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 m4=de("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 cu=de("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 p4=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g4=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @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 mw=de("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 v4=de("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 y4=de("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
* @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 gy=de("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 x4=de("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 b4=de("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
* @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 w4=de("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k4=de("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 th=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j4=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @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 S4=de("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @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 N4=de("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
* @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 E4=de("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pw=de("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 A4=de("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 C4=de("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
* @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 gw=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
* @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 P4=de("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 ef=de("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 tf=de("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 O4=de("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 _4=de("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
* @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 ro=de("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 M4=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I4=de("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 vy=de("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 T4=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @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 rh=de("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 D4=de("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 R4=de("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 IN=de("ShieldCheck",[["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:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L4=de("ShieldQuestion",[["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:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["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 Ks=de("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 TN=de("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/**
* @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 $4=de("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const z4=de("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
* @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 us=de("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 DN=de("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 F4=de("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 B4=de("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/**
* @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 RN=de("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 nv=de("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 gn=de("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 U4=de("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 Uu=de("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 zn=de("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 ha=de("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"}]]),ou=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:x4},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:Jd},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:vo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:ef},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:pn},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:DN},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:i4}];var vw=1,H4=.9,W4=.8,K4=.17,Vp=.1,qp=.999,G4=.9999,V4=.99,q4=/[\\\/_+.#"@\[\(\{&]/,Q4=/[\\\/_+.#"@\[\(\{&]/g,Y4=/[\s-]/,LN=/[\s-]/g;function iv(e,t,r,n,i,o,u){if(o===t.length)return i===e.length?vw:V4;var c=`${i},${o}`;if(u[c]!==void 0)return u[c];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,g,v,b,j;h>=0;)g=iv(e,t,r,n,h+1,o+1,u),g>m&&(h===i?g*=vw:q4.test(e.charAt(h-1))?(g*=W4,b=e.slice(i,h-1).match(Q4),b&&i>0&&(g*=Math.pow(qp,b.length))):Y4.test(e.charAt(h-1))?(g*=H4,j=e.slice(i,h-1).match(LN),j&&i>0&&(g*=Math.pow(qp,j.length))):(g*=K4,i>0&&(g*=Math.pow(qp,h-i))),e.charAt(h)!==t.charAt(o)&&(g*=G4)),(g<Vp&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(v=iv(e,t,r,n,h+1,o+2,u),v*Vp>g&&(g=v*Vp)),g>m&&(m=g),h=r.indexOf(f,h+1);return u[c]=m,m}function yw(e){return e.toLowerCase().replace(LN," ")}function X4(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,iv(e,t,yw(e),yw(t),0,0,{})}function ca(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function xw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Is(...e){return t=>{let r=!1;const n=e.map(i=>{const o=xw(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():xw(e[i],null)}}}}function yo(...e){return y.useCallback(Is(...e),e)}function Z4(e,t=[]){let r=[];function n(o,u){const c=y.createContext(u);c.displayName=o+"Context";const f=r.length;r=[...r,u];const h=g=>{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||c,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||c,j=y.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(u=>y.createContext(u));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return i.scopeName=e,[n,J4(i,...t)]}function J4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const u=n.reduce((c,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...c,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var yu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eI=Zf[" useId ".trim().toString()]||(()=>{}),tI=0;function di(e){const[t,r]=y.useState(eI());return yu(()=>{r(n=>n??String(tI++))},[e]),t?`radix-${t}`:""}var rI=Zf[" useInsertionEffect ".trim().toString()]||yu;function nI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,u]=iI({defaultProp:t,onChange:r}),c=e!==void 0,f=c?e:i;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==c&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${c?"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.`),m.current=c},[c,n])}const h=y.useCallback(m=>{var g;if(c){const v=aI(m)?m(e):m;v!==e&&((g=u.current)==null||g.call(u,v))}else o(m)},[c,e,o,u]);return[f,h]}function iI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),i=y.useRef(r),o=y.useRef(t);return rI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;i.current!==r&&((u=o.current)==null||u.call(o,r),i.current=r)},[r,i]),[r,n,o]}function aI(e){return typeof e=="function"}var nh=fN();function $N(e){const t=y.forwardRef((r,n)=>{let{children:i,...o}=r,u=null,c=!1;const f=[];bw(i)&&typeof vd=="function"&&(i=vd(i._payload)),y.Children.forEach(i,v=>{var b;if(cI(v)){c=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;bw(k)&&typeof vd=="function"&&(k=vd(k._payload)),u=sI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=y.cloneElement(u,void 0,f):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(u=i);const h=u?uI(u):void 0,m=yo(n,h);if(!u){if(i||i===0)throw new Error(c?mI(e):hI(e));return i}const g=lI(o,u.props??{});return u.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var oI=Symbol.for("radix.slottable"),sI=(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 lI(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...c)=>{const f=o(...c);return i(...c),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function uI(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oI}var dI=Symbol.for("react.lazy");function bw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dI&&"_payload"in e&&fI(e._payload)}function fI(e){return typeof e=="object"&&e!==null&&"then"in e}var hI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vd=Zf[" use ".trim().toString()],pI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qt=pI.reduce((e,t)=>{const r=$N(`Primitive.${t}`),n=y.forwardRef((i,o)=>{const{asChild:u,...c}=i,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gI(e,t){e&&nh.flushSync(()=>e.dispatchEvent(t))}function xu(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 vI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var yI="DismissableLayer",av="dismissableLayer.update",xI="dismissableLayer.pointerDownOutside",bI="dismissableLayer.focusOutside",ww,yy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=y.useContext(yy),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=yo(t,F=>v(F)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,O=y.useRef(!1),D=SI(F=>{const z=F.target;if(!(z instanceof Node))return;const Y=[...m.branches].some(U=>U.contains(z));!_||Y||(o==null||o(F),c==null||c(F),F.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=NI(F=>{if(n&&O.current)return;const z=F.target;[...m.branches].some(U=>U.contains(z))||(u==null||u(F),c==null||c(F),F.defaultPrevented||f==null||f())},b);return vI(F=>{A===m.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&f&&(F.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ww=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),kw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ww))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),kw())},[g,m]),y.useEffect(()=>{const F=()=>j({});return document.addEventListener(av,F),()=>document.removeEventListener(av,F)},[]),l.jsx(qt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:ca(e.onFocusCapture,B.onFocusCapture),onBlurCapture:ca(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:ca(e.onPointerDownCapture,D.onPointerDownCapture)})});zN.displayName=yI;var wI="DismissableLayerBranch",kI=y.forwardRef((e,t)=>{const r=y.useContext(yy),n=y.useRef(null),i=yo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(qt.div,{...e,ref:i})});kI.displayName=wI;function jI(){const e=y.useContext(yy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function SI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,u=xu(e),c=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(_=>_.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!c.current){let A=function(){r.removeEventListener("click",m.current);const _=v();g(),_||FN(xI,u,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();c.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,u,n,i,o]),{onPointerDownCapture:()=>c.current=!0}}function NI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e),n=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!n.current&&FN(bI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function kw(){const e=new CustomEvent(av);document.dispatchEvent(e)}function FN(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?gI(i,o):i.dispatchEvent(o)}var Qp="focusScope.autoFocusOnMount",Yp="focusScope.autoFocusOnUnmount",jw={bubbles:!1,cancelable:!0},EI="FocusScope",BN=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...u}=e,[c,f]=y.useState(null),h=xu(i),m=xu(o),g=y.useRef(null),v=yo(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!c)return;const P=A.target;c.contains(P)?g.current=P:Qi(g.current,{select:!0})},S=function(A){if(b.paused||!c)return;const P=A.relatedTarget;P!==null&&(c.contains(P)||Qi(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&Qi(c)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){Nw.add(b);const k=document.activeElement;if(!c.contains(k)){const N=new CustomEvent(Qp,jw);c.addEventListener(Qp,h),c.dispatchEvent(N),N.defaultPrevented||(AI(MI(UN(c)),{select:!0}),document.activeElement===k&&Qi(c))}return()=>{c.removeEventListener(Qp,h),setTimeout(()=>{const N=new CustomEvent(Yp,jw);c.addEventListener(Yp,m),c.dispatchEvent(N),N.defaultPrevented||Qi(k??document.body,{select:!0}),c.removeEventListener(Yp,m),Nw.remove(b)},0)}}},[c,h,m,b]);const j=y.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 E=k.currentTarget,[A,P]=CI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&Qi(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&Qi(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(qt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});BN.displayName=EI;function AI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qi(n,{select:t}),document.activeElement!==r)return}function CI(e){const t=UN(e),r=Sw(t,e),n=Sw(t.reverse(),e);return[r,n]}function UN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?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(!PI(r,{upTo:t}))return r}function PI(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 OI(e){return e instanceof HTMLInputElement&&"select"in e}function Qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&OI(e)&&t&&e.select()}}var Nw=_I();function _I(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ew(e,t),e.unshift(t)},remove(t){var r;e=Ew(e,t),(r=e[0])==null||r.resume()}}}function Ew(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function MI(e){return e.filter(t=>t.tagName!=="A")}var II="Portal",HN=y.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[i,o]=y.useState(!1);yu(()=>o(!0),[]);const u=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?nh.createPortal(l.jsx(qt.div,{...n,ref:t}),u):null});HN.displayName=II;function TI(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var ih=e=>{const{present:t,children:r}=e,n=DI(t),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=RI(n.ref,LI(i));return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:o}):null};ih.displayName="Presence";function DI(e){const[t,r]=y.useState(),n=y.useRef(null),i=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[c,f]=TI(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=yd(n.current);o.current=c==="mounted"?h:"none"},[c]),yu(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=yd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),yu(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=yd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=yd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RI(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(u=>{const c=Aw(u,r);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let u=0;u<o.length;u++){const c=o[u];typeof c=="function"?c():Aw(n[u],null)}}},[])}function yd(e){return(e==null?void 0:e.animationName)||"none"}function LI(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var xd=0,En=null;function $I(){y.useEffect(()=>{En||(En={start:Cw(),end:Cw()});const{start:e,end:t}=En;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),xd++,()=>{xd===1&&(En==null||En.start.remove(),En==null||En.end.remove(),En=null),xd=Math.max(0,xd-1)}},[])}function Cw(){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 In=function(){return In=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},In.apply(this,arguments)};function WN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function zI(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Ud="right-scroll-bar-position",Hd="width-before-scroll-bar",FI="with-scroll-bars-hidden",BI="--removed-body-scroll-bar-size";function Xp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UI(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var HI=typeof window<"u"?y.useLayoutEffect:y.useEffect,Pw=new WeakMap;function WI(e,t){var r=UI(null,function(n){return e.forEach(function(i){return Xp(i,n)})});return HI(function(){var n=Pw.get(r);if(n){var i=new Set(n),o=new Set(e),u=r.current;i.forEach(function(c){o.has(c)||Xp(c,null)}),o.forEach(function(c){i.has(c)||Xp(c,u)})}Pw.set(r,e)},[e]),r}function KI(e){return e}function GI(e,t){t===void 0&&(t=KI);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(c){return c!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(c){return o(c)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var c=r;r=[],c.forEach(o),u=r}var f=function(){var m=u;u=[],m.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(m){u.push(m),h()},filter:function(m){return u=u.filter(m),r}}}};return i}function VI(e){e===void 0&&(e={});var t=GI(null);return t.options=In({async:!0,ssr:!1},e),t}var KN=function(e){var t=e.sideCar,r=WN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,In({},r))};KN.isSideCarExport=!0;function qI(e,t){return e.useMedium(t),KN}var GN=VI(),Zp=function(){},ah=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Zp,onWheelCapture:Zp,onTouchMoveCapture:Zp}),i=n[0],o=n[1],u=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,A=e.gapMode,P=WN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,O=WI([r,t]),D=In(In({},P),i);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:GN,removeScrollBar:h,shards:g,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:A}),u?y.cloneElement(y.Children.only(c),In(In({},D),{ref:O})):y.createElement(E,In({},D,{className:f,ref:O}),c))});ah.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ah.classNames={fullWidth:Hd,zeroRight:Ud};var QI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=QI();return t&&e.setAttribute("nonce",t),e}function XI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=YI())&&(XI(t,r),ZI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eT=function(){var e=JI();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},VN=function(){var e=eT(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},tT={left:0,top:0,right:0,gap:0},Jp=function(e){return parseInt(e||"",10)||0},rT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Jp(r),Jp(n),Jp(i)]},nT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tT;var t=rT(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])}},iT=VN(),fs="data-scroll-locked",aT=function(e,t,r,n){var i=e.left,o=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),`
.`.concat(FI,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(c,"px ").concat(n,`;
}
body[`).concat(fs,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(u,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(c,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Ud,` {
right: `).concat(c,"px ").concat(n,`;
}
.`).concat(Hd,` {
margin-right: `).concat(c,"px ").concat(n,`;
}
.`).concat(Ud," .").concat(Ud,` {
right: 0 `).concat(n,`;
}
.`).concat(Hd," .").concat(Hd,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(fs,`] {
`).concat(BI,": ").concat(c,`px;
}
`)},Ow=function(){var e=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(e)?e:0},oT=function(){y.useEffect(function(){return document.body.setAttribute(fs,(Ow()+1).toString()),function(){var e=Ow()-1;e<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,e.toString())}},[])},sT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;oT();var o=y.useMemo(function(){return nT(i)},[i]);return y.createElement(iT,{styles:aT(o,!t,i,r?"":"!important")})},ov=!1;if(typeof window<"u")try{var bd=Object.defineProperty({},"passive",{get:function(){return ov=!0,!0}});window.addEventListener("test",bd,bd),window.removeEventListener("test",bd,bd)}catch{ov=!1}var Qo=ov?{passive:!1}:!1,lT=function(e){return e.tagName==="TEXTAREA"},qN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lT(e)&&r[t]==="visible")},uT=function(e){return qN(e,"overflowY")},cT=function(e){return qN(e,"overflowX")},_w=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=QN(e,n);if(i){var o=YN(e,n),u=o[1],c=o[2];if(u>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},fT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},QN=function(e,t){return e==="v"?uT(t):cT(t)},YN=function(e,t){return e==="v"?dT(t):fT(t)},hT=function(e,t){return e==="h"&&t==="rtl"?-1:1},mT=function(e,t,r,n,i){var o=hT(e,window.getComputedStyle(t).direction),u=o*n,c=r.target,f=t.contains(c),h=!1,m=u>0,g=0,v=0;do{if(!c)break;var b=YN(e,c),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&QN(e,c)&&(g+=N,v+=j);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},wd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mw=function(e){return[e.deltaX,e.deltaY]},Iw=function(e){return e&&"current"in e?e.current:e},pT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gT=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},vT=0,Yo=[];function yT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(vT++)[0],o=y.useState(VN)[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(i));var k=zI([e.lockRef.current],(e.shards||[]).map(Iw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=wd(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,O=k.target,D=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&D==="h"&&O.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,z=F?F===O||F.contains(O):!1;if(z)return!1;var Y=_w(D,O);if(!Y)return!0;if(Y?_=D:(_=D==="v"?"h":"v",Y=_w(D,O)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=_),!_)return!0;var U=n.current||_;return mT(U,S,k,U==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!Yo.length||Yo[Yo.length-1]!==o)){var N="deltaY"in S?Mw(S):wd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&pT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(Iw).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=A.length>0?c(S,A[0]):!u.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:xT(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=wd(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Mw(k),k.target,c(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,wd(k),k.target,c(k,e.lockRef.current))},[]);y.useEffect(function(){return Yo.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Qo),document.addEventListener("touchmove",f,Qo),document.addEventListener("touchstart",m,Qo),function(){Yo=Yo.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Qo),document.removeEventListener("touchmove",f,Qo),document.removeEventListener("touchstart",m,Qo)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:gT(i)}):null,b?y.createElement(sT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bT=qI(GN,yT);var XN=y.forwardRef(function(e,t){return y.createElement(ah,In({},e,{ref:t,sideCar:bT}))});XN.classNames=ah.classNames;var wT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xo=new WeakMap,kd=new WeakMap,jd={},eg=0,ZN=function(e){return e&&(e.host||ZN(e.parentNode))},kT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ZN(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})},jT=function(e,t,r,n){var i=kT(t,Array.isArray(e)?e:[e]);jd[r]||(jd[r]=new WeakMap);var o=jd[r],u=[],c=new Set,f=new Set(i),h=function(g){!g||c.has(g)||(c.add(g),h(g.parentNode))};i.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(c.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(Xo.get(v)||0)+1,S=(o.get(v)||0)+1;Xo.set(v,k),o.set(v,S),u.push(v),k===1&&j&&kd.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),c.clear(),eg++,function(){u.forEach(function(g){var v=Xo.get(g)-1,b=o.get(g)-1;Xo.set(g,v),o.set(g,b),v||(kd.has(g)||g.removeAttribute(n),kd.delete(g)),b||g.removeAttribute(r)}),eg--,eg||(Xo=new WeakMap,Xo=new WeakMap,kd=new WeakMap,jd={})}},ST=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=wT(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),jT(n,i,r,"aria-hidden")):function(){return null}},oh="Dialog",[JN]=Z4(oh),[NT,xn]=JN(oh),e5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:u=!0}=e,c=y.useRef(null),f=y.useRef(null),[h,m]=nI({prop:n,defaultProp:i??!1,onChange:o,caller:oh});return l.jsx(NT,{scope:t,triggerRef:c,contentRef:f,contentId:di(),titleId:di(),descriptionId:di(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};e5.displayName=oh;var t5="DialogTrigger",ET=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(t5,r),o=yo(t,i.triggerRef);return l.jsx(qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":by(i.open),...n,ref:o,onClick:ca(e.onClick,i.onOpenToggle)})});ET.displayName=t5;var xy="DialogPortal",[AT,r5]=JN(xy,{forceMount:void 0}),n5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=xn(xy,t);return l.jsx(AT,{scope:t,forceMount:r,children:y.Children.map(n,u=>l.jsx(ih,{present:r||o.open,children:l.jsx(HN,{asChild:!0,container:i,children:u})}))})};n5.displayName=xy;var rf="DialogOverlay",i5=y.forwardRef((e,t)=>{const r=r5(rf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=xn(rf,e.__scopeDialog);return o.modal?l.jsx(ih,{present:n||o.open,children:l.jsx(PT,{...i,ref:t})}):null});i5.displayName=rf;var CT=$N("DialogOverlay.RemoveScroll"),PT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(rf,r),o=jI(),u=yo(t,o);return l.jsx(XN,{as:CT,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(qt.div,{"data-state":by(i.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ts="DialogContent",a5=y.forwardRef((e,t)=>{const r=r5(Ts,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=xn(Ts,e.__scopeDialog);return l.jsx(ih,{present:n||o.open,children:o.modal?l.jsx(OT,{...i,ref:t}):l.jsx(_T,{...i,ref:t})})});a5.displayName=Ts;var OT=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(null),i=yo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return ST(o)},[]),l.jsx(o5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ca(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ca(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&o.preventDefault()}),onFocusOutside:ca(e.onFocusOutside,o=>o.preventDefault())})}),_T=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return l.jsx(o5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,i.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"&&(i.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),o5=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...u}=e,c=xn(Ts,r);return $I(),l.jsx(l.Fragment,{children:l.jsx(BN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(zN,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":by(c.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),s5="DialogTitle",MT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(s5,r);return l.jsx(qt.h2,{id:i.titleId,...n,ref:t})});MT.displayName=s5;var l5="DialogDescription",IT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(l5,r);return l.jsx(qt.p,{id:i.descriptionId,...n,ref:t})});IT.displayName=l5;var u5="DialogClose",TT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(u5,r);return l.jsx(qt.button,{type:"button",...n,ref:t,onClick:ca(e.onClick,()=>i.onOpenChange(!1))})});TT.displayName=u5;function by(e){return e?"open":"closed"}var Wl='[cmdk-group=""]',tg='[cmdk-group-items=""]',DT='[cmdk-group-heading=""]',c5='[cmdk-item=""]',Tw=`${c5}:not([aria-disabled="true"])`,sv="cmdk-item-select",os="data-value",RT=(e,t,r)=>X4(e,t,r),d5=y.createContext(void 0),Hu=()=>y.useContext(d5),f5=y.createContext(void 0),wy=()=>y.useContext(f5),h5=y.createContext(void 0),m5=y.forwardRef((e,t)=>{let r=ss(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ss(()=>new Set),i=ss(()=>new Map),o=ss(()=>new Map),u=ss(()=>new Set),c=p5(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=di(),A=di(),P=di(),_=y.useRef(null),O=VT();so(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,D.emit()}},[m]),so(()=>{O(6,he)},[]);let D=y.useMemo(()=>({subscribe:M=>(u.current.add(M),()=>u.current.delete(M)),snapshot:()=>r.current,setState:(M,H,ne)=>{var Z,me,pe,Oe;if(!Object.is(r.current[M],H)){if(r.current[M]=H,M==="search")U(),z(),O(1,Y);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(P);re?re.focus():(Z=document.getElementById(E))==null||Z.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,D.emit()}),ne||O(5,he),((me=c.current)==null?void 0:me.value)!==void 0){let re=H??"";(Oe=(pe=c.current).onValueChange)==null||Oe.call(pe,re);return}}D.emit()}},emit:()=>{u.current.forEach(M=>M())}}),[]),B=y.useMemo(()=>({value:(M,H,ne)=>{var Z;H!==((Z=o.current.get(M))==null?void 0:Z.value)&&(o.current.set(M,{value:H,keywords:ne}),r.current.filtered.items.set(M,F(H,ne)),O(2,()=>{z(),D.emit()}))},item:(M,H)=>(n.current.add(M),H&&(i.current.has(H)?i.current.get(H).add(M):i.current.set(H,new Set([M]))),O(3,()=>{U(),z(),r.current.value||Y(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ne=ue();O(4,()=>{U(),(ne==null?void 0:ne.getAttribute("id"))===M&&Y(),D.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:_}),[]);function F(M,H){var ne,Z;let me=(Z=(ne=c.current)==null?void 0:ne.filter)!=null?Z:RT;return M?me(M,r.current.search,H):0}function z(){if(!r.current.search||c.current.shouldFilter===!1)return;let M=r.current.filtered.items,H=[];r.current.filtered.groups.forEach(Z=>{let me=i.current.get(Z),pe=0;me.forEach(Oe=>{let re=M.get(Oe);pe=Math.max(re,pe)}),H.push([Z,pe])});let ne=_.current;ge().sort((Z,me)=>{var pe,Oe;let re=Z.getAttribute("id"),we=me.getAttribute("id");return((pe=M.get(we))!=null?pe:0)-((Oe=M.get(re))!=null?Oe:0)}).forEach(Z=>{let me=Z.closest(tg);me?me.appendChild(Z.parentElement===me?Z:Z.closest(`${tg} > *`)):ne.appendChild(Z.parentElement===ne?Z:Z.closest(`${tg} > *`))}),H.sort((Z,me)=>me[1]-Z[1]).forEach(Z=>{var me;let pe=(me=_.current)==null?void 0:me.querySelector(`${Wl}[${os}="${encodeURIComponent(Z[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function Y(){let M=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(os);D.setState("value",H||void 0)}function U(){var M,H,ne,Z;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let me=0;for(let pe of n.current){let Oe=(H=(M=o.current.get(pe))==null?void 0:M.value)!=null?H:"",re=(Z=(ne=o.current.get(pe))==null?void 0:ne.keywords)!=null?Z:[],we=F(Oe,re);r.current.filtered.items.set(pe,we),we>0&&me++}for(let[pe,Oe]of i.current)for(let re of Oe)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=me}function he(){var M,H,ne;let Z=ue();Z&&(((M=Z.parentElement)==null?void 0:M.firstChild)===Z&&((ne=(H=Z.closest(Wl))==null?void 0:H.querySelector(DT))==null||ne.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${c5}[aria-selected="true"]`)}function ge(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(Tw))||[])}function ie(M){let H=ge()[M];H&&D.setState("value",H.getAttribute(os))}function se(M){var H;let ne=ue(),Z=ge(),me=Z.findIndex(Oe=>Oe===ne),pe=Z[me+M];(H=c.current)!=null&&H.loop&&(pe=me+M<0?Z[Z.length-1]:me+M===Z.length?Z[0]:Z[me+M]),pe&&D.setState("value",pe.getAttribute(os))}function X(M){let H=ue(),ne=H==null?void 0:H.closest(Wl),Z;for(;ne&&!Z;)ne=M>0?KT(ne,Wl):GT(ne,Wl),Z=ne==null?void 0:ne.querySelector(Tw);Z?D.setState("value",Z.getAttribute(os)):se(M)}let te=()=>ie(ge().length-1),J=M=>{M.preventDefault(),M.metaKey?te():M.altKey?X(1):se(1)},I=M=>{M.preventDefault(),M.metaKey?ie(0):M.altKey?X(-1):se(-1)};return y.createElement(qt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var H;(H=N.onKeyDown)==null||H.call(N,M);let ne=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ne))switch(M.key){case"n":case"j":{S&&M.ctrlKey&&J(M);break}case"ArrowDown":{J(M);break}case"p":case"k":{S&&M.ctrlKey&&I(M);break}case"ArrowUp":{I(M);break}case"Home":{M.preventDefault(),ie(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let Z=ue();if(Z){let me=new Event(sv);Z.dispatchEvent(me)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:QT},f),sh(e,M=>y.createElement(f5.Provider,{value:D},y.createElement(d5.Provider,{value:B},M))))}),LT=y.forwardRef((e,t)=>{var r,n;let i=di(),o=y.useRef(null),u=y.useContext(h5),c=Hu(),f=p5(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;so(()=>{if(!h)return c.item(i,u==null?void 0:u.id)},[h]);let m=g5(i,o,[e.value,e.children,o],e.keywords),g=wy(),v=ma(O=>O.value&&O.value===m.current),b=ma(O=>h||c.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(sv,j),()=>O.removeEventListener(sv,j)},[b,e.onSelect,e.disabled]);function j(){var O,D;k(),(D=(O=f.current).onSelect)==null||D.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,..._}=e;return y.createElement(qt.div,{ref:Is(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||c.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),$T=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,u=di(),c=y.useRef(null),f=y.useRef(null),h=di(),m=Hu(),g=ma(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);so(()=>m.group(u),[]),g5(u,c,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:u,forceMount:i}),[i]);return y.createElement(qt.div,{ref:Is(c,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),sh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(h5.Provider,{value:v},b))))}),zT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=y.useRef(null),o=ma(u=>!u.search);return!r&&!o?null:y.createElement(qt.div,{ref:Is(i,t),...n,"cmdk-separator":"",role:"separator"})}),FT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=wy(),u=ma(h=>h.search),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(qt.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":c,id:f.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),BT=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=y.useRef(null),u=y.useRef(null),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(qt.div,{ref:Is(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:f.listId},sh(e,h=>y.createElement("div",{ref:Is(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),UT=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:u,...c}=e;return y.createElement(e5,{open:r,onOpenChange:n},y.createElement(n5,{container:u},y.createElement(i5,{"cmdk-overlay":"",className:i}),y.createElement(a5,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(m5,{ref:t,...c}))))}),HT=y.forwardRef((e,t)=>ma(r=>r.filtered.count===0)?y.createElement(qt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),WT=y.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return y.createElement(qt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},sh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Zo=Object.assign(m5,{List:BT,Item:LT,Input:FT,Group:$T,Separator:zT,Dialog:UT,Empty:HT,Loading:WT});function KT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function GT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function p5(e){let t=y.useRef(e);return so(()=>{t.current=e}),t}var so=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ss(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ma(e){let t=wy(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function g5(e,t,r,n=[]){let i=y.useRef(),o=Hu();return so(()=>{var u;let c=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,c,f),(u=t.current)==null||u.setAttribute(os,c),i.current=c}),i}var VT=()=>{let[e,t]=y.useState(),r=ss(()=>new Map);return so(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function qT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(qT(t),{ref:t.ref},r(t.props.children)):r(t)}var QT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function YT({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),l.jsx(Zo.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] overscroll-contain",onClick:()=>r(!1),children:l.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:[l.jsx(Zo.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"}),l.jsxs(Zo.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(Zo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(Zo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ou.map(n=>l.jsxs(Zo.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:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const v5="mc_expert_mode",lv="mc-expert-mode-change",XT=()=>{try{return localStorage.getItem(v5)==="true"}catch{return!1}};function ZT(e){return window.addEventListener(lv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(lv,e),window.removeEventListener("storage",e)}}function Dw(e){localStorage.setItem(v5,String(e)),window.dispatchEvent(new Event(lv))}function y5(){return y.useSyncExternalStore(ZT,XT,()=>!1)}function x5(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=x5(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=x5(e))&&(n&&(n+=" "),n+=t);return n}const ky="-",JT=e=>{const t=tD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const c=u.split(ky);return c[0]===""&&c.length!==1&&c.shift(),b5(c,t)||eD(u)},getConflictingClassGroupIds:(u,c)=>{const f=r[u]||[];return c&&n[u]?[...f,...n[u]]:f}}},b5=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?b5(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(ky);return(u=t.validators.find(({validator:c})=>c(o)))==null?void 0:u.classGroupId},Rw=/^\[(.+)\]$/,eD=e=>{if(Rw.test(e)){const t=Rw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},tD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),r).forEach(([o,u])=>{uv(u,n,o,t)}),n},uv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Lw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(rD(i)){uv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,u])=>{uv(u,Lw(t,o),r,n)})})},Lw=(e,t)=>{let r=e;return t.split(ky).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},rD=e=>e.isThemeGetter,nD=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,c])=>[t+u,c])):o);return[r,i]}):e,iD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(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 i(o,u),u},set(o,u){r.has(o)?r.set(o,u):i(o,u)}}},w5="!",aD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,u=c=>{const f=[];let h=0,m=0,g;for(let S=0;S<c.length;S++){let N=c[S];if(h===0){if(N===i&&(n||c.slice(S,S+o)===t)){f.push(c.slice(m,S)),m=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const v=f.length===0?c:c.substring(m),b=v.startsWith(w5),j=b?v.substring(1):v,k=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?c=>r({className:c,parseClassName:u}):u},oD=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},sD=e=>({cache:iD(e.cacheSize),parseClassName:aD(e),...JT(e)}),lD=/\s+/,uD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],u=e.trim().split(lD);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){c=h+(c.length>0?" "+c:c);continue}if(k=n(v),!k){c=h+(c.length>0?" "+c:c);continue}j=!1}const S=oD(m).join(":"),N=g?S+w5:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=i(k,j);for(let P=0;P<A.length;++P){const _=A[P];o.push(N+_)}c=h+(c.length>0?" "+c:c)}return c};function cD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=k5(t))&&(n&&(n+=" "),n+=r);return n}const k5=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=k5(e[n]))&&(r&&(r+=" "),r+=t);return r};function dD(e,...t){let r,n,i,o=u;function u(f){const h=t.reduce((m,g)=>g(m),e());return r=sD(h),n=r.cache.get,i=r.cache.set,o=c,c(f)}function c(f){const h=n(f);if(h)return h;const m=uD(f,r);return i(f,m),m}return function(){return o(cD.apply(null,arguments))}}const at=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},j5=/^\[(?:([a-z-]+):)?(.+)\]$/i,fD=/^\d+\/\d+$/,hD=new Set(["px","full","screen"]),mD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pD=/\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$/,gD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>hs(e)||hD.has(e)||fD.test(e),Ki=e=>Gs(e,"length",ED),hs=e=>!!e&&!Number.isNaN(Number(e)),rg=e=>Gs(e,"number",hs),Kl=e=>!!e&&Number.isInteger(Number(e)),xD=e=>e.endsWith("%")&&hs(e.slice(0,-1)),$e=e=>j5.test(e),Gi=e=>mD.test(e),bD=new Set(["length","size","percentage"]),wD=e=>Gs(e,bD,S5),kD=e=>Gs(e,"position",S5),jD=new Set(["image","url"]),SD=e=>Gs(e,jD,CD),ND=e=>Gs(e,"",AD),Gl=()=>!0,Gs=(e,t,r)=>{const n=j5.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},ED=e=>pD.test(e)&&!gD.test(e),S5=()=>!1,AD=e=>vD.test(e),CD=e=>yD.test(e),PD=()=>{const e=at("colors"),t=at("spacing"),r=at("blur"),n=at("brightness"),i=at("borderColor"),o=at("borderRadius"),u=at("borderSpacing"),c=at("borderWidth"),f=at("contrast"),h=at("grayscale"),m=at("hueRotate"),g=at("invert"),v=at("gap"),b=at("gradientColorStops"),j=at("gradientColorStopPositions"),k=at("inset"),S=at("margin"),N=at("opacity"),E=at("padding"),A=at("saturate"),P=at("scale"),_=at("sepia"),O=at("skew"),D=at("space"),B=at("translate"),F=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],U=()=>[$e,t],he=()=>["",ri,Ki],ue=()=>["auto",hs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",$e],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[hs,$e];return{cacheSize:500,separator:":",theme:{colors:[Gl],spacing:[ri,Ki],blur:["none","",Gi,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",Gi,$e],borderSpacing:U(),borderWidth:he(),contrast:I(),grayscale:te(),hueRotate:I(),invert:te(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[xD,Ki],inset:Y(),margin:Y(),opacity:I(),padding:U(),saturate:I(),scale:I(),sepia:te(),skew:I(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Gi]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],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",Kl,$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:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",Kl,$e]}],"grid-cols":[{"grid-cols":[Gl]}],"col-start-end":[{col:["auto",{span:["full",Kl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[Gl]}],"row-start-end":[{row:["auto",{span:[Kl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"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:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],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":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"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:[Gi]},Gi]}],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",Gi,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rg]}],"font-family":[{font:[Gl]}],"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",hs,rg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,$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:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Ki]}],"underline-offset":[{"underline-offset":["auto",ri,$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:U()}],"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(),kD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SD]}],"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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ri,$e]}],"outline-w":[{outline:[ri,Ki]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,Ki]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gi,ND]}],"shadow-color":[{shadow:[Gl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Gi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],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":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"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:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Kl,$e]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"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":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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:[ri,Ki,rg]}],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"]}}},OD=dD(PD);function ee(...e){return OD(rt(e))}function Ds(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function N5(){const e=y5();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Dw(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(us,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Dw(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx($4,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function je(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=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 m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const c=await fetch(e,{...t,headers:r,body:o});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return c.json()}const E5=(e,t,r=!1,n=!0)=>je("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),_D=e=>je("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Ge={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],voiceMetrics:["voice-metrics"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},MD=(e=!0)=>Rt({queryKey:Ge.memoryGraph,queryFn:()=>je("/api/memory/graph"),enabled:e}),jy=()=>Rt({queryKey:Ge.health,queryFn:()=>je("/api/health"),refetchInterval:1e4}),xo=(e=5e3)=>Rt({queryKey:Ge.systemStatus,queryFn:()=>je("/api/system/status"),refetchInterval:e}),A5=(e=3e3)=>Rt({queryKey:Ge.services,queryFn:()=>je("/api/system/services"),refetchInterval:e}),yi=(e=4e3)=>Rt({queryKey:Ge.models,queryFn:()=>je("/api/models"),refetchInterval:e}),C5=(e=8e3)=>Rt({queryKey:Ge.groups,queryFn:()=>je("/api/groups"),refetchInterval:e}),ID=(e=5e3)=>Rt({queryKey:Ge.voiceMetrics,queryFn:()=>je("/api/voice/metrics"),refetchInterval:e}),TD=()=>Rt({queryKey:Ge.routingPolicy,queryFn:()=>je("/api/routing/policy")}),DD=(e=2e3)=>Rt({queryKey:Ge.jobs,queryFn:()=>je("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),Sy=(e=3e3)=>Rt({queryKey:Ge.tokenStats,queryFn:()=>je("/api/system/token-stats"),refetchInterval:e}),Ny=(e=5e3)=>Rt({queryKey:Ge.agentStatus,queryFn:()=>je("/api/agent/status"),refetchInterval:e}),P5=(e=6e4)=>Rt({queryKey:Ge.hermesBrain,queryFn:()=>je("/api/agent/brain"),refetchInterval:e}),lh=e=>Rt({queryKey:Ge.updates,queryFn:()=>je("/api/maintenance/updates"),refetchInterval:e}),RD=()=>Rt({queryKey:Ge.discover,queryFn:()=>je("/api/discover")}),LD=e=>Rt({queryKey:Ge.drafts(e),queryFn:()=>je(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),$D=e=>Rt({queryKey:Ge.connect(e),queryFn:()=>je(e?`/api/connect?${e}`:"/api/connect")}),zD=()=>Rt({queryKey:Ge.connectHealth,queryFn:()=>je("/api/connect/health"),refetchInterval:15e3}),cv=e=>Rt({queryKey:Ge.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),je(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let dv=[],fv=[];const hv=new Set,O5=()=>hv.forEach(e=>e());function _5(e){return hv.add(e),()=>{hv.delete(e)}}function FD(e){dv=[...dv,e].slice(-40),O5()}function BD(e){fv=[...fv,e].slice(-40),O5()}const UD=()=>y.useSyncExternalStore(_5,()=>dv),HD=()=>y.useSyncExternalStore(_5,()=>fv);function WD(){const{data:e,dataUpdatedAt:t}=xo(3e3),{data:r,dataUpdatedAt:n}=Sy(3e3),i=y.useRef(null);y.useEffect(()=>{var o,u,c,f;e&&FD({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((c=e.gpu)==null?void 0:c.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,c=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);BD({t:o,prompt:Math.max(0,(u-i.current.p)/f),completion:Math.max(0,(c-i.current.c)/f)})}i.current={p:u,c,t:o}},[n])}function KD(){const{data:e,error:t}=xo(3e3),r=UD();return{sys:e,hist:r,error:t}}function Yi(e){return(e/1024**3).toFixed(1)}function mv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function _r(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function GD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function $w(e){return e?`${Math.round(e/1024)}k`:"—"}var VD=["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 Ey(e){if(typeof e!="string")return!1;var t=VD;return t.includes(e)}var qD=["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"],QD=new Set(qD);function M5(e){return typeof e!="string"?!1:QD.has(e)}function I5(e){return typeof e=="string"&&e.startsWith("data-")}function vn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(M5(r)||I5(r))&&(t[r]=e[r]);return t}function uh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return vn(t)}return typeof e=="object"&&!Array.isArray(e)?vn(e):null}function Yr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(M5(r)||I5(r)||Ey(r))&&(t[r]=e[r]);return t}function YD(e){return e==null?null:y.isValidElement(e)?Yr(e.props):typeof e=="object"&&!Array.isArray(e)?Yr(e):null}var XD=["children","width","height","viewBox","className","style","title","desc"];function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pv.apply(null,arguments)}function ZD(e,t){if(e==null)return{};var r,n,i=JD(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var T5=y.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,o=e.viewBox,u=e.className,c=e.style,f=e.title,h=e.desc,m=ZD(e,XD),g=o||{width:n,height:i,x:0,y:0},v=rt("recharts-surface",u);return y.createElement("svg",pv({},Yr(m),{className:v,width:n,height:i,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),eR=["children","className"];function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gv.apply(null,arguments)}function tR(e,t){if(e==null)return{};var r,n,i=rR(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Xr=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=tR(e,eR),o=rt("recharts-layer",n);return y.createElement("g",gv({className:o},Yr(i),{ref:t}),r)}),nR=y.createContext(null);function pt(e){return function(){return e}}const vv=Math.PI,yv=2*vv,$a=1e-6,iR=yv-$a;function D5(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function aR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return D5;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class oR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?D5:aR(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,u){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+u}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,c=this._y1,f=n-t,h=i-r,m=u-t,g=c-r,v=m*m+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>$a)if(!(Math.abs(g*f-h*m)>$a)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=i-c,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((vv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,_=A/N;Math.abs(P-1)>$a&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),h=t+c,m=r+f,g=1^u,v=u?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>$a||Math.abs(this._y1-m)>$a)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%yv+yv),v>iR?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>$a&&this._append`A${n},${n},0,${+(v>=vv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function R5(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 oR(t)}function Ay(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L5(e){this._context=e}L5.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 ch(e){return new L5(e)}function $5(e){return e[0]}function z5(e){return e[1]}function F5(e,t){var r=pt(!0),n=null,i=ch,o=null,u=R5(c);e=typeof e=="function"?e:e===void 0?$5:pt(e),t=typeof t=="function"?t:t===void 0?z5:pt(t);function c(f){var h,m=(f=Ay(f)).length,g,v=!1,b;for(n==null&&(o=i(b=u())),h=0;h<=m;++h)!(h<m&&r(g=f[h],h,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:pt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:pt(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:pt(!!f),c):r},c.curve=function(f){return arguments.length?(i=f,n!=null&&(o=i(n)),c):i},c.context=function(f){return arguments.length?(f==null?n=o=null:o=i(n=f),c):n},c}function Sd(e,t,r){var n=null,i=pt(!0),o=null,u=ch,c=null,f=R5(h);e=typeof e=="function"?e:e===void 0?$5:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?z5:pt(+r);function h(g){var v,b,j,k=(g=Ay(g)).length,S,N=!1,E,A=new Array(k),P=new Array(k);for(o==null&&(c=u(E=f())),v=0;v<=k;++v){if(!(v<k&&i(S=g[v],v,g))===N)if(N=!N)b=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),j=v-1;j>=b;--j)c.point(A[j],P[j]);c.lineEnd(),c.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),c.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return c=null,E+""||null}function m(){return F5().defined(i).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 m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(i=typeof g=="function"?g:pt(!!g),h):i},h.curve=function(g){return arguments.length?(u=g,o!=null&&(c=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=c=null:c=u(o=g),h):o},h}class B5{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 sR(e){return new B5(e,!0)}function lR(e){return new B5(e,!1)}function nf(){}function af(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 U5(e){this._context=e}U5.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:af(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:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uR(e){return new U5(e)}function H5(e){this._context=e}H5.prototype={areaStart:nf,areaEnd:nf,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:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cR(e){return new H5(e)}function W5(e){this._context=e}W5.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:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dR(e){return new W5(e)}function K5(e){this._context=e}K5.prototype={areaStart:nf,areaEnd:nf,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 fR(e){return new K5(e)}function zw(e){return e<0?-1:1}function Fw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),u=(r-e._y1)/(i||n<0&&-0),c=(o*i+u*n)/(n+i);return(zw(o)+zw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function Bw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ng(e,t,r){var n=e._x0,i=e._y0,o=e._x1,u=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,i+c*t,o-c,u-c*r,o,u)}function of(e){this._context=e}of.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:ng(this,this._t0,Bw(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,ng(this,Bw(this,r=Fw(this,e,t)),r);break;default:ng(this,this._t0,r=Fw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function G5(e){this._context=new V5(e)}(G5.prototype=Object.create(of.prototype)).point=function(e,t){of.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.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,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function hR(e){return new of(e)}function mR(e){return new G5(e)}function q5(e){this._context=e}q5.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=Uw(e),i=Uw(t),o=0,u=1;u<r;++o,++u)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[u],t[u]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Uw(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,u[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,u[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,u[t]-=n*u[t-1];for(i[r-1]=u[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(u[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function pR(e){return new q5(e)}function dh(e,t){this._context=e,this._t=t}dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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 gR(e){return new dh(e,.5)}function vR(e){return new dh(e,0)}function yR(e){return new dh(e,1)}function lo(e,t){if((u=e.length)>1)for(var r=1,n,i,o=e[t[0]],u,c=o.length;r<u;++r)for(i=o,o=e[t[r]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function xv(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function xR(e,t){return e[t]}function bR(e){const t=[];return t.key=e,t}function wR(){var e=pt([]),t=xv,r=lo,n=xR;function i(o){var u=Array.from(e.apply(this,arguments),bR),c,f=u.length,h=-1,m;for(const g of o)for(c=0,++h;c<f;++c)(u[c][h]=[0,+n(g,u[c].key,h,o)]).data=g;for(c=0,m=Ay(t(u));c<f;++c)u[m[c]].index=c;return r(u,m),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:pt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:pt(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?xv:typeof o=="function"?o:pt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??lo,i):r},i}function kR(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,u;i<o;++i){for(u=r=0;r<n;++r)u+=e[r][i][1]||0;if(u)for(r=0;r<n;++r)e[r][i][1]/=u}lo(e,t)}}function jR(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var u=0,c=0;u<i;++u)c+=e[u][r][1]||0;n[r][1]+=n[r][0]=-c/2}lo(e,t)}}function SR(e,t){if(!(!((u=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,u;n<o;++n){for(var c=0,f=0,h=0;c<u;++c){for(var m=e[t[c]],g=m[n][1]||0,v=m[n-1][1]||0,b=(g-v)/2,j=0;j<c;++j){var k=e[t[j]],S=k[n][1]||0,N=k[n-1][1]||0;b+=S-N}f+=g,h+=b*g}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,lo(e,t)}}function bv(e){return e==="__proto__"}function Q5(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Cy(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function Y5(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Y5).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Py(e){if(Array.isArray(e))return e.map(Cy);if(typeof e=="symbol")return[e];e=Y5(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",o="",u=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const c=e[n];if(o)c==="\\"&&n+1<r?(n++,i+=e[n]):c===o?o="":i+=c;else if(u)c==='"'||c==="'"?o=c:c==="]"?(u=!1,t.push(i),i=""):i+=c;else if(c==="[")u=!0,i&&(t.push(i),i="");else if(c==="."){i&&(t.push(i),i="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else i+=c;n++}return i&&t.push(i),t}function bo(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(bv(t))return r;const n=e[t];return n===void 0?Q5(t)&&!Object.hasOwn(e,t)?bo(e,Py(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Cy(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return NR(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),bv(t))return r;const n=e[t];return n===void 0?r:n}}}function NR(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||bv(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var ER=4;function la(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ER,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ht(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,o,u)=>{var c=r[u-1];return typeof c=="string"?i+c+o:c!==void 0?i+la(c)+o:i+o},"")}var Vr=e=>e===0?0:e>0?1:-1,Fn=e=>typeof e=="number"&&e!=+e,uo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Fn(e),Bn=e=>Ee(e)||typeof e=="string",AR=0,bu=e=>{var t=++AR;return"".concat(e||"").concat(t)},pa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&typeof t!="string")return n;var o;if(uo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Fn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},X5=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function li(e,t,r){return Ee(e)&&Ee(t)?la(e+r*(t-e)):t}function Z5(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):bo(n,t))===r)}var Vt=e=>e===null||typeof e>"u",Oy=e=>Vt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jr(e){return e!=null}function Vs(){}var J5=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,_y=(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(i=>{Ey(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},CR=(e,t,r)=>n=>(e(t,r,n),null),PR=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Ey(i)&&typeof o=="function"&&(n||(n={}),n[i]=CR(o,t,r))}),n};function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(r),!0).forEach(function(n){_R(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _R(e,t,r){return(t=MR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MR(e){var t=IR(e,"string");return typeof t=="symbol"?t:t+""}function IR(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)}function Jr(e,t){var r=OR({},e),n=t,i=Object.keys(t),o=i.reduce((u,c)=>(u[c]===void 0&&n[c]!==void 0&&(u[c]=n[c]),u),r);return o}function TR(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],o=t(i,n,e);r.has(o)||r.set(o,i)}return Array.from(r.values())}function DR(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function eE(e){return e}function RR(e){return function(t){return bo(t,e)}}function wv(e){return e==null||typeof e!="object"&&typeof e!="function"}function LR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $R(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function My(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zR="[object RegExp]",tE="[object String]",rE="[object Number]",nE="[object Boolean]",iE="[object Arguments]",FR="[object Symbol]",BR="[object Date]",UR="[object Map]",HR="[object Set]",WR="[object Array]",KR="[object ArrayBuffer]",GR="[object Object]",VR="[object DataView]",qR="[object Uint8Array]",QR="[object Uint8ClampedArray]",YR="[object Uint16Array]",XR="[object Uint32Array]",ZR="[object Int8Array]",JR="[object Int16Array]",eL="[object Int32Array]",tL="[object Float32Array]",rL="[object Float64Array]",Ww=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function nL(e){return typeof Ww.Buffer<"u"&&Ww.Buffer.isBuffer(e)}function iL(e,t){return Ua(e,void 0,e,new Map,t)}function Ua(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(wv(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 c=0;c<e.length;c++)u[c]=Ua(e[c],c,r,n,i);return Object.hasOwn(e,"index")&&(u.index=e.index),Object.hasOwn(e,"input")&&(u.input=e.input),u}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const u=new RegExp(e.source,e.flags);return u.lastIndex=e.lastIndex,u}if(e instanceof Map){const u=new Map;n.set(e,u);for(const[c,f]of e)u.set(c,Ua(f,c,r,n,i));return u}if(e instanceof Set){const u=new Set;n.set(e,u);for(const c of e)u.add(Ua(c,void 0,r,n,i));return u}if(nL(e))return e.subarray();if(LR(e)){const u=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,u);for(let c=0;c<e.length;c++)u[c]=Ua(e[c],c,r,n,i);return u}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const u=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,u),cn(u,e,r,n,i),u}if(typeof File<"u"&&e instanceof File){const u=new File([e],e.name,{type:e.type});return n.set(e,u),cn(u,e,r,n,i),u}if(typeof Blob<"u"&&e instanceof Blob){const u=new Blob([e],{type:e.type});return n.set(e,u),cn(u,e,r,n,i),u}if(e instanceof Error){const u=structuredClone(e);return n.set(e,u),u.message=e.message,u.name=e.name,u.stack=e.stack,u.cause=e.cause,u.constructor=e.constructor,cn(u,e,r,n,i),u}if(e instanceof Boolean){const u=new Boolean(e.valueOf());return n.set(e,u),cn(u,e,r,n,i),u}if(e instanceof Number){const u=new Number(e.valueOf());return n.set(e,u),cn(u,e,r,n,i),u}if(e instanceof String){const u=new String(e.valueOf());return n.set(e,u),cn(u,e,r,n,i),u}if(typeof e=="object"&&aL(e)){const u=Object.create(Object.getPrototypeOf(e));return n.set(e,u),cn(u,e,r,n,i),u}return e}function cn(e,t,r=e,n,i){const o=[...Object.keys(t),...$R(t)];for(let u=0;u<o.length;u++){const c=o[u],f=Object.getOwnPropertyDescriptor(e,c);(f==null||f.writable)&&(e[c]=Ua(t[c],c,r,n,i))}}function aL(e){switch(My(e)){case iE:case WR:case KR:case VR:case nE:case BR:case tL:case rL:case ZR:case JR:case eL:case UR:case rE:case GR:case zR:case HR:case tE:case FR:case qR:case QR:case YR:case XR:return!0;default:return!1}}function oL(e){return Ua(e,void 0,e,new Map,void 0)}function Wd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function aE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function oE(e,t,r){return typeof r!="function"?oE(e,t,()=>{}):kv(e,t,function n(i,o,u,c,f,h){const m=r(i,o,u,c,f,h);return m!==void 0?!!m:kv(i,o,n,h,!1)},new Map,!0)}function kv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return sL(e,t,r,n);case"function":return Object.keys(t).length>0?kv(e,{...t},r,n,i):Wd(e,t);default:return aE(e)&&i?typeof t=="string"?t==="":!0:Wd(e,t)}}function sL(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return sE(e,t,r,n);if(t instanceof Map)return lL(e,t,r,n);if(t instanceof Set)return uL(e,t,r,n);const i=Object.keys(t);if(e==null||wv(e))return i.length===0;if(i.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<i.length;o++){const u=i[o];if(!wv(e)&&!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function lL(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries())if(r(e.get(i),o,i,e,t,n)===!1)return!1;return!0}function sE(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const u=t[o];let c=!1;for(let f=0;f<e.length;f++){if(i.has(f))continue;const h=e[f];let m=!1;if(r(h,u,o,e,t,n)&&(m=!0),m){i.add(f),c=!0;break}}if(!c)return!1}return!0}function uL(e,t,r,n){return t.size===0?!0:e instanceof Set?sE([...e],[...t],r,n):!1}function lE(e,t){return oE(e,t,()=>{})}function cL(e){return e=oL(e),t=>lE(t,e)}function dL(e,t){return iL(e,(r,n,i,o)=>{if(typeof e=="object"){if(My(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),cn(u,e,i,o),u}switch(Object.prototype.toString.call(e)){case rE:case tE:case nE:{const u=new e.constructor(e==null?void 0:e.valueOf());return cn(u,e),u}case iE:{const u={};return cn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function fL(e){return dL(e)}const hL=/^(?:0|[1-9]\d*)$/;function uE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return hL.test(e)}}function mL(e){return e!==null&&typeof e=="object"&&My(e)==="[object Arguments]"}function pL(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&Q5(t)&&(e==null?void 0:e[t])==null?r=Py(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const o=r[i];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||mL(n))&&uE(o)&&o<n.length))return!1;n=n[o]}return!0}function gL(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Cy(e);break}return t=fL(t),function(r){const n=bo(r,e);return n===void 0?pL(r,e):t===void 0?n===void 0:lE(n,t)}}function vL(e){if(e==null)return eE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?gL(e[0],e[1]):cL(e);case"string":case"symbol":case"number":return RR(e)}}function yL(e){return Number.isSafeInteger(e)&&e>=0}function cE(e){return e!=null&&typeof e!="function"&&yL(e.length)}function xL(e){return typeof e=="object"&&e!==null}function bL(e){return xL(e)&&cE(e)}function Kw(e,t=eE){return bL(e)?TR(Array.from(e),DR(vL(t),1)):[]}function wL(e,t,r){return t===!0?Kw(e,r):typeof t=="function"?Kw(e,t):e}var ig={exports:{}},ag={},og={exports:{}},sg={};/**
* @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 Gw;function kL(){if(Gw)return sg;Gw=1;var e=Ws();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),i(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return sg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sg}var Vw;function jL(){return Vw||(Vw=1,og.exports=kL()),og.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 qw;function SL(){if(qw)return ag;qw=1;var e=Ws(),t=jL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return ag.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=c(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var D=k.value;if(b(D,O))return P=D}return P=O}if(D=P,n(A,O))return D;var B=v(O);return b!==void 0&&b(D,B)?(A=O,D):(A=O,P=B)}var E=!1,A,P,_=g===void 0?null:g;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,g,v,b]);var S=i(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},ag}var Qw;function NL(){return Qw||(Qw=1,ig.exports=SL()),ig.exports}var EL=NL(),Iy=y.createContext(null),AL=e=>e,jt=()=>{var e=y.useContext(Iy);return e?e.store.dispatch:AL},Kd=()=>{},CL=()=>Kd,PL=(e,t)=>e===t;function Me(e){var t=y.useContext(Iy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Kd,[t,e]);return EL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:CL,t?t.store.getState:Kd,t?t.store.getState:Kd,r,PL)}function OL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _L(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 Yw=e=>Array.isArray(e)?e:[e];function ML(e){const t=Array.isArray(e[0])?e[0]:e;return _L(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function IL(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var TL=class{constructor(e){this.value=e}deref(){return this.value}},DL=()=>typeof WeakRef>"u"?TL:WeakRef,dE=DL(),RL=0,Xw=1;function Nd(){return{s:RL,v:void 0,o:null,p:null}}function LL(e){return e instanceof dE?e.deref():e}function fE(e,t={}){let r=Nd();const{resultEqualityCheck:n}=t;let i,o=0;function u(){let c=r;const{length:f}=arguments;for(let g=0,v=f;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let j=c.o;j===null&&(c.o=j=new WeakMap);const k=j.get(b);k===void 0?(c=Nd(),j.set(b,c)):c=k}else{let j=c.p;j===null&&(c.p=j=new Map);const k=j.get(b);k===void 0?(c=Nd(),j.set(b,c)):c=k}}const h=c;let m;if(c.s===Xw)m=c.v;else if(m=e.apply(null,arguments),o++,n){const g=LL(i);g!=null&&n(g,m)&&(m=g,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new dE(m):m}return h.s=Xw,h.v=m,m}return u.clearCache=()=>{r=Nd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function $L(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,u=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),OL(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=fE,argsMemoizeOptions:j=[]}=m,k=Yw(v),S=Yw(j),N=ML(i),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){u++;const _=IL(N,arguments);return c=E.apply(null,_),c},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var q=$L(fE);function zL(e,t=1){const r=[],n=Math.floor(t),i=(o,u)=>{for(let c=0;c<o.length;c++){const f=o[c];Array.isArray(f)&&u<n?i(f,u+1):r.push(f)}};return i(e,0),r}function jv(e,t,r){return aE(r)&&(typeof t=="number"&&cE(r)&&uE(t)&&t<r.length||typeof t=="string"&&t in r)?Wd(r[t],e):!1}function Zw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const FL=(e,t,r)=>{if(e!==t){const n=Zw(e),i=Zw(t);if(n===i&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function hE(e){return typeof e=="symbol"||e instanceof Symbol}const BL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UL=/^\w*$/;function HL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||hE(e)?!0:typeof e=="string"&&(UL.test(e)||!BL.test(e))||t!=null}function WL(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(c=>String(c));const i=(c,f)=>{let h=c;for(let m=0;m<f.length&&h!=null;++m)h=h[f[m]];return h},o=(c,f)=>f==null||c==null?f:typeof c=="object"&&"key"in c?Object.hasOwn(f,c.key)?f[c.key]:i(f,c.path):typeof c=="function"?c(f):Array.isArray(c)?i(f,c):typeof f=="object"?f[c]:f,u=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||HL(c)?c:{key:c,path:Py(c)}));return e.map(c=>({original:c,criteria:u.map(f=>o(f,c))})).slice().sort((c,f)=>{for(let h=0;h<u.length;h++){const m=FL(c.criteria[h],f.criteria[h],r[h]);if(m!==0)return m}return 0}).map(c=>c.original)}function fh(e,...t){const r=t.length;return r>1&&jv(e,t[0],t[1])?t=[]:r>2&&jv(t[0],t[1],t[2])&&(t=[t[0]]),WL(e,zL(t),["asc"])}var mE=e=>e.legend.settings,KL=e=>e.legend.size,GL=e=>e.legend.payload;q([GL,mE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?fh(n,r):n});function VL(e,t){return XL(e)||YL(e,t)||QL(e,t)||qL()}function qL(){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 QL(e,t){if(e){if(typeof e=="string")return Jw(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)?Jw(e,t):void 0}}function Jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function YL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function XL(e){if(Array.isArray(e))return e}var Ed=1;function ek(e,t){return Math.abs(e.height-t.height)>Ed||Math.abs(e.left-t.left)>Ed||Math.abs(e.top-t.top)>Ed||Math.abs(e.width-t.width)>Ed}function tk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ZL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=VL(t,2),n=r[0],i=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var c=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=tk(f);if(ek(h,u.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=tk(f);ek(g,u.current)&&i(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,c]}function Ut(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 JL=typeof Symbol=="function"&&Symbol.observable||"@@observable",rk=JL,lg=()=>Math.random().toString(36).substring(7).split("").join("."),e$={INIT:`@@redux/INIT${lg()}`,REPLACE:`@@redux/REPLACE${lg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lg()}`},sf=e$;function Ty(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 pE(e,t,r){if(typeof e!="function")throw new Error(Ut(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ut(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ut(1));return r(pE)(e,t)}let n=e,i=t,o=new Map,u=o,c=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function m(){if(f)throw new Error(Ut(3));return i}function g(S){if(typeof S!="function")throw new Error(Ut(4));if(f)throw new Error(Ut(5));let N=!0;h();const E=c++;return u.set(E,S),function(){if(N){if(f)throw new Error(Ut(6));N=!1,h(),u.delete(E),o=null}}}function v(S){if(!Ty(S))throw new Error(Ut(7));if(typeof S.type>"u")throw new Error(Ut(8));if(typeof S.type!="string")throw new Error(Ut(17));if(f)throw new Error(Ut(9));try{f=!0,i=n(i,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Ut(10));n=S,v({type:sf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ut(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[rk](){return this}}}return v({type:sf.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[rk]:j}}function t$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:sf.INIT})>"u")throw new Error(Ut(12));if(typeof r(void 0,{type:sf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ut(13))})}function gE(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const u=t[o];typeof e[u]=="function"&&(r[u]=e[u])}const n=Object.keys(r);let i;try{t$(r)}catch(o){i=o}return function(u={},c){if(i)throw i;let f=!1;const h={};for(let m=0;m<n.length;m++){const g=n[m],v=r[g],b=u[g],j=v(b,c);if(typeof j>"u")throw c&&c.type,new Error(Ut(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function lf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function r$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(Ut(15))};const u={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(u));return o=lf(...c)(i.dispatch),{...i,dispatch:o}}}function vE(e){return Ty(e)&&"type"in e&&typeof e.type=="string"}var yE=Symbol.for("immer-nothing"),nk=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function fn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Dr=Object,Rs=Dr.getPrototypeOf,uf="constructor",hh="prototype",Sv="configurable",cf="enumerable",Gd="writable",wu="value",mi=e=>!!e&&!!e[hr];function yn(e){var t;return e?xE(e)||ph(e)||!!e[nk]||!!((t=e[uf])!=null&&t[nk])||gh(e)||vh(e):!1}var n$=Dr[hh][uf].toString(),ik=new WeakMap;function xE(e){if(!e||!Dy(e))return!1;const t=Rs(e);if(t===null||t===Dr[hh])return!0;const r=Dr.hasOwnProperty.call(t,uf)&&t[uf];if(r===Object)return!0;if(!ls(r))return!1;let n=ik.get(r);return n===void 0&&(n=Function.toString.call(r),ik.set(r,n)),n===n$}function mh(e,t,r=!0){Wu(e)===0?(r?Reflect.ownKeys(e):Dr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Wu(e){const t=e[hr];return t?t.type_:ph(e)?1:gh(e)?2:vh(e)?3:0}var ak=(e,t,r=Wu(e))=>r===2?e.has(t):Dr[hh].hasOwnProperty.call(e,t),Nv=(e,t,r=Wu(e))=>r===2?e.get(t):e[t],df=(e,t,r,n=Wu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function i$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ph=Array.isArray,gh=e=>e instanceof Map,vh=e=>e instanceof Set,Dy=e=>typeof e=="object",ls=e=>typeof e=="function",ug=e=>typeof e=="boolean";function a$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ii=e=>e.copy_||e.base_,Ry=e=>e.modified_?e.copy_:e.base_;function Ev(e,t){if(gh(e))return new Map(e);if(vh(e))return new Set(e);if(ph(e))return Array[hh].slice.call(e);const r=xE(e);if(t===!0||t==="class_only"&&!r){const n=Dr.getOwnPropertyDescriptors(e);delete n[hr];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const u=i[o],c=n[u];c[Gd]===!1&&(c[Gd]=!0,c[Sv]=!0),(c.get||c.set)&&(n[u]={[Sv]:!0,[Gd]:!0,[cf]:c[cf],[wu]:e[u]})}return Dr.create(Rs(e),n)}else{const n=Rs(e);if(n!==null&&r)return{...e};const i=Dr.create(n);return Dr.assign(i,e)}}function Ly(e,t=!1){return yh(e)||mi(e)||!yn(e)||(Wu(e)>1&&Dr.defineProperties(e,{set:Ad,add:Ad,clear:Ad,delete:Ad}),Dr.freeze(e),t&&mh(e,(r,n)=>{Ly(n,!0)},!1)),e}function o$(){fn(2)}var Ad={[wu]:o$};function yh(e){return e===null||!Dy(e)?!0:Dr.isFrozen(e)}var ff="MapSet",Av="Patches",ok="ArrayMethods",bE={};function co(e){const t=bE[e];return t||fn(0,e),t}var sk=e=>!!bE[e],ku,wE=()=>ku,s$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:sk(ff)?co(ff):void 0,arrayMethodsPlugin_:sk(ok)?co(ok):void 0});function lk(e,t){t&&(e.patchPlugin_=co(Av),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cv(e){Pv(e),e.drafts_.forEach(l$),e.drafts_=null}function Pv(e){e===ku&&(ku=e.parent_)}var uk=e=>ku=s$(ku,e);function l$(e){const t=e[hr];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];if(e!==void 0&&e!==r){r[hr].modified_&&(Cv(t),fn(4)),yn(e)&&(e=dk(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[hr].base_,e,t)}else e=dk(t,r);return u$(t,e,!0),Cv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yE?e:void 0}function dk(e,t){if(yh(t))return t;const r=t[hr];if(!r)return hf(t,e.handledSet_,e);if(!xh(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);SE(r,e)}return r.copy_}function u$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ly(t,r)}function kE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var xh=(e,t)=>e.scope_===t,c$=[];function jE(e,t,r,n){const i=ii(e),o=e.type_;if(n!==void 0&&Nv(i,n,o)===t){df(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;mh(i,(f,h)=>{if(mi(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const u=e.draftLocations_.get(t)??c$;for(const c of u)df(i,c,r,o)}function d$(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!xh(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const u=Ry(o);jE(e,o.draft_??o,u,r),SE(o,i)})}function SE(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_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}kE(e)}}function f$(e,t,r){const{scope_:n}=e;if(mi(r)){const i=r[hr];xh(i,n)&&i.callbacks_.push(function(){Vd(e);const u=Ry(i);jE(e,r,u,t)})}else yn(r)&&e.callbacks_.push(function(){const o=ii(e);e.type_===3?o.has(r)&&hf(r,n.handledSet_,n):Nv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&hf(Nv(e.copy_,t,e.type_),n.handledSet_,n)})}function hf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||mi(e)||t.has(e)||!yn(e)||yh(e)||(t.add(e),mh(e,(n,i)=>{if(mi(i)){const o=i[hr];if(xh(o,r)){const u=Ry(o);df(e,n,u,e.type_),kE(o)}}else yn(i)&&hf(i,t,r)})),e}function h$(e,t){const r=ph(e),n={type_:r?1:0,scope_:t?t.scope_:wE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=mf;r&&(i=[n],o=ju);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,[c,n]}var mf={get(e,t){if(t===hr)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 i=ii(e);if(!ak(i,t,e.type_))return m$(e,i,t);const o=i[t];if(e.finalized_||!yn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&a$(t))return o;if(o===cg(e.base_,t)){Vd(e);const u=e.type_===1?+t:t,c=_v(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,t){return t in ii(e)},ownKeys(e){return Reflect.ownKeys(ii(e))},set(e,t,r){const n=NE(ii(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cg(ii(e),t),o=i==null?void 0:i[hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(i$(r,i)&&(r!==void 0||ak(e.base_,t,e.type_)))return!0;Vd(e),Ov(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),f$(e,t,r)),!0},deleteProperty(e,t){return Vd(e),cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ov(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ii(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Gd]:!0,[Sv]:e.type_!==1||t!=="length",[cf]:n[cf],[wu]:r[t]}},defineProperty(){fn(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){fn(12)}},ju={};for(let e in mf){let t=mf[e];ju[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ju.deleteProperty=function(e,t){return ju.set.call(this,e,t,void 0)};ju.set=function(e,t,r){return mf.set.call(this,e[0],t,r,e[0])};function cg(e,t){const r=e[hr];return(r?ii(r):e)[t]}function m$(e,t,r){var i;const n=NE(t,r);return n?wu in n?n[wu]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function NE(e,t){if(!(t in e))return;let r=Rs(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Rs(r)}}function Ov(e){e.modified_||(e.modified_=!0,e.parent_&&Ov(e.parent_))}function Vd(e){e.copy_||(e.assigned_=new Map,e.copy_=Ev(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ls(r)&&!ls(n)){const u=n;n=r;const c=this;return function(h=u,...m){return c.produce(h,g=>n.call(this,g,...m))}}ls(n)||fn(6),i!==void 0&&!ls(i)&&fn(7);let o;if(yn(r)){const u=uk(this),c=_v(u,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Cv(u):Pv(u)}return lk(u,i),ck(o,u)}else if(!r||!Dy(r)){if(o=n(r),o===void 0&&(o=r),o===yE&&(o=void 0),this.autoFreeze_&&Ly(o,!0),i){const u=[],c=[];co(Av).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:c}),i(u,c)}return o}else fn(1,r)},this.produceWithPatches=(r,n)=>{if(ls(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,o;return[this.produce(r,n,(c,f)=>{i=c,o=f}),i,o]},ug(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ug(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ug(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yn(t)||fn(8),mi(t)&&(t=qr(t));const r=uk(this),n=_v(r,t,void 0);return n[hr].isManual_=!0,Pv(r),n}finishDraft(t,r){const n=t&&t[hr];(!n||!n.isManual_)&&fn(9);const{scope_:i}=n;return lk(i,r),ck(void 0,i)}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 i=co(Av).applyPatches_;return mi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function _v(e,t,r,n){const[i,o]=gh(t)?co(ff).proxyMap_(t,r):vh(t)?co(ff).proxySet_(t,r):h$(t,r);return((r==null?void 0:r.scope_)??wE()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?d$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function qr(e){return mi(e)||fn(10,e),EE(e)}function EE(e){if(!yn(e)||yh(e))return e;const t=e[hr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ev(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ev(e,!0);return mh(r,(i,o)=>{df(r,i,EE(o))},n),t&&(t.finalized_=!1),r}var g$=new p$,AE=g$.produce;function CE(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var v$=CE(),y$=CE,x$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?lf:lf.apply(null,arguments)};function Lr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Rr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>vE(n)&&n.type===e,r}var PE=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 fk(e){return yn(e)?AE(e,()=>{}):e}function Cd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function b$(e){return typeof e=="boolean"}var w$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let u=new PE;return r&&(b$(r)?u.push(v$):u.push(y$(r.extraArgument))),u},OE="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[OE]:!0}}),hk=e=>t=>{setTimeout(t,e)},k$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(i),u=setTimeout(i,t)},_E=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?k$(window.requestAnimationFrame,100):hk(10):e.type==="callback"?e.queueNotification:hk(e.timeout),h=()=>{u=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>i&&m(),v=n.subscribe(g);return c.add(m),()=>{v(),c.delete(m)}},dispatch(m){var g;try{return i=!((g=m==null?void 0:m.meta)!=null&&g[OE]),o=!i,o&&(u||(u=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},j$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new PE(e);return n&&i.push(_E(typeof n=="object"?n:void 0)),i};function S$(e){const t=w$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Ty(r))c=gE(r);else throw new Error(Rr(1));let f;typeof n=="function"?f=n(t):f=t();let h=lf;i&&(h=x$({trace:!1,...typeof i=="object"&&i}));const m=r$(...f),g=j$(m);let v=typeof u=="function"?u(g):g();const b=h(...v);return pE(c,o,b)}function ME(e){const t={},r=[];let n;const i={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Rr(28));if(c in t)throw new Error(Rr(29));return t[c]=u,i},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}),i},addMatcher(o,u){return r.push({matcher:o,reducer:u}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function N$(e){return typeof e=="function"}function E$(e,t){let[r,n,i]=ME(t),o;if(N$(e))o=()=>fk(e());else{const c=fk(e);o=()=>c}function u(c=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,g)=>{if(g)if(mi(m)){const b=g(m,f);return b===void 0?m:b}else{if(yn(m))return AE(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},c)}return u.getInitialState=o,u}var A$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",C$=(e=21)=>{let t="",r=e;for(;r--;)t+=A$[Math.random()*64|0];return t},P$=Symbol.for("rtk-slice-createasyncthunk");function O$(e,t){return`${e}/${t}`}function _$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[P$];return function(i){const{name:o,reducerPath:u=o}=i;if(!o)throw new Error(Rr(11));const c=(typeof i.reducers=="function"?i.reducers(I$()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,_){const O=typeof P=="string"?P:P.type;if(!O)throw new Error(Rr(12));if(O in h.sliceCaseReducersByType)throw new Error(Rr(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),m},exposeAction(P,_){return h.actionCreators[P]=_,m},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,m}};f.forEach(P=>{const _=c[P],O={reducerName:P,type:O$(o,P),createNotation:typeof i.reducers=="function"};D$(_)?L$(O,_,m,t):T$(O,_,m)});function g(){const[P={},_=[],O=void 0]=typeof i.extraReducers=="function"?ME(i.extraReducers):[i.extraReducers],D={...P,...h.sliceCaseReducersByType};return E$(i.initialState,B=>{for(let F in D)B.addCase(F,D[F]);for(let F of h.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of _)B.addMatcher(F.matcher,F.reducer);O&&B.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,_){return k||(k=g()),k(P,_)}function N(){return k||(k=g()),k.getInitialState()}function E(P,_=!1){function O(B){let F=B[P];return typeof F>"u"&&_&&(F=Cd(j,O,N)),F}function D(B=v){const F=Cd(b,_,()=>new WeakMap);return Cd(F,B,()=>{const z={};for(const[Y,U]of Object.entries(i.selectors??{}))z[Y]=M$(U,B,()=>Cd(j,B,N),_);return z})}return{reducerPath:P,getSelectors:D,get selectors(){return D(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(P,{reducerPath:_,...O}={}){const D=_??u;return P.inject({reducerPath:D,reducer:S},O),{...A,...E(D,!0)}}};return A}}function M$(e,t,r,n){function i(o,...u){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...u)}return i.unwrapped=e,i}var sr=_$();function I$(){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 T$({type:e,reducerName:t,createNotation:r},n,i){let o,u;if("reducer"in n){if(r&&!R$(n))throw new Error(Rr(17));o=n.reducer,u=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Lr(e,u):Lr(e))}function D$(e){return e._reducerDefinitionType==="asyncThunk"}function R$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function L$({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Rr(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:h,options:m}=r,g=i(e,o,m);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Pd,pending:c||Pd,rejected:f||Pd,settled:h||Pd})}function Pd(){}var $$="task",IE="listener",TE="completed",$y="cancelled",z$=`task-${$y}`,F$=`task-${TE}`,Mv=`${IE}-${$y}`,B$=`${IE}-${TE}`,bh=class{constructor(e){qo(this,"code");qo(this,"name","TaskAbortError");qo(this,"message");this.code=e,this.message=`${$$} ${$y} (reason: ${e})`}},zy=(e,t)=>{if(typeof e!="function")throw new TypeError(Rr(32))},pf=()=>{},DE=(e,t=pf)=>(e.catch(t),e),RE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),no=e=>{if(e.aborted)throw new bh(e.reason)};function LE(e,t){let r=pf;return new Promise((n,i)=>{const o=()=>i(new bh(e.reason));if(e.aborted){o();return}r=RE(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=pf})}var U$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof bh?"cancelled":"rejected",error:r}}finally{t==null||t()}},gf=e=>t=>DE(LE(e,t).then(r=>(no(e),r))),$E=e=>{const t=gf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ms}=Object,mk={},wh="listenerMiddleware",H$=(e,t)=>{const r=n=>RE(e,()=>n.abort(e.reason));return(n,i)=>{zy(n);const o=new AbortController;r(o);const u=U$(async()=>{no(e),no(o.signal);const c=await n({pause:gf(o.signal),delay:$E(o.signal),signal:o.signal});return no(o.signal),c},()=>o.abort(F$));return i!=null&&i.autoJoin&&t.push(u.catch(pf)),{result:gf(e)(u),cancel(){o.abort(z$)}}}},W$=(e,t)=>{const r=async(n,i)=>{no(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await LE(t,Promise.race(c));return no(t),f}finally{o()}};return((n,i)=>DE(r(n,i)))},zE=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Lr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Rr(21));return zy(o),{predicate:i,type:t,effect:o}},FE=ms(e=>{const{type:t,predicate:r,effect:n}=zE(e);return{id:C$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Rr(22))}}},{withTypes:()=>FE}),pk=(e,t)=>{const{type:r,effect:n,predicate:i}=zE(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Iv=e=>{e.pending.forEach(t=>{t.abort(Mv)})},K$=(e,t)=>()=>{for(const r of t.keys())Iv(r);e.clear()},gk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},BE=ms(Lr(`${wh}/add`),{withTypes:()=>BE}),G$=Lr(`${wh}/removeAll`),UE=ms(Lr(`${wh}/remove`),{withTypes:()=>UE}),V$=(...e)=>{console.error(`${wh}/error`,...e)},Ku=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},i=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=V$}=e;zy(u);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Iv(b)}),f=(b=>{const j=pk(t,b)??FE(b);return c(j)});ms(f,{withTypes:()=>f});const h=b=>{const j=pk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Iv(j)),!!j};ms(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=W$(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ms({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:$E(N.signal),pause:gf(N.signal),extra:o,signal:N.signal,fork:H$(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,O)=>{P!==N&&(P.abort(Mv),O.delete(P))})},cancel:()=>{N.abort(Mv),b.pending.delete(N)},throwIfCancelled:()=>{no(N.signal)}})))}catch(P){P instanceof bh||gk(u,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort(B$),i(b),b.pending.delete(N)}},g=K$(t,r);return{middleware:b=>j=>k=>{if(!vE(k))return j(k);if(BE.match(k))return f(k.payload);if(G$.match(k)){g();return}if(UE.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===mk)throw new Error(Rr(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const _ of P){let O=!1;try{O=_.predicate(k,A,S)}catch(D){O=!1,gk(u,D,{raisedBy:"predicate"})}O&&m(_,k,b,N)}}}finally{S=mk}return E},startListening:f,stopListening:h,clearListeners:g}};function Rr(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 q$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},HE=sr({name:"chartLayout",initialState:q$,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,i,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=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),kh=HE.actions,Q$=kh.setMargin,Y$=kh.setLayout,X$=kh.setChartSize,Z$=kh.setScale,J$=HE.reducer;function WE(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function Un(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(r),!0).forEach(function(n){ez(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ez(e,t,r){return(t=tz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tz(e){var t=rz(e,"string");return typeof t=="symbol"?t:t+""}function rz(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)}function Dt(e,t,r){return Vt(e)||Vt(t)?r:Bn(t)?bo(e,t,r):typeof t=="function"?t(e):r}var nz=(e,t,r)=>{if(t&&r){var n=r.width,i=r.height,o=t.align,u=t.verticalAlign,c=t.layout;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&Ee(e[o]))return cs(cs({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&Ee(e[u]))return cs(cs({},e),{},{[u]:e[u]+(i||0)})}return e},Gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",KE=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,o,u=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate));return i||u.push(t),o||u.push(r),u},GE=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,u=e.scale,c=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=i==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Vr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=u.map(A);return He(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(jr);return S}return f&&h?h.map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.ticks&&m!=null?u.ticks(m).map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.domain().map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(jr)},iz=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 i=0;i<n;++i)for(var o=0,u=0,c=0;c<r;++c){var f=e[c],h=f==null?void 0:f[i];if(h!=null){var m=h[1],g=h[0],v=Fn(m)?g:m;v>=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},az=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 i=0;i<n;++i)for(var o=0,u=0;u<r;++u){var c=e[u],f=c==null?void 0:c[i];if(f!=null){var h=Fn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},oz={sign:iz,expand:kR,none:lo,silhouette:jR,wiggle:SR,positive:az},sz=(e,t,r)=>{var n,i=(n=oz[r])!==null&&n!==void 0?n:lo,o=wR().keys(t).value((c,f)=>Number(Dt(c,f,0))).order(xv).offset(i),u=o(e);return u.forEach((c,f)=>{c.forEach((h,m)=>{var g=Dt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ee(g[0])&&Ee(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function lz(e){return e==null?void 0:String(e)}function yk(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Vt(i[t.dataKey])){var c=Z5(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Dt(i,Vt(u)?t.dataKey:u),h=t.scale.map(f);return Ee(h)?h:null}var uz=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},cz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],dz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return cz(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var u=o.stackedData,c=u.reduce((f,h)=>{var m=WE(h,t,r),g=uz(m);return!He(g[0])||!He(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},xk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vf=(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 i=fh(t,m=>m.coordinate),o=1/0,u=1,c=i.length;u<c;u++){var f=i[u],h=i[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function wk(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,i=e.value,o=e.name;return cs(cs({},t),{},{dataKey:r,payload:n,value:i,name:o})}function VE(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var fz=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},hz=(e,t)=>t==="centric"?e.angle:e.radius,xi=e=>e.layout.width,bi=e=>e.layout.height,mz=e=>e.layout.scale,qE=e=>e.layout.margin,jh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Sh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pz="data-recharts-item-index",gz="data-recharts-item-id",Gu=60;function kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Od(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){vz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vz(e,t,r){return(t=yz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yz(e){var t=xz(e,"string");return typeof t=="symbol"?t:t+""}function xz(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 bz=e=>e.brush.height;function wz(e){var t=Sh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Gu;return r+i}return r},0)}function kz(e){var t=Sh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Gu;return r+i}return r},0)}function jz(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Sz(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Qt=q([xi,bi,qE,bz,wz,kz,jz,Sz,mE,KL],(e,t,r,n,i,o,u,c,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+c},v=Od(Od({},g),m),b=v.bottom;v.bottom+=n,v=nz(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Od(Od({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),Nz=q(Qt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),QE=q(xi,bi,(e,t)=>({x:0,y:0,width:e,height:t})),Ez=y.createContext(null),Nr=()=>y.useContext(Ez)!=null,Nh=e=>e.brush,Eh=q([Nh,Qt,qE],(e,t,r)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ee(e.width)?e.width:t.width}));function Az(e,t,{signal:r,edges:n}={}){let i,o=null;const u=n!=null&&n.includes("leading"),c=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{c&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;i=this,o=S;const N=m==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 Cz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),i&&(u[1]="trailing");let c,f=null;const h=Az(function(...v){c=e.apply(this,v),f=null},t,{edges:u}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(c=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),c):(h.apply(this,v),c)},g=()=>(h.flush(),c);return m.cancel=h.cancel,m.flush=g,m}function Pz(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Cz(e,t,{leading:n,maxWait:t,trailing:i})}var yf=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(r.replace(/%s/g,()=>i[u++]))}},Tn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},YE=(e,t,r)=>{var n=r.width,i=n===void 0?Tn.width:n,o=r.height,u=o===void 0?Tn.height:o,c=r.aspect,f=r.maxHeight,h=uo(i)?e:Number(i),m=uo(u)?t:Number(u);return c&&c>0&&(h?m=h/c:m&&(h=m*c),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Oz={width:0,height:0,overflow:"visible"},_z={width:0,overflowX:"visible"},Mz={height:0,overflowY:"visible"},Iz={},Tz=e=>{var t=e.width,r=e.height,n=uo(t),i=uo(r);return n&&i?Oz:n?_z:i?Mz:Iz};function Dz(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Tn.width,o=Tn.height):i===void 0?i=n&&n>0?void 0:Tn.width:o===void 0&&(o=n&&n>0?void 0:Tn.height),{width:i,height:o}}var Rz=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xf.apply(null,arguments)}function jk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jk(Object(r),!0).forEach(function(n){Lz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lz(e,t,r){return(t=$z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $z(e){var t=zz(e,"string");return typeof t=="symbol"?t:t+""}function zz(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)}function Fz(e,t){return Wz(e)||Hz(e,t)||Uz(e,t)||Bz()}function Bz(){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 Uz(e,t){if(e){if(typeof e=="string")return Nk(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)?Nk(e,t):void 0}}function Nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Hz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function Wz(e){if(Array.isArray(e))return e}function Kz(e,t){if(e==null)return{};var r,n,i=Gz(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var XE=y.createContext(Tn.initialDimension);function Vz(e){return Un(e.width)&&Un(e.height)}function ZE(e){var t=e.children,r=e.width,n=e.height,i=y.useMemo(()=>({width:r,height:n}),[r,n]);return Vz(i)?y.createElement(XE.Provider,{value:i},t):null}var Fy=()=>y.useContext(XE),qz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Tn.initialDimension:n,o=e.width,u=e.height,c=e.minWidth,f=c===void 0?Tn.minWidth:c,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?Tn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=Kz(e,Rz),P=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:i.width,containerHeight:i.height}),D=Fz(O,2),B=D[0],F=D[1],z=y.useCallback((ie,se)=>{F(X=>{var te=Math.round(ie),J=Math.round(se);return X.containerWidth===te&&X.containerHeight===J?X:{containerWidth:te,containerHeight:J}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return Vs;var ie=I=>{var M,H=I[0];if(H!=null){var ne=H.contentRect,Z=ne.width,me=ne.height;z(Z,me),(M=_.current)===null||M===void 0||M.call(_,Z,me)}};b>0&&(ie=Pz(ie,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(ie),X=P.current.getBoundingClientRect(),te=X.width,J=X.height;return z(te,J),se.observe(P.current),()=>{se.disconnect()}},[z,b]);var Y=B.containerWidth,U=B.containerHeight;yf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var he=YE(Y,U,{width:o,height:u,aspect:r,maxHeight:m}),ue=he.calculatedWidth,ge=he.calculatedHeight;return yf(Y<0||U<0||ue!=null&&ue>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.`,ue,ge,o,u,f,h,r),y.createElement("div",xf({id:j?"".concat(j):void 0,className:rt("recharts-responsive-container",k),style:Sk(Sk({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:Tz({width:o,height:u})},y.createElement(ZE,{width:ue,height:ge},g)))}),Qz=y.forwardRef((e,t)=>{var r=Fy();if(Un(r.width)&&Un(r.height))return e.children;var n=Dz({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,u=YE(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=u.calculatedWidth,f=u.calculatedHeight;return Ee(c)&&Ee(f)?y.createElement(ZE,{width:c,height:f},e.children):y.createElement(qz,xf({},e,{width:i,height:o,ref:t}))});function By(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=Nr(),r=Me(Nz),n=Me(Eh),i=(e=Me(Nh))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},Yz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},JE=()=>{var e;return(e=Me(Qt))!==null&&e!==void 0?e:Yz},eA=()=>Me(xi),tA=()=>Me(bi),ct=e=>e.layout.layoutType,qs=()=>Me(ct),Uy=()=>{var e=qs();if(e==="horizontal"||e==="vertical")return e},rA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Xz=()=>{var e=qs();return e!==void 0},Vu=e=>{var t=jt(),r=Nr(),n=e.width,i=e.height,o=Fy(),u=n,c=i;return o&&(u=o.width>0?o.width:n,c=o.height>0?o.height:i),y.useEffect(()=>{!r&&Un(u)&&Un(c)&&t(X$({width:u,height:c}))},[t,r,u,c]),null},nA=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Su=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[$r]}function fo(e){var t;return e?iA(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||qu(e)||Ph(e):!1}var Zz=Object.prototype.constructor.toString(),Ak=new WeakMap;function iA(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=Ak.get(r);return n===void 0&&(n=Function.toString.call(r),Ak.set(r,n)),n===Zz}function bf(e,t,r=!0){Ch(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Ch(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:qu(e)?2:Ph(e)?3:0}function Tv(e,t){return Ch(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aA(e,t,r){const n=Ch(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qu(e){return e instanceof Map}function Ph(e){return e instanceof Set}function za(e){return e.copy_||e.base_}function Dv(e,t){if(qu(e))return new Map(e);if(Ph(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=iA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const u=i[o],c=n[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Su(e),n)}else{const n=Su(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Hy(e,t=!1){return Oh(e)||Ls(e)||!fo(e)||(Ch(e)>1&&Object.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),Object.freeze(e),t&&Object.values(e).forEach(r=>Hy(r,!0))),e}function e6(){hn(2)}var _d={value:e6};function Oh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var t6={};function ho(e){const t=t6[e];return t||hn(0,e),t}var Nu;function oA(){return Nu}function r6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ck(e,t){t&&(ho("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Rv(e){Lv(e),e.drafts_.forEach(n6),e.drafts_=null}function Lv(e){e===Nu&&(Nu=e.parent_)}function Pk(e){return Nu=r6(Nu,e)}function n6(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ok(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[$r].modified_&&(Rv(t),hn(4)),fo(e)&&(e=wf(t,e),t.parent_||kf(t,e)),t.patches_&&ho("Patches").generateReplacementPatches_(r[$r].base_,e,t.patches_,t.inversePatches_)):e=wf(t,r,[]),Rv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nA?e:void 0}function wf(e,t,r){if(Oh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[$r];if(!i)return bf(t,(o,u)=>_k(e,i,t,o,u,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return kf(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let u=o,c=!1;i.type_===3&&(u=new Set(o),o.clear(),c=!0),bf(u,(f,h)=>_k(e,i,o,f,h,r,c),n),kf(e,o,!1),r&&e.patches_&&ho("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function _k(e,t,r,n,i,o,u){if(i==null||typeof i!="object"&&!u)return;const c=Oh(i);if(!(c&&!u)){if(Ls(i)){const f=o&&t&&t.type_!==3&&!Tv(t.assigned_,n)?o.concat(n):void 0,h=wf(e,i,f);if(aA(r,n,h),Ls(h))e.canAutoFreeze_=!1;else return}else u&&r.add(i);if(fo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;wf(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(qu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&kf(e,i)}}}function kf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hy(t,r)}function i6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:oA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Wy;r&&(i=[n],o=Eu);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,c}var Wy={get(e,t){if(t===$r)return e;const r=za(e);if(!Tv(r,t))return a6(e,r,t);const n=r[t];return e.finalized_||!fo(n)?n:n===dg(e.base_,t)?(fg(e),e.copy_[t]=zv(n,e)):n},has(e,t){return t in za(e)},ownKeys(e){return Reflect.ownKeys(za(e))},set(e,t,r){const n=sA(za(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=dg(za(e),t),o=i==null?void 0:i[$r];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jz(r,i)&&(r!==void 0||Tv(e.base_,t)))return!0;fg(e),$v(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 dg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fg(e),$v(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=za(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hn(11)},getPrototypeOf(e){return Su(e.base_)},setPrototypeOf(){hn(12)}},Eu={};bf(Wy,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return Wy.set.call(this,e[0],t,r,e[0])};function dg(e,t){const r=e[$r];return(r?za(r):e)[t]}function a6(e,t,r){var i;const n=sA(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function sA(e,t){if(!(t in e))return;let r=Su(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Su(r)}}function $v(e){e.modified_||(e.modified_=!0,e.parent_&&$v(e.parent_))}function fg(e){e.copy_||(e.copy_=Dv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o6=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,m=>r.call(this,m,...h))}}typeof r!="function"&&hn(6),n!==void 0&&typeof n!="function"&&hn(7);let i;if(fo(t)){const o=Pk(this),u=zv(t,void 0);let c=!0;try{i=r(u),c=!1}finally{c?Rv(o):Lv(o)}return Ck(o,n),Ok(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===nA&&(i=void 0),this.autoFreeze_&&Hy(i,!0),n){const o=[],u=[];ho("Patches").generateReplacementPatches_(t,i,o,u),n(o,u)}return i}else hn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let n,i;return[this.produce(t,r,(u,c)=>{n=u,i=c}),n,i]},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){fo(e)||hn(8),Ls(e)&&(e=s6(e));const t=Pk(this),r=zv(e,void 0);return r[$r].isManual_=!0,Lv(t),r}finishDraft(e,t){const r=e&&e[$r];(!r||!r.isManual_)&&hn(9);const{scope_:n}=r;return Ck(n,t),Ok(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=ho("Patches").applyPatches_;return Ls(e)?n(e,t):this.produce(e,i=>n(i,t))}};function zv(e,t){const r=qu(e)?ho("MapSet").proxyMap_(e,t):Ph(e)?ho("MapSet").proxySet_(e,t):i6(e,t);return(t?t.scope_:oA()).drafts_.push(r),r}function s6(e){return Ls(e)||hn(10,e),lA(e)}function lA(e){if(!fo(e)||Oh(e))return e;const t=e[$r];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Dv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Dv(e,!0);return bf(r,(i,o)=>{aA(r,i,lA(o))},n),t&&(t.finalized_=!1),r}var l6=new o6;l6.produce;var u6={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},uA=sr({name:"legend",initialState:u6,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:ot()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=qr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),Qu=uA.actions;Qu.setLegendSize;Qu.setLegendSettings;var c6=Qu.addLegendPayload,d6=Qu.replaceLegendPayload,f6=Qu.removeLegendPayload,h6=uA.reducer,hg={exports:{}},mg={};/**
* @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 Mk;function m6(){if(Mk)return mg;Mk=1;var e=Ws();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,i=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return mg.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=i(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,E=_,_=g(_),v!==void 0&&j.hasValue){var O=j.value;if(v(O,_))return A=O}return A=_}if(O=A,r(E,_))return O;var D=g(_);return v!==void 0&&v(O,D)?(E=_,O):(E=_,A=D)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),c(k),k},mg}var Ik;function p6(){return Ik||(Ik=1,hg.exports=m6()),hg.exports}p6();function g6(e){e()}function v6(){let e=null,t=null;return{clear(){e=null,t=null},notify(){g6(()=>{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 i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Tk={notify(){},get:()=>[]};function y6(e,t){let r,n=Tk,i=0,o=!1;function u(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=v6())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=Tk)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var x6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b6=x6(),w6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",k6=w6(),j6=()=>b6||k6?y.useLayoutEffect:y.useEffect,S6=j6();function Dk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function N6(e,t){if(Dk(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 i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!Dk(e[r[i]],t[r[i]]))return!1;return!0}var pg=Symbol.for("react-redux-context"),gg=typeof globalThis<"u"?globalThis:{};function E6(){if(!y.createContext)return{};const e=gg[pg]??(gg[pg]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var A6=E6();function C6(e){const{children:t,context:r,serverState:n,store:i}=e,o=y.useMemo(()=>{const f=y6(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),u=y.useMemo(()=>i.getState(),[i]);S6(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=r||A6;return y.createElement(c.Provider,{value:o},t)}var P6=C6,O6=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function _6(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function _h(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(O6.has(n)){if(e[n]==null&&t[n]==null)continue;if(!N6(e[n],t[n]))return!1}else if(!_6(e[n],t[n]))return!1;return!0}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fv.apply(null,arguments)}function Rk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rk(Object(r),!0).forEach(function(n){M6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M6(e,t,r){return(t=I6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I6(e){var t=T6(e,"string");return typeof t=="symbol"?t:t+""}function T6(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)}function D6(e,t){return z6(e)||$6(e,t)||L6(e,t)||R6()}function R6(){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 L6(e,t){if(e){if(typeof e=="string")return Lk(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)?Lk(e,t):void 0}}function Lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function $6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function z6(e){if(Array.isArray(e))return e}function F6(e){return Array.isArray(e)&&Bn(e[0])&&Bn(e[1])?e.join(" ~ "):e}var Jo={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function B6(e,t){return t==null?e:fh(e,t)}var U6=e=>{var t=e.separator,r=t===void 0?Jo.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,u=o===void 0?Jo.labelStyle:o,c=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?Jo.accessibilityLayer:j,S=()=>{if(c&&c.length){var B={padding:0,margin:0},F=B6(c,h),z=F.map((Y,U)=>{if(!Y||Y.type==="none")return null;var he=Y.formatter||f||F6,ue=Y.value,ge=Y.name,ie=ue,se=ge;if(he){var X=he(ue,ge,Y,U,c);if(Array.isArray(X)){var te=D6(X,2);ie=te[0],se=te[1]}else if(X!=null)ie=X;else return null}var J=Vl(Vl({},Jo.itemStyle),{},{color:Y.color||Jo.itemStyle.color},i);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:J},Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ie),y.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},N=Vl(Vl({},Jo.contentStyle),n),E=Vl({margin:0},u),A=!Vt(v),P=A?v:"",_=rt("recharts-default-tooltip",m),O=rt("recharts-tooltip-label",g);A&&b&&c!==void 0&&c!==null&&(P=b(v,c));var D=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Fv({className:_,style:N},D),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},ql="recharts-tooltip-wrapper",H6={visibility:"hidden"};function W6(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(ql,{["".concat(ql,"-right")]:Ee(r)&&t&&Ee(t.x)&&r>=t.x,["".concat(ql,"-left")]:Ee(r)&&t&&Ee(t.x)&&r<t.x,["".concat(ql,"-bottom")]:Ee(n)&&t&&Ee(t.y)&&n>=t.y,["".concat(ql,"-top")]:Ee(n)&&t&&Ee(t.y)&&n<t.y})}function $k(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offset,o=e.position,u=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ee(o[n]))return o[n];var m=r[n]-c-(i>0?i:0),g=r[n]+i;if(t[n])return u[n]?m:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=m,j=v;return b<j?Math.max(g,v):Math.max(m,v)}if(h==null)return 0;var k=g+c,S=v+h;return k>S?Math.max(m,v):Math.max(g,v)}function K6(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 G6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,u=e.reverseDirection,c=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return c.height>0&&c.width>0&&r?(g=$k({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=$k({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),m=K6({translateX:g,translateY:v,useTranslate3d:f})):m=H6,{cssProperties:m,cssClasses:W6({translateX:g,translateY:v,coordinate:r})}}var V6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Yu={isSsr:V6()};function q6(e,t){return Z6(e)||X6(e,t)||Y6(e,t)||Q6()}function Q6(){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 Y6(e,t){if(e){if(typeof e=="string")return zk(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)?zk(e,t):void 0}}function zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function X6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function Z6(e){if(Array.isArray(e))return e}function cA(){var e=y.useState(()=>Yu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=q6(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(r),!0).forEach(function(n){J6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J6(e,t,r){return(t=e8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e8(e){var t=t8(e,"string");return typeof t=="symbol"?t:t+""}function t8(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)}function r8(e,t){return o8(e)||a8(e,t)||i8(e,t)||n8()}function n8(){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 i8(e,t){if(e){if(typeof e=="string")return Bk(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)?Bk(e,t):void 0}}function Bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function o8(e){if(Array.isArray(e))return e}function s8(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing=="string"?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function l8(e){var t,r,n,i,o,u,c=cA(),f=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=r8(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,_,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.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]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(es(es({},m),{},{dismissed:!1}));var v=G6({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=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:es(es({transition:s8({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=es(es({},k),{},{visibility:!m.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 u8=y.memo(l8),dA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bv.apply(null,arguments)}function Uk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(r),!0).forEach(function(n){c8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=f8(e,"string");return typeof t=="symbol"?t:t+""}function f8(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 Wk={curveBasisClosed:cR,curveBasisOpen:dR,curveBasis:uR,curveBumpX:sR,curveBumpY:lR,curveLinearClosed:fR,curveLinear:ch,curveMonotoneX:hR,curveMonotoneY:mR,curveNatural:pR,curveStep:gR,curveStepAfter:yR,curveStepBefore:vR},jf=e=>He(e.x)&&He(e.y),Kk=e=>e.base!=null&&jf(e.base)&&jf(e),Ql=e=>e.x,Yl=e=>e.y,h8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Oy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Wk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Wk[r]||ch},Gk={connectNulls:!1,type:"linear"},m8=e=>{var t=e.type,r=t===void 0?Gk.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?Gk.connectNulls:c,h=h8(r,u),m=f?i.filter(jf):i;if(Array.isArray(o)){var g,v=i.map((N,E)=>Hk(Hk({},N),{},{base:o[E]}));u==="vertical"?g=Sd().y(Yl).x1(Ql).x0(N=>N.base.x):g=Sd().x(Ql).y1(Yl).y0(N=>N.base.y);var b=g.defined(Kk).curve(h),j=f?v.filter(Kk):v;return b(j)}var k;u==="vertical"&&Ee(o)?k=Sd().y(Yl).x1(Ql).x0(o):Ee(o)?k=Sd().x(Ql).y1(Yl).y0(o):k=F5().x(Ql).y(Yl);var S=k.defined(jf).curve(h);return S(m)},qd=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=qs();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},c=r&&r.length?m8(u):n;return y.createElement("path",Bv({},vn(e),_y(e),{className:rt("recharts-curve",t),d:c===null?void 0:c,ref:i}))},p8=["x","y","top","left","width","height","className"];function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uv.apply(null,arguments)}function Vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function g8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(r),!0).forEach(function(n){v8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v8(e,t,r){return(t=y8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y8(e){var t=x8(e,"string");return typeof t=="symbol"?t:t+""}function x8(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)}function b8(e,t){if(e==null)return{};var r,n,i=w8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function w8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var k8=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),j8=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,u=o===void 0?0:o,c=e.left,f=c===void 0?0:c,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=b8(e,p8),k=g8({x:r,y:i,top:u,left:f,width:m,height:v},j);return!Ee(r)||!Ee(i)||!Ee(m)||!Ee(v)||!Ee(u)||!Ee(f)?null:y.createElement("path",Uv({},Yr(k),{className:rt("recharts-cross",b),d:k8(r,i,m,v,u,f)}))};function S8(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Sf=1e-4,fA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],hA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),qk=(e,t)=>r=>{var n=fA(e,t);return hA(n,r)},N8=(e,t)=>r=>{var n=fA(e,t),i=[...n.map((o,u)=>o*u).slice(1),0];return hA(i,r)},E8=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 i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},A8=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=E8(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},C8=(e,t,r,n)=>{var i=qk(e,r),o=qk(t,n),u=N8(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=i(g)-m,j=u(g);if(Math.abs(b-m)<Sf||j<Sf)return o(g);g=c(g-b/j)}return o(g)};return f.isStepper=!1,f},Qk=function(){return C8(...A8(...arguments))},P8=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,u=t.dt,c=u===void 0?16.67:u,f=1,h=[0],m=0,g=0,v=1e4,b=0;b<v;){var j=-(m-f)*n,k=g*o;if(g+=(j-k)*c/1e3,m+=g*c/1e3,h.push(m),Math.abs(m-f)<Sf&&Math.abs(g)<Sf)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,O=Math.floor(_),D=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*D}},O8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Qk(e);case"spring":return P8();default:if(e.split("(")[0]==="cubic-bezier")return Qk(e)}return typeof e=="function"?e:null},_8=(e,t,r)=>{var n,i=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(i,u);return}n=e.setTimeout(i,u)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},mA=y.createContext(_8);mA.Provider;function M8(e){var t=y.useContext(mA);return y.useMemo(()=>e??t,[e,t])}function I8(e,t,r){return(t=T8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T8(e){var t=D8(e,"string");return typeof t=="symbol"?t:t+""}function D8(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 Yk="init",Xk="pending",Zk="active",R8="completed";function vg(e){return Math.max(0,e)}class L8{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;I8(this,"state",Yk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=vg(t.animationDuration),this.animationBegin=vg(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()===Yk)return this.state=Xk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Xk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Zk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):vg(this.animationBegin-r)}if(this.getState()===Zk){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=R8}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class $8 extends L8{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(li(this.getFrom(),this.getTo(),this.getProgress()))}}class z8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=u=>{u-n>=r?t(u):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function F8(e,t){return W8(e)||H8(e,t)||U8(e,t)||B8()}function B8(){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 U8(e,t){if(e){if(typeof e=="string")return Jk(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)?Jk(e,t):void 0}}function Jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function H8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function W8(e){if(Array.isArray(e))return e}var K8={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},ej=0,yg=1;function pA(e){var t=Jr(e,K8),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,u=t.easing,c=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=cA(),v=n==="auto"?!Yu.isSsr&&!g:n,b=M8(t.animationController),j=y.useState(v?ej:yg),k=F8(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(yg)},[v]),y.useEffect(()=>{var E=O8(u);if(!v||!i||E==null)return Vs;var A=new z8,P=new $8({animationId:r,easing:E,animationDuration:o,animationBegin:c,onAnimationStart:h,onAnimationEnd:f,from:ej,to:yg});return b(A,P,N)},[b,r,v,i,o,u,c,h,f]),m(Number(S))}function gA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(bu(t)),n=y.useRef(e);return n.current!==e&&(r.current=bu(t),n.current=e),r.current}var G8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V8=(e,t,r)=>e.map(n=>"".concat(G8(n)," ").concat(t,"ms ").concat(r)).join(","),q8=["radius"],Q8=["radius"],tj,rj,nj,ij,aj,oj,sj,lj,uj,cj;function dj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dj(Object(r),!0).forEach(function(n){Y8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y8(e,t,r){return(t=X8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X8(e){var t=Z8(e,"string");return typeof t=="symbol"?t:t+""}function Z8(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)}function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nf.apply(null,arguments)}function hj(e,t){if(e==null)return{};var r,n,i=J8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function J8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function eF(e,t){return iF(e)||nF(e,t)||rF(e,t)||tF()}function tF(){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 rF(e,t){if(e){if(typeof e=="string")return mj(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)?mj(e,t):void 0}}function mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function iF(e){if(Array.isArray(e))return e}function An(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var pj=(e,t,r,n,i)=>{var o=la(r),u=la(n),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,g;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,j=4;b<j;b++){var k,S=(k=i[b])!==null&&k!==void 0?k:0;v[b]=S>c?c:S}g=Ht(tj||(tj=An(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Ht(rj||(rj=An(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Ht(nj||(nj=An(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Ht(ij||(ij=An(["A ",",",",0,0,",`,
`,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Ht(aj||(aj=An(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Ht(oj||(oj=An(["A ",",",",0,0,",`,
`,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Ht(sj||(sj=An(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Ht(lj||(lj=An(["A ",",",",0,0,",`,
`,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(c>0&&i===+i&&i>0){var N=Math.min(c,i);g=Ht(uj||(uj=An(["M ",",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Ht(cj||(cj=An(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},gj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aF=e=>{var t=Jr(e,gj),r=y.useRef(null),n=y.useState(-1),i=eF(n,2),o=i[0],u=i[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&u(X)}catch{}},[]);var c=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(c),_=y.useRef(f),O=y.useMemo(()=>({x:c,y:f,width:h,height:m,radius:g}),[c,f,h,m,g]),D=gA(O,"rectangle-");if(c!==+c||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=rt("recharts-rectangle",v);if(!N){var F=Yr(t);F.radius;var z=hj(F,q8);return y.createElement("path",Nf({},z,{x:la(c),y:la(f),width:la(h),height:la(m),radius:typeof g=="number"?g:void 0,className:B,d:pj(c,f,h,m,g)}))}var Y=E.current,U=A.current,he=P.current,ue=_.current,ge="0px ".concat(o===-1?1:o,"px"),ie="".concat(o,"px ").concat(o,"px"),se=V8(["strokeDasharray"],j,typeof b=="string"?b:gj.animationEasing);return y.createElement(pA,{animationId:D,key:D,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var te=li(Y,h,X),J=li(U,m,X),I=li(he,c,X),M=li(ue,f,X);r.current&&(E.current=te,A.current=J,P.current=I,_.current=M);var H;S?X>0?H={transition:se,strokeDasharray:ie}:H={strokeDasharray:ge}:H={strokeDasharray:ie};var ne=Yr(t);ne.radius;var Z=hj(ne,Q8);return y.createElement("path",Nf({},Z,{radius:typeof g=="number"?g:void 0,className:B,d:pj(I,M,te,J,g),ref:r,style:fj(fj({},H),t.style)}))})};function vj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vj(Object(r),!0).forEach(function(n){oF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oF(e,t,r){return(t=sF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sF(e){var t=lF(e,"string");return typeof t=="symbol"?t:t+""}function lF(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 Ef=Math.PI/180,uF=e=>e*180/Math.PI,Gt=(e,t,r,n)=>({x:e+Math.cos(-Ef*n)*r,y:t+Math.sin(-Ef*n)*r}),cF=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},dF=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},fF=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,u=dF({x:r,y:n},{x:i,y:o});if(u<=0)return{radius:u,angle:0};var c=(r-i)/u,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:u,angle:uF(f),angleInRadian:f}},hF=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},mF=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(i,o);return e+u*360},pF=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=fF({x:r,y:n},t),o=i.radius,u=i.angle,c=t.innerRadius,f=t.outerRadius;if(o<c||o>f||o===0)return null;var h=hF(t),m=h.startAngle,g=h.endAngle,v=u,b;if(m<=g){for(;v>g;)v-=360;for(;v<m;)v+=360;b=v>=m&&v<=g}else{for(;v>m;)v-=360;for(;v<g;)v+=360;b=v>=g&&v<=m}return b?yj(yj({},t),{},{radius:o,angle:mF(v,t)}):null};function vA(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,u=Gt(t,r,n,i),c=Gt(t,r,n,o);return{points:[u,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var xj,bj,wj,kj,jj,Sj,Nj;function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hv.apply(null,arguments)}function Ha(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gF=(e,t)=>{var r=Vr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Md=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,h=c*(u?1:-1)+n,m=Math.asin(c/h)/Ef,g=f?i:i+o*m,v=Gt(t,r,h,g),b=Gt(t,r,n,g),j=f?i-o*m:i,k=Gt(t,r,h*Math.cos(m*Ef),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},yA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,u=e.endAngle,c=gF(o,u),f=o+c,h=Gt(t,r,i,o),m=Gt(t,r,i,f),g=Ht(xj||(xj=Ha(["M ",",",`
A `,",",`,0,
`,",",`,
`,",",`
`])),h.x,h.y,i,i,+(Math.abs(c)>180),+(o>f),m.x,m.y);if(n>0){var v=Gt(t,r,n,o),b=Gt(t,r,n,f);g+=Ht(bj||(bj=Ha(["L ",",",`
A `,",",`,0,
`,",",`,
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else g+=Ht(wj||(wj=Ha(["L ",","," Z"])),t,r);return g},vF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=Vr(h-f),g=Md({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Md({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=c?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return u?Ht(kj||(kj=Ha(["M ",",",`
a`,",",",0,0,1,",`,0
a`,",",",0,0,1,",`,0
`])),b.x,b.y,o,o,o*2,o,o,-o*2):yA({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var P=Ht(jj||(jj=Ha(["M ",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",",`
`])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Md({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=_.circleTangency,D=_.lineTangency,B=_.theta,F=Md({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=F.circleTangency,Y=F.lineTangency,U=F.theta,he=c?Math.abs(f-h):Math.abs(f-h)-B-U;if(he<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Ht(Sj||(Sj=Ha(["L",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(m<0),z.x,z.y,n,n,+(he>180),+(m>0),O.x,O.y,o,o,+(m<0),D.x,D.y)}else P+=Ht(Nj||(Nj=Ha(["L",",","Z"])),t,r);return P},yF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xF=e=>{var t=Jr(e,yF),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o<i||h===m)return null;var v=rt("recharts-sector",g),b=o-i,j=pa(u,b,0,!0),k;return j>0&&Math.abs(h-m)<360?k=vF({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):k=yA({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",Hv({},Yr(t),{className:v,d:k}))};function bF(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(J5(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,u=t.outerRadius,c=t.angle,f=Gt(n,i,o,c),h=Gt(n,i,u,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return vA(t)}}function wF(e){return hE(e)?NaN:Number(e)}function xg(e){return e?(e=wF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function xA(e,t,r){r&&typeof r!="number"&&jv(e,t,r)&&(t=r=void 0),e=xg(e),t===void 0?(t=e,e=0):t=xg(t),r=r===void 0?e<t?1:-1:xg(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),i=new Array(n);for(let o=0;o<n;o++)i[o]=e,e+=r;return i}var bn=e=>e.chartData,Ky=q([bn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Mh=(e,t,r,n)=>n?Ky(e):bn(e),kF=(e,t,r)=>r?Ky(e):bn(e),jF=q([Mh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});q([Ky],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var SF=q([bn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Gy(e,t){return CF(e)||AF(e,t)||EF(e,t)||NF()}function NF(){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 EF(e,t){if(e){if(typeof e=="string")return Ej(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)?Ej(e,t):void 0}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function AF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function CF(e){if(Array.isArray(e))return e}function Rn(e){if(Array.isArray(e)&&e.length===2){var t=Gy(e,2),r=t[0],n=t[1];if(He(r)&&He(n))return!0}return!1}function Aj(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function bA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=Gy(e,2),n=r[0],i=r[1],o,u;if(He(n))o=n;else if(typeof n=="function")return;if(He(i))u=i;else if(typeof i=="function")return;var c=[o,u];if(Rn(c))return c}}function PF(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Rn(n))return Aj(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var i=Gy(e,2),o=i[0],u=i[1],c,f;if(o==="auto")t!=null&&(c=Math.min(...t));else if(Ee(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&xk.test(o)){var h=xk.exec(o);if(h==null||h[1]==null||t==null)c=void 0;else{var m=+h[1];c=t[0]-m}}else c=t==null?void 0:t[0];if(u==="auto")t!=null&&(f=Math.max(...t));else if(Ee(u))f=u;else if(typeof u=="function")try{t!=null&&(f=u(t==null?void 0:t[1]))}catch{}else if(typeof u=="string"&&bk.test(u)){var g=bk.exec(u);if(g==null||g[1]==null||t==null)f=void 0;else{var v=+g[1];f=t[1]+v}}else f=t==null?void 0:t[1];var b=[c,f];if(Rn(b))return t==null?b:Aj(b,t,r)}}}var Qs=1e9,OF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},qy,ut=!0,Zr="[DecimalError] ",io=Zr+"Invalid argument: ",Vy=Zr+"Exponent out of range: ",Ys=Math.floor,Fa=Math.pow,_F=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Tr,Tt=1e7,st=7,wA=9007199254740991,Af=Ys(wA/st),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*st;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 fi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Je(fi(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return kt(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,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Tr))throw Error(Zr+"NaN");if(r.s<1)throw Error(Zr+(r.s?"NaN":"-Infinity"));return r.eq(Tr)?new n(0):(ut=!1,t=fi(Au(r,o),Au(e,o),o),ut=!0,Je(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SA(t,e):kA(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Zr+"NaN");return r.s?(ut=!1,t=fi(r,e,0,1).times(e),ut=!0,r.minus(t)):Je(new n(r),i)};be.naturalExponential=be.exp=function(){return jA(this)};be.naturalLogarithm=be.ln=function(){return Au(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?kA(t,e):SA(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(io+e);if(t=kt(i)+1,n=i.d.length-1,r=n*st+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,i,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Zr+"NaN")}for(e=kt(c),ut=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Dn(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ys((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=u=r+3;;)if(o=n,n=o.plus(fi(c,o,u+2)).times(.5),Dn(o.d).slice(0,u)===(t=Dn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),i==u&&t=="4999"){if(Je(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;u+=4}return ut=!0,Je(n,r)};be.times=be.mul=function(e){var t,r,n,i,o,u,c,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f<h&&(o=v,v=b,b=o,u=f,f=h,h=u),o=[],u=f+h,n=u;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)c=o[i]+b[n]*v[i-n-1]+t,o[i--]=c%Tt|0,t=c/Tt|0;o[i]=(o[i]+t)%Tt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ut?Je(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:(Hn(e,0,Qs),t===void 0?t=n.rounding:Hn(t,0,8),Je(r,e+kt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=mo(n,!0):(Hn(e,0,Qs),t===void 0?t=i.rounding:Hn(t,0,8),n=Je(new i(n),e+1,t),r=mo(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?mo(i):(Hn(e,0,Qs),t===void 0?t=o.rounding:Hn(t,0,8),n=Je(new o(i),e+kt(i)+1,t),r=mo(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Je(new t(e),kt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,i,o,u,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Tr);if(c=new f(c),!c.s){if(e.s<1)throw Error(Zr+"Infinity");return c}if(c.eq(Tr))return c;if(n=f.precision,e.eq(Tr))return Je(c,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=c.s,u){if((r=m<0?-m:m)<=wA){for(i=new f(Tr),t=Math.ceil(n/st+4),ut=!1;r%2&&(i=i.times(c),Pj(i.d,t)),r=Ys(r/2),r!==0;)c=c.times(c),Pj(c.d,t);return ut=!0,e.s<0?new f(Tr).div(i):Je(i,n)}}else if(o<0)throw Error(Zr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ut=!1,i=e.times(Au(c,n+h)),ut=!0,i=jA(i),i.s=o,i};be.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=kt(i),n=mo(i,r<=o.toExpNeg||r>=o.toExpPos)):(Hn(e,1,Qs),t===void 0?t=o.rounding:Hn(t,0,8),i=Je(new o(i),e,t),r=kt(i),n=mo(i,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):(Hn(e,1,Qs),t===void 0?t=n.rounding:Hn(t,0,8)),Je(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=kt(e),r=e.constructor;return mo(e,t<=r.toExpNeg||t>=r.toExpPos)};function kA(e,t){var r,n,i,o,u,c,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ut?Je(t,g):t;if(f=e.d,h=t.d,u=e.e,i=t.e,f=f.slice(),o=u-i,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,i=u,c=f.length),u=Math.ceil(g/st),c=u>c?u+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Tt|0,f[o]%=Tt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ut?Je(t,g):t}function Hn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(io+e)}function Dn(e){var t,r,n,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;t<i;t++)n=e[t]+"",r=st-n.length,r&&(o+=Xi(r)),o+=n;u=e[t],n=u+"",r=st-n.length,r&&(o+=Xi(r))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var fi=(function(){function e(n,i){var o,u=0,c=n.length;for(n=n.slice();c--;)o=n[c]*i+u,n[c]=o%Tt|0,u=o/Tt|0;return u&&n.unshift(u),n}function t(n,i,o,u){var c,f;if(o!=u)f=o>u?1:-1;else for(c=f=0;c<o;c++)if(n[c]!=i[c]){f=n[c]>i[c]?1:-1;break}return f}function r(n,i,o){for(var u=0;o--;)n[o]-=u,u=n[o]<i[o]?1:0,n[o]=u*Tt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,u){var c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D,B,F=n.constructor,z=n.s==i.s?1:-1,Y=n.d,U=i.d;if(!n.s)return new F(n);if(!i.s)throw Error(Zr+"Division by zero");for(f=n.e-i.e,D=U.length,_=Y.length,b=new F(z),j=b.d=[],h=0;U[h]==(Y[h]||0);)++h;if(U[h]>(Y[h]||0)&&--f,o==null?E=o=F.precision:u?E=o+(kt(n)-kt(i))+1:E=o,E<0)return new F(0);if(E=E/st+2|0,h=0,D==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)A=m*Tt+(Y[h]||0),j[h]=A/U|0,m=A%U|0;else{for(m=Tt/(U[0]+1)|0,m>1&&(U=e(U,m),Y=e(Y,m),D=U.length,_=Y.length),P=D,k=Y.slice(0,D),S=k.length;S<D;)k[S++]=0;B=U.slice(),B.unshift(0),O=U[0],U[1]>=Tt/2&&++O;do m=0,c=t(U,k,D,S),c<0?(N=k[0],D!=S&&(N=N*Tt+(k[1]||0)),m=N/O|0,m>1?(m>=Tt&&(m=Tt-1),g=e(U,m),v=g.length,S=k.length,c=t(g,k,v,S),c==1&&(m--,r(g,D<v?B:U,v))):(m==0&&(c=m=1),g=U.slice()),v=g.length,v<S&&g.unshift(0),r(k,g,S),c==-1&&(S=k.length,c=t(U,k,D,S),c<1&&(m++,r(k,D<S?B:U,S))),S=k.length):c===0&&(m++,k=[0]),j[h++]=m,c&&k[0]?k[S++]=Y[P]||0:(k=[Y[P]],S=1);while((P++<_||k[0]!==void 0)&&E--)}return j[0]||j.shift(),b.e=f,Je(b,u?o+kt(b)+1:o)}})();function jA(e,t){var r,n,i,o,u,c,f=0,h=0,m=e.constructor,g=m.precision;if(kt(e)>16)throw Error(Vy+kt(e));if(!e.s)return new m(Tr);for(ut=!1,c=g,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Fa(2,h))/Math.LN10*2+5|0,c+=n,r=i=o=new m(Tr),m.precision=c;;){if(i=Je(i.times(e),c),r=r.times(++f),u=o.plus(fi(i,r,c)),Dn(u.d).slice(0,c)===Dn(o.d).slice(0,c)){for(;h--;)o=Je(o.times(o),c);return m.precision=g,t==null?(ut=!0,Je(o,g)):o}o=u}}function kt(e){for(var t=e.e*st,r=e.d[0];r>=10;r/=10)t++;return t}function bg(e,t,r){if(t>e.LN10.sd())throw ut=!0,r&&(e.precision=r),Error(Zr+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function Xi(e){for(var t="";e--;)t+="0";return t}function Au(e,t){var r,n,i,o,u,c,f,h,m,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(Zr+(b.s?"NaN":"-Infinity"));if(b.eq(Tr))return new k(0);if(t==null?(ut=!1,h=S):h=t,b.eq(10))return t==null&&(ut=!0),bg(k,h);if(h+=v,k.precision=h,r=Dn(j),n=r.charAt(0),o=kt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Dn(b.d),n=r.charAt(0),g++;o=kt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=bg(k,h+2,S).times(o+""),b=Au(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(ut=!0,Je(b,S)):b;for(c=u=b=fi(b.minus(Tr),b.plus(Tr),h),m=Je(b.times(b),h),i=3;;){if(u=Je(u.times(m),h),f=c.plus(fi(u,new k(i),h)),Dn(f.d).slice(0,h)===Dn(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(bg(k,h+2,S).times(o+""))),c=fi(c,new k(g),h),k.precision=S,t==null?(ut=!0,Je(c,S)):c;c=f,i+=2}}function Cj(e,t){var r,n,i;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(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ys(r/st),e.d=[],n=(r+1)%st,r<0&&(n+=st),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=st;n<i;)e.d.push(+t.slice(n,n+=st));t=t.slice(n),n=st-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ut&&(e.e>Af||e.e<-Af))throw Error(Vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,r){var n,i,o,u,c,f,h,m,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=st,i=t,h=g[m=0];else{if(m=Math.ceil((n+1)/st),o=g.length,m>=o)return e;for(h=o=g[m],u=1;o>=10;o/=10)u++;n%=st,i=n-st+u}if(r!==void 0&&(o=Fa(10,u-i-1),c=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?h/Fa(10,u-i):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=kt(e),g.length=1,t=t-o-1,g[0]=Fa(10,(st-t%st)%st),e.e=Ys(-t/st)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Fa(10,st-n),g[m]=i>0?(h/Fa(10,u-i)%Fa(10,i)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Tt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Tt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ut&&(e.e>Af||e.e<-Af))throw Error(Vy+kt(e));return e}function SA(e,t){var r,n,i,o,u,c,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ut?Je(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(m=u<0,m?(r=f,u=-u,c=g.length):(r=g,n=h,c=f.length),i=Math.max(Math.ceil(b/st),c)+2,u>i&&(u=i,r.length=1),r.reverse(),i=u;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=g.length,m=i<c,m&&(c=i),i=0;i<c;i++)if(f[i]!=g[i]){m=f[i]<g[i];break}u=0}for(m&&(r=f,f=g,g=r,t.s=-t.s),c=f.length,i=g.length-c;i>0;--i)f[c++]=0;for(i=g.length;i>u;){if(f[--i]<g[i]){for(o=i;o&&f[--o]===0;)f[o]=Tt-1;--f[o],f[i]+=Tt}f[i]-=g[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ut?Je(t,b):t):new v(0)}function mo(e,t,r){var n,i=kt(e),o=Dn(e.d),u=o.length;return t?(r&&(n=r-u)>0?o=o.charAt(0)+"."+o.slice(1)+Xi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Xi(-i-1)+o,r&&(n=r-u)>0&&(o+=Xi(n))):i>=u?(o+=Xi(i+1-u),r&&(n=r-i-1)>0&&(o=o+"."+Xi(n))):((n=i+1)<u&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-u)>0&&(i+1===u&&(o+="."),o+=Xi(n))),e.s<0?"-"+o:o}function Pj(e,t){if(e.length>t)return e.length=t,!0}function NA(e){var t,r,n;function i(o){var u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,o instanceof i){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(io+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 Cj(u,o.toString())}else if(typeof o!="string")throw Error(io+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,_F.test(o))Cj(u,o);else throw Error(io+o)}if(i.prototype=be,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=NA,i.config=i.set=MF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function MF(e){if(!e||typeof e!="object")throw Error(Zr+"Object expected");var t,r,n,i=["precision",1,Qs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Ys(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(io+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(io+r+": "+n);return this}var qy=NA(OF);Tr=new qy(1);const Ke=qy;function EA(e){var t;return e===0?t=1:t=Math.floor(new Ke(e).abs().log(10).toNumber())+1,t}function AA(e,t,r){for(var n=new Ke(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Cu(e,t){return RF(e)||DF(e,t)||TF(e,t)||IF()}function IF(){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 TF(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);r<t;r++)n[r]=e[r];return n}function DF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function RF(e){if(Array.isArray(e))return e}var CA=e=>{var t=Cu(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},Qy=(e,t,r)=>{if(e.lte(0))return new Ke(0);var n=EA(e.toNumber()),i=new Ke(10).pow(n),o=e.div(i),u=n!==1?.05:.1,c=new Ke(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=c.mul(i);return t?new Ke(f.toNumber()):new Ke(Math.ceil(f.toNumber()))},PA=(e,t,r)=>{var n;if(e.lte(0))return new Ke(0);var i=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ke(o).abs().log(10).toNumber()),c=new Ke(10).pow(u),f=e.div(c).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,c=c.mul(new Ke(10).pow(m))}var g=(n=i[h])!==null&&n!==void 0?n:1,v=new Ke(g).mul(c);return t?v:new Ke(Math.ceil(v.toNumber()))},LF=(e,t,r)=>{var n=new Ke(1),i=new Ke(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ke(10).pow(EA(e)-1),i=new Ke(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ke(Math.floor(e)))}else e===0?i=new Ke(Math.floor((t-1)/2)):r||(i=new Ke(Math.floor(e)));for(var u=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new Ke(f-u).mul(n)).toNumber());return c},OA=function(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Qy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var c=u(new Ke(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new Ke(0):(f=new Ke(t).add(r).div(2),f=f.sub(new Ke(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new Ke(r).sub(f).div(c).toNumber()),g=h+m+1;return g>n?OA(t,r,n,i,o+1,u):(g<n&&(m=r>0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new Ke(h).mul(c)),tickMax:f.add(new Ke(m).mul(c))})},_j=function(t){var r=Cu(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=CA([n,i]),m=Cu(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(g===v)return LF(g,o,u);var j=c==="snap125"?PA:Qy,k=OA(g,v,f,u,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=AA(N,E.add(new Ke(.1).mul(S)),S);return n>i?A.reverse():A},Mj=function(t,r){var n=Cu(t,2),i=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=CA([i,o]),h=Cu(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[i,o];if(m===g)return[m];var v=c==="snap125"?PA:Qy,b=Math.max(r,2),j=v(new Ke(g).sub(m).div(b-1),u,0),k=[...AA(new Ke(m),new Ke(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),i>o?k.reverse():k},$F=e=>e.rootProps.barCategoryGap,Ih=e=>e.rootProps.stackOffset,_A=e=>e.rootProps.reverseStackOrder,Yy=e=>e.options.chartName,Xy=e=>e.rootProps.syncId,MA=e=>e.rootProps.syncMethod,Zy=e=>e.options.eventEmitter,zF=e=>e.rootProps.baseValue,dr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ma={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Cn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Th=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Dh(e,t,r){if(r!=="auto")return r;if(e!=null)return Gn(e,t)?"category":"number"}function Ij(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ij(Object(r),!0).forEach(function(n){FF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ij(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=UF(e,"string");return typeof t=="symbol"?t:t+""}function UF(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 Tj={allowDataOverflow:Ma.allowDataOverflow,allowDecimals:Ma.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ma.angleAxisId,includeHidden:!1,name:void 0,reversed:Ma.reversed,scale:Ma.scale,tick:Ma.tick,tickCount:void 0,ticks:void 0,type:Ma.type,unit:void 0,niceTicks:"auto"},Dj={allowDataOverflow:Cn.allowDataOverflow,allowDecimals:Cn.allowDecimals,allowDuplicatedCategory:Cn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Cn.radiusAxisId,includeHidden:Cn.includeHidden,name:void 0,reversed:Cn.reversed,scale:Cn.scale,tick:Cn.tick,tickCount:Cn.tickCount,ticks:void 0,type:Cn.type,unit:void 0,niceTicks:"auto"},HF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Jy=q([HF,rA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Dh(t,"angleAxis",Tj.type))!==null&&r!==void 0?r:"category";return Cf(Cf({},Tj),{},{type:n})}),WF=(e,t)=>e.polarAxis.radiusAxis[t],e0=q([WF,rA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Dh(t,"radiusAxis",Dj.type))!==null&&r!==void 0?r:"category";return Cf(Cf({},Dj),{},{type:n})}),Rh=e=>e.polarOptions,t0=q([xi,bi,Qt],cF),IA=q([Rh,t0],(e,t)=>{if(e!=null)return pa(e.innerRadius,t,0)}),TA=q([Rh,t0],(e,t)=>{if(e!=null)return pa(e.outerRadius,t,t*.8)}),KF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},DA=q([Rh],KF);q([Jy,DA],Th);var RA=q([t0,IA,TA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});q([e0,RA],Th);var LA=q([ct,Rh,IA,TA,xi,bi],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,c=t.cy,f=t.startAngle,h=t.endAngle;return{cx:pa(u,i,i/2),cy:pa(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Lt=(e,t)=>t,Lh=(e,t,r)=>r;function r0(e){return e==null?void 0:e.id}function $A(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,c=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var g=r0(f);m.forEach((v,b)=>{var j=u==null||o?b:String(Dt(v,u,null)),k=Dt(v,f.dataKey,0),S;c.has(j)?S=c.get(j):S={},Object.assign(S,{[g]:k}),c.set(j,S)})}}),Array.from(c.values())}function n0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var $h=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function zh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function GF(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var $t=e=>{var t=ct(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Xs=e=>e.tooltip.settings.axisId;function i0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[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})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var u=i[0],c=i[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var VF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Rn(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];He(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function da(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a0(e){let t,r,n;e.length!==2?(t=da,r=(c,f)=>da(e(c),f),n=(c,f)=>e(c)-f):(t=e===da||e===qF?e:QF,r=e,n=e);function i(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<0?h=g+1:m=g}while(h<m)}return h}function o(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<=0?h=g+1:m=g}while(h<m)}return h}function u(c,f,h=0,m=c.length){const g=i(c,f,h,m-1);return g>h&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:i,center:u,right:o}}function QF(){return 0}function zA(e){return e===null?NaN:+e}function*YF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const XF=a0(da),Xu=XF.right;a0(zA).center;class Rj extends Map{constructor(t,r=e9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Lj(this,t))}has(t){return super.has(Lj(this,t))}set(t,r){return super.set(ZF(this,t),r)}delete(t){return super.delete(JF(this,t))}}function Lj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function ZF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function JF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function e9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function t9(e=da){if(e===da)return FA;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 FA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const r9=Math.sqrt(50),n9=Math.sqrt(10),i9=Math.sqrt(2);function Pf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),u=o>=r9?10:o>=n9?5:o>=i9?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/u,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*u,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?Pf(e,t,r*2):[c,f,h]}function Wv(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,u]=n?Pf(t,e,r):Pf(e,t,r);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(n)if(u<0)for(let h=0;h<c;++h)f[h]=(o-h)/-u;else for(let h=0;h<c;++h)f[h]=(o-h)*u;else if(u<0)for(let h=0;h<c;++h)f[h]=(i+h)/-u;else for(let h=0;h<c;++h)f[h]=(i+h)*u;return f}function Kv(e,t,r){return t=+t,e=+e,r=+r,Pf(e,t,r)[2]}function Gv(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Kv(t,e,r):Kv(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function $j(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function zj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function BA(e,t,r=0,n=1/0,i){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(i=i===void 0?FA:t9(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));BA(e,t,b,j,i)}const o=e[t];let u=r,c=n;for(Xl(e,r,t),i(e[n],o)>0&&Xl(e,r,n);u<c;){for(Xl(e,u,c),++u,--c;i(e[u],o)<0;)++u;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?Xl(e,r,c):(++c,Xl(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function Xl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function a9(e,t,r){if(e=Float64Array.from(YF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return zj(e);if(t>=1)return $j(e);var n,i=(n-1)*t,o=Math.floor(i),u=$j(BA(e,o).subarray(0,o+1)),c=zj(e.subarray(o+1));return u+(c-u)*(i-o)}}function o9(e,t,r=zA){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,i=(n-1)*t,o=Math.floor(i),u=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return u+(c-u)*(i-o)}}function s9(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function en(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Vv=Symbol("implicit");function o0(){var e=new Rj,t=[],r=[],n=Vv;function i(o){let u=e.get(o);if(u===void 0){if(n!==Vv)return n;e.set(o,u=t.push(o)-1)}return r[u%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Rj;for(const u of o)e.has(u)||e.set(u,t.push(u)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return o0(t,r).unknown(n)},en.apply(i,arguments),i}function s0(){var e=o0().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,u,c=!1,f=0,h=0,m=.5;delete e.unknown;function g(){var v=t().length,b=i<n,j=b?i:n,k=b?n:i;o=(k-j)/Math.max(1,v-f+h*2),c&&(o=Math.floor(o)),j+=(k-j-o*(v-f))*m,u=o*(1-f),c&&(j=Math.round(j),u=Math.round(u));var S=s9(v).map(function(N){return j+o*N});return r(b?S.reverse():S)}return e.domain=function(v){return arguments.length?(t(v),g()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,g()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,c=!0,g()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(v){return arguments.length?(c=!!v,g()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),g()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),g()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,g()):h},e.align=function(v){return arguments.length?(m=Math.max(0,Math.min(1,v)),g()):m},e.copy=function(){return s0(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(m)},en.apply(g(),arguments)}function UA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return UA(t())},e}function l9(){return UA(s0.apply(null,arguments).paddingInner(1))}function l0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function HA(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Zu(){}var Pu=.7,Of=1/Pu,ps="\\s*([+-]?\\d+)\\s*",Ou="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u9=/^#([0-9a-f]{3,8})$/,c9=new RegExp(`^rgb\\(${ps},${ps},${ps}\\)$`),d9=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),f9=new RegExp(`^rgba\\(${ps},${ps},${ps},${Ou}\\)$`),h9=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Ou}\\)$`),m9=new RegExp(`^hsl\\(${Ou},${Ln},${Ln}\\)$`),p9=new RegExp(`^hsla\\(${Ou},${Ln},${Ln},${Ou}\\)$`),Fj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};l0(Zu,_u,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bj,formatHex:Bj,formatHex8:g9,formatHsl:v9,formatRgb:Uj,toString:Uj});function Bj(){return this.rgb().formatHex()}function g9(){return this.rgb().formatHex8()}function v9(){return WA(this).formatHsl()}function Uj(){return this.rgb().formatRgb()}function _u(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=u9.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Hj(t):r===3?new Sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Id(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Id(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=c9.exec(e))?new Sr(t[1],t[2],t[3],1):(t=d9.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f9.exec(e))?Id(t[1],t[2],t[3],t[4]):(t=h9.exec(e))?Id(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,1):(t=p9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,t[4]):Fj.hasOwnProperty(e)?Hj(Fj[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function Hj(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Id(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function y9(e){return e instanceof Zu||(e=_u(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function qv(e,t,r,n){return arguments.length===1?y9(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l0(Sr,qv,HA(Zu,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(ao(this.r),ao(this.g),ao(this.b),_f(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:Wj,formatHex:Wj,formatHex8:x9,formatRgb:Kj,toString:Kj}));function Wj(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function x9(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kj(){const e=_f(this.opacity);return`${e===1?"rgb(":"rgba("}${ao(this.r)}, ${ao(this.g)}, ${ao(this.b)}${e===1?")":`, ${e})`}`}function _f(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ao(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wa(e){return e=ao(e),(e<16?"0":"")+e.toString(16)}function Gj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new mn(e,t,r,n)}function WA(e){if(e instanceof mn)return new mn(e.h,e.s,e.l,e.opacity);if(e instanceof Zu||(e=_u(e)),!e)return new mn;if(e instanceof mn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,c=o-i,f=(o+i)/2;return c?(t===o?u=(r-n)/c+(r<n)*6:r===o?u=(n-t)/c+2:u=(t-r)/c+4,c/=f<.5?o+i:2-o-i,u*=60):c=f>0&&f<1?0:u,new mn(u,c,f,e.opacity)}function b9(e,t,r,n){return arguments.length===1?WA(e):new mn(e,t,r,n??1)}function mn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l0(mn,b9,HA(Zu,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new mn(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,i=2*r-n;return new Sr(wg(e>=240?e-240:e+120,i,n),wg(e,i,n),wg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new mn(Vj(this.h),Td(this.s),Td(this.l),_f(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=_f(this.opacity);return`${e===1?"hsl(":"hsla("}${Vj(this.h)}, ${Td(this.s)*100}%, ${Td(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Vj(e){return e=(e||0)%360,e<0?e+360:e}function Td(e){return Math.max(0,Math.min(1,e||0))}function wg(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 u0=e=>()=>e;function w9(e,t){return function(r){return e+r*t}}function k9(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 j9(e){return(e=+e)==1?KA:function(t,r){return r-t?k9(t,r,e):u0(isNaN(t)?r:t)}}function KA(e,t){var r=t-e;return r?w9(e,r):u0(isNaN(e)?t:e)}const qj=(function e(t){var r=j9(t);function n(i,o){var u=r((i=qv(i)).r,(o=qv(o)).r),c=r(i.g,o.g),f=r(i.b,o.b),h=KA(i.opacity,o.opacity);return function(m){return i.r=u(m),i.g=c(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function S9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function N9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E9(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),u;for(u=0;u<n;++u)i[u]=Zs(e[u],t[u]);for(;u<r;++u)o[u]=t[u];return function(c){for(u=0;u<n;++u)o[u]=i[u](c);return o}}function A9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Mf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function C9(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Zs(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var Qv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kg=new RegExp(Qv.source,"g");function P9(e){return function(){return e}}function O9(e){return function(t){return e(t)+""}}function _9(e,t){var r=Qv.lastIndex=kg.lastIndex=0,n,i,o,u=-1,c=[],f=[];for(e=e+"",t=t+"";(n=Qv.exec(e))&&(i=kg.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(i=i[0])?c[u]?c[u]+=i:c[++u]=i:(c[++u]=null,f.push({i:u,x:Mf(n,i)})),r=kg.lastIndex;return r<t.length&&(o=t.slice(r),c[u]?c[u]+=o:c[++u]=o),c.length<2?f[0]?O9(f[0].x):P9(t):(t=f.length,function(h){for(var m=0,g;m<t;++m)c[(g=f[m]).i]=g.x(h);return c.join("")})}function Zs(e,t){var r=typeof t,n;return t==null||r==="boolean"?u0(t):(r==="number"?Mf:r==="string"?(n=_u(t))?(t=n,qj):_9:t instanceof _u?qj:t instanceof Date?A9:N9(t)?S9:Array.isArray(t)?E9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C9:Mf)(e,t)}function c0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function M9(e,t){t===void 0&&(t=e,e=Zs);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(u){var c=Math.max(0,Math.min(n-1,Math.floor(u*=n)));return o[c](u-c)}}function I9(e){return function(){return e}}function If(e){return+e}var Qj=[0,1];function fr(e){return e}function Yv(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:I9(isNaN(t)?NaN:.5)}function T9(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function D9(e,t,r){var n=e[0],i=e[1],o=t[0],u=t[1];return i<n?(n=Yv(i,n),o=r(u,o)):(n=Yv(n,i),o=r(o,u)),function(c){return o(n(c))}}function R9(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),u=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++u<n;)i[u]=Yv(e[u],e[u+1]),o[u]=r(t[u],t[u+1]);return function(c){var f=Xu(e,c,1,n)-1;return o[f](i[f](c))}}function Ju(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Fh(){var e=Qj,t=Qj,r=Zs,n,i,o,u=fr,c,f,h;function m(){var v=Math.min(e.length,t.length);return u!==fr&&(u=T9(e[0],e[v-1])),c=v>2?R9:D9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(i((h||(h=c(t,e.map(n),Mf)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,If),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=c0,m()},g.clamp=function(v){return arguments.length?(u=v?!0:fr,m()):u!==fr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,i=b,m()}}function d0(){return Fh()(fr,fr)}function L9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tf(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 $s(e){return e=Tf(Math.abs(e)),e?e[1]:NaN}function $9(e,t){return function(r,n){for(var i=r.length,o=[],u=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(t)}}function z9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var F9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=F9.exec(e)))throw new Error("invalid format: "+e);var t;return new f0({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]})}Mu.prototype=f0.prototype;function f0(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+""}f0.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 B9(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Df;function U9(e,t){var r=Tf(e,t);if(!r)return Df=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Df=Math.max(-8,Math.min(8,Math.floor(i/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")+Tf(e,Math.max(0,t+o-1))[0]}function Yj(e,t){var r=Tf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Xj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L9,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)=>Yj(e*100,t),r:Yj,s:U9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zj(e){return e}var Jj=Array.prototype.map,eS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H9(e){var t=e.grouping===void 0||e.thousands===void 0?Zj:$9(Jj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Zj:z9(Jj.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Mu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,_=g.trim,O=g.type;O==="n"?(A=!0,O="g"):Xj[O]||(P===void 0&&(P=12),_=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(O)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),F=Xj[O],z=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Y(U){var he=D,ue=B,ge,ie,se;if(O==="c")ue=F(U)+ue,U="";else{U=+U;var X=U<0||1/U<0;if(U=isNaN(U)?f:F(Math.abs(U),P),_&&(U=B9(U)),X&&+U==0&&k!=="+"&&(X=!1),he=(X?k==="("?k:c:k==="-"||k==="("?"":k)+he,ue=(O==="s"&&!isNaN(U)&&Df!==void 0?eS[8+Df/3]:"")+ue+(X&&k==="("?")":""),z){for(ge=-1,ie=U.length;++ge<ie;)if(se=U.charCodeAt(ge),48>se||se>57){ue=(se===46?i+U.slice(ge+1):U.slice(ge))+ue,U=U.slice(0,ge);break}}}A&&!N&&(U=t(U,1/0));var te=he.length+U.length+ue.length,J=te<E?new Array(E-te+1).join(b):"";switch(A&&N&&(U=t(J+U,J.length?E-ue.length:1/0),J=""),j){case"<":U=he+U+ue+J;break;case"=":U=he+J+U+ue;break;case"^":U=J.slice(0,te=J.length>>1)+he+U+ue+J.slice(te);break;default:U=J+he+U+ue;break}return o(U)}return Y.toString=function(){return g+""},Y}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor($s(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Mu(g),g.type="f",g),{suffix:eS[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Dd,h0,GA;W9({thousands:",",grouping:[3],currency:["$",""]});function W9(e){return Dd=H9(e),h0=Dd.format,GA=Dd.formatPrefix,Dd}function K9(e){return Math.max(0,-$s(Math.abs(e)))}function G9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function V9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function VA(e,t,r,n){var i=Gv(e,t,r),o;switch(n=Mu(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=G9(i,u))&&(n.precision=o),GA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=V9(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=K9(i))&&(n.precision=o-(n.type==="%")*2);break}}return h0(n)}function ga(e){var t=e.domain;return e.ticks=function(r){var n=t();return Wv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return VA(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,u=n[i],c=n[o],f,h,m=10;for(c<u&&(h=u,u=c,c=h,h=i,i=o,o=h);m-- >0;){if(h=Kv(u,c,r),h===f)return n[i]=u,n[o]=c,t(n);if(h>0)u=Math.floor(u/h)*h,c=Math.ceil(c/h)*h;else if(h<0)u=Math.ceil(u*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function qA(){var e=d0();return e.copy=function(){return Ju(e,qA())},en.apply(e,arguments),ga(e)}function QA(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,If),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return QA(e).unknown(t)},e=arguments.length?Array.from(e,If):[0,1],ga(r)}function YA(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],u;return o<i&&(u=r,r=n,n=u,u=i,i=o,o=u),e[r]=t.floor(i),e[n]=t.ceil(o),e}function tS(e){return Math.log(e)}function rS(e){return Math.exp(e)}function q9(e){return-Math.log(-e)}function Q9(e){return-Math.exp(-e)}function Y9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function X9(e){return e===10?Y9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Z9(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 nS(e){return(t,r)=>-e(-t,r)}function m0(e){const t=e(tS,rS),r=t.domain;let n=10,i,o;function u(){return i=Z9(n),o=X9(n),r()[0]<0?(i=nS(i),o=nS(o),e(q9,Q9)):e(tS,rS),t}return t.base=function(c){return arguments.length?(n=+c,u()):n},t.domain=function(c){return arguments.length?(r(c),u()):r()},t.ticks=c=>{const f=r();let h=f[0],m=f[f.length-1];const g=m<h;g&&([h,m]=[m,h]);let v=i(h),b=i(m),j,k;const S=c==null?10:+c;let N=[];if(!(n%1)&&b-v<S){if(v=Math.floor(v),b=Math.ceil(b),h>0){for(;v<=b;++v)for(j=1;j<n;++j)if(k=v<0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}N.length*2<S&&(N=Wv(h,m,S))}else N=Wv(v,b,Math.min(b-v,S)).map(o);return g?N.reverse():N},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Mu(f)).precision==null&&(f.trim=!0),f=h0(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return m=>{let g=m/o(Math.round(i(m)));return g*n<n-.5&&(g*=n),g<=h?f(m):""}},t.nice=()=>r(YA(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function XA(){const e=m0(Fh()).domain([1,10]);return e.copy=()=>Ju(e,XA()).base(e.base()),en.apply(e,arguments),e}function iS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function p0(e){var t=1,r=e(iS(t),aS(t));return r.constant=function(n){return arguments.length?e(iS(t=+n),aS(t)):t},ga(r)}function ZA(){var e=p0(Fh());return e.copy=function(){return Ju(e,ZA()).constant(e.constant())},en.apply(e,arguments)}function oS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function J9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e7(e){return e<0?-e*e:e*e}function g0(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(J9,e7):e(oS(r),oS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ga(t)}function v0(){var e=g0(Fh());return e.copy=function(){return Ju(e,v0()).exponent(e.exponent())},en.apply(e,arguments),e}function t7(){return v0.apply(null,arguments).exponent(.5)}function sS(e){return Math.sign(e)*e*e}function r7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function JA(){var e=d0(),t=[0,1],r=!1,n;function i(o){var u=r7(e(o));return isNaN(u)?n:r?Math.round(u):u}return i.invert=function(o){return e.invert(sS(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,If)).map(sS)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return JA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},en.apply(i,arguments),ga(i)}function eC(){var e=[],t=[],r=[],n;function i(){var u=0,c=Math.max(1,t.length);for(r=new Array(c-1);++u<c;)r[u-1]=o9(e,u/c);return o}function o(u){return u==null||isNaN(u=+u)?n:t[Xu(r,u)]}return o.invertExtent=function(u){var c=t.indexOf(u);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let c of u)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(da),i()},o.range=function(u){return arguments.length?(t=Array.from(u),i()):t.slice()},o.unknown=function(u){return arguments.length?(n=u,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return eC().domain(e).range(t).unknown(n)},en.apply(o,arguments)}function tC(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function u(f){return f!=null&&f<=f?i[Xu(n,f,0,r)]:o}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return u}return u.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},u.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,c()):i.slice()},u.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=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 tC().domain([e,t]).range(i).unknown(o)},en.apply(ga(u),arguments)}function rC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Xu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return rC().domain(e).range(t).unknown(r)},en.apply(i,arguments)}const jg=new Date,Sg=new Date;function Ct(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const u=i(o),c=i.ceil(o);return o-u<c-o?u:c},i.offset=(o,u)=>(t(o=new Date(+o),u==null?1:Math.floor(u)),o),i.range=(o,u,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<u)||!(c>0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<u);return f},i.filter=o=>Ct(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;t(u,-1),!o(u););else for(;--c>=0;)for(;t(u,1),!o(u););}),r&&(i.count=(o,u)=>(jg.setTime(+o),Sg.setTime(+u),e(jg),e(Sg),Math.floor(r(jg,Sg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?u=>n(u)%o===0:u=>i.count(0,u)%o===0):i)),i}const Rf=Ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Rf);Rf.range;const ui=1e3,Qr=ui*60,ci=Qr*60,pi=ci*24,y0=pi*7,lS=pi*30,Ng=pi*365,Ka=Ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCSeconds());Ka.range;const x0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getMinutes());x0.range;const b0=Ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCMinutes());b0.range;const w0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui-e.getMinutes()*Qr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());w0.range;const k0=Ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());k0.range;const ec=Ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qr)/pi,e=>e.getDate()-1);ec.range;const Bh=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>e.getUTCDate()-1);Bh.range;const nC=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>Math.floor(e/pi));nC.range;function wo(e){return Ct(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())*Qr)/y0)}const Uh=wo(0),Lf=wo(1),n7=wo(2),i7=wo(3),zs=wo(4),a7=wo(5),o7=wo(6);Uh.range;Lf.range;n7.range;i7.range;zs.range;a7.range;o7.range;function ko(e){return Ct(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)/y0)}const Hh=ko(0),$f=ko(1),s7=ko(2),l7=ko(3),Fs=ko(4),u7=ko(5),c7=ko(6);Hh.range;$f.range;s7.range;l7.range;Fs.range;u7.range;c7.range;const j0=Ct(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());j0.range;const S0=Ct(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());S0.range;const gi=Ct(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());gi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(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)});gi.range;const vi=Ct(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());vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(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)});vi.range;function iC(e,t,r,n,i,o){const u=[[Ka,1,ui],[Ka,5,5*ui],[Ka,15,15*ui],[Ka,30,30*ui],[o,1,Qr],[o,5,5*Qr],[o,15,15*Qr],[o,30,30*Qr],[i,1,ci],[i,3,3*ci],[i,6,6*ci],[i,12,12*ci],[n,1,pi],[n,2,2*pi],[r,1,y0],[t,1,lS],[t,3,3*lS],[e,1,Ng]];function c(h,m,g){const v=m<h;v&&([h,m]=[m,h]);const b=g&&typeof g.range=="function"?g:f(h,m,g),j=b?b.range(h,+m+1):[];return v?j.reverse():j}function f(h,m,g){const v=Math.abs(m-h)/g,b=a0(([,,S])=>S).right(u,v);if(b===u.length)return e.every(Gv(h/Ng,m/Ng,g));if(b===0)return Rf.every(Math.max(Gv(h,m,g),1));const[j,k]=u[v/u[b-1][2]<u[b][2]/v?b-1:b];return j.every(k)}return[c,f]}const[d7,f7]=iC(vi,S0,Hh,nC,k0,b0),[h7,m7]=iC(gi,j0,Uh,ec,w0,x0);function Eg(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ag(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Zl(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function p7(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,u=e.shortDays,c=e.months,f=e.shortMonths,h=Jl(i),m=eu(i),g=Jl(o),v=eu(o),b=Jl(u),j=eu(u),k=Jl(c),S=eu(c),N=Jl(f),E=eu(f),A={a:se,A:X,b:te,B:J,c:null,d:mS,e:mS,f:$7,g:q7,G:Y7,H:D7,I:R7,j:L7,L:aC,m:z7,M:F7,p:I,q:M,Q:vS,s:yS,S:B7,u:U7,U:H7,V:W7,w:K7,W:G7,x:null,X:null,y:V7,Y:Q7,Z:X7,"%":gS},P={a:H,A:ne,b:Z,B:me,c:null,d:pS,e:pS,f:tB,g:dB,G:hB,H:Z7,I:J7,j:eB,L:sC,m:rB,M:nB,p:pe,q:Oe,Q:vS,s:yS,S:iB,u:aB,U:oB,V:sB,w:lB,W:uB,x:null,X:null,y:cB,Y:fB,Z:mB,"%":gS},_={a:z,A:Y,b:U,B:he,c:ue,d:fS,e:fS,f:_7,g:dS,G:cS,H:hS,I:hS,j:A7,L:O7,m:E7,M:C7,p:F,q:N7,Q:I7,s:T7,S:P7,u:b7,U:w7,V:k7,w:x7,W:j7,x:ge,X:ie,y:dS,Y:cS,Z:S7,"%":M7};A.x=O(r,A),A.X=O(n,A),A.c=O(t,A),P.x=O(r,P),P.X=O(n,P),P.c=O(t,P);function O(re,we){return function(_e){var ae=[],et=-1,Be=0,Pe=re.length,vt,Yt,K;for(_e instanceof Date||(_e=new Date(+_e));++et<Pe;)re.charCodeAt(et)===37&&(ae.push(re.slice(Be,et)),(Yt=uS[vt=re.charAt(++et)])!=null?vt=re.charAt(++et):Yt=vt==="e"?" ":"0",(K=we[vt])&&(vt=K(_e,Yt)),ae.push(vt),Be=et+1);return ae.push(re.slice(Be,et)),ae.join("")}}function D(re,we){return function(_e){var ae=Zl(1900,void 0,1),et=B(ae,re,_e+="",0),Be,Pe;if(et!=_e.length)return null;if("Q"in ae)return new Date(ae.Q);if("s"in ae)return new Date(ae.s*1e3+("L"in ae?ae.L:0));if(we&&!("Z"in ae)&&(ae.Z=0),"p"in ae&&(ae.H=ae.H%12+ae.p*12),ae.m===void 0&&(ae.m="q"in ae?ae.q:0),"V"in ae){if(ae.V<1||ae.V>53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Be=Ag(Zl(ae.y,0,1)),Pe=Be.getUTCDay(),Be=Pe>4||Pe===0?$f.ceil(Be):$f(Be),Be=Bh.offset(Be,(ae.V-1)*7),ae.y=Be.getUTCFullYear(),ae.m=Be.getUTCMonth(),ae.d=Be.getUTCDate()+(ae.w+6)%7):(Be=Eg(Zl(ae.y,0,1)),Pe=Be.getDay(),Be=Pe>4||Pe===0?Lf.ceil(Be):Lf(Be),Be=ec.offset(Be,(ae.V-1)*7),ae.y=Be.getFullYear(),ae.m=Be.getMonth(),ae.d=Be.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),Pe="Z"in ae?Ag(Zl(ae.y,0,1)).getUTCDay():Eg(Zl(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(Pe+5)%7:ae.w+ae.U*7-(Pe+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,Ag(ae)):Eg(ae)}}function B(re,we,_e,ae){for(var et=0,Be=we.length,Pe=_e.length,vt,Yt;et<Be;){if(ae>=Pe)return-1;if(vt=we.charCodeAt(et++),vt===37){if(vt=we.charAt(et++),Yt=_[vt in uS?we.charAt(et++):vt],!Yt||(ae=Yt(re,_e,ae))<0)return-1}else if(vt!=_e.charCodeAt(ae++))return-1}return ae}function F(re,we,_e){var ae=h.exec(we.slice(_e));return ae?(re.p=m.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function z(re,we,_e){var ae=b.exec(we.slice(_e));return ae?(re.w=j.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function Y(re,we,_e){var ae=g.exec(we.slice(_e));return ae?(re.w=v.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function U(re,we,_e){var ae=N.exec(we.slice(_e));return ae?(re.m=E.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function he(re,we,_e){var ae=k.exec(we.slice(_e));return ae?(re.m=S.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function ue(re,we,_e){return B(re,t,we,_e)}function ge(re,we,_e){return B(re,r,we,_e)}function ie(re,we,_e){return B(re,n,we,_e)}function se(re){return u[re.getDay()]}function X(re){return o[re.getDay()]}function te(re){return f[re.getMonth()]}function J(re){return c[re.getMonth()]}function I(re){return i[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function H(re){return u[re.getUTCDay()]}function ne(re){return o[re.getUTCDay()]}function Z(re){return f[re.getUTCMonth()]}function me(re){return c[re.getUTCMonth()]}function pe(re){return i[+(re.getUTCHours()>=12)]}function Oe(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var we=O(re+="",A);return we.toString=function(){return re},we},parse:function(re){var we=D(re+="",!1);return we.toString=function(){return re},we},utcFormat:function(re){var we=O(re+="",P);return we.toString=function(){return re},we},utcParse:function(re){var we=D(re+="",!0);return we.toString=function(){return re},we}}}var uS={"-":"",_:" ",0:"0"},zt=/^\s*\d+/,g7=/^%/,v7=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function y7(e){return e.replace(v7,"\\$&")}function Jl(e){return new RegExp("^(?:"+e.map(y7).join("|")+")","i")}function eu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function x7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function b7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function w7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function k7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function j7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function cS(e,t,r){var n=zt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function S7(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 N7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function E7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function fS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=zt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function C7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function P7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function O7(e,t,r){var n=zt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _7(e,t,r){var n=zt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M7(e,t,r){var n=g7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I7(e,t,r){var n=zt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function T7(e,t,r){var n=zt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function mS(e,t){return Ye(e.getDate(),t,2)}function D7(e,t){return Ye(e.getHours(),t,2)}function R7(e,t){return Ye(e.getHours()%12||12,t,2)}function L7(e,t){return Ye(1+ec.count(gi(e),e),t,3)}function aC(e,t){return Ye(e.getMilliseconds(),t,3)}function $7(e,t){return aC(e,t)+"000"}function z7(e,t){return Ye(e.getMonth()+1,t,2)}function F7(e,t){return Ye(e.getMinutes(),t,2)}function B7(e,t){return Ye(e.getSeconds(),t,2)}function U7(e){var t=e.getDay();return t===0?7:t}function H7(e,t){return Ye(Uh.count(gi(e)-1,e),t,2)}function oC(e){var t=e.getDay();return t>=4||t===0?zs(e):zs.ceil(e)}function W7(e,t){return e=oC(e),Ye(zs.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function K7(e){return e.getDay()}function G7(e,t){return Ye(Lf.count(gi(e)-1,e),t,2)}function V7(e,t){return Ye(e.getFullYear()%100,t,2)}function q7(e,t){return e=oC(e),Ye(e.getFullYear()%100,t,2)}function Q7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Y7(e,t){var r=e.getDay();return e=r>=4||r===0?zs(e):zs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function X7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function pS(e,t){return Ye(e.getUTCDate(),t,2)}function Z7(e,t){return Ye(e.getUTCHours(),t,2)}function J7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function eB(e,t){return Ye(1+Bh.count(vi(e),e),t,3)}function sC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function tB(e,t){return sC(e,t)+"000"}function rB(e,t){return Ye(e.getUTCMonth()+1,t,2)}function nB(e,t){return Ye(e.getUTCMinutes(),t,2)}function iB(e,t){return Ye(e.getUTCSeconds(),t,2)}function aB(e){var t=e.getUTCDay();return t===0?7:t}function oB(e,t){return Ye(Hh.count(vi(e)-1,e),t,2)}function lC(e){var t=e.getUTCDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function sB(e,t){return e=lC(e),Ye(Fs.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function lB(e){return e.getUTCDay()}function uB(e,t){return Ye($f.count(vi(e)-1,e),t,2)}function cB(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function dB(e,t){return e=lC(e),Ye(e.getUTCFullYear()%100,t,2)}function fB(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function hB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function mB(){return"+0000"}function gS(){return"%"}function vS(e){return+e}function yS(e){return Math.floor(+e/1e3)}var ts,uC,cC;pB({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 pB(e){return ts=p7(e),uC=ts.format,ts.parse,cC=ts.utcFormat,ts.utcParse,ts}function gB(e){return new Date(e)}function vB(e){return e instanceof Date?+e:+new Date(+e)}function N0(e,t,r,n,i,o,u,c,f,h){var m=d0(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function _(O){return(f(O)<O?b:c(O)<O?j:u(O)<O?k:o(O)<O?S:n(O)<O?i(O)<O?N:E:r(O)<O?A:P)(O)}return m.invert=function(O){return new Date(g(O))},m.domain=function(O){return arguments.length?v(Array.from(O,vB)):v().map(gB)},m.ticks=function(O){var D=v();return e(D[0],D[D.length-1],O??10)},m.tickFormat=function(O,D){return D==null?_:h(D)},m.nice=function(O){var D=v();return(!O||typeof O.range!="function")&&(O=t(D[0],D[D.length-1],O??10)),O?v(YA(D,O)):m},m.copy=function(){return Ju(m,N0(e,t,r,n,i,o,u,c,f,h))},m}function yB(){return en.apply(N0(h7,m7,gi,j0,Uh,ec,w0,x0,Ka,uC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xB(){return en.apply(N0(d7,f7,vi,S0,Hh,Bh,k0,b0,Ka,cC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Wh(){var e=0,t=1,r,n,i,o,u=fr,c=!1,f;function h(g){return g==null||isNaN(g=+g)?f:u(i===0?.5:(g=(o(g)-r)*i,c?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(c=!!g,h):c},h.interpolator=function(g){return arguments.length?(u=g,h):u};function m(g){return function(v){var b,j;return arguments.length?([b,j]=v,u=g(b,j),h):[u(0),u(1)]}}return h.range=m(Zs),h.rangeRound=m(c0),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),i=r===n?0:1/(n-r),h}}function va(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dC(){var e=ga(Wh()(fr));return e.copy=function(){return va(e,dC())},wi.apply(e,arguments)}function fC(){var e=m0(Wh()).domain([1,10]);return e.copy=function(){return va(e,fC()).base(e.base())},wi.apply(e,arguments)}function hC(){var e=p0(Wh());return e.copy=function(){return va(e,hC()).constant(e.constant())},wi.apply(e,arguments)}function E0(){var e=g0(Wh());return e.copy=function(){return va(e,E0()).exponent(e.exponent())},wi.apply(e,arguments)}function bB(){return E0.apply(null,arguments).exponent(.5)}function mC(){var e=[],t=fr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Xu(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(da),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>a9(e,o/n))},r.copy=function(){return mC(t).domain(e)},wi.apply(r,arguments)}function Kh(){var e=0,t=.5,r=1,n=1,i,o,u,c,f,h=fr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k<n*o?c:f),h(g?Math.max(0,Math.min(1,k)):k))}b.domain=function(k){return arguments.length?([e,t,r]=k,i=m(e=+e),o=m(t=+t),u=m(r=+r),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),n=o<i?-1:1,b):[e,t,r]},b.clamp=function(k){return arguments.length?(g=!!k,b):g},b.interpolator=function(k){return arguments.length?(h=k,b):h};function j(k){return function(S){var N,E,A;return arguments.length?([N,E,A]=S,h=M9(k,[N,E,A]),b):[h(0),h(.5),h(1)]}}return b.range=j(Zs),b.rangeRound=j(c0),b.unknown=function(k){return arguments.length?(v=k,b):v},function(k){return m=k,i=k(e),o=k(t),u=k(r),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),n=o<i?-1:1,b}}function pC(){var e=ga(Kh()(fr));return e.copy=function(){return va(e,pC())},wi.apply(e,arguments)}function gC(){var e=m0(Kh()).domain([.1,1,10]);return e.copy=function(){return va(e,gC()).base(e.base())},wi.apply(e,arguments)}function vC(){var e=p0(Kh());return e.copy=function(){return va(e,vC()).constant(e.constant())},wi.apply(e,arguments)}function A0(){var e=g0(Kh());return e.copy=function(){return va(e,A0()).exponent(e.exponent())},wi.apply(e,arguments)}function wB(){return A0.apply(null,arguments).exponent(.5)}const yC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:s0,scaleDiverging:pC,scaleDivergingLog:gC,scaleDivergingPow:A0,scaleDivergingSqrt:wB,scaleDivergingSymlog:vC,scaleIdentity:QA,scaleImplicit:Vv,scaleLinear:qA,scaleLog:XA,scaleOrdinal:o0,scalePoint:l9,scalePow:v0,scaleQuantile:eC,scaleQuantize:tC,scaleRadial:JA,scaleSequential:dC,scaleSequentialLog:fC,scaleSequentialPow:E0,scaleSequentialQuantile:mC,scaleSequentialSqrt:bB,scaleSequentialSymlog:hC,scaleSqrt:t7,scaleSymlog:ZA,scaleThreshold:rC,scaleTime:yB,scaleUtc:xB,tickFormat:VA},Symbol.toStringTag,{value:"Module"}));function kB(e){var t=yC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Oy(e));if(r in t&&typeof t[r]=="function")return t[r]()}function xS(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=kB(e);if(n!=null)return n.domain(t).range(r),n}}function C0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?xS(e.scale,r,n):xS(t,r,n)}function jB(e){return"scale".concat(Oy(e))}function SB(e){return jB(e)in yC}var xC=(e,t,r)=>{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return SB(n)?n:"point"}};function NB(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(i?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function bC(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}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var u,c,f=NB(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,m=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function EB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):bC(e,void 0)}function bS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bS(Object(r),!0).forEach(function(n){AB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AB(e,t,r){return(t=CB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=PB(e,"string");return typeof t=="symbol"?t:t+""}function PB(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)}function wC(e,t){return IB(e)||MB(e,t)||_B(e,t)||OB()}function OB(){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 _B(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<t;r++)n[r]=e[r];return n}function MB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function IB(e){if(Array.isArray(e))return e}var Xv=[0,"auto"],Et={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},kC=(e,t)=>e.cartesianAxis.xAxis[t],ki=(e,t)=>{var r=kC(e,t);return r??Et},At={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Xv,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:Gu},jC=(e,t)=>e.cartesianAxis.yAxis[t],ji=(e,t)=>{var r=jC(e,t);return r??At},TB={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:""},P0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TB},mr=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"zAxis":return P0(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},DB=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tc=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},SC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function NC(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 EC=e=>e.graphicalItems.cartesianItems,RB=q([Lt,Lh],NC),AC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Js=q([EC,mr,RB],AC,{memoizeOptions:{resultEqualityCheck:zh}}),CC=q([Js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(n0)),PC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),LB=q([Js],PC),OC=e=>e.map(t=>t.data).filter(Boolean).flat(1),$B=q([Js],e=>e.some(t=>!t.data)),_C=q([Js],OC,{memoizeOptions:{resultEqualityCheck:zh}}),MC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},O0=q([_C,Mh],MC),zB=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Dt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Dt(i,n)}))):e.map(n=>({value:n})),IC=(e,t,r,n,i,o)=>{var u=n.chartData,c=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,m=zB(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=c.slice(f,h+1),v=g.map(b=>({value:Dt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},rc=q([O0,mr,Js,Mh,$B,_C],IC);function gs(e){if(Bn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function kS(e){if(Array.isArray(e)){var t=[gs(e[0]),gs(e[1])];return Rn(t)?t:void 0}var r=gs(e);if(r!=null)return[r,r]}function Wn(e){return e.map(gs).filter(jr)}function FB(e,t){var r=gs(e),n=gs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var BB=q([rc],e=>e==null?void 0:e.map(t=>t.value).sort(FB));function TC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function UB(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Fn(t))n=t;else if(Array.isArray(t)){var i=Wn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Wn(r.flatMap(o=>{var u=Dt(e,o.dataKey),c,f;if(Array.isArray(u)){var h=wC(u,2);c=h[0],f=h[1]}else c=f=u;if(!(!He(c)||!He(f)))return[n-c,n+f]}))}var Pt=e=>{var t=$t(e),r=Xs(e);return tc(e,t,r)},Bs=q([Pt],e=>e==null?void 0:e.dataKey),HB=q([CC,Mh,Pt],$A),DC=(e,t,r,n)=>{var i={},o=t.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},i);return Object.fromEntries(Object.entries(o).map(u=>{var c=wC(u,2),f=c[0],h=c[1],m=n?[...h].reverse():h,g=m.map(r0);return[f,{stackedData:sz(e,g,r),graphicalItems:m}]}))},RC=q([HB,CC,Ih,_A],DC),LC=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return dz(e,i,o)},WB=q([mr],e=>e.allowDataOverflow),_0=e=>{var t;if(e==null||!("domain"in e))return Xv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(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:Xv},$C=q([mr],_0),zC=q([$C,WB],bA),KB=q([RC,bn,Lt,zC],LC,{memoizeOptions:{resultEqualityCheck:$h}}),M0=e=>e.errorBars,GB=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>TC(r,n)),Ff=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),u=Math.min(...o),c=Math.max(...o);return[u,c]}},FC=function(t,r,n,i,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:u,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>TC(o,b));g.forEach(b=>{var j,k=Dt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=UB(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(c==null||N<c)&&(c=N),(f==null||E>f)&&(f=E)}var A=kS(k);A!=null&&(c=c==null?A[0]:Math.min(c,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=kS(Dt(h,r.dataKey));m!=null&&(c=c==null?m[0]:Math.min(c,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),He(c)&&He(f))return[c,f]},VB=q([O0,mr,LB,M0,Lt,jF],FC,{memoizeOptions:{resultEqualityCheck:$h}});function qB(e){var t=e.value;if(Bn(t)||t instanceof Date)return t}var QB=(e,t,r)=>{var n=e.map(qB).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&X5(n))?xA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},BC=e=>e.referenceElements.dots,el=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),YB=q([BC,Lt,Lh],el),UC=e=>e.referenceElements.areas,XB=q([UC,Lt,Lh],el),HC=e=>e.referenceElements.lines,ZB=q([HC,Lt,Lh],el),WC=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JB=q(YB,Lt,WC),KC=(e,t)=>{if(e!=null){var r=Wn(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)]}},eU=q([XB,Lt],KC);function tU(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function rU(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var GC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?tU(n):rU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},nU=q([ZB,Lt],GC),iU=q(JB,nU,eU,(e,t,r)=>Ff(e,r,t)),VC=(e,t,r,n,i,o,u,c)=>{if(r!=null)return r;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",h=f?Ff(n,o,i):Ff(o,i);return PF(t,h,e.allowDataOverflow)},aU=q([mr,$C,zC,KB,VB,iU,ct,Lt],VC,{memoizeOptions:{resultEqualityCheck:$h}}),oU=[0,1],qC=(e,t,r,n,i,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var c=e.dataKey,f=e.type,h=Gn(t,o);if(h&&c==null){var m;return xA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?QB(n,e,h):i==="expand"&&!h?oU:u}},I0=q([mr,ct,O0,rc,Ih,Lt,aU],qC),tl=q([mr,SC,Yy],xC),QC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=_0(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Rn(e)){if(o)return _j(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Mj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Rn(e))return _j(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Rn(e))return Mj(e,t.tickCount,t.allowDecimals,"adaptive")}}},T0=q([I0,tc,tl],QC),YC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Rn(t)&&Array.isArray(r)&&r.length>0){var i,o,u=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,h)]}return t},sU=q([mr,I0,T0,Lt],YC),lU=q(rc,mr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,v)=>g-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var u=o-i;if(u===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],h=n[c+1];if(!(f==null||h==null)){var m=h-f;r=Math.min(r,m)}}return r/u}}),XC=q(lU,ct,$F,Qt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var u=pa(r,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),uU=(e,t,r)=>{var n=ki(e,t);return n==null||typeof n.padding!="string"?0:XC(e,"xAxis",t,r,n.padding)},cU=(e,t,r)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:XC(e,"yAxis",t,r,n.padding)},dU=q(ki,uU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),fU=q(ji,cU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),ZC=q([Qt,dU,Eh,Nh,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),JC=q([Qt,ct,fU,Eh,Nh,(e,t,r)=>r],(e,t,r,n,i,o)=>{var u=i.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]}),nc=(e,t,r,n)=>{var i;switch(t){case"xAxis":return ZC(e,r,n);case"yAxis":return JC(e,r,n);case"zAxis":return(i=P0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return DA(e);case"radiusAxis":return RA(e,r);default:return}},eP=q([mr,nc],Th),hU=q([tl,sU],VF),D0=q([mr,tl,hU,eP],C0),tP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,u=Gn(e,n);if(u&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},R0=q([ct,rc,tc,Lt],tP),Gh=q([D0],i0);q([D0],EB);q([D0,BB],bC);q([Js,M0,Lt],GB);function rP(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Vh=(e,t)=>t,qh=(e,t,r)=>r,mU=q(jh,Vh,qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rP)),pU=q(Sh,Vh,qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rP)),nP=(e,t)=>({width:e.width,height:t.height}),gU=(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}},vU=q(Qt,ki,nP),yU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},xU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},bU=q(bi,Qt,mU,Vh,qh,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=nP(t,c);u==null&&(u=yU(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[c.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),wU=q(xi,Qt,pU,Vh,qh,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=gU(t,c);u==null&&(u=xU(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[c.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),kU=(e,t)=>{var r=ki(e,t);if(r!=null)return bU(e,r.orientation,r.mirror)},jU=q([Qt,ki,kU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),SU=(e,t)=>{var r=ji(e,t);if(r!=null)return wU(e,r.orientation,r.mirror)},NU=q([Qt,ji,SU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),EU=q(Qt,ji,(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}}),iP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,c=Gn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(u&&c&&o==="category"&&i&&X5(h))return f}},L0=q([ct,rc,mr,Lt],iP),jS=q([ct,DB,tl,Gh,L0,R0,nc,T0,Lt],(e,t,r,n,i,o,u,c,f)=>{if(t!=null){var h=Gn(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:i,isCategorical:h,niceTicks:c,range:u,realScaleType:r,scale:n}}}),AU=(e,t,r,n,i,o,u,c,f)=>{if(!(t==null||n==null)){var h=Gn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Vr(o[0]-o[1])*2*j:j;var k=g||i;return k?k.map((S,N)=>{var E=u?u.indexOf(S):S,A=n.map(E);return He(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(jr):h&&c?c.map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.domain().map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(jr)}},aP=q([ct,tc,tl,Gh,T0,nc,L0,R0,Lt],AU),CU=(e,t,r,n,i,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Gn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Vr(n[0]-n[1])*2*h:h,c&&o?o.map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.domain().map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:i?i[m]:m,index:g,offset:h}:null}).filter(jr)}},oP=q([ct,tc,Gh,nc,L0,R0,Lt],CU),sP=q(mr,Gh,(e,t)=>{if(!(e==null||t==null))return zf(zf({},e),{},{scale:t})}),PU=q([mr,tl,I0,eP],C0),OU=q([PU],i0);q((e,t,r)=>P0(e,r),OU,(e,t)=>{if(!(e==null||t==null))return zf(zf({},e),{},{scale:t})});var _U=q([ct,jh,Sh],(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}}),MU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};q([MU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);u<n&&(n=u,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var lP=e=>e.options.defaultTooltipEventType,uP=e=>e.options.validateTooltipEventTypes;function cP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function ic(e,t){var r=lP(e),n=uP(e);return cP(t,r,n)}function IU(e){return Me(t=>ic(t,e))}var dP=(e,t)=>{var r,n=Number(t);if(!(Fn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TU=e=>e.tooltip.settings,Ji={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},DU={itemInteraction:{click:Ji,hover:Ji},axisInteraction:{click:Ji,hover:Ji},keyboardInteraction:Ji,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}},fP=sr({name:"tooltip",initialState:DU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=qr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},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}}}),tn=fP.actions,RU=tn.addTooltipEntrySettings,LU=tn.replaceTooltipEntrySettings,$U=tn.removeTooltipEntrySettings,zU=tn.setTooltipSettingsState,FU=tn.setActiveMouseOverItemIndex;tn.mouseLeaveItem;var hP=tn.mouseLeaveChart;tn.setActiveClickItemIndex;var mP=tn.setMouseOverAxisIndex,BU=tn.setMouseClickAxisIndex,lu=tn.setSyncInteraction,Bf=tn.setKeyboardInteraction,UU=fP.reducer;function SS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SS(Object(r),!0).forEach(function(n){HU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HU(e,t,r){return(t=WU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WU(e){var t=KU(e,"string");return typeof t=="symbol"?t:t+""}function KU(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)}function GU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function VU(e){return e.index!=null}var pP=(e,t,r,n)=>{if(t==null)return Ji;var i=GU(e,t,r);if(i==null)return Ji;if(i.active)return i;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(VU(i)){if(o)return Rd(Rd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Rd(Rd({},Ji),{},{coordinate:i.coordinate})};function qU(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 QU(e,t){var r=qU(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),u=Math.max(n,i);return r>=o&&r<=u}function YU(e,t,r){if(r==null||t==null)return!0;var n=Dt(e,t);return n==null||!Rn(r)?!0:QU(n,r)}var du=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!He(o))return i;var u=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(u,Math.min(o,c)),h=t[f];return h==null||YU(h,r,n)?String(f):null},gP=(e,t,r,n,i,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[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}}}},vP=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},yP=e=>e.options.tooltipPayloadSearcher,rl=e=>e.tooltip;function NS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ES(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NS(Object(r),!0).forEach(function(n){XU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XU(e,t,r){return(t=ZU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZU(e){var t=JU(e,"string");return typeof t=="symbol"?t:t+""}function JU(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)}function eH(e){if(typeof e=="string"||typeof e=="number")return e}function tH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function rH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function AS(e){if(typeof e=="string")return e}function nH(e){if(!(e==null||typeof e!="object")){var t="name"in e?eH(e.name):void 0,r="unit"in e?tH(e.unit):void 0,n="dataKey"in e?rH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?AS(e.color):void 0,u="fill"in e?AS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:u}}}function iH(e,t){return e??t}var xP=(e,t,r,n,i,o,u)=>{if(!(t==null||o==null)){var c=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=iH(k,c),E=Array.isArray(N)?WE(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?_=Z5(E,n,i):_=o(E,t,f,P),Array.isArray(_))_.forEach(D=>{var B,F,z=nH(D),Y=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,he=z==null?void 0:z.payload,ue=ES(ES({},S),{},{name:Y,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(F=z==null?void 0:z.fill)!==null&&F!==void 0?F:S==null?void 0:S.fill});v.push(wk({tooltipEntrySettings:ue,dataKey:U,payload:he,value:Dt(he,U),name:Y==null?void 0:String(Y)}))});else{var O;v.push(wk({tooltipEntrySettings:S,dataKey:A,payload:_,value:Dt(_,A),name:(O=Dt(_,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},$0=q([Pt,SC,Yy],xC),aH=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oH=q([$t,Xs],NC),jo=q([aH,Pt,oH],AC,{memoizeOptions:{resultEqualityCheck:zh}}),sH=q([jo],e=>e.filter(n0)),bP=q([jo],OC,{memoizeOptions:{resultEqualityCheck:zh}}),lH=q([jo],e=>e.some(t=>!t.data)),po=q([bP,bn],MC),uH=q([sH,bn,Pt],$A),z0=q([po,Pt,jo,bn,lH,bP],IC),wP=q([Pt],_0),cH=q([Pt],e=>e.allowDataOverflow),kP=q([wP,cH],bA),dH=q([jo],e=>e.filter(n0)),fH=q([uH,dH,Ih,_A],DC),hH=q([fH,bn,$t,kP],LC),mH=q([jo],PC),pH=q([po,Pt,mH,M0,$t,SF],FC,{memoizeOptions:{resultEqualityCheck:$h}}),gH=q([BC,$t,Xs],el),vH=q([gH,$t],WC),yH=q([UC,$t,Xs],el),xH=q([yH,$t],KC),bH=q([HC,$t,Xs],el),wH=q([bH,$t],GC),kH=q([vH,wH,xH],Ff),jH=q([Pt,wP,kP,hH,pH,kH,ct,$t],VC),Us=q([Pt,ct,po,z0,Ih,$t,jH],qC),SH=q([Us,Pt,$0],QC),NH=q([Pt,Us,SH,$t],YC),jP=e=>{var t=$t(e),r=Xs(e),n=!1;return nc(e,t,r,n)},SP=q([Pt,jP],Th),EH=q([Pt,$0,NH,SP],C0),NP=q([EH],i0),AH=q([ct,z0,Pt,$t],iP),CH=q([ct,z0,Pt,$t],tP),PH=(e,t,r,n,i,o,u,c)=>{if(t){var f=t.type,h=Gn(e,c);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Vr(i[0]-i[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(jr):n.domain().map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(jr)}}},Si=q([ct,Pt,$0,NP,jP,AH,CH,$t],PH),F0=q([lP,uP,TU],(e,t,r)=>cP(r.shared,e,t)),EP=e=>e.tooltip.settings.trigger,B0=e=>e.tooltip.settings.defaultIndex,ac=q([rl,F0,EP,B0],pP),Iu=q([ac,po,Bs,Us],du),AP=q([Si,Iu],dP),OH=q([ac],e=>{if(e)return e.dataKey}),_H=q([ac],e=>{if(e)return e.graphicalItemId}),CP=q([rl,F0,EP,B0],vP),MH=q([xi,bi,ct,Qt,Si,B0,CP],gP),IH=q([ac,MH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TH=q([ac],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),DH=q([CP,Iu,bn,Bs,AP,yP,F0],xP),RH=q([DH],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CS(Object(r),!0).forEach(function(n){LH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LH(e,t,r){return(t=$H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $H(e){var t=zH(e,"string");return typeof t=="symbol"?t:t+""}function zH(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 FH=()=>Me(Pt),BH=()=>{var e=FH(),t=Me(Si),r=Me(NP);return vf(!e||!r?void 0:PS(PS({},e),{},{scale:r}),t)};function OS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OS(Object(r),!0).forEach(function(n){UH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UH(e,t,r){return(t=HH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HH(e){var t=WH(e,"string");return typeof t=="symbol"?t:t+""}function WH(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 KH=(e,t,r,n)=>{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},GH=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,u=n.radius;return rs(rs(rs({},n),Gt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var c=i.coordinate,f=n.angle;return rs(rs(rs({},n),Gt(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function VH(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 PP=(e,t,r,n,i)=>{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"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<u;c++){var f,h,m,g,v,b=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[c])===null||m===void 0?void 0:m.coordinate,k=c>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Vr(j-b)!==Vr(k-j)){var N=[];if(Vr(k-j)===Vr(i[1]-i[0])){S=k;var E=j+i[1]-i[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+i[1]-i[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[c])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,k),D=Math.max(b,k);if(e>(O+j)/2&&e<=(D+j)/2){var B;return(B=r[c])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F<u;F++){var z=t[F];if(z!=null){var Y=t[F+1],U=t[F-1];if(F===0&&Y!=null&&e<=(z.coordinate+Y.coordinate)/2||F===u-1&&U!=null&&e>(z.coordinate+U.coordinate)/2||F>0&&F<u-1&&U!=null&&Y!=null&&e>(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+Y.coordinate)/2)return z.index}}return-1},OP=()=>Me(Yy),U0=(e,t)=>t,_P=(e,t,r)=>r,H0=(e,t,r,n)=>n,qH=q(Si,e=>fh(e,t=>t.coordinate)),W0=q([rl,U0,_P,H0],pP),K0=q([W0,po,Bs,Us],du),QH=(e,t,r)=>{if(t!=null){var n=rl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},MP=q([rl,U0,_P,H0],vP),Uf=q([xi,bi,ct,Qt,Si,H0,MP],gP),YH=q([W0,Uf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),IP=q([Si,K0],dP),XH=q([MP,K0,bn,Bs,IP,yP,U0],xP),ZH=q([W0,K0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),JH=(e,t,r,n,i,o,u)=>{if(!(!e||!r||!n||!i)&&VH(e,u)){var c=fz(e,t),f=PP(c,o,i,r,n),h=KH(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},eW=(e,t,r,n,i,o,u)=>{if(!(!e||!n||!i||!o||!r)){var c=pF(e,r);if(c){var f=hz(c,t),h=PP(f,u,o,n,i),m=GH(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},tW=(e,t,r,n,i,o,u,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?JH(e,t,n,i,o,u,c):eW(e,t,r,n,i,o,u)},rW=q(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}}),nW=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(dr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:GF}});function _S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_S(Object(r),!0).forEach(function(n){iW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iW(e,t,r){return(t=aW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(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 sW={},lW={zIndexMap:Object.values(dr).reduce((e,t)=>MS(MS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),sW)},uW=new Set(Object.values(dr));function cW(e){return uW.has(e)}var TP=sr({name:"zIndex",initialState:lW,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:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cW(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:ot()},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:ot()}}}),Qh=TP.actions,dW=Qh.registerZIndexPortal,Cg=Qh.unregisterZIndexPortal,fW=Qh.registerZIndexPortalElement,hW=Qh.unregisterZIndexPortalElement,mW=TP.reducer;function Ni(e){var t=e.zIndex,r=e.children,n=Xz(),i=n&&t!==void 0&&t!==0,o=Nr(),u=y.useRef(void 0),c=y.useRef(new Set),f=jt(),h=Me(g=>rW(g,t,o));if(y.useLayoutEffect(()=>{if(!i){var g=c.current;g.forEach(b=>{f(Cg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(c.current.has(t)||(f(dW({zIndex:t})),c.current.add(t)),h){u.current=h;var v=c.current;v.forEach(b=>{b!==t&&(f(Cg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),y.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(v=>{f(Cg({zIndex:v}))}),g.clear()}},[f]),!i)return r;var m=h??u.current;return m?nh.createPortal(r,m):null}function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zv.apply(null,arguments)}function IS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ld(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IS(Object(r),!0).forEach(function(n){pW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=vW(e,"string");return typeof t=="symbol"?t:t+""}function vW(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)}function yW(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return y.isValidElement(t)?y.cloneElement(t,n):y.createElement(r,n)}function xW(e){var t,r=e.coordinate,n=e.payload,i=e.index,o=e.offset,u=e.tooltipAxisBandSize,c=e.layout,f=e.cursor,h=e.tooltipEventType,m=e.chartName,g=r,v=n,b=i;if(!f||!g||m!=="ScatterChart"&&h!=="axis")return null;var j,k,S;if(m==="ScatterChart")j=g,k=j8,S=dr.cursorLine;else if(m==="BarChart")j=S8(c,g,o,u),k=aF,S=dr.cursorRectangle;else if(c==="radial"&&J5(g)){var N=vA(g),E=N.cx,A=N.cy,P=N.radius,_=N.startAngle,O=N.endAngle;j={cx:E,cy:A,startAngle:_,endAngle:O,innerRadius:P,outerRadius:P},k=xF,S=dr.cursorLine}else j={points:bF(c,g,o)},k=qd,S=dr.cursorLine;var D=typeof f=="object"&&"className"in f?f.className:void 0,B=Ld(Ld(Ld(Ld({stroke:"#ccc",pointerEvents:"none"},o),j),uh(f)),{},{payload:v,payloadIndex:b,className:rt("recharts-tooltip-cursor",D)});return y.createElement(Ni,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(yW,{cursor:f,cursorComp:k,cursorProps:B}))}function bW(e){var t=BH(),r=JE(),n=qs(),i=OP();return t==null||r==null||n==null||i==null?null:y.createElement(xW,Zv({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var DP=y.createContext(null),wW=()=>y.useContext(DP),Pg={exports:{}},TS;function kW(){return TS||(TS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,g||f,v),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 c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v<b;v++)j[v]=g[v].fn;return j},c.prototype.listenerCount=function(h){var m=r?r+h:h,g=this._events[m];return g?g.fn?1:g.length:0},c.prototype.emit=function(h,m,g,v,b,j){var k=r?r+h:h;if(!this._events[k])return!1;var S=this._events[k],N=arguments.length,E,A;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,g),!0;case 4:return S.fn.call(S.context,m,g,v),!0;case 5:return S.fn.call(S.context,m,g,v,b),!0;case 6:return S.fn.call(S.context,m,g,v,b,j),!0}for(A=1,E=new Array(N-1);A<N;A++)E[A-1]=arguments[A];S.fn.apply(S.context,E)}else{var P=S.length,_;for(A=0;A<P;A++)switch(S[A].once&&this.removeListener(h,S[A].fn,void 0,!0),N){case 1:S[A].fn.call(S[A].context);break;case 2:S[A].fn.call(S[A].context,m);break;case 3:S[A].fn.call(S[A].context,m,g);break;case 4:S[A].fn.call(S[A].context,m,g,v);break;default:if(!E)for(_=1,E=new Array(N-1);_<N;_++)E[_-1]=arguments[_];S[A].fn.apply(S[A].context,E)}}return!0},c.prototype.on=function(h,m,g){return o(this,h,m,g,!1)},c.prototype.once=function(h,m,g){return o(this,h,m,g,!0)},c.prototype.removeListener=function(h,m,g,v){var b=r?r+h:h;if(!this._events[b])return this;if(!m)return u(this,b),this;var j=this._events[b];if(j.fn)j.fn===m&&(!v||j.once)&&(!g||j.context===g)&&u(this,b);else{for(var k=0,S=[],N=j.length;k<N;k++)(j[k].fn!==m||v&&!j[k].once||g&&j[k].context!==g)&&S.push(j[k]);S.length?this._events[b]=S.length===1?S[0]:S:u(this,b)}return this},c.prototype.removeAllListeners=function(h){var m;return h?(m=r?r+h:h,this._events[m]&&u(this,m)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(Pg)),Pg.exports}var jW=kW();const SW=cy(jW);var Tu=new SW,Jv="recharts.syncEvent.tooltip",DS="recharts.syncEvent.brush",NW=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fn(r))return e[r]}},EW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},RP=sr({name:"options",initialState:EW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),AW=RP.reducer,CW=RP.actions.createEventEmitter;function PW(e){return e.tooltip.syncInteraction}var OW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},LP=sr({name:"chartData",initialState:OW,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,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),G0=LP.actions,RS=G0.setChartData,_W=G0.setDataStartEndIndexes;G0.setComputedData;var MW=LP.reducer,IW=["x","y"];function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(r),!0).forEach(function(n){TW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TW(e,t,r){return(t=DW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DW(e){var t=RW(e,"string");return typeof t=="symbol"?t:t+""}function RW(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)}function LW(e,t){if(e==null)return{};var r,n,i=$W(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $W(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function zW(){var e=Me(Xy),t=Me(Zy),r=jt(),n=Me(MA),i=Me(Si),o=qs(),u=Ah(),c=Me(f=>f.rootProps.className);y.useEffect(()=>{if(e==null)return Vs;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.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 v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=LW(b,IW),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,_=N.height,O=ns(ns({},S),{},{x:u.x+(P?(j-E)/P:0)*u.width,y:u.y+(_?(k-A)/_:0)*u.height});r(ns(ns({},m),{},{payload:ns(ns({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var D;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},F=n(i,B);D=i[F]}else n==="value"&&(D=i.find(se=>String(se.value)===m.payload.label));var z=m.payload.coordinate;if(z==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(D==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=z.x,U=z.y,he=Math.min(Y,u.x+u.width),ue=Math.min(U,u.y+u.height),ge={x:o==="horizontal"?D.coordinate:he,y:o==="horizontal"?ue:D.coordinate},ie=lu({active:m.payload.active,coordinate:ge,dataKey:m.payload.dataKey,index:String(D.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(ie)}}};return Tu.on(Jv,f),()=>{Tu.off(Jv,f)}},[c,r,t,e,n,i,o,u])}function FW(){var e=Me(Xy),t=Me(Zy),r=jt();y.useEffect(()=>{if(e==null)return Vs;var n=(i,o,u)=>{t!==u&&e===i&&r(_W(o))};return Tu.on(DS,n),()=>{Tu.off(DS,n)}},[r,t,e])}function BW(){var e=jt();y.useEffect(()=>{e(CW())},[e]),zW(),FW()}function UW(e,t,r,n,i,o){var u=Me(j=>QH(j,e,t)),c=Me(_H),f=Me(Zy),h=Me(Xy),m=Me(MA),g=Me(PW),v=(g==null?void 0:g.sourceViewBox)!=null,b=Ah();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=lu({active:o,coordinate:r,dataKey:u,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:c});Tu.emit(Jv,h,j,f)}},[v,r,u,c,i,n,f,h,m,o,b])}function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$S(Object(r),!0).forEach(function(n){HW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HW(e,t,r){return(t=WW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WW(e){var t=KW(e,"string");return typeof t=="symbol"?t:t+""}function KW(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)}function GW(e,t){return YW(e)||QW(e,t)||qW(e,t)||VW()}function VW(){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 FS(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)?FS(e,t):void 0}}function FS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function QW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function YW(e){if(Array.isArray(e))return e}function XW(e){return e.dataKey}function ZW(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(U6,t)}var BS=[],JW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function eK(e){var t,r,n=Jr(e,JW),i=n.active,o=n.allowEscapeViewBox,u=n.animationDuration,c=n.animationEasing,f=n.content,h=n.filterNull,m=n.isAnimationActive,g=n.offset,v=n.payloadUniqBy,b=n.position,j=n.reverseDirection,k=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,A=n.trigger,P=n.defaultIndex,_=n.portal,O=n.axisId,D=jt(),B=typeof P=="number"?String(P):P;y.useEffect(()=>{D(zU({shared:E,trigger:A,axisId:O,active:i,defaultIndex:B}))},[D,E,A,O,i,B]);var F=Ah(),z=dA(),Y=IU(E),U=(t=Me(_e=>ZH(_e,Y,A,B)))!==null&&t!==void 0?t:{},he=U.activeIndex,ue=U.isActive,ge=Me(_e=>XH(_e,Y,A,B)),ie=Me(_e=>IP(_e,Y,A,B)),se=Me(_e=>YH(_e,Y,A,B)),X=ge,te=wW(),J=(r=i??ue)!==null&&r!==void 0?r:!1,I=ZL([X,J]),M=GW(I,2),H=M[0],ne=M[1],Z=Y==="axis"?ie:void 0;UW(Y,A,se,Z,he,J);var me=_??te;if(me==null||F==null||Y==null)return null;var pe=X??BS;J||(pe=BS),h&&pe.length&&(pe=wL(pe.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),v,XW));var Oe=pe.length>0,re=zS(zS({},n),{},{payload:pe,label:Z,active:J,activeIndex:he,coordinate:se,accessibilityLayer:z}),we=y.createElement(u8,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:m,active:J,coordinate:se,hasPayload:Oe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:F,wrapperStyle:S,lastBoundingBox:H,innerRef:ne,hasPortalFromProps:!!_},ZW(f,re));return y.createElement(y.Fragment,null,nh.createPortal(we,me),J&&y.createElement(bW,{cursor:N,tooltipEventType:Y,coordinate:se,payload:pe,index:he}))}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(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 iK{constructor(t){tK(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 US(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?US(Object(r),!0).forEach(function(n){oK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):US(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oK(e,t,r){return(t=sK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sK(e){var t=lK(e,"string");return typeof t=="symbol"?t:t+""}function lK(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 uK={cacheSize:2e3,enableCache:!0},$P=aK({},uK),HS=new iK($P.cacheSize),cK={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},WS="recharts_measurement_span";function dK(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",u=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(u,"|").concat(c)}var KS=(e,t)=>{try{var r=document.getElementById(WS);r||(r=document.createElement("span"),r.setAttribute("id",WS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,cK,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||Yu.isSsr)return{width:0,height:0};if(!$P.enableCache)return KS(t,r);var n=dK(t,r),i=HS.get(n);if(i)return i;var o=KS(t,r);return HS.set(n,o),o},zP;function Hf(e,t){return pK(e)||mK(e,t)||hK(e,t)||fK()}function fK(){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 hK(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<t;r++)n[r]=e[r];return n}function mK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function pK(e){if(Array.isArray(e))return e}function gK(e,t,r){return(t=vK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vK(e){var t=yK(e,"string");return typeof t=="symbol"?t:t+""}function yK(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 VS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xK=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,bK=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},kK=["cm","mm","pt","pc","in","Q","px"];function jK(e){return kK.includes(e)}var ds="NaN";function SK(e,t){return e*wK[t]}class Wt{static parse(t){var r,n=(r=bK.exec(t))!==null&&r!==void 0?r:[],i=Hf(n,3),o=i[1],u=i[2];return o==null?Wt.NaN:new Wt(parseFloat(o),u??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fn(t)&&(this.unit=""),r!==""&&!xK.test(r)&&(this.num=NaN,this.unit=""),jK(r)&&(this.num=SK(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Wt(NaN,""):new Wt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Wt(NaN,""):new Wt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Wt(NaN,""):new Wt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Wt(NaN,""):new Wt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fn(this.num)}}zP=Wt;gK(Wt,"NaN",new zP(NaN,""));function FP(e){if(e==null||e.includes(ds))return ds;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=VS.exec(t))!==null&&r!==void 0?r:[],i=Hf(n,4),o=i[1],u=i[2],c=i[3],f=Wt.parse(o??""),h=Wt.parse(c??""),m=u==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return ds;t=t.replace(VS,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,v=(g=qS.exec(t))!==null&&g!==void 0?g:[],b=Hf(v,4),j=b[1],k=b[2],S=b[3],N=Wt.parse(j??""),E=Wt.parse(S??""),A=k==="+"?N.add(E):N.subtract(E);if(A.isNaN())return ds;t=t.replace(qS,A.toString())}return t}var QS=/\(([^()]*)\)/;function NK(e){for(var t=e,r;(r=QS.exec(t))!=null;){var n=r,i=Hf(n,2),o=i[1];t=t.replace(QS,FP(o))}return t}function EK(e){var t=e.replace(/\s+/g,"");return t=NK(t),t=FP(t),t}function AK(e){try{return EK(e)}catch{return ds}}function Og(e){var t=AK(e.slice(5,-1));return t===ds?"":t}var CK=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],PK=["dx","dy","angle","className","breakAll"];function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ey.apply(null,arguments)}function YS(e,t){if(e==null)return{};var r,n,i=OK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function XS(e,t){return TK(e)||IK(e,t)||MK(e,t)||_K()}function _K(){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 MK(e,t){if(e){if(typeof e=="string")return ZS(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)?ZS(e,t):void 0}}function ZS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function IK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function TK(e){if(Array.isArray(e))return e}var BP=/[ \f\n\r\t\v\u2028\u2029]+/,UP=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Vt(t)||(r?i=t.toString().split(""):i=t.toString().split(BP));var o=i.map(c=>({word:c,width:fu(c,n).width})),u=r?0:fu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function HP(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function DK(e){return Vt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var WP=(e,t,r,n)=>e.reduce((i,o)=>{var u=o.word,c=o.width,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(u),f.width+=c+r;else{var h={words:[u],width:c};i.push(h)}return i},[]),KP=e=>e.reduce((t,r)=>t.width>r.width?t:r),RK="…",JS=(e,t,r,n,i,o,u,c)=>{var f=e.slice(0,t),h=UP({breakAll:r,style:n,children:f+RK});if(!h)return[!1,[]];var m=WP(h.wordsWithComputedWidth,o,u,c),g=m.length>i||KP(m).width>Number(o);return[g,m]},LK=(e,t,r,n,i)=>{var o=e.maxLines,u=e.children,c=e.style,f=e.breakAll,h=Ee(o),m=String(u),g=WP(t,n,r,i);if(!h||i)return g;var v=g.length>o||KP(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=JS(m,E,f,c,o,n,r,i),P=XS(A,2),_=P[0],O=P[1],D=JS(m,N,f,c,o,n,r,i),B=XS(D,1),F=B[0];if(!_&&!F&&(b=N+1),_&&F&&(j=N-1),!_&&F){S=O;break}k++}return S||g},e2=e=>{var t=Vt(e)?[]:e.toString().split(BP);return[{words:t,width:void 0}]},$K=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!Yu.isSsr){var c,f,h=UP({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;c=m,f=g}else return e2(n);return LK({breakAll:o,children:n,maxLines:u,style:i},c,f,t,!!r)}return e2(n)},GP="#808080",zK={angle:0,breakAll:!1,capHeight:"0.71em",fill:GP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},V0=y.forwardRef((e,t)=>{var r=Jr(e,zK),n=r.x,i=r.y,o=r.lineHeight,u=r.capHeight,c=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=YS(r,CK),v=y.useMemo(()=>$K({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,E=YS(g,PK);if(!Bn(n)||!Bn(i)||v.length===0)return null;var A=Number(n)+(Ee(b)?b:0),P=Number(i)+(Ee(j)?j:0);if(!He(A)||!He(P))return null;var _;switch(m){case"start":_=Og("calc(".concat(u,")"));break;case"middle":_=Og("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Og("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],D=v[0];if(f&&D!=null){var B=D.width,F=g.width;O.push("scale(".concat(Ee(F)&&Ee(B)?F/B:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",ey({},Yr(E),{ref:t,x:A,y:P,className:rt("recharts-text",S),textAnchor:h,fill:c.includes("url")?GP:c}),v.map((z,Y)=>{var U=z.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Y===0?_:o,key:"".concat(U,"-").concat(Y)},U)}))});V0.displayName="Text";function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){FK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FK(e,t,r){return(t=BK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BK(e){var t=UK(e,"string");return typeof t=="symbol"?t:t+""}function UK(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 HK=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,u=By(t),c=u.x,f=u.y,h=u.height,m=u.upperWidth,g=u.lowerWidth,v=c,b=c+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*i,A=N>0?"end":"start",P=N>0?"start":"end",_=m>=0?1:-1,O=_*i,D=_>0?"end":"start",B=_>0?"start":"end",F=o;if(r==="top"){var z={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return F&&(z.height=Math.max(f-F.y,0),z.width=m),z}if(r==="bottom"){var Y={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return F&&(Y.height=Math.max(F.y+F.height-(f+h),0),Y.width=g),Y}if(r==="left"){var U={x:j-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=h),U}if(r==="right"){var he={x:j+k+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(he.width=Math.max(F.x+F.width-he.x,0),he.height=h),he}var ue=F?{width:k,height:h}:{};return r==="insideLeft"?Pn({x:j+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?Pn({x:j+k-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"},ue):r==="insideTop"?Pn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?Pn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?Pn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:P},ue):r==="insideTopRight"?Pn({x:v+m-O,y:f+E,horizontalAnchor:D,verticalAnchor:P},ue):r==="insideBottomLeft"?Pn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideBottomRight"?Pn({x:b+g-O,y:f+h-E,horizontalAnchor:D,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ee(r.x)||uo(r.x))&&(Ee(r.y)||uo(r.y))?Pn({x:c+pa(r.x,k),y:f+pa(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Pn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},WK=["labelRef"],KK=["content"];function r2(e,t){if(e==null)return{};var r,n,i=GK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){VK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VK(e,t,r){return(t=qK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qK(e){var t=QK(e,"string");return typeof t=="symbol"?t:t+""}function QK(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)}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}var VP=y.createContext(null),YK=e=>{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,u=e.height,c=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:u}),[t,r,n,i,o,u]);return y.createElement(VP.Provider,{value:f},c)},qP=()=>{var e=y.useContext(VP),t=Ah();return e||(t?By(t):void 0)},XK=y.createContext(null),ZK=()=>{var e=y.useContext(XK),t=Me(LA);return e||t},JK=e=>{var t=e.value,r=e.formatter,n=Vt(e.children)?t:e.children;return typeof r=="function"?r(n):n},q0=e=>e!=null&&typeof e=="function",eG=(e,t)=>{var r=Vr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},tG=(e,t,r,n,i)=>{var o=e.offset,u=e.className,c=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.startAngle,v=i.endAngle,b=i.clockWise,j=(h+m)/2,k=eG(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=Gt(c,f,j,N),P=Gt(c,f,j,N+(E?1:-1)*359),_="M".concat(A.x,",").concat(A.y,`
A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`,
`).concat(P.x,",").concat(P.y),O=Vt(e.id)?bu("recharts-radial-line-"):e.id;return y.createElement("text",si({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:O,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},rG=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,u=e.outerRadius,c=e.startAngle,f=e.endAngle,h=(c+f)/2;if(r==="outside"){var m=Gt(n,i,u+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=Gt(n,i,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Qd=e=>e!=null&&"cx"in e&&Ee(e.cx),nG={angle:0,offset:5,zIndex:dr.label,position:"middle",textBreakAll:!1};function iG(e){if(!Qd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Zi(e){var t=Jr(e,nG),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,u=t.children,c=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=ZK(),b=qP(),j=i==="center"?b:v??b,k,S,N;r==null?k=j:Qd(r)?k=r:k=By(r);var E=iG(k);if(!k||Vt(o)&&Vt(u)&&!y.isValidElement(c)&&typeof c!="function")return null;var A=uu(uu({},t),{},{viewBox:k});if(y.isValidElement(c)){A.labelRef;var P=r2(A,WK);return y.cloneElement(c,P)}if(typeof c=="function"){A.content;var _=r2(A,KK);if(S=y.createElement(c,_),y.isValidElement(S))return S}else S=JK(t);var O=Yr(t);if(Qd(k)){if(i==="insideStart"||i==="insideEnd"||i==="end")return tG(t,i,S,O,k);N=rG(k,t.offset,t.position)}else{if(!E)return null;var D=HK({viewBox:E,position:i,offset:t.offset,parentViewBox:Qd(n)?void 0:n});N=uu(uu({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return y.createElement(Ni,{zIndex:t.zIndex},y.createElement(V0,si({ref:g,className:rt("recharts-label",h)},O,N,{textAnchor:HP(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}Zi.displayName="Label";var aG=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(Zi,si({key:"label-implicit"},n)):Bn(e)?y.createElement(Zi,si({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===Zi?y.cloneElement(e,uu({key:"label-implicit"},n)):y.createElement(Zi,si({key:"label-implicit",content:e},n)):q0(e)?y.createElement(Zi,si({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(Zi,si({},e,{key:"label-implicit"},n)):null};function oG(e){var t=e.label,r=e.labelRef,n=qP();return aG(t,n,r)||null}var sG=["valueAccessor"],lG=["dataKey","clockWise","id","textBreakAll","zIndex"];function Wf(){return Wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wf.apply(null,arguments)}function i2(e,t){if(e==null)return{};var r,n,i=uG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cG=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(DK(t))return t},QP=y.createContext(void 0),dG=QP.Provider,YP=y.createContext(void 0);YP.Provider;function fG(){return y.useContext(QP)}function hG(){return y.useContext(YP)}function Yd(e){var t=e.valueAccessor,r=t===void 0?cG:t,n=i2(e,sG),i=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,c=n.zIndex,f=i2(n,lG),h=fG(),m=hG(),g=h||m;return!g||!g.length?null:y.createElement(Ni,{zIndex:c??dr.label},y.createElement(Xr,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Vt(i)?r(v,b):Dt(v.payload,i),S=Vt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(Zi,Wf({key:"label-".concat(b)},Yr(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:u,viewBox:v.viewBox,index:b,zIndex:0}))})))}Yd.displayName="LabelList";function mG(e){var t=e.label;return t?t===!0?y.createElement(Yd,{key:"labelList-implicit"}):y.isValidElement(t)||q0(t)?y.createElement(Yd,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(Yd,Wf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ty.apply(null,arguments)}var XP=e=>{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=rt("recharts-dot",i);return Ee(t)&&Ee(r)&&Ee(n)?y.createElement("circle",ty({},vn(e),_y(e),{className:o,cx:t,cy:r,r:n})):null},pG={radiusAxis:{},angleAxis:{}},ZP=sr({name:"polarAxis",initialState:pG,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]}}}),Yh=ZP.actions;Yh.addRadiusAxis;Yh.removeRadiusAxis;Yh.addAngleAxis;Yh.removeAngleAxis;var gG=ZP.reducer;function vG(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var JP=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(n){yG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yG(e,t,r){return(t=xG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xG(e){var t=bG(e,"string");return typeof t=="symbol"?t:t+""}function bG(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)}function eO(e,t){return o2(o2({},t),e)}function wG(e){return y.isValidElement(e)?e.props:e}function kG(e,t){return y.cloneElement(e,eO(wG(e),t))}function jG(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function SG(e){return"isActive"in e&&e.isActive===!0}function NG(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,u=e.inActiveClassName,c=u===void 0?"recharts-shape":u,f=jG(n),h;return y.isValidElement(t)?h=kG(t,n):t===r?h=y.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=y.createElement(r,eO(t,n)):h=y.createElement(r,n),SG(n)?y.createElement(Xr,{className:o},h):y.createElement(Xr,{className:c},h)}function EG(e){var t=e.tooltipEntrySettings,r=jt(),n=Nr(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(RU(t)):i.current!==t&&r(LU({prev:i.current,next:t})),i.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{i.current&&(r($U(i.current)),i.current=null)},[r]),null}function AG(e){var t=e.legendPayload,r=jt(),n=Nr(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(c6(t)):i.current!==t&&r(d6({prev:i.current,next:t})),i.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{i.current&&(r(f6(i.current)),i.current=null)},[r]),null}function CG(e,t){return MG(e)||_G(e,t)||OG(e,t)||PG()}function PG(){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 OG(e,t){if(e){if(typeof e=="string")return s2(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)?s2(e,t):void 0}}function s2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _G(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function MG(e){if(Array.isArray(e))return e}var Q0="index",IG="append";function Y0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;o<t.length;o++){var u=e[o],c=t[o];u!=null?n.push({status:"matched",prev:u,next:c}):n.push({status:"added",next:c})}return n}function TG(e,t){var r=e.length/t.length,n=t.map((i,o)=>e[Math.floor(o*r)]);return Y0(n,t)}function DG(e,t){var r=t.map((n,i)=>e[i]);return Y0(r,t)}function RG(e,t){for(var r=new Map,n=0;n<e.length;n++){var i=e[n];if(i!=null){var o=t(i,n);o!=null&&!r.has(o)&&r.set(o,i)}}return r}function LG(e,t,r){var n=RG(e,r),i=new Set,o=t.map((g,v)=>{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return i.add(b),j}}),u=[];for(var c of n){var f=CG(c,2),h=f[0],m=f[1];i.has(h)||u.push(m)}return Y0(o,t,u)}function ry(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===Q0?TG(e,t):r===IG?DG(e,t):LG(e,t,r)}function tO(e,t){var r=y.useRef(e),n=y.useRef(t.current),i=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=y.useCallback(function(u,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(c===0){i.current=!0;return}c===1&&(n.current=u),c>0&&i.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function $G(e,t){return UG(e)||BG(e,t)||FG(e,t)||zG()}function zG(){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 FG(e,t){if(e){if(typeof e=="string")return l2(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)?l2(e,t):void 0}}function l2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function BG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function UG(e){if(Array.isArray(e))return e}function HG(e,t){var r=y.useState(!1),n=$G(r,2),i=n[0],o=n[1],u=y.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),c=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:u,handleAnimationEnd:c}}function WG(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,u=e.isAnimationActive,c=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=gA(r,n),E=tO(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=ry(A,i,b??Q0);return y.createElement(pA,{animationId:N,begin:c,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},_=>{var O=A==null,D=i==null?i:v(P,_,S),B=j?j(_):_>0;return E.syncStepValue(D,_,B),D==null?null:k(D,_,O)})}var _g;function KG(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 u2(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)?u2(e,t):void 0}}function u2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function QG(e){if(Array.isArray(e))return e}var YG=()=>{var e=y.useState(()=>bu("uid-")),t=KG(e,1),r=t[0];return r},rO=(_g=Zf.useId)!==null&&_g!==void 0?_g:YG;function XG(e,t){var r=rO();return t||(e?"".concat(e,"-").concat(r):r)}var ZG=y.createContext(void 0),JG=e=>{var t=e.id,r=e.type,n=e.children,i=XG("recharts-".concat(r),t);return y.createElement(ZG.Provider,{value:i},n(i))},eV={cartesianItems:[],polarItems:[]},nO=sr({name:"graphicalItems",initialState:eV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=qr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=qr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:ot()}}}),nl=nO.actions,tV=nl.addCartesianGraphicalItem,rV=nl.replaceCartesianGraphicalItem,nV=nl.removeCartesianGraphicalItem;nl.addPolarGraphicalItem;nl.removePolarGraphicalItem;nl.replacePolarGraphicalItem;var iV=nO.reducer,aV=e=>{var t=jt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(tV(e)):r.current!==e&&t(rV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(nV(r.current)),r.current=null)},[t]),null},oV=y.memo(aV),sV=["points"];function c2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=uV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uV(e){var t=cV(e,"string");return typeof t=="symbol"?t:t+""}function cV(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)}function Kf(){return Kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kf.apply(null,arguments)}function dV(e,t){if(e==null)return{};var r,n,i=fV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hV(e){var t=e.option,r=e.dotProps,n=e.className;if(y.isValidElement(t))return y.cloneElement(t,r);if(typeof t=="function")return t(r);var i=rt(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var u=dV(o,sV);return y.createElement(XP,Kf({},u,{className:i}))}function mV(e,t){return e==null?!1:t?!0:e.length===1}function pV(e){var t=e.points,r=e.dot,n=e.className,i=e.dotClassName,o=e.dataKey,u=e.baseProps,c=e.needClip,f=e.clipPathId,h=e.zIndex,m=h===void 0?dr.scatter:h;if(!mV(t,r))return null;var g=JP(r),v=YD(r),b=t.map((k,S)=>{var N,E,A=Mg(Mg(Mg({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(hV,{key:"dot-".concat(S),option:r,dotProps:A,className:i})}),j={};return c&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Ni,{zIndex:m},y.createElement(Xr,Kf({className:n},j),b))}function d2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function f2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(r),!0).forEach(function(n){gV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gV(e,t,r){return(t=vV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vV(e){var t=yV(e,"string");return typeof t=="symbol"?t:t+""}function yV(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 iO=0,xV={xAxis:{},yAxis:{},zAxis:{}},aO=sr({name:"cartesianAxis",initialState:xV,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ot()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.xAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.xAxis[n.id],e.xAxis[i.id]=i)},prepare:ot()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ot()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ot()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.yAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.yAxis[n.id],e.yAxis[i.id]=i)},prepare:ot()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ot()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ot()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.zAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.zAxis[n.id],e.zAxis[i.id]=i)},prepare:ot()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ot()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,i=r.width,o=e.yAxis[n];if(o){var u,c=o.widthHistory||[];if(c.length===3&&c[0]===c[2]&&i===c[1]&&i!==o.width&&Math.abs(i-((u=c[0])!==null&&u!==void 0?u:0))<=1)return;var f=[...c,i].slice(-3);e.yAxis[n]=f2(f2({},o),{},{width:i,widthHistory:f})}}}}),Vn=aO.actions,bV=Vn.addXAxis,wV=Vn.replaceXAxis,kV=Vn.removeXAxis,jV=Vn.addYAxis,SV=Vn.replaceYAxis,NV=Vn.removeYAxis;Vn.addZAxis;Vn.replaceZAxis;Vn.removeZAxis;var EV=Vn.updateYAxisWidth,AV=aO.reducer,CV=q([Qt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PV=q([CV,xi,bi],(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)}}),X0=()=>Me(PV),OV=()=>Me(RH);function h2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ig(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h2(Object(r),!0).forEach(function(n){_V(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _V(e,t,r){return(t=MV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MV(e){var t=IV(e,"string");return typeof t=="symbol"?t:t+""}function IV(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 TV=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,u=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var c={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=Ig(Ig(Ig({},c),uh(i)),_y(i)),h;return y.isValidElement(i)?h=y.cloneElement(i,f):typeof i=="function"?h=i(f):h=y.createElement(XP,f),y.createElement(Xr,{className:"recharts-active-dot",clipPath:u},h)};function m2(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,u=e.zIndex,c=u===void 0?dr.activeDot:u,f=Me(Iu),h=OV();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return Vt(m)?null:y.createElement(Ni,{zIndex:c},y.createElement(TV,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var DV=e=>{var t=e.chartData,r=jt(),n=Nr();return y.useEffect(()=>n?()=>{}:(r(RS(t)),()=>{r(RS(void 0))}),[t,r,n]),null},p2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},oO=sr({name:"brush",initialState:p2,reducers:{setBrushSettings(e,t){return t.payload==null?p2:t.payload}}});oO.actions.setBrushSettings;var RV=oO.reducer;function LV(e){return(e%180+180)%180}var $V=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=LV(i),u=o*Math.PI/180,c=Math.atan(n/r),f=u>c&&u<Math.PI-c?n/Math.sin(u):r/Math.cos(u);return Math.abs(f)},zV={dots:[],areas:[],lines:[]},sO=sr({name:"referenceElements",initialState:zV,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=qr(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=qr(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=qr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),il=sO.actions;il.addDot;il.removeDot;il.addArea;il.removeArea;il.addLine;il.removeLine;var FV=sO.reducer;function BV(e,t){return KV(e)||WV(e,t)||HV(e,t)||UV()}function UV(){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 HV(e,t){if(e){if(typeof e=="string")return g2(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)?g2(e,t):void 0}}function g2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function WV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function KV(e){if(Array.isArray(e))return e}var GV=y.createContext(void 0),VV=e=>{var t=e.children,r=y.useState("".concat(bu("recharts"),"-clip")),n=BV(r,1),i=n[0],o=X0();if(o==null)return null;var u=o.x,c=o.y,f=o.width,h=o.height;return y.createElement(GV.Provider,{value:i},y.createElement("defs",null,y.createElement("clipPath",{id:i},y.createElement("rect",{x:u,y:c,height:h,width:f}))),t)};function lO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function qV(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return $V(n,r)}function QV(e,t,r){var n=r==="width",i=e.x,o=e.y,u=e.width,c=e.height;return t===1?{start:n?i:o,end:n?i+u:o+c}:{start:n?i+u:o+c,end:n?i:o}}function Du(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function YV(e,t){return lO(e,t+1)}function XV(e,t,r,n,i){for(var o=(n||[]).slice(),u=t.start,c=t.end,f=0,h=1,m=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:lO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||Du(e,E,N,m,c);A||(f=0,m=u,h+=1),A&&(m=E+e*(N()/2+i),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function ZV(e,t,r,n,i){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var c=t.start,f=t.end,h=1;h<=u;h++){for(var m=(u-1)%h,g=c,v=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,O,D=()=>(O===void 0&&(O=r(P,_)),O),B=P.coordinate,F=k===m||Du(e,B,D,g,f);if(!F)return v=!1,1;F&&(g=B+e*(D()/2+i))},j,k=m;k<u&&(j=b(),!(j!==0&&j===1));k+=h);if(v){for(var S=[],N=m;N<u;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function v2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v2(Object(r),!0).forEach(function(n){JV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JV(e,t,r){return(t=eq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eq(e){var t=tq(e,"string");return typeof t=="symbol"?t:t+""}function tq(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)}function rq(e,t,r,n,i){for(var o=(n||[]).slice(),u=o.length,c=t.start,f=t.end,h=function(v){var b=o[v];if(b==null)return 1;var j=b,k,S=()=>(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=nr(nr({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=nr(nr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Du(e,j.tickCoord,S,c,f);E&&(f=j.tickCoord-e*(S()/2+i),o[v]=nr(nr({},j),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function nq(e,t,r,n,i,o){var u=(n||[]).slice(),c=u.length,f=t.start,h=t.end;if(o){var m=n[c-1];if(m!=null){var g=r(m,c-1),v=e*(m.coordinate+e*g/2-h);if(u[c-1]=m=nr(nr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Du(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+i),u[c-1]=nr(nr({},m),{},{isShow:!0}))}}}for(var j=o?c-1:c,k=function(E){var A=u[E];if(A==null)return 1;var P=A,_,O=()=>(_===void 0&&(_=r(A,E)),_);if(E===0){var D=e*(P.coordinate-e*O()/2-f);u[E]=P=nr(nr({},P),{},{tickCoord:D<0?P.coordinate-D*e:P.coordinate})}else u[E]=P=nr(nr({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=Du(e,P.tickCoord,O,f,h);B&&(f=P.tickCoord+e*(O()/2+i),u[E]=nr(nr({},P),{},{isShow:!0}))}},S=0;S<j;S++)k(S);return u}function Z0(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,u=e.minTickGap,c=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,g=e.angle;if(!i||!i.length||!n)return[];if(Ee(f)||Yu.isSsr){var v;return(v=YV(i,Ee(f)?f:0))!==null&&v!==void 0?v:[]}var b=[],j=c==="top"||c==="bottom"?"width":"height",k=m&&j==="width"?fu(m,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,O)=>{var D=typeof h=="function"?h(_.value,O):_.value;return j==="width"?qV(fu(D,{fontSize:t,letterSpacing:r}),k,g):fu(D,{fontSize:t,letterSpacing:r})[j]},N=i[0],E=i[1],A=i.length>=2&&N!=null&&E!=null?Vr(E.coordinate-N.coordinate):1,P=QV(o,A,j);return f==="equidistantPreserveStart"?XV(A,P,S,i,u):f==="equidistantPreserveEnd"?ZV(A,P,S,i,u):(f==="preserveStart"||f==="preserveStartEnd"?b=nq(A,P,S,i,u,f==="preserveStartEnd"):b=rq(A,P,S,i,u),b.filter(_=>_.isShow))}var iq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,u=o===void 0?0:o,c=e.tickMargin,f=c===void 0?0:c,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+m+(r?i:0);return Math.round(v)}return 0},aq={xAxis:{},yAxis:{}},uO=sr({name:"renderedTicks",initialState:aq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),cO=uO.actions,oq=cO.setRenderedTicks,sq=cO.removeRenderedTicks,lq=uO.reducer,uq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function y2(e,t){return hq(e)||fq(e,t)||dq(e,t)||cq()}function cq(){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 dq(e,t){if(e){if(typeof e=="string")return x2(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)?x2(e,t):void 0}}function x2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function hq(e){if(Array.isArray(e))return e}function mq(e,t){if(e==null)return{};var r,n,i=pq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},go.apply(null,arguments)}function b2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(r),!0).forEach(function(n){gq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gq(e,t,r){return(t=vq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vq(e){var t=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(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 hi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:dr.axis};function xq(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,u=e.mirror,c=e.axisLine,f=e.otherSvgProps;if(!c)return null;var h=gt(gt(gt({},f),vn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!u||o==="bottom"&&u);h=gt(gt({},h),{},{x1:t,y1:r+m*i,x2:t+n,y2:r+m*i})}else{var g=+(o==="left"&&!u||o==="right"&&u);h=gt(gt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+i})}return y.createElement("line",go({},h,{className:rt("recharts-cartesian-axis-line",bo(c,"className"))}))}function bq(e,t,r,n,i,o,u,c,f){var h,m,g,v,b,j,k=c?-1:1,S=e.tickSize||u,N=Ee(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,v=r+ +!c*i,g=v-k*S,j=g-k*f,b=N;break;case"left":g=v=e.coordinate,m=t+ +!c*n,h=m-k*S,b=h-k*f,j=N;break;case"right":g=v=e.coordinate,m=t+ +c*n,h=m+k*S,b=h+k*f,j=N;break;default:h=m=e.coordinate,v=r+ +c*i,g=v+k*S,j=g+k*f,b=N;break}return{line:{x1:h,y1:g,x2:m,y2:v},tick:{x:b,y:j}}}function wq(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function kq(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function jq(e){var t=e.option,r=e.tickProps,n=e.value,i,o=rt(r.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))i=y.cloneElement(t,gt(gt({},r),{},{className:o}));else if(typeof t=="function")i=t(gt(gt({},r),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(u=rt(u,vG(t))),i=y.createElement(V0,go({},r,{className:u}),n)}return i}function Sq(e){var t=e.ticks,r=e.axisType,n=e.axisId,i=jt();return y.useEffect(()=>{if(n==null||r==null)return Vs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return i(oq({ticks:o,axisId:n,axisType:r})),()=>{i(sq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Nq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,u=e.stroke,c=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,O=e.events,D=e.axisType,B=e.axisId,F=Z0(gt(gt({},_),{},{ticks:n}),A,P),z=vn(_),Y=uh(i),U=HP(z.textAnchor)?z.textAnchor:wq(g,v),he=kq(g,v),ue={};typeof o=="object"&&(ue=o);var ge=gt(gt({},z),{},{fill:"none"},ue),ie=F.map(te=>gt({entry:te},bq(te,b,j,k,S,g,N,v,E))),se=ie.map(te=>{var J=te.entry,I=te.line;return y.createElement(Xr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},o&&y.createElement("line",go({},ge,I,{className:rt("recharts-cartesian-axis-tick-line",bo(o,"className"))})))}),X=ie.map((te,J)=>{var I,M,H=te.entry,ne=te.tick,Z=gt(gt(gt(gt({verticalAnchor:he},z),{},{textAnchor:U,stroke:"none",fill:u},ne),{},{index:J,payload:H,visibleTicksCount:F.length,tickFormatter:c,padding:h},m),{},{angle:(I=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:z.angle)!==null&&I!==void 0?I:0}),me=gt(gt({},Z),Y);return y.createElement(Xr,go({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},PR(O,H,J)),i&&y.createElement(jq,{option:i,tickProps:me,value:"".concat(typeof c=="function"?c(H.value,J):H.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},y.createElement(Sq,{ticks:F,axisId:B,axisType:D}),X.length>0&&y.createElement(Ni,{zIndex:dr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},X)),se.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},se))}),Eq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,u=e.hide,c=e.ticks,f=e.axisType,h=e.axisId,m=mq(e,uq),g=y.useState(""),v=y2(g,2),b=v[0],j=v[1],k=y.useState(""),S=y2(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return iq({ticks:A.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var D=O[0];if(D){var B=window.getComputedStyle(D),F=B.fontSize,z=B.letterSpacing;(F!==b||z!==N)&&(j(F),E(z))}}},[b,N]);return u||n!=null&&n<=0||i!=null&&i<=0?null:y.createElement(Ni,{zIndex:e.zIndex},y.createElement(Xr,{className:rt("recharts-cartesian-axis",o)},y.createElement(xq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:vn(e)}),y.createElement(Nq,{ref:P,axisType:f,events:m,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:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(YK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(oG,{label:e.label,labelRef:e.labelRef}),e.children)))}),J0=y.forwardRef((e,t)=>{var r=Jr(e,hi);return y.createElement(Eq,go({},r,{ref:t}))});J0.displayName="CartesianAxis";var Aq=["x1","y1","x2","y2","key"],Cq=["offset"],Pq=["xAxisId","yAxisId"],Oq=["xAxisId","yAxisId"];function w2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w2(Object(r),!0).forEach(function(n){_q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _q(e,t,r){return(t=Mq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mq(e){var t=Iq(e,"string");return typeof t=="symbol"?t:t+""}function Iq(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)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ga.apply(null,arguments)}function Gf(e,t){if(e==null)return{};var r,n,i=Tq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dq=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.ry;return y.createElement("rect",{x:n,y:i,ry:c,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function dO(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 i,o=r.x1,u=r.y1,c=r.x2,f=r.y2,h=r.key,m=Gf(r,Aq),g=(i=vn(m))!==null&&i!==void 0?i:{};g.offset;var v=Gf(g,Cq);n=y.createElement("line",Ga({},v,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:h}))}return n}function Rq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Gf(e,Pq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(dO,{key:"line-".concat(h),option:i,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Lq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Gf(e,Oq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(dO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function $q(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||c==null)return null;var m=c.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?i+u-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,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"},g)}function zq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,u=e.y,c=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+c-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var Fq=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return KE(Z0(ar(ar(ar({},hi),r),{},{ticks:GE(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Bq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return KE(Z0(ar(ar(ar({},hi),r),{},{ticks:GE(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},Uq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:dr.grid};function fO(e){var t=eA(),r=tA(),n=JE(),i=ar(ar({},Jr(e,Uq)),{},{x:Ee(e.x)?e.x:n.left,y:Ee(e.y)?e.y:n.top,width:Ee(e.width)?e.width:n.width,height:Ee(e.height)?e.height:n.height}),o=i.xAxisId,u=i.yAxisId,c=i.x,f=i.y,h=i.width,m=i.height,g=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,j=Nr(),k=Me(F=>jS(F,"xAxis",o,j)),S=Me(F=>jS(F,"yAxis",u,j));if(!Un(h)||!Un(m)||!Ee(c)||!Ee(f))return null;var N=i.verticalCoordinatesGenerator||Fq,E=i.horizontalCoordinatesGenerator||Bq,A=i.horizontalPoints,P=i.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:S?ar(ar({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:g);yf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var D=b&&b.length,B=N({xAxis:k?ar(ar({},k),{},{ticks:D?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},D?!0:g);yf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return y.createElement(Ni,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Dq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement($q,Ga({},i,{horizontalPoints:A})),y.createElement(zq,Ga({},i,{verticalPoints:P})),y.createElement(Rq,Ga({},i,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(Lq,Ga({},i,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}fO.displayName="CartesianGrid";var Hq={},hO=sr({name:"errorBars",initialState:Hq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===i.dataKey&&u.direction===i.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),ex=hO.actions;ex.addErrorBar;ex.replaceErrorBar;ex.removeErrorBar;var Wq=hO.reducer;function mO(e,t){var r,n,i=Me(h=>ki(h,e)),o=Me(h=>ji(h,t)),u=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Et.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:At.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function Kq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=X0(),o=mO(t,r),u=o.needClipX,c=o.needClipY,f=o.needClip,h=Me(A=>ZC(A,t,!1)),m=Me(A=>JC(A,r,!1));if(!f||!i)return null;var g=i.x,v=i.y,b=i.width,j=i.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=c&&m?Math.min(m[0],m[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=c&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function Gq(e){var t=uh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,u=Number(i),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(c)||c<0)&&(c=n),{r:u,strokeWidth:c}}return{r,strokeWidth:n}}function tx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:iO}function rx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:iO}var pO=(e,t,r)=>sP(e,"xAxis",tx(e,t),r),gO=(e,t,r)=>oP(e,"xAxis",tx(e,t),r),vO=(e,t,r)=>sP(e,"yAxis",rx(e,t),r),yO=(e,t,r)=>oP(e,"yAxis",rx(e,t),r),Vq=q([ct,pO,vO,gO,yO],(e,t,r,n,i)=>Gn(e,"xAxis")?vf(t,n,!1):vf(r,i,!1)),qq=(e,t)=>t,xO=q([EC,qq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),bO=e=>{var t=ct(e),r=Gn(t,"xAxis");return r?"yAxis":"xAxis"},Qq=(e,t)=>{var r=bO(e);return r==="yAxis"?rx(e,t):tx(e,t)},Yq=(e,t,r)=>RC(e,bO(e),Qq(e,t),r),Xq=q([xO,Yq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=r0(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(c=>c.key===i);if(u!=null)return u.map(c=>[c[0],c[1]])}}}),Zq=q([ct,pO,vO,gO,yO,Xq,kF,Vq,xO,zF],(e,t,r,n,i,o,u,c,f,h)=>{var m=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||c==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return SQ({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:c})}}),Jq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],eQ=["id","baseLine"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hu.apply(null,arguments)}function k2(e,t){if(e==null)return{};var r,n,i=tQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function rQ(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!He(c)||!He(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.y||0));return Ee(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.y||0),m)),Ee(m)?y.createElement("rect",{x:c<f?c:c-h,y:0,width:h,height:Math.floor(m+(u?parseInt("".concat(u),10):1))}):null}function nQ(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!He(c)||!He(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.x||0));return Ee(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.x||0),m)),Ee(m)?y.createElement("rect",{x:0,y:c<f?c:c-h,width:m+(u?parseInt("".concat(u),10):1),height:Math.floor(h)}):null}function iQ(e){var t=e.alpha,r=e.layout,n=e.points,i=e.baseLine,o=e.strokeWidth;return r==="vertical"?y.createElement(nQ,{alpha:t,points:n,baseLine:i,strokeWidth:o}):y.createElement(rQ,{alpha:t,points:n,baseLine:i,strokeWidth:o})}function aQ(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,i=n===void 0?!1:n,o=e.isEntrance,u=o===void 0?!1:o,c=e.layout,f=e.isRange,h=e.stroke,m=e.connectNulls,g=k2(e,Jq),v=c==="vertical"?"vertical":"horizontal",b=m??!1,j=rO(),k=g.id,S=g.baseLine,N=k2(g,eQ),E=vn(N),A=y.createElement(qd,hu({},g,{id:k,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:v})),P=h!=="none"&&y.createElement(qd,hu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),_=h!=="none"&&f&&Array.isArray(S)&&y.createElement(qd,hu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(u&&(i||r<1)){var O;return y.createElement(Xr,null,y.createElement("defs",null,y.createElement("clipPath",{id:j},y.createElement(iQ,{alpha:r,points:(O=g.points)!==null&&O!==void 0?O:[],baseLine:S,layout:v,strokeWidth:g.strokeWidth}))),y.createElement(Xr,{clipPath:"url(#".concat(j,")")},A,P,_))}return y.createElement(y.Fragment,null,A,P,_)}var oQ=["id"],sQ=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vf.apply(null,arguments)}function wO(e,t){if(e==null)return{};var r,n,i=lQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function j2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(r),!0).forEach(function(n){uQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uQ(e,t,r){return(t=cQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cQ(e){var t=dQ(e,"string");return typeof t=="symbol"?t:t+""}function dQ(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 fQ=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Hs(Hs({},r.next),{},{x:li(r.prev.x,r.next.x,t),y:li(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),kO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Q0,animationInterpolateFn:fQ,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:aQ,xAxisId:0,yAxisId:0,zIndex:dr.area};function qf(e,t){return e&&e!=="none"?e:t}var hQ=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:qf(n,i),value:VE(r,t),payload:e}]},mQ=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,u=e.name,c=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:Vs,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:VE(u,t),hide:c,type:h,color:qf(n,o),unit:f,graphicalItemId:m}};return y.createElement(EG,{tooltipEntrySettings:g})});function pQ(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,u=n.dataKey,c=vn(n);return y.createElement(pV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:c,needClip:i,clipPathId:t})}function gQ(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Hs(Hs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(dG,{value:t?i:void 0},r)}function vQ(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,u=e.animationElapsedTime,c=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=wO(o,oQ),N=Yr(S),E=Hs(Hs({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:c,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Xr,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},y.createElement(NG,{option:j,DefaultShape:kO.shape,shapeProps:E})),y.createElement(pQ,{points:t,props:S,clipPathId:i}))}function yQ(e,t,r){if(Ee(e)){var n=Ee(t)?t:void 0;return li(n,e,r)}if(Vt(e)||Fn(e)){var i=Ee(t)?t:void 0;return li(i,0,r)}return e}function xQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,c=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:u,baseLine:c}),[u,c]),k=tO(j,o),S=Uy(),N=HG(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var O;return Array.isArray(c)&&Array.isArray(_)?O=ry(_,c,v):Array.isArray(c)?O=ry(null,c,v):O=null,y.createElement(WG,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(D,B,F)=>{var z;return B===1?z=c:Array.isArray(c)?z=b(O,B,S):z=F?c:yQ(c,_,B),k.syncStepValue(z,B),y.createElement(gQ,{showLabels:!E,points:u},n.children,y.createElement(vQ,{points:D,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:F}),y.createElement(mG,{label:n.label}))})}function bQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=y.useRef(null),o=y.useRef();return y.createElement(xQ,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class wQ extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,u=t.top,c=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=Gq(n),A=E.r,P=E.strokeWidth,_=JP(n),O=A*2+P,D=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(Ni,{zIndex:k},y.createElement(Xr,{className:S},f&&y.createElement("defs",null,y.createElement(Kq,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:c-O/2,y:u-O/2,width:g+O,height:v+O}))),y.createElement(bQ,{needClip:f,clipPathId:N,props:this.props})),y.createElement(m2,{points:i,mainColor:qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(j)&&y.createElement(m2,{points:j,mainColor:qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function kQ(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,u=e.connectNulls,c=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=wO(e,sQ),N=qs(),E=OP(),A=mO(j,k),P=A.needClip,_=Nr(),O=(t=Me(ge=>Zq(ge,e.id,_)))!==null&&t!==void 0?t:{},D=O.points,B=O.isRange,F=O.baseLine,z=X0();if(N!=="horizontal"&&N!=="vertical"||z==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Y=z.height,U=z.width,he=z.x,ue=z.y;return!D||!D.length?null:y.createElement(wQ,Vf({},S,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:F,connectNulls:u,dot:c,fill:f,fillOpacity:h,height:Y,hide:m,layout:N,isAnimationActive:g,isRange:B,legendType:v,needClip:P,points:D,stroke:b,width:U,left:he,top:ue,xAxisId:j,yAxisId:k}))}var jQ=(e,t,r,n,i)=>{var o=r??t;if(Ee(o))return o;var u=e==="horizontal"?i:n,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]};function SQ(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,u=e.layout,c=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=jQ(u,c,n,f,h),N=u==="horizontal",E=!1,A=m.map((_,O)=>{var D,B,F,z;if(k)z=o[g+O];else{var Y=Dt(_,i);Array.isArray(Y)?(z=Y,E=!0):z=[S,Y]}var U=(D=(B=z)===null||B===void 0?void 0:B[1])!==null&&D!==void 0?D:null,he=U==null||k&&!r&&Dt(_,i)==null;if(N){var ue;return{x:yk({axis:f,ticks:v,bandSize:j,entry:_,index:O}),y:he?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:z,payload:_}}return{x:he?null:(F=f.scale.map(U))!==null&&F!==void 0?F:null,y:yk({axis:h,ticks:b,bandSize:j,entry:_,index:O}),value:z,payload:_}}),P;return k||E?P=A.map(_=>{var O,D=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:D!=null&&_.y!=null&&(B=h.scale.map(D))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:D!=null&&(O=f.scale.map(D))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function NQ(e){var t=Jr(e,kO),r=Nr();return y.createElement(JG,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(AG,{legendPayload:hQ(t)}),y.createElement(mQ,{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(oV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:lz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(kQ,Vf({},t,{id:n}))))}var jO=y.memo(NQ,_h);jO.displayName="Area";var EQ=["domain","range"],AQ=["domain","range"];function S2(e,t){if(e==null)return{};var r,n,i=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function CQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function N2(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function SO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,i=S2(e,EQ),o=t.domain,u=t.range,c=S2(t,AQ);return!N2(r,o)||!N2(n,u)?!1:_h(i,c)}var PQ=["type"],OQ=["dangerouslySetInnerHTML","ticks","scale"],_Q=["id","scale"];function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ny.apply(null,arguments)}function E2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){MQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MQ(e,t,r){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(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)}function iy(e,t){if(e==null)return{};var r,n,i=DQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function RQ(e){var t=jt(),r=y.useRef(null),n=Uy(),i=e.type,o=iy(e,PQ),u=Dh(n,"xAxis",i),c=y.useMemo(()=>{if(u!=null)return A2(A2({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(bV(c)):r.current!==c&&t(wV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(kV(r.current)),r.current=null)},[t]),null}var LQ=e=>{var t=e.xAxisId,r=e.className,n=Me(QE),i=Nr(),o="xAxis",u=Me(v=>aP(v,o,t,i)),c=Me(v=>vU(v,t)),f=Me(v=>jU(v,t)),h=Me(v=>kC(v,t));if(c==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=iy(e,OQ);h.id,h.scale;var g=iy(h,_Q);return y.createElement(J0,ny({},m,g,{x:f.x,y:f.y,width:c.width,height:c.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},$Q={allowDataOverflow:Et.allowDataOverflow,allowDecimals:Et.allowDecimals,allowDuplicatedCategory:Et.allowDuplicatedCategory,angle:Et.angle,axisLine:hi.axisLine,height:Et.height,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:hi.tickLine,tickSize:hi.tickSize,type:Et.type,niceTicks:Et.niceTicks,xAxisId:0},zQ=e=>{var t=Jr(e,$Q);return y.createElement(y.Fragment,null,y.createElement(RQ,{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(LQ,t))},NO=y.memo(zQ,SO);NO.displayName="XAxis";var FQ=["type"],BQ=["dangerouslySetInnerHTML","ticks","scale"],UQ=["id","scale"];function ay(){return ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ay.apply(null,arguments)}function C2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function P2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C2(Object(r),!0).forEach(function(n){HQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HQ(e,t,r){return(t=WQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WQ(e){var t=KQ(e,"string");return typeof t=="symbol"?t:t+""}function KQ(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)}function oy(e,t){if(e==null)return{};var r,n,i=GQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function VQ(e){var t=jt(),r=y.useRef(null),n=Uy(),i=e.type,o=oy(e,FQ),u=Dh(n,"yAxis",i),c=y.useMemo(()=>{if(u!=null)return P2(P2({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(jV(c)):r.current!==c&&t(SV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(NV(r.current)),r.current=null)},[t]),null}function qQ(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=y.useRef(null),u=y.useRef(null),c=Me(QE),f=Nr(),h=jt(),m="yAxis",g=Me(N=>EU(N,t)),v=Me(N=>NU(N,t)),b=Me(N=>aP(N,m,t,f)),j=Me(N=>jC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||q0(i)||y.isValidElement(i)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(EV({id:t,width:E}))}}},[b,g,h,i,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=oy(e,BQ);j.id,j.scale;var S=oy(j,UQ);return y.createElement(J0,ay({},k,S,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(m," ").concat(m),r),viewBox:c,ticks:b,axisType:m,axisId:t}))}var QQ={allowDataOverflow:At.allowDataOverflow,allowDecimals:At.allowDecimals,allowDuplicatedCategory:At.allowDuplicatedCategory,angle:At.angle,axisLine:hi.axisLine,hide:!1,includeHidden:At.includeHidden,interval:At.interval,label:!1,minTickGap:At.minTickGap,mirror:At.mirror,orientation:At.orientation,padding:At.padding,reversed:At.reversed,scale:At.scale,tick:At.tick,tickCount:At.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:At.type,niceTicks:At.niceTicks,width:At.width,yAxisId:0},YQ=e=>{var t=Jr(e,QQ);return y.createElement(y.Fragment,null,y.createElement(VQ,{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(qQ,t))},EO=y.memo(YQ,SO);EO.displayName="YAxis";var XQ=(e,t)=>t,nx=q([XQ,ct,LA,$t,SP,Si,qH,Qt],tW);function ZQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function ix(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(ZQ(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.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=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var AO=Lr("mouseClick"),CO=Ku();CO.startListening({actionCreator:AO,effect:(e,t)=>{var r=e.payload,n=nx(t.getState(),ix(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(BU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var sy=Lr("mouseMove"),PO=Ku(),is=null,Ia=null,Tg=null;PO.startListening({actionCreator:sy,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||(u==null?void 0:u.includes("mousemove"));is!==null&&(cancelAnimationFrame(is),is=null),Ia!==null&&(typeof o!="number"||!c)&&(clearTimeout(Ia),Ia=null),Tg=ix(r);var f=()=>{var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(!Tg){is=null,Ia=null;return}if(m==="axis"){var g=nx(h,Tg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(mP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(hP())}is=null,Ia=null};if(!c){f();return}o==="raf"?is=requestAnimationFrame(f):typeof o=="number"&&Ia===null&&(Ia=setTimeout(f,o))}});function JQ(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?"<<CHILDREN>>":t}var O2={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},OO=sr({name:"rootProps",initialState:O2,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:O2.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}}}),eY=OO.reducer,tY=OO.actions.updateOptions,rY=null,nY={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)},_O=sr({name:"polarOptions",initialState:rY,reducers:nY});_O.actions.updatePolarOptions;var iY=_O.reducer,MO=Lr("keyDown"),IO=Lr("focus"),TO=Lr("blur"),Xh=Ku(),as=null,Ta=null,$d=null;Xh.startListening({actionCreator:MO,effect:(e,t)=>{$d=e.payload,as!==null&&(cancelAnimationFrame(as),as=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ta!==null&&(typeof i!="number"||!u)&&(clearTimeout(Ta),Ta=null);var c=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=$d;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=du(m,po(f),Bs(f),Us(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=Si(f),S=po(f),N=ic(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Uf(f,N,"hover",String(m.index));t.dispatch(Bf({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=_U(f),P=A==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,O;if(j){var D=Bs(f),B=Us(f),F=_*P,z=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,F>0){for(var Y=0;Y<S.length;Y++)if(du(z(Y),S,D,B)!=null){O=Y;break}}else for(var U=S.length-1;U>=0;U--)if(du(z(U),S,D,B)!=null){O=U;break}if(O<0)return}else{O=b+_*P;var he=(k==null?void 0:k.length)||S.length;if(he===0||O>=he||O<0)return}var ue=Uf(f,N,"hover",String(O));t.dispatch(Bf({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{as=null,Ta=null}};if(!u){c();return}i==="raf"?as=requestAnimationFrame(c):typeof i=="number"&&Ta===null&&(c(),$d=null,Ta=setTimeout(()=>{$d?c():(Ta=null,as=null)},i))}});Xh.startListening({actionCreator:IO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",u=ic(r,r.tooltip.settings.shared),c=Uf(r,u,"hover",String(o));t.dispatch(Bf({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Xh.startListening({actionCreator:TO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(Bf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function DO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Kr=Lr("externalEvent"),RO=Ku(),zd=new Map,tu=new Map,Dg=new Map;RO.startListening({actionCreator:Kr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,u=DO(i);Dg.set(o,{handler:n,reactEvent:u});var c=zd.get(o);c!==void 0&&(cancelAnimationFrame(c),zd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=tu.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),tu.delete(o));var k=()=>{var E=Dg.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,_=t.getState(),O={activeCoordinate:IH(_),activeDataKey:OH(_),activeIndex:Iu(_),activeLabel:AP(_),activeTooltipIndex:Iu(_),isTooltipActive:TH(_)};A&&A(O,P)}finally{zd.delete(o),tu.delete(o),Dg.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);zd.set(o,S)}else if(typeof m=="number"){if(!tu.has(o)){k();var N=setTimeout(k,m);tu.set(o,N)}}else k()}}});var aY=q([rl],e=>e.tooltipItemPayloads),oY=q([aY,(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 i=n.getPosition;if(i!=null)return i(t)}}}),LO=Lr("touchMove"),$O=Ku(),Da=null,Vi=null,_2=null,ru=null;$O.startListening({actionCreator:LO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){ru=DO(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||u.includes("touchmove");Da!==null&&(cancelAnimationFrame(Da),Da=null),Vi!==null&&(typeof o!="number"||!c)&&(clearTimeout(Vi),Vi=null),_2=Array.from(r.touches).map(h=>ix({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(ru!=null){var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=_2)===null||g===void 0?void 0:g[0];if(v==null){Da=null,Vi=null;return}var b=nx(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(mP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=ru.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(pz),E=(j=S.getAttribute(gz))!==null&&j!==void 0?j:void 0,A=jo(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,_=oY(h,N,E);t.dispatch(FU({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Da=null,Vi=null}};if(!c){f();return}o==="raf"?Da=requestAnimationFrame(f):typeof o=="number"&&Vi===null&&(f(),ru=null,Vi=setTimeout(()=>{ru?f():(Vi=null,Da=null)},o))}}});var zO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},FO=sr({name:"eventSettings",initialState:zO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),sY=FO.actions.setEventSettings,lY=FO.reducer,uY=gE({brush:RV,cartesianAxis:AV,chartData:MW,errorBars:Wq,eventSettings:lY,graphicalItems:iV,layout:J$,legend:h6,options:AW,polarAxis:gG,polarOptions:iY,referenceElements:FV,renderedTicks:lq,rootProps:eY,tooltip:UU,zIndex:mW}),cY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return S$({reducer:uY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([CO.middleware,PO.middleware,Xh.middleware,RO.middleware,$O.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(_E({type:"raf"}))},devTools:{serialize:{replacer:JQ},name:"recharts-".concat(r)}})};function dY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Nr(),o=y.useRef(null);if(i)return r;o.current==null&&(o.current=cY(t,n));var u=Iy;return y.createElement(P6,{context:u,store:o.current},r)}function fY(e){var t=e.layout,r=e.margin,n=jt(),i=Nr();return y.useEffect(()=>{i||(n(Y$(t)),n(Q$(r)))},[n,i,t,r]),null}var hY=y.memo(fY,_h);function mY(e){var t=jt();return y.useEffect(()=>{t(tY(e))},[t,e]),null}var pY=e=>{var t=jt();return y.useEffect(()=>{t(sY(e))},[t,e]),null},gY=y.memo(pY,_h);function M2(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),i=jt();return y.useLayoutEffect(()=>(n.current&&i(fW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(hW({zIndex:t,isPanorama:r}))}),[i,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function I2(e){var t=e.children,r=e.isPanorama,n=Me(nW);if(!n||n.length===0)return t;var i=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,i.map(u=>y.createElement(M2,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(M2,{key:u,zIndex:u,isPanorama:r})))}var vY=["children"];function yY(e,t){if(e==null)return{};var r,n,i=xY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Qf(){return Qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qf.apply(null,arguments)}var bY={width:"100%",height:"100%",display:"block"},wY=y.forwardRef((e,t)=>{var r=eA(),n=tA(),i=dA();if(!Un(r)||!Un(n))return null;var o=e.children,u=e.otherAttributes,c=e.title,f=e.desc,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=i?0:void 0,typeof u.role=="string"?m=u.role:m=i?"application":void 0),y.createElement(T5,Qf({},u,{title:c,desc:f,role:m,tabIndex:h,width:r,height:n,style:bY,ref:t}),o)}),kY=e=>{var t=e.children,r=Me(Eh);if(!r)return null;var n=r.width,i=r.height,o=r.y,u=r.x;return y.createElement(T5,{width:n,height:i,x:u,y:o},t)},T2=y.forwardRef((e,t)=>{var r=e.children,n=yY(e,vY),i=Nr();return i?y.createElement(kY,null,y.createElement(I2,{isPanorama:!0},r)):y.createElement(wY,Qf({ref:t},n),y.createElement(I2,{isPanorama:!1},r))});function jY(e,t){return AY(e)||EY(e,t)||NY(e,t)||SY()}function SY(){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 NY(e,t){if(e){if(typeof e=="string")return D2(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)?D2(e,t):void 0}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function EY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function AY(e){if(Array.isArray(e))return e}function CY(){var e=jt(),t=y.useState(null),r=jY(t,2),n=r[0],i=r[1],o=Me(mz);return y.useEffect(()=>{if(n!=null){var u=n.getBoundingClientRect(),c=u.width/n.offsetWidth;He(c)&&c!==o&&e(Z$(c))}},[n,e,o]),i}function R2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(r),!0).forEach(function(n){OY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OY(e,t,r){return(t=_Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Y(e){var t=MY(e,"string");return typeof t=="symbol"?t:t+""}function MY(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)}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fa.apply(null,arguments)}function Yf(e,t){return RY(e)||DY(e,t)||TY(e,t)||IY()}function IY(){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 TY(e,t){if(e){if(typeof e=="string")return L2(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)?L2(e,t):void 0}}function L2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function DY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function RY(e){if(Array.isArray(e))return e}var LY=()=>(BW(),null);function Xf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var $Y=y.forwardRef((e,t)=>{var r,n,i=y.useRef(null),o=y.useState({containerWidth:Xf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Xf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Yf(o,2),c=u[0],f=u[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),i.current!=null&&(i.current.disconnect(),i.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,_=A.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),i.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=i.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Vu,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",fa({ref:m},e)))}),zY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=y.useState({containerWidth:Xf(r),containerHeight:Xf(n)}),o=Yf(i,2),u=o[0],c=o[1],f=y.useCallback((m,g)=>{c(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Vu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",fa({ref:h},e)))}),FY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))}),BY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(zY,fa({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(FY,fa({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))});function UY(e){return e?$Y:BY}var HY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,u=e.onContextMenu,c=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,_=y.useRef(null),O=jt(),D=y.useState(null),B=Yf(D,2),F=B[0],z=B[1],Y=y.useState(null),U=Yf(Y,2),he=U[0],ue=U[1],ge=CY(),ie=Fy(),se=(ie==null?void 0:ie.width)>0?ie.width:N,X=(ie==null?void 0:ie.height)>0?ie.height:i,te=y.useCallback(Pe=>{ge(Pe),typeof t=="function"&&t(Pe),z(Pe),ue(Pe),Pe!=null&&(_.current=Pe)},[ge,t,z,ue]),J=y.useCallback(Pe=>{O(AO(Pe)),O(Kr({handler:o,reactEvent:Pe}))},[O,o]),I=y.useCallback(Pe=>{O(sy(Pe)),O(Kr({handler:h,reactEvent:Pe}))},[O,h]),M=y.useCallback(Pe=>{O(hP()),O(Kr({handler:m,reactEvent:Pe}))},[O,m]),H=y.useCallback(Pe=>{O(sy(Pe)),O(Kr({handler:g,reactEvent:Pe}))},[O,g]),ne=y.useCallback(()=>{O(IO())},[O]),Z=y.useCallback(()=>{O(TO())},[O]),me=y.useCallback(Pe=>{O(MO(Pe.key))},[O]),pe=y.useCallback(Pe=>{O(Kr({handler:u,reactEvent:Pe}))},[O,u]),Oe=y.useCallback(Pe=>{O(Kr({handler:c,reactEvent:Pe}))},[O,c]),re=y.useCallback(Pe=>{O(Kr({handler:f,reactEvent:Pe}))},[O,f]),we=y.useCallback(Pe=>{O(Kr({handler:v,reactEvent:Pe}))},[O,v]),_e=y.useCallback(Pe=>{O(Kr({handler:k,reactEvent:Pe}))},[O,k]),ae=y.useCallback(Pe=>{P&&O(LO(Pe)),O(Kr({handler:j,reactEvent:Pe}))},[O,P,j]),et=y.useCallback(Pe=>{O(Kr({handler:b,reactEvent:Pe}))},[O,b]),Be=UY(E);return y.createElement(DP.Provider,{value:F},y.createElement(nR.Provider,{value:he},y.createElement(Be,{width:se??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:PY({position:"relative",cursor:"default",width:se,height:X},S),onClick:J,onContextMenu:pe,onDoubleClick:Oe,onFocus:ne,onBlur:Z,onKeyDown:me,onMouseDown:re,onMouseEnter:I,onMouseLeave:M,onMouseMove:H,onMouseUp:we,onTouchEnd:et,onTouchMove:ae,onTouchStart:_e,ref:te},y.createElement(LY,null),r)))}),WY=["width","height","responsive","children","className","style","compact","title","desc"];function KY(e,t){if(e==null)return{};var r,n,i=GY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var VY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=e.responsive,o=e.children,u=e.className,c=e.style,f=e.compact,h=e.title,m=e.desc,g=KY(e,WY),v=vn(g);return f?y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement(T2,{otherAttributes:v,title:h,desc:m},o)):y.createElement(HY,{className:u,style:c,width:r,height:n,responsive:i??!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(T2,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(VV,null,o)))});function ly(){return ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ly.apply(null,arguments)}function $2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(r),!0).forEach(function(n){QY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QY(e,t,r){return(t=YY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YY(e){var t=XY(e,"string");return typeof t=="symbol"?t:t+""}function XY(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 ZY={top:5,right:5,bottom:5,left:5},JY=qY({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:ZY,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},zO),eX=y.forwardRef(function(t,r){var n,i=Jr(t.categoricalChartProps,JY),o=t.chartName,u=t.defaultTooltipEventType,c=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,m={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return y.createElement(dY,{preloadedState:{options:m},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},y.createElement(DV,{chartData:h.data}),y.createElement(hY,{layout:i.layout,margin:i.margin}),y.createElement(gY,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),y.createElement(mY,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),y.createElement(VY,ly({},i,{ref:r})))}),tX=["axis"],rX=y.forwardRef((e,t)=>y.createElement(eX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tX,tooltipPayloadSearcher:NW,categoricalChartProps:e,ref:t}));const nX="rgba(130,130,150,0.14)",z2="rgba(130,130,150,0.85)";function iX(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 BO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function aX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:BO(n.value,r)})]},n.dataKey))})})}function UO({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((c,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),c),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(iX(o*1.15),10);return l.jsx("div",{style:{height:i},className:"w-full",children:l.jsx(Qz,{width:"100%",height:"100%",children:l.jsxs(rX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(c=>l.jsxs("linearGradient",{id:`grad-${c.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:c.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:c.color,stopOpacity:0})]},c.key))}),l.jsx(fO,{vertical:!1,stroke:nX}),l.jsx(NO,{dataKey:"t",hide:!0}),l.jsx(EO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:c=>BO(c,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:z2}}),l.jsx(eK,{content:l.jsx(aX,{unit:r}),cursor:{stroke:z2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(c=>l.jsx(jO,{type:"monotone",dataKey:c.key,name:c.label,stroke:c.color,strokeWidth:2,fill:`url(#grad-${c.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},c.key))]})})})}const oX=[{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 HO(){var u,c,f,h;const{sys:e,hist:t}=KD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=oX.filter(m=>m.key!=="gpu"||r),i={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(c=e==null?void 0:e.ram)==null?void 0:c.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?`${Yi(e.ram.used)}/${Yi(e.ram.total)} GB`:"",gpu:r?`${Yi(e.gpu.gtt_used)}/${Yi(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Yi(e.disk.used)}/${Yi(e.disk.total)} GB`:""};return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx(UO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.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)&&l.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&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function nu({label:e,value:t,tone:r}){return l.jsxs("div",{className:ee("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:[l.jsx("span",{className:"flex items-center gap-1.5",children:e}),l.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function sX(){var r;const{data:e}=lh(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return l.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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(R4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&l.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?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(nu,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),l.jsx(nu,{label:"Inferenz-Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{label:"Router (llama-swap)",tone:e.swap>0?"alert":"muted",value:e.swap>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{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=>l.jsx(nu,{tone:n.update===!0?"alert":"muted",label:l.jsxs(l.Fragment,{children:[n.name,n.reachable===!1&&l.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))]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),l.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 ",l.jsx(eh,{className:"h-3.5 w-3.5"})]})]})}function WO({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:u,onCancel:c}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:c||(()=>u()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,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 m;h.key==="Enter"&&u((m=f.current)==null?void 0:m.value)}}),i!==void 0&&l.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=i)},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"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:c,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"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.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 ya(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((c,f,h)=>{t({type:"alert",title:c,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=y.useCallback((c,f,h,m)=>{t({type:"confirm",title:c,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((c,f,h,m,g,v)=>{t({type:"prompt",title:c,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?l.jsx(WO,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:u}}function lX(){const e=Kn(),{data:t}=Ny(3e3),{data:r}=yi(),{showAlert:n,dialogElement:i}=ya(),[o,u]=y.useState(!1),c=(r==null?void 0:r.models)??[];async function f(h){try{await je("/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:Ge.agentStatus}),u(!1)}catch(m){n("Fehler",`Fehler beim Wechseln des Gehirns: ${m.message}`)}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&l.jsxs("a",{href:Ds(t.terminal_url),target:"_blank",rel:"noopener",className:ee("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:[l.jsx(Ms,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),l.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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),l.jsx($n,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[l.jsx(gy,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),l.jsx(Uu,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[l.jsxs("div",{children:["Config: ",t.has_config?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Skills: ",t.has_skills?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Memory: ",t.has_memories?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):l.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&l.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"Telegram"}),l.jsx("span",{className:ee("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"MCP-Server"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"PC Executor"}),l.jsx("span",{className:ee("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),l.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 (',l.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),l.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...c.map(h=>{var m;return((m=h.name.split("/").pop())==null?void 0:m.replace(".gguf",""))||h.name})].map(h=>{const m=["auto","fast","heavy"].includes(h);return l.jsxs("button",{onClick:()=>f(h),className:ee("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:[l.jsxs("div",{className:"flex flex-col text-left",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:m?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),i]})}function uX(){const e=Kn(),{data:t=[]}=cv({limit:3}),[r,n]=y.useState(""),[i,o]=y.useState("stable"),[u,c]=y.useState(!1);async function f(){if(!(!r.trim()||u)){c(!0);try{await je("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:i,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{c(!1)}}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(vo,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("textarea",{value:r,onChange:h=>n(h.target.value),"aria-label":"Fakt oder Regel im Gedächtnis speichern",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"}),l.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[l.jsxs("select",{value:i,onChange:h=>o(h.target.value),"aria-label":"Kategorie",className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[l.jsx("option",{value:"stable",children:"🔵 Fakt"}),l.jsx("option",{value:"instruction",children:"📋 Regel"}),l.jsx("option",{value:"user",children:"👤 User"}),l.jsx("option",{value:"versioned",children:"🟡 Version"})]}),l.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:[l.jsx(tf,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),l.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[l.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),l.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?l.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>l.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[l.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}),l.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),l.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 F2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function KO(){const{data:e}=Sy(3e3),t=HD(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jf,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:F2.map(i=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?l.jsx(UO,{data:t,series:F2,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.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 cX(){const{data:e}=A5(3e3),{showAlert:t,dialogElement:r}=ya(),[n,i]=y.useState({});async function o(u){i(c=>({...c,[u]:!0}));try{const c=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});c.ok||t("Fehler",`Neustart fehlgeschlagen: ${c.err||"Unbekannt"}`)}catch(c){t("Fehler",`Fehler: ${c.message}`)}finally{i(c=>({...c,[u]:!1}))}}return l.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:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),l.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?l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>l.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),l.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),l.jsx("button",{onClick:()=>o(u.unit),disabled:n[u.unit],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:l.jsx(ro,{className:ee("h-3.5 w-3.5",n[u.unit]&&"animate-spin")})})]},u.unit))}),l.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:[l.jsxs("a",{href:Ds(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:[l.jsx(Ms,{className:"h-3 w-3"})," Engine"]}),l.jsxs("a",{href:Ds(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:[l.jsx(Ms,{className:"h-3 w-3"})," Gateway"]})]})]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}const Rg=[{key:"stt",label:"STT",hint:"Sprache → Text"},{key:"vision",label:"Bildschirm-Sicht",hint:"Vision-Beschreibung"},{key:"chat_ttfb",label:"Chat-TTFB",hint:"Zeit bis 1. Token"},{key:"tts",label:"TTS",hint:"Text → Sprache"}];function Fd(e){return e==null?"—":e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e)} ms`}function dX({stat:e,label:t,hint:r,maxP95:n}){const i=!!e&&e.count>0,o=i&&e.p95_ms&&n>0?Math.max(4,Math.min(100,e.p95_ms/n*100)):0;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[l.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold text-foreground",children:t}),l.jsx("span",{className:"truncate text-[10px] text-muted-foreground/60",children:r})]}),i?l.jsx("span",{className:"shrink-0 font-mono text-sm font-bold tabular-nums text-foreground",children:Fd(e.p50_ms)}):l.jsx("span",{className:"shrink-0 text-[10px] italic text-muted-foreground/50",children:"noch keine Messungen"})]}),l.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-background/50 border border-border/30",children:l.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-teal-500 to-indigo-500 transition-all duration-500",style:{width:`${o}%`}})}),i&&l.jsxs("div",{className:"flex items-center gap-3 font-mono text-[10px] text-muted-foreground/65",children:[l.jsxs("span",{children:["p50 ",Fd(e.p50_ms)]}),l.jsxs("span",{children:["p95 ",Fd(e.p95_ms)]}),l.jsxs("span",{children:["zuletzt ",Fd(e.last_ms)]}),l.jsxs("span",{className:"text-muted-foreground/45",children:["· n=",e.count]})]})]})}function GO(){const{data:e}=ID(5e3),t=Math.max(1,...Rg.map(n=>{var i;return((i=e==null?void 0:e[n.key])==null?void 0:i.p95_ms)??0})),r=Rg.some(n=>{var i;return(((i=e==null?void 0:e[n.key])==null?void 0:i.count)??0)>0});return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(MN,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Sprach-Latenz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Rg.map(n=>l.jsx(dX,{stat:e==null?void 0:e[n.key],label:n.label,hint:n.hint,maxP95:t},n.key))}),l.jsx("div",{className:"mt-4 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:r?"Server-seitige Dauer je Pipeline-Stufe (p50 prominent). Rollender Schnitt über die letzten Turns; Reset bei Neustart.":"Noch keine Voice-Turns gemessen — sprich einmal über den „Sprechen“-Tab, dann erscheinen hier STT/Vision/Chat/TTS."})]})}const VO=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:vo,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:AN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:vu,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:e4,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Os,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Os,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:B4,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],qO=VO.map(e=>e.role),B2=Object.fromEntries(VO.map(e=>[e.role,e])),U2=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:vo,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),fX={fast:"hermes",coder_lite:"coder-lite"};function ir(e){return e&&(B2[e]||B2[fX[e]])||U2(e)}function oo({role:e,dense:t=!1,className:r}){const n=ir(e),i=n.icon;return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function hX({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 l.jsxs("span",{className:ee("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 H2(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 mX(){var b,j,k;const{data:e}=yi(2e3),{data:t}=Sy(2e3),{data:r}=xo(),n=(e==null?void 0:e.models)??[],i=(e==null?void 0:e.running)??[],o=((b=r==null?void 0:r.gpu)==null?void 0:b.gtt_total)||((j=r==null?void 0:r.gpu)==null?void 0:j.vram_total)||0,u=((k=r==null?void 0:r.gpu)==null?void 0:k.gtt_used)||0,c=o>0?Math.min(100,u/o*100):0,f=c>=88?"bg-red-500":c>=70?"bg-amber-500":"bg-teal-500",h=c>=88?"text-red-400":c>=70?"text-amber-400":"text-foreground",m=y.useRef(null),[g,v]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const S=t.total_tokens;if(m.current!==null&&S>m.current){v(!0);const N=setTimeout(()=>v(!1),4e3);return m.current=S,()=>clearTimeout(N)}m.current=S},[t==null?void 0:t.total_tokens]),l.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",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jd,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Modelle"})]}),l.jsxs("span",{className:ee("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",g?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[g?l.jsx(ha,{className:"h-3 w-3 animate-pulse"}):l.jsx(A4,{className:"h-3 w-3"}),g?"Inferenz aktiv":"Idle"]})]}),o>0&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-muted-foreground/80 mb-1",children:[l.jsx("span",{className:"uppercase tracking-wider font-semibold",children:"Speicher-Pool"}),l.jsxs("span",{children:[l.jsx("span",{className:ee("font-bold",h),children:Yi(u)})," / ",Yi(o)," GB belegt"]})]}),l.jsx("div",{className:"h-1.5 w-full rounded-full bg-background/50 border border-border/30 overflow-hidden",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",f),style:{width:`${c}%`}})})]}),l.jsx("div",{className:"space-y-2 flex-1",children:qO.map(S=>{var A;const N=n.find(P=>P.role===S),E=N?i.includes(N.name):!1;return l.jsxs("div",{className:ee("flex items-center justify-between gap-2 p-2 rounded-xl border transition-all duration-300",E?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":N?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(oo,{role:S,className:"shrink-0"}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:N?(A=N.name.split("/").pop())==null?void 0:A.replace(/\.gguf$/i,""):"nicht zugewiesen"}),N&&l.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap text-muted-foreground/70",children:[l.jsx("span",{className:"text-[9px] font-mono",children:_r(N.size_bytes)}),N.prompt_cache&&l.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"}),N.spec_active&&l.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: ${N.spec_draft_model})`,children:"SPEC"}),N.parallel_slots>1&&l.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:`${N.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",N.parallel_slots]}),N.incomplete&&l.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"})]})]})]}),l.jsx("span",{className:"shrink-0",children:N?E?l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full bg-emerald-500",g&&"animate-pulse")})," warm"]}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},S)})}),l.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. Details & Routing im Modell-Manager."})]})}function pX(){var P,_,O,D,B,F;const{data:e}=jy(),{data:t}=A5(),{data:r}=yi(),{data:n}=xo(),i=!!e&&!!t,o=z=>{var Y;return(Y=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:Y.ok},u=e==null?void 0:e.engine_reachable,c=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:vo,critical:!0};return i?u===!1?{...z,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:c===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const z={id:"vision",label:"Lucys Augen",icon:vu,critical:!1};if(!i||!r)return{...z,status:"loading",detail:"Wird geprüft …"};const Y=r.models.find(he=>he.role==="vision");return Y?(r.running??[]).includes(Y.name)?{...z,status:"ok",detail:"Sieht Bildschirm und Bilder."}:{...z,status:"warn",detail:"Lucys Augen sind eingeschlafen — das erste Bild-Ansehen dauert dann kurz.",repair:{kind:"loadModel",model:Y.name,label:"Augen aufwecken"}}:{...z,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:AN,critical:!0},Y=o("mem0");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...z,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:ef,critical:!0},Y=e?e.gateway_reachable:o("integriert");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...z,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:pn,critical:!0},Y=o("hermes-gateway");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...z,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:E4,critical:!1},Y=o("voice");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy kann hören und sprechen."}:{...z,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((D=n==null?void 0:n.gpu)==null?void 0:D.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,g=((F=n==null?void 0:n.gpu)==null?void 0:F.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(z=>z.status==="loading"),S=h.filter(z=>z.critical&&z.status==="down"),N=h.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const gX={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function QO({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=pX(),{showAlert:o,dialogElement:u}=ya(),c=Kn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await je(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?`
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}c.invalidateQueries({queryKey:Ge.health}),c.invalidateQueries({queryKey:Ge.services}),c.invalidateQueries({queryKey:Ge.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:th,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:p4,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:gn,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:gn,iconCls:"text-red-400",title:g.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:ee("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(vX,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),u]})}function vX({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",gX[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(or,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(th,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Uu,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(L4,{className:"h-3.5 w-3.5"})," manuell"]})]})}function W2({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function yX(){return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),l.jsx(QO,{}),l.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[l.jsx(HO,{}),l.jsx(KO,{}),l.jsx(mX,{})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Stack & Telemetrie"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(cX,{}),l.jsx(GO,{})]})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Betrieb & Wissen"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsx(sX,{}),l.jsx(lX,{}),l.jsx(uX,{})]})]})]})}function xX(){const e=Kn(),{data:t=[]}=DD(2e3),{showAlert:r,dialogElement:n}=ya();async function i(c){try{await je(`/api/jobs/${c}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Ge.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(c=>c.state==="running"||c.state==="queued"),u=t.filter(c=>c.state!=="running"&&c.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:l.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:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(c=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:c.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[c.progress??0,"% • ",mv(c.done_bytes),"/",mv(c.total_bytes),c.eta_s?` • ETA ${GD(c.eta_s)}`:""]}),l.jsx("button",{onClick:()=>i(c.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"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${c.progress??0}%`}})})]},c.id)),u.map(c=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:c.label}),l.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",c.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:c.state})]},c.id)),n]})}function Ra({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 l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function K2({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(Ra,{children:"💻 Code"}),e.vision&&l.jsx(Ra,{children:"👁 Bild"}),e.reasoning&&l.jsx(Ra,{children:"🧠 Reason"}),e.moe&&l.jsxs(Ra,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(Ra,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(Ra,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(Ra,{children:"🔢 Embed"})]}):null}function bX({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:i}=LD(e.gguf_path),[o,u]=y.useState(null),[c,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await je(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),u(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(ha,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.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:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.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:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.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)&&l.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:[l.jsx(gn,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.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 ",l.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."]}):m.map(N=>{var P,_;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[_r(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.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"}):l.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 ${(P=N.vocab)==null?void 0:P.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:[l.jsx(gn,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.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=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),c&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:c})]})})}const wX=e=>!!ir(e).protected;function kX({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,u={};o==null||o.models.forEach(m=>{u[m.name]=m});const c=o?o.models.map(m=>r.find(g=>g.name===m.name)).filter(Boolean):r;return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ir(e).label} konfigurieren`,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(oo,{role:e})," festlegen"]}),l.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:ir(e).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ir(e).desc})]}),(o==null?void 0:o.recommended)&&l.jsxs("button",{onClick:()=>n(o.recommended),title:(f=u[o.recommended])==null?void 0:f.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:[l.jsx(ha,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[wX(e)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>n(""),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:l.jsx("span",{children:"Zuweisung entfernen"})}),c.map(m=>{var k;const g=u[m.name],v=m.role===e,b=!!(g!=null&&g.recommended),j=!!g&&!g.suitable;return l.jsxs("button",{onClick:()=>n(m.name),className:ee("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",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":j?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(k=m.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,""),b&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:g?`${g.params_b}B · ${m.quant} · ${g.reason}`:`${_r(m.size_bytes)} · ${m.quant}`})]}),v&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const jX=["fast","heavy","heavy_chars"],SX=["coder_lite","coder","coding_escalate_chars"];function NX(){const e=Kn(),{data:t,isLoading:r}=TD(),[n,i]=y.useState(null),[o,u]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{i(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){u(!0),f("");try{const{policy:E}=await _D(N);i({...E}),e.invalidateQueries({queryKey:Ge.routingPolicy}),e.invalidateQueries({queryKey:Ge.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{u(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(M4,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.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:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:c,children:c}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(th,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(S4,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),jX.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(o4,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),SX.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function EX(){var he,ue,ge;const e=Kn(),{data:t}=yi(4e3),{data:r}=C5(),{data:n}=xo(),{data:i}=P5(),{showAlert:o,dialogElement:u}=ya(),[c,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(he=r==null?void 0:r.groups)==null?void 0:he.brains,j=(b==null?void 0:b.members)??[],k=ie=>g.find(se=>se.name===ie),S=ie=>{var se;return((se=ie.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""))||ie},N=j.map(k).filter(Boolean),E=1024**3,A=i==null?void 0:i.budget,P=N.reduce((ie,se)=>ie+(se.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((ge=n==null?void 0:n.gpu)==null?void 0:ge.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(_?_/E:0),D=(A==null?void 0:A.warm_projected_gb)??P,B=O>0?Math.min(100,D/O*100):0,F=g.filter(ie=>!j.includes(ie.name)&&!ie.incomplete);async function z(ie){m(!0);try{await E5("brains",ie,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Ge.groups}),e.invalidateQueries({queryKey:Ge.models}),e.invalidateQueries({queryKey:Ge.hermesBrain})}catch(se){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(se==null?void 0:se.message)||se}`)}finally{m(!1)}}function Y(ie){const se=k(ie);if(se&&ir(se.role).protected){o("Geschützt",`${ir(se.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}z(j.filter(X=>X!==ie))}function U(ie){f(!1),z([...j,ie])}return b?l.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:[l.jsx(G2,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(ie=>{const se=v.includes(ie.name),X=ir(ie.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",se?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:se?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:ie.name,children:S(ie.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Y(ie.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(zn,{className:"h-3.5 w-3.5"})})]},ie.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||F.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(tf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[D.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(gn,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),c&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:F.map(ie=>l.jsxs("button",{onClick:()=>U(ie.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(ie.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]},ie.name))})]})}),u]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(G2,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),u]})}function G2(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ha,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function YO(){var Be,Pe,vt,Yt;const e=Kn(),{data:t,isLoading:r,error:n}=yi(4e3),{data:i}=lh(4e3),{data:o}=P5(),{data:u}=xo(),{data:c}=C5(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=ya(),v=y5(),b=K=>!!ir(K).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Ge.models}),e.invalidateQueries({queryKey:Ge.routing})},E=(Be=c==null?void 0:c.groups)==null?void 0:Be.brains,A=(E==null?void 0:E.members)??[],P=K=>A.includes(K),_=A.some(K=>k.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Se=A.includes(K)?A.filter(qe=>qe!==K):[...A,K];try{await E5("brains",Se,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Ge.groups}),N()}catch(qe){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${qe.message||qe}`)}}const[D,B]=y.useState(null),[F,z]=y.useState(null),[Y,U]=y.useState(null),[he,ue]=y.useState("grid"),[ge,ie]=y.useState("all"),se=j.filter(K=>ge==="in_use"?!!K.role||k.includes(K.name):!0);async function X(K){try{await je(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Ae){f("Fehler",`Fehler beim Laden des Modells: ${Ae.message}`)}}async function te(K){if(E&&_&&!P(K)){const Ae=A.filter(Se=>k.includes(Se)).map(Se=>Se.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ae}) raus — Lucy verliert Hirn bzw. Augen.
Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(K));return}X(K)}async function J(K){const Ae=j.find(Se=>Se.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`${ir(Ae.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await je(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),N()}catch(Se){f("Fehler",`Fehler beim Entladen des Modells: ${Se.message}`)}}async function I(){try{await je("/api/models/unload",{method:"POST"}),N()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function M(K,Ae){try{const Se=await je(`/api/models/${encodeURIComponent(Ae)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});N(),Se!=null&&Se.warning&&f("Hirn gesetzt — Hinweis",Se.warning)}catch(Se){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Se.message||Se}`)}}function H(K){B(K),z(null),je(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Ae=>z(Ae)).catch(()=>{})}async function ne(K,Ae){let Se=null;try{Se=await je(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const qe=Se?`Optimal für dein Setup: ${(Se.ctx/1024).toFixed(0)}k (${Se.ctx}) — GTT ${Se.gtt_gb} GB reserviert ${Se.reserved_gb} GB (${Se.mode}) → ${Se.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",qe,String(Ae||32768),async G=>{if(G)try{await je(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(G,10)})}),N()}catch(Ie){f("Fehler",`Fehler beim Setzen des Kontexts: ${Ie.message||Ie}`)}},void 0,Se?{autoValue:String(Se.ctx),autoLabel:`Auto (${(Se.ctx/1024).toFixed(0)}k)`}:void 0)}async function Z(K){const Ae=j.find(Se=>Se.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`${ir(Ae.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await je(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),N()}catch(Se){f("Fehler",`Fehler beim Löschen: ${Se.message||Se}`)}})}async function me(K,Ae,Se,qe){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Ae,quant:Se,jinja:qe})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(G){f("Fehler",`Fehler beim Starten des Upgrades: ${G.message||G}`)}}async function pe(K){const Ae=o==null?void 0:o.budget,Se=Ae&&!Ae.fits?`
⚠ Speicher-Warnung: Dieses Brain (~${Ae.brain_gb} GB) bleibt immer resident (persistent). Zusammen mit dem größten on-demand-Modell (~${Ae.largest_ondemand_gb} GB) sprengt das das Budget (${Ae.gtt_gb} GB) → beim Laden von heavy/coder droht ein Überlauf. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${K.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Se}`,async()=>{try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(qe){f("Fehler",`Update fehlgeschlagen: ${qe.message||qe}`)}})}if(r)return l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(S)return l.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 (",S,")."]});const Oe=j.filter(K=>k.includes(K.name)),re=Oe.reduce((K,Ae)=>K+(Ae.size_bytes||0),0),we=((Pe=u==null?void 0:u.gpu)==null?void 0:Pe.gtt_total)||((vt=u==null?void 0:u.gpu)==null?void 0:vt.vram_total)||0,_e=((Yt=u==null?void 0:u.gpu)==null?void 0:Yt.gtt_used)||0,ae=16*1024**3,et=we>2*1024**3?we:re>ae?re*1.2:ae;return l.jsxs("div",{className:"space-y-8",children:[l.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),l.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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cu,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",_r(re)," Gewichte",_e>0?` · ${_r(_e)} real belegt (inkl. KV)`:""," / ",_r(et)]}),v&&k.length>0&&l.jsx("button",{onClick:I,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"})]})]}),l.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:Oe.length===0?l.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"}):Oe.map((K,Ae)=>{var G;const Se=(K.size_bytes||0)/et*100,qe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ae%4];return l.jsxs("div",{style:{width:`${Se}%`},className:ee("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",qe),title:`${K.name} (${_r(K.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${ir(K.role).short}] `:"",(G=K.name.split("/").pop())==null?void 0:G.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:_r(K.size_bytes)})]},K.name)})})]}),l.jsx(EX,{}),v&&l.jsx(NX,{}),l.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:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:qO.map(K=>{var qe;const Ae=j.find(G=>G.role===K),Se=Ae?k.includes(Ae.name):!1;return l.jsxs("div",{onClick:()=>H(K),className:ee("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]",Se?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ae?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(oo,{role:K}),Se&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ae==null?void 0:Ae.name,children:Ae?(qe=Ae.name.split("/").pop())==null?void 0:qe.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&l.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:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.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",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),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",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.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:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:_r(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>pe(o.recommended.repo),className:ee("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",o.budget&&!o.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:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(cu,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",se.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ie("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>ie("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),he==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:se.length===0?l.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:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=i==null?void 0:i.model_list.find(G=>G.role===K.role),qe=H2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",qe.color),title:qe.name,children:qe.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.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:K.quant||"GGUF"}),Ae&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(Jf,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&l.jsx(oo,{role:K.role,dense:!0}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(K2,{caps:K.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(cu,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:_r(K.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(P4,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:$w(K.ctx)})]})]})]}),Se&&l.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:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Se.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>me(Se.repo,K.role,K.quant||"Q4_K_M",K.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:[l.jsx(_s,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const G=b(K.role),Ie=Ae&&G,Xt=K.incomplete&&!Ae||Ie;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Xt,title:Ie?`${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Xt?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:Ie?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):l.jsx("div",{className:"space-y-2",children:se.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=H2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Se.color),title:Se.name,children:Se.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&l.jsx(oo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"}),Ae&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",_r(K.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",$w(K.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(K2,{caps:K.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const qe=b(K.role),G=Ae&&qe,Ie=K.incomplete&&!Ae||G;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Ie,title:G?`${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",Ie?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:G?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),D&&l.jsx(kX,{role:D,roleRec:F,models:j,onAssign:K=>{M(D,K),B(null)},onClose:()=>B(null)}),Y&&l.jsx(bX,{model:Y,onClose:()=>U(null),onChanged:N}),g]})}const AX=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],CX=["fast","heavy","coder","vision","hermes","scout"],PX=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function V2(e){return PX.format(e)}function OX(){const{data:e}=yi(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[i,o]=y.useState([]),[u,c]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,_]=y.useState(""),[O,D]=y.useState(null),[B,F]=y.useState(!1),[z,Y]=y.useState({});async function U(M){c(!0),h("");try{const H=await je(`/api/hf/search?q=${encodeURIComponent(M)}`);o(H.results),H.results.length||h("Keine Ergebnisse.")}catch(H){h(`Suche fehlgeschlagen: ${H}`)}finally{c(!1)}}y.useEffect(()=>{U("")},[]);function he(M){g(M.key),n(""),U(M.q)}function ue(){g(""),U(r)}async function ge(M,H,ne){F(!1);try{const Z=await je(`/api/fit?params_b=0&quant=${encodeURIComponent(H)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ne)}`);D(Z)}catch{D(null)}}async function ie(M){if(j===M){k(null);return}k(M),N([]),D(null),_(""),F(!1),h("Analysiere Repository…");try{const H=await je(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(H.quants);const ne=H.quants.includes("Q4_K_M")?"Q4_K_M":H.quants[0]||"Q4_K_M";A(ne),h(H.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),H.quants.length&&ge(H.repo,ne,"")}catch(H){h(`Fehler: ${H}`)}}function se(){const M=v.trim();M&&(o(H=>H.some(ne=>ne.repo===M)?H:[{repo:M,downloads:0,likes:0},...H]),b(""),ie(M))}const X=P?t.find(M=>(M.role||"").toLowerCase()===P):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){F(!0);return}Y(H=>({...H,[M]:"Starte…"}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:P||void 0,jinja:!0})}),Y(H=>({...H,[M]:"Download läuft"})),F(!1)}catch{Y(ne=>({...ne,[M]:"Fehler"}))}}const J=M=>{var ne;const H=((ne=M.split("/").pop())==null?void 0:ne.toLowerCase().replace(/-gguf$/i,""))||"";return H.length>3&&t.some(Z=>Z.name.toLowerCase().includes(H))},I=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(vy,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:AX.map(M=>l.jsxs("button",{onClick:()=>he(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&l.jsx(d4,{className:"h-3 w-3"}),M.label]},M.key))}),u?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const H=j===M.repo,ne=J(M.repo),Z=M.repo.includes("/")?M.repo.split("/")[0]:"—",me=M.repo.split("/").pop();return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",H?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>ie(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:me}),ne&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(or,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:Z}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(_s,{className:"h-3 w-3"})," ",V2(M.downloads)]}),M.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(g4,{className:"h-3 w-3"})," ",V2(M.likes)]})]})]}),H?l.jsx(PN,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(CN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),H&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:pe=>{A(pe.target.value),ge(M.repo,pe.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:pe=>{_(pe.target.value),ge(M.repo,E,pe.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),CX.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))]}),l.jsx("button",{onClick:()=>te(M.repo),disabled:!!z[M.repo]&&z[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:z[M.repo]?z[M.repo]:B?l.jsxs(l.Fragment,{children:[l.jsx(gn,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.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] text-amber-400",children:[l.jsx(gn,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!u&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&se(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (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 font-mono"}),l.jsx("button",{onClick:se,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:"Laden"})]})]})}const _X={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ha},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:vo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Os},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:vu},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:J3},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:tv}};function MX(){const{data:e,isLoading:t,error:r}=RD(),{data:n}=yi(),{data:i}=lh(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[c,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(OX,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?l.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,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.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:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(F4,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=_X[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:gy},S=k.icon,N=o.find(D=>D.role===j.role),E=i==null?void 0:i.model_list.find(D=>D.role===j.role),A=j.models.find(D=>D.repo===j.recommended)||j.models[0];if(!A)return null;const P=c[A.repo],_=j.models.filter(D=>D.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:ee("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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.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:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.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?l.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:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.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"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",mv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(hX,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!c[E.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:[l.jsx(_s,{className:"h-3.5 w-3.5"}),c[E.repo]||"Auf neue Version aktualisieren"]})]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(_s,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(D=>({...D,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(PN,{className:"h-3 w-3"}):l.jsx(CN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(D=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:D.name,children:D.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",D.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:D.fit.text})]})]}),l.jsx("button",{onClick:()=>b(D.repo,j.role,D.quant||"Q4_K_M",D.caps.tools!=="no"),disabled:!!c[D.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:c[D.repo]||"Installieren"})]},D.repo))})]})]},j.role)})})]})]})}function IX(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.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=>l.jsx("button",{onClick:()=>t(r),className:ee("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))})]}),l.jsx(xX,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(YO,{}):l.jsx(MX,{})})]})}const TX={zed:"Zed: settings.json",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function q2({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(th,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(ON,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(a4,{className:"h-3 w-3"})," ",e.detail]})}function Q2({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("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:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:i,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:[n?l.jsx(or,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(rv,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function XO(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=y.useState("zed"),[u,c]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=$D(f.toString()),{data:g,isLoading:v}=zD(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[i];async function N(E,A){A&&(await navigator.clipboard.writeText(A),c(E),setTimeout(()=>c(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(y4,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx($n,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(q2,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(vo,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(q2,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.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:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(m4,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,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"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(f4,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,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-violet-500/50 text-foreground"})]})]}),b&&l.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: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(Q2,{tool:S,fileName:TX[i]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(Q2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const DX="modulepreload",RX=function(e){return"/"+e},Y2={},LX=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=u(r.map(h=>{if(h=RX(h),h in Y2)return;Y2[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":DX,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};class $X extends y.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.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:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const zX=y.lazy(()=>LX(()=>import("./GraphView-CCAApGf_.js"),[]).then(e=>({default:e.GraphView}))),Bd=["identity","knowledge","rules","events"],X2=new Set(["auto","agent","hermes"]),Lg={identity:{label:"Identität",icon:U4,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Ks,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:I4,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:_N,bg:"bg-amber-500/10",text:"text-amber-400"}},Z2={label:"Gedächtnis",icon:ev,text:"text-muted-foreground"},FX={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},J2=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu:
1) wer ich bin und woran ich gerade arbeite,
2) wie ich angesprochen werden möchte,
3) meine bevorzugten Tools, Sprachen und Arbeitsweise,
4) wichtige Regeln/Konventionen, die du beachten sollst,
5) meine Infrastruktur (Server, Dienste ohne Geheimnisse).
Frag immer nur eine Sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function ZO(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Kn(),{showAlert:N,showConfirm:E,dialogElement:A}=ya(),{data:P=[]}=cv({}),{data:_=[],error:O}=cv({q:r,category:e}),{data:D}=MD(v==="graph"),B=O?String(O):"",F=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},z=y.useMemo(()=>{const I=P.length,M=P.filter(H=>X2.has(H.source)).length;return{total:I,auto:M,manual:I-M,cats:new Set(P.map(H=>H.category)).size}},[P]),Y=P.length===0,U=y.useMemo(()=>{const I=D??{nodes:[],edges:[]};if(!r.trim())return I;const M=r.toLowerCase(),H=I.nodes.filter(Z=>Z.content.toLowerCase().includes(M)),ne=new Set(H.map(Z=>Z.id));return{nodes:H,edges:I.edges.filter(Z=>ne.has(Z.source)&&ne.has(Z.target))}},[D,r]),he=y.useMemo(()=>{const I={};return _.forEach(M=>{var H;(I[H=M.category]??(I[H]=[])).push(M)}),I},[_]),ue=y.useMemo(()=>_.filter(I=>!Bd.includes(I.category)),[_]);async function ge(){i.trim()&&(await je("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:u,source:"ui"})}),o(""),k(!1),F())}function ie(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await je(`/api/memory/${I}`,{method:"DELETE"}),F()}catch(M){N("Fehler",`Löschen fehlgeschlagen: ${M.message||M}`)}})}async function se(){try{await navigator.clipboard.writeText(J2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){se(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function te(){h(!0);try{const I=await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),F()}catch(M){N("Fehler",`Fehler beim Löschen: ${M.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const J=({value:I,label:M,accent:H})=>l.jsxs("span",{className:ee("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",H==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[H==="auto"&&l.jsx(us,{className:"h-3 w-3"}),l.jsx("b",{className:ee("font-semibold",H==="auto"?"":"text-foreground"),children:I})," ",M]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",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"}),l.jsx(vy,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),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:[l.jsx(tf,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",k4,"Liste"],["graph",D4,"Graph"]].map(([I,M,H])=>l.jsxs("button",{onClick:()=>b(I),className:ee("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(M,{className:"h-3.5 w-3.5"})," ",H]},I))}),l.jsx("button",{onClick:te,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","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(us,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Y&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(J,{value:z.total,label:"Fakten"}),l.jsx(J,{value:z.auto,label:"auto gelernt",accent:"auto"}),l.jsx(J,{value:z.manual,label:"manuell"}),l.jsx(J,{value:z.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(us,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:i,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",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"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:u,onChange:I=>c(I.target.value),"aria-label":"Kategorie",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:Bd.map(I=>{var M;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((M=Lg[I])==null?void 0:M.label)||I},I)})}),l.jsxs("button",{onClick:ge,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:[l.jsx(tf,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),Y?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(N4,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:se,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(or,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(rv,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:J2})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,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:[l.jsx(RN,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:se,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:[m?l.jsx(or,{className:"h-4 w-4 text-emerald-400"}):l.jsx(rv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(T4,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx($X,{children:l.jsx(y.Suspense,{fallback:l.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:l.jsx(zX,{data:U,onDelete:ie})})}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("button",{onClick:()=>t(""),className:ee("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"}),Bd.map(I=>{const M=Lg[I]||Z2,H=M.icon;return l.jsxs("button",{onClick:()=>t(I),className:ee("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(H,{className:"h-3 w-3"})," ",M.label]},I)})]}),_.length===0?l.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."}):l.jsx("div",{className:"space-y-5",children:[...Bd,"__other"].map(I=>{const M=I==="__other"?ue:he[I]||[];if(!M.length)return null;const H=Lg[I]||Z2,ne=H.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ne,{className:ee("h-3.5 w-3.5",H.text)}),l.jsx("span",{className:ee("text-[11px] font-bold uppercase tracking-wider",H.text),children:H.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:M.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:M.map(Z=>{const me=X2.has(Z.source);return l.jsxs("div",{className:ee("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",FX[Z.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Z.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof Z.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(Z.score*100),"%"]}),l.jsxs("span",{className:ee("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",me?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:me?"Automatisch gelernt":"Manuell angelegt",children:[me&&l.jsx(us,{className:"h-2.5 w-2.5"}),Z.source]}),l.jsx("button",{onClick:()=>ie(Z.id),"aria-label":"Eintrag löschen",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:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},Z.id)})})]},I)})})]}),A]})}const BX=["chat","coding","fast","heavy"];function JO(){const{data:e,error:t}=Ny(5e3),{data:r}=yi(),{showAlert:n,dialogElement:i}=ya(),o=Kn(),u=t?String(t):"",[c,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Ge.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await je("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Ge.agentStatus}),o.invalidateQueries({queryKey:Ge.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:Ds(e.terminal_url),target:"_blank",rel:"noopener",className:ee("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:[l.jsx(Ms,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),u&&l.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&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(Ds(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(Jf,{className:ee("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx($n,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(pw,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.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:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pw,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.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."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.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."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.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&&l.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:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ks,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.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&&c&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:BX.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(or,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.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:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function UX(){const{data:e}=Ny(5e3),t=e!=null&&e.terminal_url?Ds(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",l.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".']})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.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:[l.jsx(Ms,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.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&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.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:[l.jsx(DN,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const eN=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function HX(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Or({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:u}){return l.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",u&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&l.jsx("span",{className:ee("text-[9px] font-mono",r),children:i})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function La({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(us,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function bt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(Y3,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function WX(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(ev,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.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:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(tv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?eN:eN.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>HX(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(Or,{id:"grundlagen",icon:$n,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(Or,{id:"moe",icon:gy,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs(La,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(Or,{id:"lokal",icon:rh,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs(La,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~1222 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(Or,{id:"modelle",icon:Jd,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs(La,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(Or,{id:"gateway",icon:C4,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs(La,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(Or,{id:"mcp",icon:ef,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(j4,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(Or,{id:"skills",icon:_4,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.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: Treibt Entwicklung mit strikter TDD-Praxis
---
# Instructions
...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(Or,{id:"memory",icon:u4,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs(La,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(Or,{id:"agents",icon:pn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs(La,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(Or,{id:"ide",icon:Os,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs(La,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(Or,{id:"tricks",icon:w4,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(ha,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(Or,{id:"wartung",icon:Ks,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(MN,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(tv,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Jd,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(bt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(bt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(bt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(bt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(bt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(ef,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(bt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(bt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(bt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(bt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(bt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(bt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(bt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(bt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(ev,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(bt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(bt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(bt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(bt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(Or,{id:"troubleshooting",icon:b4,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function KX({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.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:[l.jsx(l4,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const tN=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function iu({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:u,onAction:c}){return l.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:ee("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:c,disabled:!i||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function GX({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(c4,{className:"h-3.5 w-3.5"})})]})}function $g(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const VX=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,qX=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function QX(e){return VX.test(e)?"error":qX.test(e)?"warn":"info"}const YX={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function XX({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[u,c]=y.useState(!1),[f,h]=y.useState(""),m=y.useRef(null),g=y.useMemo(()=>t?t.split(`
`).map(S=>({t:S,level:QX(S)})):[],[t]),v=y.useMemo(()=>g.filter(S=>S.level!=="info").length,[g]),b=f.trim().toLowerCase(),j=g.filter(S=>(!u||S.level!=="info")&&(!b||S.t.toLowerCase().includes(b))),k=n==="password_required"||n==="incorrect_password";return l.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:[l.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[l.jsx(RN,{className:"h-3 w-3 text-primary"}),l.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("div",{className:"relative",children:[l.jsx(vy,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),l.jsxs("button",{onClick:()=>c(S=>!S),title:"Nur Fehler und Warnungen zeigen",className:ee("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",u?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[l.jsx(gn,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),l.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3 w-3",r&&"animate-spin")})})]})]}),l.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:k?l.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),l.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):g.length===0?l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):j.length===0?l.jsx("span",{className:"text-muted-foreground",children:u?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):j.map((S,N)=>l.jsx("div",{className:ee("whitespace-pre-wrap",YX[S.level]),children:S.t||" "},N))})]})}function ZX({open:e,showAlert:t}){const[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState(!1),[f,h]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(Ks,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:u?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>c(!u),"aria-label":u?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:u?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(v4,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("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"}),l.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("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"})]})]})}function JX({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:Ks,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:rh,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:TN,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:pn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],u=o.icon,c=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(u,{className:ee("h-4.5 w-4.5",o.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),l.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(ro,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):l.jsxs(l.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&l.jsxs("div",{className:ee("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?l.jsx(gn,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):l.jsx(ON,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:ee("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&l.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&l.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),l.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?l.jsxs(l.Fragment,{children:[((i==null?void 0:i.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:i.packages.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(gw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:m.current}),l.jsx(Zd,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&l.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[l.jsx(_N,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),l.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(gw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),l.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),l.jsx(Zd,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&l.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",l.jsx(Ms,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&l.jsxs("details",{className:"group",children:[l.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),l.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:i.commits.map(m=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(h4,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:m.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!c&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[l.jsx(IN,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:n,disabled:e.loading||c||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function e_({open:e,onClose:t,defaultTab:r="maintenance"}){var qe;const[n,i]=y.useState(null),[o,u]=y.useState([]),[c,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[_,O]=y.useState(""),[D,B]=y.useState(!1),[F,z]=y.useState(null),[Y,U]=y.useState([]),[he,ue]=y.useState(!1),[ge,ie]=y.useState(null),[se,X]=y.useState(null);function te(G,Ie,Xt){X({type:"alert",title:G,message:Ie,onConfirm:()=>{X(null),Xt&&Xt()}})}function J(G,Ie,Xt){X({type:"confirm",title:G,message:Ie,onConfirm:()=>{X(null),Xt()},onCancel:()=>X(null)})}function I(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){je("/api/maintenance/updates").then(i).catch(G=>console.error("Error loading updates",G))}function H(){je("/api/jobs").then(G=>u(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function ne(){je("/api/system/services").then(z).catch(()=>{})}function Z(){je("/api/system/backups").then(G=>U(G.backups||[])).catch(()=>{})}function me(G){v(!0),j(null),je(`/api/maintenance/logs?service=${G}&lines=150`).then(Ie=>{Ie.ok?m(Ie.text):(m(`Fehler beim Laden der Logs: ${Ie.err||"Unbekannter Fehler"}`),(Ie.status==="incorrect_password"||Ie.status==="password_required")&&j(Ie.status))}).catch(Ie=>m(`Fehler: ${Ie.message}`)).finally(()=>v(!1))}y.useEffect(()=>{if(!e)return;M(),H(),ne(),Z();const G=setInterval(()=>{H(),M(),ne()},3e3);return()=>clearInterval(G)},[e]),y.useEffect(()=>{!e||N!=="logs"||me(c)},[e,N,c]);function pe(G){return(G==null?void 0:G.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),H(),!0):!1}async function Oe(){try{const G=await je("/api/maintenance/os-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function re(){try{const G=await je("/api/maintenance/engine-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function we(){try{const G=await je("/api/maintenance/swap-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function _e(){ue(!0);try{const G=await je("/api/maintenance/hermes-update",{method:"POST"});if(pe(G))return;H()}catch(G){te("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{ue(!1)}}async function ae(G){ie({kind:G,loading:!0,data:null});try{const Ie=await je(`/api/maintenance/update-details?kind=${G}`);ie({kind:G,loading:!1,data:Ie})}catch(Ie){ie({kind:G,loading:!1,data:{kind:G,error:Ie.message}})}}function et(){const G=ge==null?void 0:ge.kind;ie(null),G==="os"?Oe():G==="engine"?re():G==="swap"?we():G==="hermes"&&_e()}async function Be(){P(!0);try{await je("/api/maintenance/check-updates",{method:"POST"}),H(),E("maintenance")}catch(G){te("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{P(!1)}}async function Pe(G,Ie){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Ie})}),te("Gestartet",`Modell-Upgrade für '${Ie}' (${G}) gestartet.`),H(),E("maintenance")}catch(Xt){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Xt.message}`)}}async function vt(){J("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await je("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){te("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Yt(){B(!0),O("Snapshot wird erzeugt...");try{const G=await je("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),Z()}catch(G){O(`Fehler: ${G.message}`)}finally{B(!1)}}async function K(G){S(Ie=>({...Ie,[G]:!0}));try{const Ie=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Ie.ok?te("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&c===G&&me(G)}):te("Fehler",`Fehler beim Neustart: ${Ie.err||"Unbekannter Fehler"}`)}catch(Ie){te("Fehler",`Fehler beim Neustart: ${Ie.message}`)}finally{S(Ie=>({...Ie,[G]:!1}))}}async function Ae(G){try{await je(`/api/jobs/${G}/cancel`,{method:"POST"}),H()}catch(Ie){te("Fehler",`Fehler beim Abbrechen: ${Ie.message}`)}}const Se=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ee("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}),l.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] 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:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.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:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:ee("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"}),l.jsx("button",{onClick:()=>E("logs"),className:ee("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"}),l.jsx("button",{onClick:()=>E("settings"),className:ee("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"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:Be,disabled:A||!!Se,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(ro,{className:ee("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Se&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(ro,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Se.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(iu,{icon:Ks,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("os")}),l.jsx(iu,{icon:rh,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("engine")}),l.jsx(iu,{icon:TN,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("swap")}),(()=>{var Ie;const G=(Ie=n==null?void 0:n.components)==null?void 0:Ie.find(Xt=>Xt.key==="hermes_agent");return l.jsx(iu,{icon:pn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:he,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("hermes")})})(),(qe=n==null?void 0:n.model_list)==null?void 0:qe.map(G=>l.jsx(iu,{icon:Z3,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>Pe(G.repo,G.role)},G.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:tN.map(G=>{var Ie;return l.jsx(GX,{label:G.label,system:G.type==="system",ok:(Ie=F==null?void 0:F.services.find(Xt=>Xt.name.toLowerCase().includes(G.reach)))==null?void 0:Ie.ok,busy:k[G.id],onRestart:()=>K(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Y[0]?`Letztes: ${Y[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Y.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:Yt,disabled:D,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(t4,{className:ee("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),_&&l.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:_})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:vt,className:"flex w-full items-center gap-3 p-3 rounded-lg 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:[l.jsx(O4,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.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(G=>{const Ie=G.state==="running"||G.state==="queued";return l.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Ie?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ie&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",G.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:ee(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),Ie&&l.jsx("button",{onClick:()=>Ae(G.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"})]}),G.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&l.jsxs("span",{children:[$g(G.done_bytes)," / ",$g(G.total_bytes),G.rate_bps!=null&&` (${$g(G.rate_bps)}/s)`]}),G.eta_s!=null&&l.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:c,onChange:G=>f(G.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:tN.map(G=>l.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),l.jsxs("button",{onClick:()=>K(c),disabled:k[c],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:[l.jsx(ro,{className:ee("h-3.5 w-3.5",k[c]&&"animate-spin")}),"Restart"]})]}),l.jsx(XX,{service:c,text:h,loading:g,logStatus:b,onRefresh:()=>me(c),onOpenSettings:()=>E("settings")})]}),N==="settings"&&l.jsx(ZX,{open:e,showAlert:te})]})]}),ge&&l.jsx(JX,{detail:ge,maintenanceJob:Se,onClose:()=>ie(null),onApply:et}),se&&l.jsx(WO,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}function eZ(){const{data:e}=lh(3e4),{data:t}=yi(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],u=i.find(m=>m.role==="hermes"),c=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(QO,{frame:"box"}),l.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(n4,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(or,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(eh,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:$n,label:"Lucys Hirn",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)},{icon:Os,label:"Coder (Vibe-Coding)",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(HO,{}),l.jsx(KO,{})]}),l.jsx(GO,{})]})}function zg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(eh,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function tZ(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(EN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(YO,{}):l.jsx(JO,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.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:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(N5,{})]}),l.jsx(zg,{icon:$n,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(zg,{icon:IN,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(zg,{icon:pn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const rZ=[{id:"start",label:"Start",icon:Jf},{id:"vibe",label:"Vibe-Coding",icon:Os},{id:"konstitution",label:"Konstitution",icon:X3},{id:"maschinenraum",label:"Maschinenraum",icon:Uu}];function nZ(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[i,o]=y.useState("maintenance"),{data:u}=jy();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const c=u&&u.engine_reachable&&(u.brain?u.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(e_,{open:r,onClose:()=>n(!1),defaultTab:i}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:rZ.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",c?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(EN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(eZ,{}),e==="vibe"&&l.jsx(XO,{}),e==="konstitution"&&l.jsx(ZO,{}),e==="maschinenraum"&&l.jsx(tZ,{})]})]})}function iZ(){var j,k,S,N,E;WD();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return ou.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,i]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,u]=y.useState(!1),[c,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=jy(),{data:v}=xo(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),u(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const _=(O=P.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);ou.some(_=>_.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=ou.find(A=>A.id===e);return h?l.jsx(nZ,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.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]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(YT,{onNavigate:r}),l.jsx(e_,{open:o,onClose:()=>u(!1),defaultTab:c}),l.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{i(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(eh,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(r4,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ou.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.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:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(N5,{}),l.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"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},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:[l.jsx(s4,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(yX,{}),e==="models"&&l.jsx(IX,{}),e==="connect"&&l.jsx(XO,{}),e==="memory"&&l.jsx(ZO,{}),e==="agent"&&l.jsx(JO,{}),e==="terminal"&&l.jsx(UX,{}),e==="guide"&&l.jsx(WX,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&l.jsx(KX,{title:b.label,hint:b.hint})]})]})]})}class aZ extends dy.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:l.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[l.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),l.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),l.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const oZ=new T3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});l3.createRoot(document.getElementById("root")).render(l.jsx(dy.StrictMode,{children:l.jsx(aZ,{children:l.jsx(D3,{client:oZ,children:l.jsx(iZ,{})})})}));export{ro as R,us as S,nv as T,D4 as a,cy as g,l as j,y as r};