const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-HKWdUr_n.js","assets/code-xml-D-FeXxuA.js","assets/rotate-ccw-DyH-0aBE.js","assets/zap-C5XjvNrh.js","assets/chevron-down-DUjbeeIY.js","assets/layers-YHWsVV8J.js","assets/ConnectView-BVQISUp-.js","assets/folder-open-c9H3RsKD.js","assets/GuideView-BejVWV-I.js","assets/AuftragsbuchView-Cg2IAINl.js","assets/SectionLabel-BkcHvYQE.js","assets/IdeenView-CK4Z-iQS.js","assets/ChronikView-DyY4WTcV.js","assets/WissenView-CunsLEvo.js"])))=>i.map(i=>d[i]); var LI=Object.defineProperty;var x1=e=>{throw TypeError(e)};var zI=(e,t,r)=>t in e?LI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xs=(e,t,r)=>zI(e,typeof t!="symbol"?t+"":t,r),mm=(e,t,r)=>t.has(e)||x1("Cannot "+r);var $=(e,t,r)=>(mm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ce=(e,t,r)=>t.has(e)?x1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pe=(e,t,r,n)=>(mm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Le=(e,t,r)=>(mm(e,t,"access private method"),r);var Hc=(e,t,r,n)=>({set _(a){pe(e,t,a,r)},get _(){return $(e,t,n)}});function FI(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function My(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vm={exports:{}},bs={},ym={exports:{}},Re={};/** * @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 b1;function BI(){if(b1)return Re;b1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function v(R){return R===null||typeof R!="object"?null:(R=m&&R[m]||R["@@iterator"],typeof R=="function"?R:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function E(R,M,J){this.props=R,this.context=M,this.refs=w,this.updater=J||x}E.prototype.isReactComponent={},E.prototype.setState=function(R,M){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,M,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function P(){}P.prototype=E.prototype;function O(R,M,J){this.props=R,this.context=M,this.refs=w,this.updater=J||x}var j=O.prototype=new P;j.constructor=O,k(j,E.prototype),j.isPureReactComponent=!0;var _=Array.isArray,N=Object.prototype.hasOwnProperty,C={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function F(R,M,J){var se,te={},ce=null,ye=null;if(M!=null)for(se in M.ref!==void 0&&(ye=M.ref),M.key!==void 0&&(ce=""+M.key),M)N.call(M,se)&&!D.hasOwnProperty(se)&&(te[se]=M[se]);var _e=arguments.length-2;if(_e===1)te.children=J;else if(1<_e){for(var Z=Array(_e),we=0;we<_e;we++)Z[we]=arguments[we+2];te.children=Z}if(R&&R.defaultProps)for(se in _e=R.defaultProps,_e)te[se]===void 0&&(te[se]=_e[se]);return{$$typeof:e,type:R,key:ce,ref:ye,props:te,_owner:C.current}}function z(R,M){return{$$typeof:e,type:R.type,key:M,ref:R.ref,props:R.props,_owner:R._owner}}function q(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function X(R){var M={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return M[J]})}var B=/\/+/g;function ue(R,M){return typeof R=="object"&&R!==null&&R.key!=null?X(""+R.key):M.toString(36)}function Y(R,M,J,se,te){var ce=typeof R;(ce==="undefined"||ce==="boolean")&&(R=null);var ye=!1;if(R===null)ye=!0;else switch(ce){case"string":case"number":ye=!0;break;case"object":switch(R.$$typeof){case e:case t:ye=!0}}if(ye)return ye=R,te=te(ye),R=se===""?"."+ue(ye,0):se,_(te)?(J="",R!=null&&(J=R.replace(B,"$&/")+"/"),Y(te,M,J,"",function(we){return we})):te!=null&&(q(te)&&(te=z(te,J+(!te.key||ye&&ye.key===te.key?"":(""+te.key).replace(B,"$&/")+"/")+R)),M.push(te)),1;if(ye=0,se=se===""?".":se+":",_(R))for(var _e=0;_e>>1,M=K[R];if(0>>1;Ra(te,Q))cea(ye,te)?(K[R]=ye,K[ce]=Q,R=ce):(K[R]=te,K[se]=Q,R=se);else if(cea(ye,Q))K[R]=ye,K[ce]=Q,R=ce;else break e}}return ie}function a(K,ie){var Q=K.sortIndex-ie.sortIndex;return Q!==0?Q:K.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,v=3,x=!1,k=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(K){for(var ie=r(f);ie!==null;){if(ie.callback===null)n(f);else if(ie.startTime<=K)n(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=r(f)}}function _(K){if(w=!1,j(K),!k)if(r(d)!==null)k=!0,fe(N);else{var ie=r(f);ie!==null&&de(_,ie.startTime-K)}}function N(K,ie){k=!1,w&&(w=!1,P(F),F=-1),x=!0;var Q=v;try{for(j(ie),m=r(d);m!==null&&(!(m.expirationTime>ie)||K&&!X());){var R=m.callback;if(typeof R=="function"){m.callback=null,v=m.priorityLevel;var M=R(m.expirationTime<=ie);ie=e.unstable_now(),typeof M=="function"?m.callback=M:m===r(d)&&n(d),j(ie)}else n(d);m=r(d)}if(m!==null)var J=!0;else{var se=r(f);se!==null&&de(_,se.startTime-ie),J=!1}return J}finally{m=null,v=Q,x=!1}}var C=!1,D=null,F=-1,z=5,q=-1;function X(){return!(e.unstable_now()-qK||125R?(K.sortIndex=Q,t(f,K),r(d)===null&&K===r(f)&&(w?(P(F),F=-1):w=!0,de(_,Q-R))):(K.sortIndex=M,t(d,K),k||x||(k=!0,fe(N))),K},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(K){var ie=v;return function(){var Q=v;v=ie;try{return K.apply(this,arguments)}finally{v=Q}}}})(bm)),bm}var P1;function KI(){return P1||(P1=1,xm.exports=HI()),xm.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 A1;function VI(){if(A1)return fr;A1=1;var e=wl(),t=KI();function r(i){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},m={};function v(i){return d.call(m,i)?!0:d.call(h,i)?!1:f.test(i)?m[i]=!0:(h[i]=!0,!1)}function x(i,l,c,p){if(c!==null&&c.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function k(i,l,c,p){if(l===null||typeof l>"u"||x(i,l,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function w(i,l,c,p,y,b,A){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=i,this.type=l,this.sanitizeURL=b,this.removeEmptyString=A}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){E[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var l=i[0];E[l]=new w(l,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){E[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){E[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){E[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){E[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){E[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){E[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){E[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function O(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var l=i.replace(P,O);E[l]=new w(l,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var l=i.replace(P,O);E[l]=new w(l,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var l=i.replace(P,O);E[l]=new w(l,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){E[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),E.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){E[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function j(i,l,c,p){var y=E.hasOwnProperty(l)?E[l]:null;(y!==null?y.type!==0:p||!(2I||y[A]!==b[I]){var T=` `+y[A].replace(" at new "," at ");return i.displayName&&T.includes("")&&(T=T.replace("",i.displayName)),T}while(1<=A&&0<=I);break}}}finally{J=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?M(i):""}function te(i){switch(i.tag){case 5:return M(i.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return i=se(i.type,!1),i;case 11:return i=se(i.type.render,!1),i;case 1:return i=se(i.type,!0),i;default:return""}}function ce(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case D:return"Fragment";case C:return"Portal";case z:return"Profiler";case F:return"StrictMode";case ue:return"Suspense";case Y:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case q:return(i._context.displayName||"Context")+".Provider";case B:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case le:return l=i.displayName||null,l!==null?l:ce(i.type)||"Memo";case fe:l=i._payload,i=i._init;try{return ce(i(l))}catch{}}return null}function ye(i){var l=i.type;switch(i.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=l.render,i=i.displayName||i.name||"",l.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(l);case 8:return l===F?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function _e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Z(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(i){var l=Z(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,l),p=""+i[l];if(!i.hasOwnProperty(l)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,b=c.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(A){p=""+A,b.call(this,A)}}),Object.defineProperty(i,l,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(A){p=""+A},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Pe(i){i._valueTracker||(i._valueTracker=we(i))}function ne(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var c=l.getValue(),p="";return i&&(p=Z(i)?i.checked?"true":"false":i.value),i=p,i!==c?(l.setValue(i),!0):!1}function ot(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function De(i,l){var c=l.checked;return Q({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function Ee(i,l){var c=l.defaultValue==null?"":l.defaultValue,p=l.checked!=null?l.checked:l.defaultChecked;c=_e(l.value!=null?l.value:c),i._wrapperState={initialChecked:p,initialValue:c,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function vt(i,l){l=l.checked,l!=null&&j(i,"checked",l,!1)}function or(i,l){vt(i,l);var c=_e(l.value),p=l.type;if(c!=null)p==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(p==="submit"||p==="reset"){i.removeAttribute("value");return}l.hasOwnProperty("value")?G(i,l.type,c):l.hasOwnProperty("defaultValue")&&G(i,l.type,_e(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(i.defaultChecked=!!l.defaultChecked)}function fi(i,l,c){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var p=l.type;if(!(p!=="submit"&&p!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+i._wrapperState.initialValue,c||l===i.value||(i.value=l),i.defaultValue=l}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function G(i,l,c){(l!=="number"||ot(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Ie=Array.isArray;function Xe(i,l,c,p){if(i=i.options,l){l={};for(var y=0;y"+l.valueOf().toString()+"",l=Ru.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;l.firstChild;)i.appendChild(l.firstChild)}});function Dl(i,l){if(l){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=l;return}}i.textContent=l}var Rl={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},Uj=["Webkit","ms","Moz","O"];Object.keys(Rl).forEach(function(i){Uj.forEach(function(l){l=l+i.charAt(0).toUpperCase()+i.substring(1),Rl[l]=Rl[i]})});function T0(i,l,c){return l==null||typeof l=="boolean"||l===""?"":c||typeof l!="number"||l===0||Rl.hasOwnProperty(i)&&Rl[i]?(""+l).trim():l+"px"}function D0(i,l){i=i.style;for(var c in l)if(l.hasOwnProperty(c)){var p=c.indexOf("--")===0,y=T0(c,l[c],p);c==="float"&&(c="cssFloat"),p?i.setProperty(c,y):i[c]=y}}var Wj=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oh(i,l){if(l){if(Wj[i]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Ch(i,l){if(i.indexOf("-")===-1)return typeof l.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _h=null;function jh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Nh=null,ro=null,no=null;function R0(i){if(i=is(i)){if(typeof Nh!="function")throw Error(r(280));var l=i.stateNode;l&&(l=ac(l),Nh(i.stateNode,i.type,l))}}function $0(i){ro?no?no.push(i):no=[i]:ro=i}function L0(){if(ro){var i=ro,l=no;if(no=ro=null,R0(i),l)for(i=0;i>>=0,i===0?32:31-(eN(i)/tN|0)|0}var Bu=64,Uu=4194304;function Fl(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Wu(i,l){var c=i.pendingLanes;if(c===0)return 0;var p=0,y=i.suspendedLanes,b=i.pingedLanes,A=c&268435455;if(A!==0){var I=A&~y;I!==0?p=Fl(I):(b&=A,b!==0&&(p=Fl(b)))}else A=c&~y,A!==0?p=Fl(A):b!==0&&(p=Fl(b));if(p===0)return 0;if(l!==0&&l!==p&&(l&y)===0&&(y=p&-p,b=l&-l,y>=b||y===16&&(b&4194240)!==0))return l;if((p&4)!==0&&(p|=c&16),l=i.entangledLanes,l!==0)for(i=i.entanglements,l&=p;0c;c++)l.push(i);return l}function Bl(i,l,c){i.pendingLanes|=l,l!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,l=31-qr(l),i[l]=c}function aN(i,l){var c=i.pendingLanes&~l;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=l,i.mutableReadLanes&=l,i.entangledLanes&=l,l=i.entanglements;var p=i.eventTimes;for(i=i.expirationTimes;0=Yl),fx=" ",hx=!1;function px(i,l){switch(i){case"keyup":return MN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var oo=!1;function DN(i,l){switch(i){case"compositionend":return mx(l);case"keypress":return l.which!==32?null:(hx=!0,fx);case"textInput":return i=l.data,i===fx&&hx?null:i;default:return null}}function RN(i,l){if(oo)return i==="compositionend"||!Yh&&px(i,l)?(i=ox(),Gu=Wh=yi=null,oo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:c,offset:l-i};i=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Sx(c)}}function Ex(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?Ex(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function Px(){for(var i=window,l=ot();l instanceof i.HTMLIFrameElement;){try{var c=typeof l.contentWindow.location.href=="string"}catch{c=!1}if(c)i=l.contentWindow;else break;l=ot(i.document)}return l}function Zh(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}function KN(i){var l=Px(),c=i.focusedElem,p=i.selectionRange;if(l!==c&&c&&c.ownerDocument&&Ex(c.ownerDocument.documentElement,c)){if(p!==null&&Zh(c)){if(l=p.start,i=p.end,i===void 0&&(i=l),"selectionStart"in c)c.selectionStart=l,c.selectionEnd=Math.min(i,c.value.length);else if(i=(l=c.ownerDocument||document)&&l.defaultView||window,i.getSelection){i=i.getSelection();var y=c.textContent.length,b=Math.min(p.start,y);p=p.end===void 0?b:Math.min(p.end,y),!i.extend&&b>p&&(y=p,p=b,b=y),y=kx(c,b);var A=kx(c,p);y&&A&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==A.node||i.focusOffset!==A.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),i.removeAllRanges(),b>p?(i.addRange(l),i.extend(A.node,A.offset)):(l.setEnd(A.node,A.offset),i.addRange(l)))}}for(l=[],i=c;i=i.parentNode;)i.nodeType===1&&l.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c=document.documentMode,lo=null,Jh=null,Jl=null,ep=!1;function Ax(i,l,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;ep||lo==null||lo!==ot(p)||(p=lo,"selectionStart"in p&&Zh(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&&Zl(Jl,p)||(Jl=p,p=rc(Jh,"onSelect"),0ho||(i.current=fp[ho],fp[ho]=null,ho--)}function Ye(i,l){ho++,fp[ho]=i.current,i.current=l}var wi={},Kt=bi(wi),lr=bi(!1),aa=wi;function po(i,l){var c=i.type.contextTypes;if(!c)return wi;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===l)return p.__reactInternalMemoizedMaskedChildContext;var y={},b;for(b in c)y[b]=l[b];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=l,i.__reactInternalMemoizedMaskedChildContext=y),y}function sr(i){return i=i.childContextTypes,i!=null}function oc(){Je(lr),Je(Kt)}function Bx(i,l,c){if(Kt.current!==wi)throw Error(r(168));Ye(Kt,l),Ye(lr,c)}function Ux(i,l,c){var p=i.stateNode;if(l=l.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var y in p)if(!(y in l))throw Error(r(108,ye(i)||"Unknown",y));return Q({},c,p)}function lc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||wi,aa=Kt.current,Ye(Kt,i),Ye(lr,lr.current),!0}function Wx(i,l,c){var p=i.stateNode;if(!p)throw Error(r(169));c?(i=Ux(i,l,aa),p.__reactInternalMemoizedMergedChildContext=i,Je(lr),Je(Kt),Ye(Kt,i)):Je(lr),Ye(lr,c)}var Dn=null,sc=!1,hp=!1;function Hx(i){Dn===null?Dn=[i]:Dn.push(i)}function nI(i){sc=!0,Hx(i)}function Si(){if(!hp&&Dn!==null){hp=!0;var i=0,l=qe;try{var c=Dn;for(qe=1;i>=A,y-=A,Rn=1<<32-qr(l)+y|c<Ne?(Ct=Oe,Oe=null):Ct=Oe.sibling;var He=ee(U,Oe,W[Ne],oe);if(He===null){Oe===null&&(Oe=Ct);break}i&&Oe&&He.alternate===null&&l(U,Oe),L=b(He,L,Ne),Ae===null?Se=He:Ae.sibling=He,Ae=He,Oe=Ct}if(Ne===W.length)return c(U,Oe),nt&&la(U,Ne),Se;if(Oe===null){for(;NeNe?(Ct=Oe,Oe=null):Ct=Oe.sibling;var Ni=ee(U,Oe,He.value,oe);if(Ni===null){Oe===null&&(Oe=Ct);break}i&&Oe&&Ni.alternate===null&&l(U,Oe),L=b(Ni,L,Ne),Ae===null?Se=Ni:Ae.sibling=Ni,Ae=Ni,Oe=Ct}if(He.done)return c(U,Oe),nt&&la(U,Ne),Se;if(Oe===null){for(;!He.done;Ne++,He=W.next())He=ae(U,He.value,oe),He!==null&&(L=b(He,L,Ne),Ae===null?Se=He:Ae.sibling=He,Ae=He);return nt&&la(U,Ne),Se}for(Oe=p(U,Oe);!He.done;Ne++,He=W.next())He=he(Oe,U,Ne,He.value,oe),He!==null&&(i&&He.alternate!==null&&Oe.delete(He.key===null?Ne:He.key),L=b(He,L,Ne),Ae===null?Se=He:Ae.sibling=He,Ae=He);return i&&Oe.forEach(function($I){return l(U,$I)}),nt&&la(U,Ne),Se}function mt(U,L,W,oe){if(typeof W=="object"&&W!==null&&W.type===D&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case N:e:{for(var Se=W.key,Ae=L;Ae!==null;){if(Ae.key===Se){if(Se=W.type,Se===D){if(Ae.tag===7){c(U,Ae.sibling),L=y(Ae,W.props.children),L.return=U,U=L;break e}}else if(Ae.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===fe&&Qx(Se)===Ae.type){c(U,Ae.sibling),L=y(Ae,W.props),L.ref=as(U,Ae,W),L.return=U,U=L;break e}c(U,Ae);break}else l(U,Ae);Ae=Ae.sibling}W.type===D?(L=ma(W.props.children,U.mode,oe,W.key),L.return=U,U=L):(oe=Rc(W.type,W.key,W.props,null,U.mode,oe),oe.ref=as(U,L,W),oe.return=U,U=oe)}return A(U);case C:e:{for(Ae=W.key;L!==null;){if(L.key===Ae)if(L.tag===4&&L.stateNode.containerInfo===W.containerInfo&&L.stateNode.implementation===W.implementation){c(U,L.sibling),L=y(L,W.children||[]),L.return=U,U=L;break e}else{c(U,L);break}else l(U,L);L=L.sibling}L=cm(W,U.mode,oe),L.return=U,U=L}return A(U);case fe:return Ae=W._init,mt(U,L,Ae(W._payload),oe)}if(Ie(W))return ge(U,L,W,oe);if(ie(W))return xe(U,L,W,oe);fc(U,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,L!==null&&L.tag===6?(c(U,L.sibling),L=y(L,W),L.return=U,U=L):(c(U,L),L=um(W,U.mode,oe),L.return=U,U=L),A(U)):c(U,L)}return mt}var go=Xx(!0),Zx=Xx(!1),hc=bi(null),pc=null,xo=null,xp=null;function bp(){xp=xo=pc=null}function wp(i){var l=hc.current;Je(hc),i._currentValue=l}function Sp(i,l,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),i===c)break;i=i.return}}function bo(i,l){pc=i,xp=xo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&l)!==0&&(ur=!0),i.firstContext=null)}function Ir(i){var l=i._currentValue;if(xp!==i)if(i={context:i,memoizedValue:l,next:null},xo===null){if(pc===null)throw Error(r(308));xo=i,pc.dependencies={lanes:0,firstContext:i}}else xo=xo.next=i;return l}var sa=null;function kp(i){sa===null?sa=[i]:sa.push(i)}function Jx(i,l,c,p){var y=l.interleaved;return y===null?(c.next=c,kp(l)):(c.next=y.next,y.next=c),l.interleaved=c,Ln(i,p)}function Ln(i,l){i.lanes|=l;var c=i.alternate;for(c!==null&&(c.lanes|=l),c=i,i=i.return;i!==null;)i.childLanes|=l,c=i.alternate,c!==null&&(c.childLanes|=l),c=i,i=i.return;return c.tag===3?c.stateNode:null}var ki=!1;function Ep(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function eb(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function zn(i,l){return{eventTime:i,lane:l,tag:0,payload:null,callback:null,next:null}}function Ei(i,l,c){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(We&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,Ln(i,c)}return y=p.interleaved,y===null?(l.next=l,kp(p)):(l.next=y.next,y.next=l),p.interleaved=l,Ln(i,c)}function mc(i,l,c){if(l=l.updateQueue,l!==null&&(l=l.shared,(c&4194240)!==0)){var p=l.lanes;p&=i.pendingLanes,c|=p,l.lanes=c,Lh(i,c)}}function tb(i,l){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var y=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var A={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?y=b=A:b=b.next=A,c=c.next}while(c!==null);b===null?y=b=l:b=b.next=l}else y=b=l;c={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:p.shared,effects:p.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=l:i.next=l,c.lastBaseUpdate=l}function vc(i,l,c,p){var y=i.updateQueue;ki=!1;var b=y.firstBaseUpdate,A=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var T=I,V=T.next;T.next=null,A===null?b=V:A.next=V,A=T;var re=i.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==A&&(I===null?re.firstBaseUpdate=V:I.next=V,re.lastBaseUpdate=T))}if(b!==null){var ae=y.baseState;A=0,re=V=T=null,I=b;do{var ee=I.lane,he=I.eventTime;if((p&ee)===ee){re!==null&&(re=re.next={eventTime:he,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ge=i,xe=I;switch(ee=l,he=c,xe.tag){case 1:if(ge=xe.payload,typeof ge=="function"){ae=ge.call(he,ae,ee);break e}ae=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=xe.payload,ee=typeof ge=="function"?ge.call(he,ae,ee):ge,ee==null)break e;ae=Q({},ae,ee);break e;case 2:ki=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,ee=y.effects,ee===null?y.effects=[I]:ee.push(I))}else he={eventTime:he,lane:ee,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(V=re=he,T=ae):re=re.next=he,A|=ee;if(I=I.next,I===null){if(I=y.shared.pending,I===null)break;ee=I,I=ee.next,ee.next=null,y.lastBaseUpdate=ee,y.shared.pending=null}}while(!0);if(re===null&&(T=ae),y.baseState=T,y.firstBaseUpdate=V,y.lastBaseUpdate=re,l=y.shared.interleaved,l!==null){y=l;do A|=y.lane,y=y.next;while(y!==l)}else b===null&&(y.shared.lanes=0);da|=A,i.lanes=A,i.memoizedState=ae}}function rb(i,l,c){if(i=l.effects,l.effects=null,i!==null)for(l=0;lc?c:4,i(!0);var p=_p.transition;_p.transition={};try{i(!1),l()}finally{qe=c,_p.transition=p}}function wb(){return Mr().memoizedState}function lI(i,l,c){var p=Ci(i);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},Sb(i))kb(l,c);else if(c=Jx(i,l,c,p),c!==null){var y=er();Jr(c,i,p,y),Eb(c,l,p)}}function sI(i,l,c){var p=Ci(i),y={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(Sb(i))kb(l,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var A=l.lastRenderedState,I=b(A,c);if(y.hasEagerState=!0,y.eagerState=I,Gr(I,A)){var T=l.interleaved;T===null?(y.next=y,kp(l)):(y.next=T.next,T.next=y),l.interleaved=y;return}}catch{}finally{}c=Jx(i,l,y,p),c!==null&&(y=er(),Jr(c,i,p,y),Eb(c,l,p))}}function Sb(i){var l=i.alternate;return i===st||l!==null&&l===st}function kb(i,l){us=xc=!0;var c=i.pending;c===null?l.next=l:(l.next=c.next,c.next=l),i.pending=l}function Eb(i,l,c){if((c&4194240)!==0){var p=l.lanes;p&=i.pendingLanes,c|=p,l.lanes=c,Lh(i,c)}}var Sc={readContext:Ir,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},uI={readContext:Ir,useCallback:function(i,l){return hn().memoizedState=[i,l===void 0?null:l],i},useContext:Ir,useEffect:hb,useImperativeHandle:function(i,l,c){return c=c!=null?c.concat([i]):null,bc(4194308,4,vb.bind(null,l,i),c)},useLayoutEffect:function(i,l){return bc(4194308,4,i,l)},useInsertionEffect:function(i,l){return bc(4,2,i,l)},useMemo:function(i,l){var c=hn();return l=l===void 0?null:l,i=i(),c.memoizedState=[i,l],i},useReducer:function(i,l,c){var p=hn();return l=c!==void 0?c(l):l,p.memoizedState=p.baseState=l,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:l},p.queue=i,i=i.dispatch=lI.bind(null,st,i),[p.memoizedState,i]},useRef:function(i){var l=hn();return i={current:i},l.memoizedState=i},useState:db,useDebugValue:Rp,useDeferredValue:function(i){return hn().memoizedState=i},useTransition:function(){var i=db(!1),l=i[0];return i=oI.bind(null,i[1]),hn().memoizedState=i,[l,i]},useMutableSource:function(){},useSyncExternalStore:function(i,l,c){var p=st,y=hn();if(nt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=l(),Ot===null)throw Error(r(349));(ca&30)!==0||ob(p,l,c)}y.memoizedState=c;var b={value:c,getSnapshot:l};return y.queue=b,hb(sb.bind(null,p,b,i),[i]),p.flags|=2048,fs(9,lb.bind(null,p,b,c,l),void 0,null),c},useId:function(){var i=hn(),l=Ot.identifierPrefix;if(nt){var c=$n,p=Rn;c=(p&~(1<<32-qr(p)-1)).toString(32)+c,l=":"+l+"R"+c,c=cs++,0<\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=A.createElement(c,{is:p.is}):(i=A.createElement(c),c==="select"&&(A=i,p.multiple?A.multiple=!0:p.size&&(A.size=p.size))):i=A.createElementNS(i,c),i[dn]=l,i[ns]=p,Hb(i,l,!1,!1),l.stateNode=i;e:{switch(A=Ch(c,p),c){case"dialog":Ze("cancel",i),Ze("close",i),y=p;break;case"iframe":case"object":case"embed":Ze("load",i),y=p;break;case"video":case"audio":for(y=0;yPo&&(l.flags|=128,p=!0,hs(b,!1),l.lanes=4194304)}else{if(!p)if(i=yc(A),i!==null){if(l.flags|=128,p=!0,c=i.updateQueue,c!==null&&(l.updateQueue=c,l.flags|=4),hs(b,!0),b.tail===null&&b.tailMode==="hidden"&&!A.alternate&&!nt)return qt(l),null}else 2*pt()-b.renderingStartTime>Po&&c!==1073741824&&(l.flags|=128,p=!0,hs(b,!1),l.lanes=4194304);b.isBackwards?(A.sibling=l.child,l.child=A):(c=b.last,c!==null?c.sibling=A:l.child=A,b.last=A)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=pt(),l.sibling=null,c=lt.current,Ye(lt,p?c&1|2:c&1),l):(qt(l),null);case 22:case 23:return om(),p=l.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(l.flags|=8192),p&&(l.mode&1)!==0?(Sr&1073741824)!==0&&(qt(l),l.subtreeFlags&6&&(l.flags|=8192)):qt(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function yI(i,l){switch(mp(l),l.tag){case 1:return sr(l.type)&&oc(),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return wo(),Je(lr),Je(Kt),Cp(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 5:return Ap(l),null;case 13:if(Je(lt),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));yo()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return Je(lt),null;case 4:return wo(),null;case 10:return wp(l.type._context),null;case 22:case 23:return om(),null;case 24:return null;default:return null}}var Ac=!1,Gt=!1,gI=typeof WeakSet=="function"?WeakSet:Set,me=null;function ko(i,l){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(p){ct(i,l,p)}else c.current=null}function Gp(i,l,c){try{c()}catch(p){ct(i,l,p)}}var qb=!1;function xI(i,l){if(op=Vu,i=Px(),Zh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var y=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var A=0,I=-1,T=-1,V=0,re=0,ae=i,ee=null;t:for(;;){for(var he;ae!==c||y!==0&&ae.nodeType!==3||(I=A+y),ae!==b||p!==0&&ae.nodeType!==3||(T=A+p),ae.nodeType===3&&(A+=ae.nodeValue.length),(he=ae.firstChild)!==null;)ee=ae,ae=he;for(;;){if(ae===i)break t;if(ee===c&&++V===y&&(I=A),ee===b&&++re===p&&(T=A),(he=ae.nextSibling)!==null)break;ae=ee,ee=ae.parentNode}ae=he}c=I===-1||T===-1?null:{start:I,end:T}}else c=null}c=c||{start:0,end:0}}else c=null;for(lp={focusedElem:i,selectionRange:c},Vu=!1,me=l;me!==null;)if(l=me,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,me=i;else for(;me!==null;){l=me;try{var ge=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var xe=ge.memoizedProps,mt=ge.memoizedState,U=l.stateNode,L=U.getSnapshotBeforeUpdate(l.elementType===l.type?xe:Qr(l.type,xe),mt);U.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var W=l.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(oe){ct(l,l.return,oe)}if(i=l.sibling,i!==null){i.return=l.return,me=i;break}me=l.return}return ge=qb,qb=!1,ge}function ps(i,l,c){var p=l.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&i)===i){var b=y.destroy;y.destroy=void 0,b!==void 0&&Gp(l,c,b)}y=y.next}while(y!==p)}}function Oc(i,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&i)===i){var p=c.create;c.destroy=p()}c=c.next}while(c!==l)}}function Yp(i){var l=i.ref;if(l!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof l=="function"?l(i):l.current=i}}function Gb(i){var l=i.alternate;l!==null&&(i.alternate=null,Gb(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&(delete l[dn],delete l[ns],delete l[dp],delete l[tI],delete l[rI])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Yb(i){return i.tag===5||i.tag===3||i.tag===4}function Qb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yb(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Qp(i,l,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?c.nodeType===8?c.parentNode.insertBefore(i,l):c.insertBefore(i,l):(c.nodeType===8?(l=c.parentNode,l.insertBefore(i,c)):(l=c,l.appendChild(i)),c=c._reactRootContainer,c!=null||l.onclick!==null||(l.onclick=ic));else if(p!==4&&(i=i.child,i!==null))for(Qp(i,l,c),i=i.sibling;i!==null;)Qp(i,l,c),i=i.sibling}function Xp(i,l,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?c.insertBefore(i,l):c.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(Xp(i,l,c),i=i.sibling;i!==null;)Xp(i,l,c),i=i.sibling}var Dt=null,Xr=!1;function Pi(i,l,c){for(c=c.child;c!==null;)Xb(i,l,c),c=c.sibling}function Xb(i,l,c){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Fu,c)}catch{}switch(c.tag){case 5:Gt||ko(c,l);case 6:var p=Dt,y=Xr;Dt=null,Pi(i,l,c),Dt=p,Xr=y,Dt!==null&&(Xr?(i=Dt,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Dt.removeChild(c.stateNode));break;case 18:Dt!==null&&(Xr?(i=Dt,c=c.stateNode,i.nodeType===8?cp(i.parentNode,c):i.nodeType===1&&cp(i,c),Vl(i)):cp(Dt,c.stateNode));break;case 4:p=Dt,y=Xr,Dt=c.stateNode.containerInfo,Xr=!0,Pi(i,l,c),Dt=p,Xr=y;break;case 0:case 11:case 14:case 15:if(!Gt&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var b=y,A=b.destroy;b=b.tag,A!==void 0&&((b&2)!==0||(b&4)!==0)&&Gp(c,l,A),y=y.next}while(y!==p)}Pi(i,l,c);break;case 1:if(!Gt&&(ko(c,l),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.componentWillUnmount()}catch(I){ct(c,l,I)}Pi(i,l,c);break;case 21:Pi(i,l,c);break;case 22:c.mode&1?(Gt=(p=Gt)||c.memoizedState!==null,Pi(i,l,c),Gt=p):Pi(i,l,c);break;default:Pi(i,l,c)}}function Zb(i){var l=i.updateQueue;if(l!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new gI),l.forEach(function(p){var y=CI.bind(null,i,p);c.has(p)||(c.add(p),p.then(y,y))})}}function Zr(i,l){var c=l.deletions;if(c!==null)for(var p=0;py&&(y=A),p&=~b}if(p=y,p=pt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*wI(p/1960))-p,10i?16:i,Oi===null)var p=!1;else{if(i=Oi,Oi=null,Ic=0,(We&6)!==0)throw Error(r(331));var y=We;for(We|=4,me=i.current;me!==null;){var b=me,A=b.child;if((me.flags&16)!==0){var I=b.deletions;if(I!==null){for(var T=0;Tpt()-em?ha(i,0):Jp|=c),dr(i,l)}function d1(i,l){l===0&&((i.mode&1)===0?l=1:(l=Uu,Uu<<=1,(Uu&130023424)===0&&(Uu=4194304)));var c=er();i=Ln(i,l),i!==null&&(Bl(i,l,c),dr(i,c))}function OI(i){var l=i.memoizedState,c=0;l!==null&&(c=l.retryLane),d1(i,c)}function CI(i,l){var c=0;switch(i.tag){case 13:var p=i.stateNode,y=i.memoizedState;y!==null&&(c=y.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(l),d1(i,c)}var f1;f1=function(i,l,c){if(i!==null)if(i.memoizedProps!==l.pendingProps||lr.current)ur=!0;else{if((i.lanes&c)===0&&(l.flags&128)===0)return ur=!1,mI(i,l,c);ur=(i.flags&131072)!==0}else ur=!1,nt&&(l.flags&1048576)!==0&&Kx(l,cc,l.index);switch(l.lanes=0,l.tag){case 2:var p=l.type;Pc(i,l),i=l.pendingProps;var y=po(l,Kt.current);bo(l,c),y=Np(null,l,p,i,y,c);var b=Ip();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,sr(p)?(b=!0,lc(l)):b=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Ep(l),y.updater=kc,l.stateNode=y,y._reactInternals=l,Lp(l,p,i,c),l=Up(null,l,p,!0,b,c)):(l.tag=0,nt&&b&&pp(l),Jt(null,l,y,c),l=l.child),l;case 16:p=l.elementType;e:{switch(Pc(i,l),i=l.pendingProps,y=p._init,p=y(p._payload),l.type=p,y=l.tag=jI(p),i=Qr(p,i),y){case 0:l=Bp(null,l,p,i,c);break e;case 1:l=Lb(null,l,p,i,c);break e;case 11:l=Mb(null,l,p,i,c);break e;case 14:l=Tb(null,l,p,Qr(p.type,i),c);break e}throw Error(r(306,p,""))}return l;case 0:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Bp(i,l,p,y,c);case 1:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Lb(i,l,p,y,c);case 3:e:{if(zb(l),i===null)throw Error(r(387));p=l.pendingProps,b=l.memoizedState,y=b.element,eb(i,l),vc(l,p,null,c);var A=l.memoizedState;if(p=A.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){y=So(Error(r(423)),l),l=Fb(i,l,p,c,y);break e}else if(p!==y){y=So(Error(r(424)),l),l=Fb(i,l,p,c,y);break e}else for(wr=xi(l.stateNode.containerInfo.firstChild),br=l,nt=!0,Yr=null,c=Zx(l,null,p,c),l.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(yo(),p===y){l=Fn(i,l,c);break e}Jt(i,l,p,c)}l=l.child}return l;case 5:return nb(l),i===null&&yp(l),p=l.type,y=l.pendingProps,b=i!==null?i.memoizedProps:null,A=y.children,sp(p,y)?A=null:b!==null&&sp(p,b)&&(l.flags|=32),$b(i,l),Jt(i,l,A,c),l.child;case 6:return i===null&&yp(l),null;case 13:return Bb(i,l,c);case 4:return Pp(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=go(l,null,p,c):Jt(i,l,p,c),l.child;case 11:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Mb(i,l,p,y,c);case 7:return Jt(i,l,l.pendingProps,c),l.child;case 8:return Jt(i,l,l.pendingProps.children,c),l.child;case 12:return Jt(i,l,l.pendingProps.children,c),l.child;case 10:e:{if(p=l.type._context,y=l.pendingProps,b=l.memoizedProps,A=y.value,Ye(hc,p._currentValue),p._currentValue=A,b!==null)if(Gr(b.value,A)){if(b.children===y.children&&!lr.current){l=Fn(i,l,c);break e}}else for(b=l.child,b!==null&&(b.return=l);b!==null;){var I=b.dependencies;if(I!==null){A=b.child;for(var T=I.firstContext;T!==null;){if(T.context===p){if(b.tag===1){T=zn(-1,c&-c),T.tag=2;var V=b.updateQueue;if(V!==null){V=V.shared;var re=V.pending;re===null?T.next=T:(T.next=re.next,re.next=T),V.pending=T}}b.lanes|=c,T=b.alternate,T!==null&&(T.lanes|=c),Sp(b.return,c,l),I.lanes|=c;break}T=T.next}}else if(b.tag===10)A=b.type===l.type?null:b.child;else if(b.tag===18){if(A=b.return,A===null)throw Error(r(341));A.lanes|=c,I=A.alternate,I!==null&&(I.lanes|=c),Sp(A,c,l),A=b.sibling}else A=b.child;if(A!==null)A.return=b;else for(A=b;A!==null;){if(A===l){A=null;break}if(b=A.sibling,b!==null){b.return=A.return,A=b;break}A=A.return}b=A}Jt(i,l,y.children,c),l=l.child}return l;case 9:return y=l.type,p=l.pendingProps.children,bo(l,c),y=Ir(y),p=p(y),l.flags|=1,Jt(i,l,p,c),l.child;case 14:return p=l.type,y=Qr(p,l.pendingProps),y=Qr(p.type,y),Tb(i,l,p,y,c);case 15:return Db(i,l,l.type,l.pendingProps,c);case 17:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Pc(i,l),l.tag=1,sr(p)?(i=!0,lc(l)):i=!1,bo(l,c),Ab(l,p,y),Lp(l,p,y,c),Up(null,l,p,!0,i,c);case 19:return Wb(i,l,c);case 22:return Rb(i,l,c)}throw Error(r(156,l.tag))};function h1(i,l){return V0(i,l)}function _I(i,l,c,p){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,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 Dr(i,l,c,p){return new _I(i,l,c,p)}function sm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function jI(i){if(typeof i=="function")return sm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===B)return 11;if(i===le)return 14}return 2}function ji(i,l){var c=i.alternate;return c===null?(c=Dr(i.tag,l,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=l,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,l=i.dependencies,c.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Rc(i,l,c,p,y,b){var A=2;if(p=i,typeof i=="function")sm(i)&&(A=1);else if(typeof i=="string")A=5;else e:switch(i){case D:return ma(c.children,y,b,l);case F:A=8,y|=8;break;case z:return i=Dr(12,c,l,y|2),i.elementType=z,i.lanes=b,i;case ue:return i=Dr(13,c,l,y),i.elementType=ue,i.lanes=b,i;case Y:return i=Dr(19,c,l,y),i.elementType=Y,i.lanes=b,i;case de:return $c(c,y,b,l);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case q:A=10;break e;case X:A=9;break e;case B:A=11;break e;case le:A=14;break e;case fe:A=16,p=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return l=Dr(A,c,l,y),l.elementType=i,l.type=p,l.lanes=b,l}function ma(i,l,c,p){return i=Dr(7,i,p,l),i.lanes=c,i}function $c(i,l,c,p){return i=Dr(22,i,p,l),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function um(i,l,c){return i=Dr(6,i,null,l),i.lanes=c,i}function cm(i,l,c){return l=Dr(4,i.children!==null?i.children:[],i.key,l),l.lanes=c,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}function NI(i,l,c,p,y){this.tag=l,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$h(0),this.expirationTimes=$h(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$h(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function dm(i,l,c,p,y,b,A,I,T){return i=new NI(i,l,c,I,T),l===1?(l=1,b===!0&&(l|=8)):l=0,b=Dr(3,null,null,l),i.current=b,b.stateNode=i,b.memoizedState={element:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ep(b),i}function II(i,l,c){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),gm.exports=VI(),gm.exports}var C1;function qI(){if(C1)return Kc;C1=1;var e=kP();return Kc.createRoot=e.createRoot,Kc.hydrateRoot=e.hydrateRoot,Kc}var GI=qI();const YI=My(GI);var gu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ja,Fi,Xo,hP,QI=(hP=class extends gu{constructor(){super();Ce(this,ja);Ce(this,Fi);Ce(this,Xo);pe(this,Xo,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Fi)||this.setEventListener($(this,Xo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Fi))==null||t.call(this),pe(this,Fi,void 0))}setEventListener(t){var r;pe(this,Xo,t),(r=$(this,Fi))==null||r.call(this),pe(this,Fi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,ja)!==t&&(pe(this,ja,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,ja)=="boolean"?$(this,ja):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ja=new WeakMap,Fi=new WeakMap,Xo=new WeakMap,hP),Dy=new QI,XI={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Bi,Iy,pP,ZI=(pP=class{constructor(){Ce(this,Bi,XI);Ce(this,Iy,!1)}setTimeoutProvider(e){pe(this,Bi,e)}setTimeout(e,t){return $(this,Bi).setTimeout(e,t)}clearTimeout(e){$(this,Bi).clearTimeout(e)}setInterval(e,t){return $(this,Bi).setInterval(e,t)}clearInterval(e){$(this,Bi).clearInterval(e)}},Bi=new WeakMap,Iy=new WeakMap,pP),ka=new ZI;function JI(e){setTimeout(e,0)}var eM=typeof window>"u"||"Deno"in globalThis;function pr(){}function tM(e,t){return typeof e=="function"?e(t):e}function hv(e){return typeof e=="number"&&e>=0&&e!==1/0}function EP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yi(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function _1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:s,stale:u}=e;if(s){if(n){if(t.queryHash!==Ry(s,t.options))return!1}else if(!Vs(t.queryKey,s))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||o&&!o(t))}function j1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ks(t.options.mutationKey)!==Ks(o))return!1}else if(!Vs(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Ry(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ks)(e)}function Ks(e){return JSON.stringify(e,(t,r)=>mv(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function Vs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Vs(e[r],t[r])):!1}var rM=Object.prototype.hasOwnProperty;function PP(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=N1(e)&&N1(t);if(!n&&!(mv(e)&&mv(t)))return t;const o=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),u=s.length,d=n?new Array(u):{};let f=0;for(let h=0;h{ka.setTimeout(t,e)})}function vv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?PP(e,t):t}function iM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function aM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var $y=Symbol();function AP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$y?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function OP(e,t){return typeof e=="function"?e(...t):!!e}function oM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var qs=(()=>{let e=()=>eM;return{isServer(){return e()},setIsServer(t){e=t}}})();function yv(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var lM=JI;function sM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},a=lM;const o=u=>{t?e.push(u):a(()=>{r(u)})},s=()=>{const u=e;e=[],u.length&&a(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||s()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{a=u}}}var Ft=sM(),Zo,Ui,Jo,mP,uM=(mP=class extends gu{constructor(){super();Ce(this,Zo,!0);Ce(this,Ui);Ce(this,Jo);pe(this,Jo,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(){$(this,Ui)||this.setEventListener($(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ui))==null||t.call(this),pe(this,Ui,void 0))}setEventListener(t){var r;pe(this,Jo,t),(r=$(this,Ui))==null||r.call(this),pe(this,Ui,t(this.setOnline.bind(this)))}setOnline(t){$(this,Zo)!==t&&(pe(this,Zo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,Zo)}},Zo=new WeakMap,Ui=new WeakMap,Jo=new WeakMap,mP),Ad=new uM;function cM(e){return Math.min(1e3*2**e,3e4)}function CP(e){return(e??"online")==="online"?Ad.isOnline():!0}var gv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _P(e){let t=!1,r=0,n;const a=yv(),o=()=>a.status!=="pending",s=w=>{var E;if(!o()){const P=new gv(w);v(P),(E=e.onCancel)==null||E.call(e,P)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Dy.isFocused()&&(e.networkMode==="always"||Ad.isOnline())&&e.canRun(),h=()=>CP(e.networkMode)&&e.canRun(),m=w=>{o()||(n==null||n(),a.resolve(w))},v=w=>{o()||(n==null||n(),a.reject(w))},x=()=>new Promise(w=>{var E;n=P=>{(o()||f())&&w(P)},(E=e.onPause)==null||E.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),k=()=>{if(o())return;let w;const E=r===0?e.initialPromise:void 0;try{w=E??e.fn()}catch(P){w=Promise.reject(P)}Promise.resolve(w).then(m).catch(P=>{var C;if(o())return;const O=e.retry??(qs.isServer()?0:3),j=e.retryDelay??cM,_=typeof j=="function"?j(r,P):j,N=O===!0||typeof O=="number"&&rf()?void 0:x()).then(()=>{t?v(P):k()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(n==null||n(),a),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?k():x().then(k),a)}}var Na,vP,jP=(vP=class{constructor(){Ce(this,Na)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hv(this.gcTime)&&pe(this,Na,ka.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qs.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Na)!==void 0&&(ka.clearTimeout($(this,Na)),pe(this,Na,void 0))}},Na=new WeakMap,vP);function dM(e){return{onFetch:(t,r)=>{var h,m,v,x,k;const n=t.options,a=(v=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],s=((k=t.state.data)==null?void 0:k.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let w=!1;const E=j=>{oM(j,()=>t.signal,()=>w=!0)},P=AP(t.options,t.fetchOptions),O=async(j,_,N)=>{if(w)return Promise.reject(t.signal.reason);if(_==null&&j.pages.length)return Promise.resolve(j);const D=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:_,direction:N?"backward":"forward",meta:t.options.meta};return E(X),X})(),F=await P(D),{maxPages:z}=t.options,q=N?aM:iM;return{pages:q(j.pages,F,z),pageParams:q(j.pageParams,_,z)}};if(a&&o.length){const j=a==="backward",_=j?fM:M1,N={pages:o,pageParams:s},C=_(n,N);u=await O(N,C,j)}else{const j=e??o.length;do{const _=d===0?s[0]??n.initialPageParam:M1(n,u);if(d>0&&_==null)break;u=await O(u,_),d++}while(d{var w,E;return(E=(w=t.options).persister)==null?void 0:E.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function M1(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 fM(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 el,Ia,tl,$r,Ma,_t,hu,Ta,kr,NP,Wn,yP,hM=(yP=class extends jP{constructor(t){super();Ce(this,kr);Ce(this,el);Ce(this,Ia);Ce(this,tl);Ce(this,$r);Ce(this,Ma);Ce(this,_t);Ce(this,hu);Ce(this,Ta);pe(this,Ta,!1),pe(this,hu,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,Ma,t.client),pe(this,$r,$(this,Ma).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,Ia,D1(this.options)),this.state=t.state??$(this,Ia),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,el)}get promise(){var t;return(t=$(this,_t))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,hu),...t},t!=null&&t._type&&pe(this,el,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=D1(this.options);r.data!==void 0&&(this.setState(T1(r.data,r.dataUpdatedAt)),pe(this,Ia,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,$r).remove(this)}setData(t,r){const n=vv(this.state.data,t,this.options);return Le(this,kr,Wn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Le(this,kr,Wn).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=$(this,_t))==null?void 0:n.promise;return(a=$(this,_t))==null||a.cancel(t),r?r.then(pr).catch(pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Ia)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Er(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$y||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yi(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:!EP(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,_t))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,_t))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,$r).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,_t)&&($(this,Ta)||Le(this,kr,NP).call(this)?$(this,_t).cancel({revert:!0}):$(this,_t).cancelRetry()),this.scheduleGc()),$(this,$r).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Le(this,kr,Wn).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,m,v,x,k,w,E,P,O,j;if(this.state.fetchStatus!=="idle"&&((f=$(this,_t))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,_t))return $(this,_t).continueRetry(),$(this,_t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(N=>N.options.queryFn);_&&this.setOptions(_.options)}const n=new AbortController,a=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(pe(this,Ta,!0),n.signal)})},o=()=>{const _=AP(this.options,r),C=(()=>{const D={client:$(this,Ma),queryKey:this.queryKey,meta:this.meta};return a(D),D})();return pe(this,Ta,!1),this.options.persister?this.options.persister(_,C,this):_(C)},u=(()=>{const _={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,Ma),state:this.state,fetchFn:o};return a(_),_})(),d=$(this,el)==="infinite"?dM(this.options.pages):this.options.behavior;d==null||d.onFetch(u,this),pe(this,tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&Le(this,kr,Wn).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),pe(this,_t,_P({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:_=>{_ instanceof gv&&_.revert&&this.setState({...$(this,tl),fetchStatus:"idle"}),n.abort()},onFail:(_,N)=>{Le(this,kr,Wn).call(this,{type:"failed",failureCount:_,error:N})},onPause:()=>{Le(this,kr,Wn).call(this,{type:"pause"})},onContinue:()=>{Le(this,kr,Wn).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const _=await $(this,_t).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(x=(v=$(this,$r).config).onSuccess)==null||x.call(v,_,this),(w=(k=$(this,$r).config).onSettled)==null||w.call(k,_,this.state.error,this),_}catch(_){if(_ instanceof gv){if(_.silent)return $(this,_t).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw Le(this,kr,Wn).call(this,{type:"error",error:_}),(P=(E=$(this,$r).config).onError)==null||P.call(E,_,this),(j=(O=$(this,$r).config).onSettled)==null||j.call(O,this.state.data,_,this),_}finally{this.scheduleGc()}}},el=new WeakMap,Ia=new WeakMap,tl=new WeakMap,$r=new WeakMap,Ma=new WeakMap,_t=new WeakMap,hu=new WeakMap,Ta=new WeakMap,kr=new WeakSet,NP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Wn=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,...IP(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...T1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,tl,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ft.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,$r).notify({query:this,type:"updated",action:t})})},yP);function IP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:CP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D1(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 hr,Fe,pu,tr,Da,rl,Kn,Wi,mu,nl,il,Ra,$a,Hi,al,Ve,$s,xv,bv,wv,Sv,kv,Ev,Pv,MP,gP,pM=(gP=class extends gu{constructor(t,r){super();Ce(this,Ve);Ce(this,hr);Ce(this,Fe);Ce(this,pu);Ce(this,tr);Ce(this,Da);Ce(this,rl);Ce(this,Kn);Ce(this,Wi);Ce(this,mu);Ce(this,nl);Ce(this,il);Ce(this,Ra);Ce(this,$a);Ce(this,Hi);Ce(this,al,new Set);this.options=r,pe(this,hr,t),pe(this,Wi,null),pe(this,Kn,yv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Fe).addObserver(this),R1($(this,Fe),this.options)?Le(this,Ve,$s).call(this):this.updateResult(),Le(this,Ve,Sv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Av($(this,Fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Av($(this,Fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Le(this,Ve,kv).call(this),Le(this,Ve,Ev).call(this),$(this,Fe).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,Fe);if(this.options=$(this,hr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Er(this.options.enabled,$(this,Fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Le(this,Ve,Pv).call(this),$(this,Fe).setOptions(this.options),r._defaulted&&!pv(this.options,r)&&$(this,hr).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Fe),observer:this});const a=this.hasListeners();a&&$1($(this,Fe),n,this.options,r)&&Le(this,Ve,$s).call(this),this.updateResult(),a&&($(this,Fe)!==n||Er(this.options.enabled,$(this,Fe))!==Er(r.enabled,$(this,Fe))||Yi(this.options.staleTime,$(this,Fe))!==Yi(r.staleTime,$(this,Fe)))&&Le(this,Ve,xv).call(this);const o=Le(this,Ve,bv).call(this);a&&($(this,Fe)!==n||Er(this.options.enabled,$(this,Fe))!==Er(r.enabled,$(this,Fe))||o!==$(this,Hi))&&Le(this,Ve,wv).call(this,o)}getOptimisticResult(t){const r=$(this,hr).getQueryCache().build($(this,hr),t),n=this.createResult(r,t);return vM(this,n)&&(pe(this,tr,n),pe(this,rl,this.options),pe(this,Da,$(this,Fe).state)),n}getCurrentResult(){return $(this,tr)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Kn).status==="pending"&&$(this,Kn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){$(this,al).add(t)}getCurrentQuery(){return $(this,Fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,hr).defaultQueryOptions(t),n=$(this,hr).getQueryCache().build($(this,hr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Le(this,Ve,$s).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,tr)))}createResult(t,r){var z;const n=$(this,Fe),a=this.options,o=$(this,tr),s=$(this,Da),u=$(this,rl),f=t!==n?t.state:$(this,pu),{state:h}=t;let m={...h},v=!1,x;if(r._optimisticResults){const q=this.hasListeners(),X=!q&&R1(t,r),B=q&&$1(t,n,r,a);(X||B)&&(m={...m,...IP(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:k,errorUpdatedAt:w,status:E}=m;x=m.data;let P=!1;if(r.placeholderData!==void 0&&x===void 0&&E==="pending"){let q;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(q=o.data,P=!0):q=typeof r.placeholderData=="function"?r.placeholderData((z=$(this,il))==null?void 0:z.state.data,$(this,il)):r.placeholderData,q!==void 0&&(E="success",x=vv(o==null?void 0:o.data,q,r),v=!0)}if(r.select&&x!==void 0&&!P)if(o&&x===(s==null?void 0:s.data)&&r.select===$(this,mu))x=$(this,nl);else try{pe(this,mu,r.select),x=r.select(x),x=vv(o==null?void 0:o.data,x,r),pe(this,nl,x),pe(this,Wi,null)}catch(q){pe(this,Wi,q)}$(this,Wi)&&(k=$(this,Wi),x=$(this,nl),w=Date.now(),E="error");const O=m.fetchStatus==="fetching",j=E==="pending",_=E==="error",N=j&&O,C=x!==void 0,F={status:E,fetchStatus:m.fetchStatus,isPending:j,isSuccess:E==="success",isError:_,isInitialLoading:N,isLoading:N,data:x,dataUpdatedAt:m.dataUpdatedAt,error:k,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!j,isLoadingError:_&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:_&&C,isStale:Ly(t,r),refetch:this.refetch,promise:$(this,Kn),isEnabled:Er(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const q=F.data!==void 0,X=F.status==="error"&&!q,B=le=>{X?le.reject(F.error):q&&le.resolve(F.data)},ue=()=>{const le=pe(this,Kn,F.promise=yv());B(le)},Y=$(this,Kn);switch(Y.status){case"pending":t.queryHash===n.queryHash&&B(Y);break;case"fulfilled":(X||F.data!==Y.value)&&ue();break;case"rejected":(!X||F.error!==Y.reason)&&ue();break}}return F}updateResult(){const t=$(this,tr),r=this.createResult($(this,Fe),this.options);if(pe(this,Da,$(this,Fe).state),pe(this,rl,this.options),$(this,Da).data!==void 0&&pe(this,il,$(this,Fe)),pv(r,t))return;pe(this,tr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!$(this,al).size)return!0;const s=new Set(o??$(this,al));return this.options.throwOnError&&s.add("error"),Object.keys($(this,tr)).some(u=>{const d=u;return $(this,tr)[d]!==t[d]&&s.has(d)})};Le(this,Ve,MP).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Le(this,Ve,Sv).call(this)}},hr=new WeakMap,Fe=new WeakMap,pu=new WeakMap,tr=new WeakMap,Da=new WeakMap,rl=new WeakMap,Kn=new WeakMap,Wi=new WeakMap,mu=new WeakMap,nl=new WeakMap,il=new WeakMap,Ra=new WeakMap,$a=new WeakMap,Hi=new WeakMap,al=new WeakMap,Ve=new WeakSet,$s=function(t){Le(this,Ve,Pv).call(this);let r=$(this,Fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(pr)),r},xv=function(){Le(this,Ve,kv).call(this);const t=Yi(this.options.staleTime,$(this,Fe));if(qs.isServer()||$(this,tr).isStale||!hv(t))return;const n=EP($(this,tr).dataUpdatedAt,t)+1;pe(this,Ra,ka.setTimeout(()=>{$(this,tr).isStale||this.updateResult()},n))},bv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Fe)):this.options.refetchInterval)??!1},wv=function(t){Le(this,Ve,Ev).call(this),pe(this,Hi,t),!(qs.isServer()||Er(this.options.enabled,$(this,Fe))===!1||!hv($(this,Hi))||$(this,Hi)===0)&&pe(this,$a,ka.setInterval(()=>{(this.options.refetchIntervalInBackground||Dy.isFocused())&&Le(this,Ve,$s).call(this)},$(this,Hi)))},Sv=function(){Le(this,Ve,xv).call(this),Le(this,Ve,wv).call(this,Le(this,Ve,bv).call(this))},kv=function(){$(this,Ra)!==void 0&&(ka.clearTimeout($(this,Ra)),pe(this,Ra,void 0))},Ev=function(){$(this,$a)!==void 0&&(ka.clearInterval($(this,$a)),pe(this,$a,void 0))},Pv=function(){const t=$(this,hr).getQueryCache().build($(this,hr),this.options);if(t===$(this,Fe))return;const r=$(this,Fe);pe(this,Fe,t),pe(this,pu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},MP=function(t){Ft.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,tr))}),$(this,hr).getQueryCache().notify({query:$(this,Fe),type:"observerResultsUpdated"})})},gP);function mM(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Er(t.retryOnMount,e)===!1)}function R1(e,t){return mM(e,t)||e.state.data!==void 0&&Av(e,t,t.refetchOnMount)}function Av(e,t,r){if(Er(t.enabled,e)!==!1&&Yi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ly(e,t)}return!1}function $1(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ly(e,r)}function Ly(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function vM(e,t){return!pv(e.getCurrentResult(),t)}var vu,xn,Yt,La,bn,Di,xP,yM=(xP=class extends jP{constructor(t){super();Ce(this,bn);Ce(this,vu);Ce(this,xn);Ce(this,Yt);Ce(this,La);pe(this,vu,t.client),this.mutationId=t.mutationId,pe(this,Yt,t.mutationCache),pe(this,xn,[]),this.state=t.state||gM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,xn).includes(t)||($(this,xn).push(t),this.clearGcTimeout(),$(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,xn,$(this,xn).filter(r=>r!==t)),this.scheduleGc(),$(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,xn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Yt).remove(this))}continue(){var t;return((t=$(this,La))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,u,d,f,h,m,v,x,k,w,E,P,O,j,_,N,C,D;const r=()=>{Le(this,bn,Di).call(this,{type:"continue"})},n={client:$(this,vu),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,La,_P({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(F,z)=>{Le(this,bn,Di).call(this,{type:"failed",failureCount:F,error:z})},onPause:()=>{Le(this,bn,Di).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Yt).canRun(this)}));const a=this.state.status==="pending",o=!$(this,La).canStart();try{if(a)r();else{Le(this,bn,Di).call(this,{type:"pending",variables:t,isPaused:o}),$(this,Yt).config.onMutate&&await $(this,Yt).config.onMutate(t,this,n);const z=await((u=(s=this.options).onMutate)==null?void 0:u.call(s,t,n));z!==this.state.context&&Le(this,bn,Di).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const F=await $(this,La).start();return await((f=(d=$(this,Yt).config).onSuccess)==null?void 0:f.call(d,F,t,this.state.context,this,n)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,F,t,this.state.context,n)),await((x=(v=$(this,Yt).config).onSettled)==null?void 0:x.call(v,F,null,this.state.variables,this.state.context,this,n)),await((w=(k=this.options).onSettled)==null?void 0:w.call(k,F,null,t,this.state.context,n)),Le(this,bn,Di).call(this,{type:"success",data:F}),F}catch(F){try{await((P=(E=$(this,Yt).config).onError)==null?void 0:P.call(E,F,t,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((j=(O=this.options).onError)==null?void 0:j.call(O,F,t,this.state.context,n))}catch(z){Promise.reject(z)}try{await((N=(_=$(this,Yt).config).onSettled)==null?void 0:N.call(_,void 0,F,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((D=(C=this.options).onSettled)==null?void 0:D.call(C,void 0,F,t,this.state.context,n))}catch(z){Promise.reject(z)}throw Le(this,bn,Di).call(this,{type:"error",error:F}),F}finally{$(this,Yt).runNext(this)}}},vu=new WeakMap,xn=new WeakMap,Yt=new WeakMap,La=new WeakMap,bn=new WeakSet,Di=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),Ft.batch(()=>{$(this,xn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Yt).notify({mutation:this,type:"updated",action:t})})},xP);function gM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vn,tn,yu,bP,xM=(bP=class extends gu{constructor(t={}){super();Ce(this,Vn);Ce(this,tn);Ce(this,yu);this.config=t,pe(this,Vn,new Set),pe(this,tn,new Map),pe(this,yu,0)}build(t,r,n){const a=new yM({client:t,mutationCache:this,mutationId:++Hc(this,yu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){$(this,Vn).add(t);const r=Vc(t);if(typeof r=="string"){const n=$(this,tn).get(r);n?n.push(t):$(this,tn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Vn).delete(t)){const r=Vc(t);if(typeof r=="string"){const n=$(this,tn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&$(this,tn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Vc(t);if(typeof r=="string"){const n=$(this,tn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=Vc(t);if(typeof r=="string"){const a=(n=$(this,tn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ft.batch(()=>{$(this,Vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Vn).clear(),$(this,tn).clear()})}getAll(){return Array.from($(this,Vn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>j1(r,n))}findAll(t={}){return this.getAll().filter(r=>j1(t,r))}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ft.batch(()=>Promise.all(t.map(r=>r.continue().catch(pr))))}},Vn=new WeakMap,tn=new WeakMap,yu=new WeakMap,bP);function Vc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wn,wP,bM=(wP=class extends gu{constructor(t={}){super();Ce(this,wn);this.config=t,pe(this,wn,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??Ry(a,r);let s=this.get(o);return s||(s=new hM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){$(this,wn).has(t.queryHash)||($(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,wn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,wn).get(t)}getAll(){return[...$(this,wn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>_1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>_1(t,n)):r}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,wP),dt,Ki,Vi,ol,ll,qi,sl,ul,SP,wM=(SP=class{constructor(e={}){Ce(this,dt);Ce(this,Ki);Ce(this,Vi);Ce(this,ol);Ce(this,ll);Ce(this,qi);Ce(this,sl);Ce(this,ul);pe(this,dt,e.queryCache||new bM),pe(this,Ki,e.mutationCache||new xM),pe(this,Vi,e.defaultOptions||{}),pe(this,ol,new Map),pe(this,ll,new Map),pe(this,qi,0)}mount(){Hc(this,qi)._++,$(this,qi)===1&&(pe(this,sl,Dy.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onFocus())})),pe(this,ul,Ad.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onOnline())})))}unmount(){var e,t;Hc(this,qi)._--,$(this,qi)===0&&((e=$(this,sl))==null||e.call(this),pe(this,sl,void 0),(t=$(this,ul))==null||t.call(this),pe(this,ul,void 0))}isFetching(e){return $(this,dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ki).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,dt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,dt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=$(this,dt).get(n.queryHash),o=a==null?void 0:a.state.data,s=tM(t,o);if(s!==void 0)return $(this,dt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ft.batch(()=>$(this,dt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,dt);Ft.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,dt);return Ft.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ft.batch(()=>$(this,dt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(pr).catch(pr)}invalidateQueries(e,t={}){return Ft.batch(()=>($(this,dt).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=Ft.batch(()=>$(this,dt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(pr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(pr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,dt).build(this,t);return r.isStaleByTime(Yi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pr).catch(pr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pr).catch(pr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ad.isOnline()?$(this,Ki).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,dt)}getMutationCache(){return $(this,Ki)}getDefaultOptions(){return $(this,Vi)}setDefaultOptions(e){pe(this,Vi,e)}setQueryDefaults(e,t){$(this,ol).set(Ks(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,ol).values()],r={};return t.forEach(n=>{Vs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,ll).set(Ks(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ll).values()],r={};return t.forEach(n=>{Vs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Vi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ry(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===$y&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Vi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,dt).clear(),$(this,Ki).clear()}},dt=new WeakMap,Ki=new WeakMap,Vi=new WeakMap,ol=new WeakMap,ll=new WeakMap,qi=new WeakMap,sl=new WeakMap,ul=new WeakMap,SP),TP=g.createContext(void 0),Pf=e=>{const t=g.useContext(TP);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SM=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),S.jsx(TP.Provider,{value:e,children:t})),DP=g.createContext(!1),kM=()=>g.useContext(DP);DP.Provider;function EM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var PM=g.createContext(EM()),AM=()=>g.useContext(PM),OM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?OP(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},CM=e=>{g.useEffect(()=>{e.clearReset()},[e])},_M=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||OP(r,[e.error,n])),jM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},NM=(e,t)=>e.isLoading&&e.isFetching&&!t,IM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,L1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function MM(e,t,r){var x,k,w,E;const n=kM(),a=AM(),o=Pf(),s=o.defaultQueryOptions(e);(k=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||k.call(x,s);const u=o.getQueryCache().get(s.queryHash),d=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":d?"optimistic":void 0,jM(s),OM(s,a,u),CM(a);const f=!o.getQueryCache().get(s.queryHash),[h]=g.useState(()=>new t(o,s)),m=h.getOptimisticResult(s),v=!n&&d;if(g.useSyncExternalStore(g.useCallback(P=>{const O=v?h.subscribe(Ft.batchCalls(P)):pr;return h.updateResult(),O},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g.useEffect(()=>{h.setOptions(s)},[s,h]),IM(s,m))throw L1(s,h,a);if(_M({result:m,errorResetBoundary:a,throwOnError:s.throwOnError,query:u,suspense:s.suspense}))throw m.error;if((E=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||E.call(w,s,m),s.experimental_prefetchInRender&&!qs.isServer()&&NM(m,n)){const P=f?L1(s,h,a):u==null?void 0:u.promise;P==null||P.catch(pr).finally(()=>{h.updateResult()})}return s.notifyOnChangeProps?m:h.trackResult(m)}function ut(e,t){return MM(e,pM)}const TM="modulepreload",DM=function(e){return"/"+e},z1={},ii=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let s=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=s(r.map(f=>{if(f=DM(f),f in z1)return;z1[f]=!0;const h=f.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":TM,h||(v.as="script"),v.crossOrigin="",v.href=f,d&&v.setAttribute("nonce",d),document.head.appendChild(v),h)return new Promise((x,k)=>{v.addEventListener("load",x),v.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return a.then(s=>{for(const u of s||[])u.status==="rejected"&&o(u.reason);return t().catch(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 RM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RP=(...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 $M={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 LM=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:s,...u},d)=>g.createElement("svg",{ref:d,...$M,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:RP("lucide",a),...u},[...s.map(([f,h])=>g.createElement(f,h)),...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 je=(e,t)=>{const r=g.forwardRef(({className:n,...a},o)=>g.createElement(LM,{ref:o,iconNode:t,className:RP(`lucide-${RM(e)}`,n),...a}));return r.displayName=`${e}`,r};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const F1=je("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 zM=je("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 Af=je("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 FM=je("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 $P=je("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 BM=je("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 UM=je("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 WM=je("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 HM=je("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 Bs=je("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 KM=je("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 LP=je("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 VM=je("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 qM=je("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const GM=je("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 zP=je("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 YM=je("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 B1=je("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 Ov=je("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 QM=je("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 XM=je("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 ZM=je("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 JM=je("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 eT=je("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 tT=je("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zy=je("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rT=je("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 nT=je("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 iT=je("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aT=je("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 Fy=je("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 oT=je("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lT=je("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 U1=je("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 By=je("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 sT=je("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 Ho=je("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 uT=je("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 Of=je("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 Uy=je("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 cT=je("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 Wy=je("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 FP=je("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 dT=je("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 fT=je("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 hT=je("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 pT=je("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 Gs=je("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 mT=je("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 Cf=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ko=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:nT,group:"Operativ"},{id:"ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:aT,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:zy,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:tT,group:"Operativ"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:iT,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:By,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:hT,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:LP,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:$P,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Af,group:"Wartung"}];var W1=1,vT=.9,yT=.8,gT=.17,wm=.1,Sm=.999,xT=.9999,bT=.99,wT=/[\\\/_+.#"@\[\(\{&]/,ST=/[\\\/_+.#"@\[\(\{&]/g,kT=/[\s-]/,BP=/[\s-]/g;function Cv(e,t,r,n,a,o,s){if(o===t.length)return a===e.length?W1:bT;var u=`${a},${o}`;if(s[u]!==void 0)return s[u];for(var d=n.charAt(o),f=r.indexOf(d,a),h=0,m,v,x,k;f>=0;)m=Cv(e,t,r,n,f+1,o+1,s),m>h&&(f===a?m*=W1:wT.test(e.charAt(f-1))?(m*=yT,x=e.slice(a,f-1).match(ST),x&&a>0&&(m*=Math.pow(Sm,x.length))):kT.test(e.charAt(f-1))?(m*=vT,k=e.slice(a,f-1).match(BP),k&&a>0&&(m*=Math.pow(Sm,k.length))):(m*=gT,a>0&&(m*=Math.pow(Sm,f-a))),e.charAt(f)!==t.charAt(o)&&(m*=xT)),(mm&&(m=v*wm)),m>h&&(h=m),f=r.indexOf(d,f+1);return s[u]=h,h}function H1(e){return e.toLowerCase().replace(BP," ")}function ET(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Cv(e,t,H1(e),H1(t),0,0,{})}function Qi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function K1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cl(...e){return t=>{let r=!1;const n=e.map(a=>{const o=K1(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a{var P;const{scope:v,children:x,...k}=m,w=((P=v==null?void 0:v[e])==null?void 0:P[d])||u,E=g.useMemo(()=>k,Object.values(k));return S.jsx(w.Provider,{value:E,children:x})};f.displayName=o+"Provider";function h(m,v){var w;const x=((w=v==null?void 0:v[e])==null?void 0:w[d])||u,k=g.useContext(x);if(k)return k;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,h]}const a=()=>{const o=r.map(s=>g.createContext(s));return function(u){const d=(u==null?void 0:u[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[n,AT(a,...t)]}function AT(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const s=n.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ys=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},OT=Ef[" useId ".trim().toString()]||(()=>{}),CT=0;function Xn(e){const[t,r]=g.useState(OT());return Ys(()=>{r(n=>n??String(CT++))},[e]),t?`radix-${t}`:""}var _T=Ef[" useInsertionEffect ".trim().toString()]||Ys;function jT({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,s]=NT({defaultProp:t,onChange:r}),u=e!==void 0,d=u?e:a;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const m=h.current;m!==u&&console.warn(`${n} is changing from ${m?"controlled":"uncontrolled"} to ${u?"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.`),h.current=u},[u,n])}const f=g.useCallback(h=>{var m;if(u){const v=IT(h)?h(e):h;v!==e&&((m=s.current)==null||m.call(s,v))}else o(h)},[u,e,o,s]);return[d,f]}function NT({defaultProp:e,onChange:t}){const[r,n]=g.useState(e),a=g.useRef(r),o=g.useRef(t);return _T(()=>{o.current=t},[t]),g.useEffect(()=>{var s;a.current!==r&&((s=o.current)==null||s.call(o,r),a.current=r)},[r,a]),[r,n,o]}function IT(e){return typeof e=="function"}var _f=kP();function UP(e){const t=g.forwardRef((r,n)=>{let{children:a,...o}=r,s=null,u=!1;const d=[];V1(a)&&typeof qc=="function"&&(a=qc(a._payload)),g.Children.forEach(a,v=>{var x;if($T(v)){u=!0;const k=v;let w="child"in k.props?k.props.child:k.props.children;V1(w)&&typeof qc=="function"&&(w=qc(w._payload)),s=TT(k,w),d.push((x=s==null?void 0:s.props)==null?void 0:x.children)}else d.push(v)}),s?s=g.cloneElement(s,void 0,d):!u&&g.Children.count(a)===1&&g.isValidElement(a)&&(s=a);const f=s?RT(s):void 0,h=Xa(n,f);if(!s){if(a||a===0)throw new Error(u?BT(e):FT(e));return a}const m=DT(o,s.props??{});return s.type!==g.Fragment&&(m.ref=n?h:f),g.cloneElement(s,m)});return t.displayName=`${e}.Slot`,t}var MT=Symbol.for("radix.slottable"),TT=(e,t)=>{if("child"in e.props){const r=e.props.child;return g.isValidElement(r)?g.cloneElement(r,void 0,e.props.children(r.props.children)):null}return g.isValidElement(t)?t:null};function DT(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function RT(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function $T(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MT}var LT=Symbol.for("react.lazy");function V1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===LT&&"_payload"in e&&zT(e._payload)}function zT(e){return typeof e=="object"&&e!==null&&"then"in e}var FT=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,BT=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,qc=Ef[" use ".trim().toString()],UT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=UT.reduce((e,t)=>{const r=UP(`Primitive.${t}`),n=g.forwardRef((a,o)=>{const{asChild:s,...u}=a,d=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(d,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function WT(e,t){e&&_f.flushSync(()=>e.dispatchEvent(t))}function Qs(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function HT(e,t=globalThis==null?void 0:globalThis.document){const r=Qs(e);g.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var KT="DismissableLayer",_v="dismissableLayer.update",VT="dismissableLayer.pointerDownOutside",qT="dismissableLayer.focusOutside",q1,Hy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),WP=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,h=g.useContext(Hy),[m,v]=g.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=g.useState({}),w=Xa(t,z=>v(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),O=E.indexOf(P),j=m?E.indexOf(m):-1,_=h.layersWithOutsidePointerEventsDisabled.size>0,N=j>=O,C=g.useRef(!1),D=XT(z=>{const q=z.target;if(!(q instanceof Node))return;const X=[...h.branches].some(B=>B.contains(q));!N||X||(o==null||o(z),u==null||u(z),z.defaultPrevented||d==null||d())},{ownerDocument:x,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:h.dismissableSurfaces}),F=ZT(z=>{if(n&&C.current)return;const q=z.target;[...h.branches].some(B=>B.contains(q))||(s==null||s(z),u==null||u(z),z.defaultPrevented||d==null||d())},x);return HT(z=>{j===h.layers.size-1&&(a==null||a(z),!z.defaultPrevented&&d&&(z.preventDefault(),d()))},x),g.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(q1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),G1(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(m),h.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=q1))}},[m,x,r,h]),g.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),G1())},[m,h]),g.useEffect(()=>{const z=()=>k({});return document.addEventListener(_v,z),()=>document.removeEventListener(_v,z)},[]),S.jsx(Wt.div,{...f,ref:w,style:{pointerEvents:_?N?"auto":"none":void 0,...e.style},onFocusCapture:Qi(e.onFocusCapture,F.onFocusCapture),onBlurCapture:Qi(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:Qi(e.onPointerDownCapture,D.onPointerDownCapture)})});WP.displayName=KT;var GT="DismissableLayerBranch",YT=g.forwardRef((e,t)=>{const r=g.useContext(Hy),n=g.useRef(null),a=Xa(t,n);return g.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),S.jsx(Wt.div,{...e,ref:a})});YT.displayName=GT;function QT(){const e=g.useContext(Hy),[t,r]=g.useState(null);return g.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function XT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,s=Qs(e),u=g.useRef(!1),d=g.useRef(!1),f=g.useRef(new Map),h=g.useRef(()=>{});return g.useEffect(()=>{function m(){d.current=!1,a.current=!1,f.current.clear()}function v(){return Array.from(f.current.values()).some(Boolean)}function x(O){if(!d.current)return;const j=O.target;j instanceof Node&&[...o].some(N=>N.contains(j))||f.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{d.current&&h.current()},0)}function k(O){d.current&&f.current.set(O.type,!1)}const w=O=>{if(O.target&&!u.current){let j=function(){r.removeEventListener("click",h.current);const N=v();m(),N||HP(VT,s,_,{discrete:!0})};const _={originalEvent:O};d.current=!0,a.current=n&&O.button===0,f.current.clear(),!n||O.button!==0?j():(r.removeEventListener("click",h.current),h.current=j,r.addEventListener("click",h.current,{once:!0}))}else r.removeEventListener("click",h.current),m();u.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of E)r.addEventListener(O,x,!0),r.addEventListener(O,k);const P=window.setTimeout(()=>{r.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(P),r.removeEventListener("pointerdown",w),r.removeEventListener("click",h.current);for(const O of E)r.removeEventListener(O,x,!0),r.removeEventListener(O,k)}},[r,s,n,a,o]),{onPointerDownCapture:()=>u.current=!0}}function ZT(e,t=globalThis==null?void 0:globalThis.document){const r=Qs(e),n=g.useRef(!1);return g.useEffect(()=>{const a=o=>{o.target&&!n.current&&HP(qT,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function G1(){const e=new CustomEvent(_v);document.dispatchEvent(e)}function HP(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?WT(a,o):a.dispatchEvent(o)}var km="focusScope.autoFocusOnMount",Em="focusScope.autoFocusOnUnmount",Y1={bubbles:!1,cancelable:!0},JT="FocusScope",KP=g.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[u,d]=g.useState(null),f=Qs(a),h=Qs(o),m=g.useRef(null),v=Xa(t,w=>d(w)),x=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let w=function(j){if(x.paused||!u)return;const _=j.target;u.contains(_)?m.current=_:Ri(m.current,{select:!0})},E=function(j){if(x.paused||!u)return;const _=j.relatedTarget;_!==null&&(u.contains(_)||Ri(m.current,{select:!0}))},P=function(j){if(document.activeElement===document.body)for(const N of j)N.removedNodes.length>0&&Ri(u)};document.addEventListener("focusin",w),document.addEventListener("focusout",E);const O=new MutationObserver(P);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E),O.disconnect()}}},[n,u,x.paused]),g.useEffect(()=>{if(u){X1.add(x);const w=document.activeElement;if(!u.contains(w)){const P=new CustomEvent(km,Y1);u.addEventListener(km,f),u.dispatchEvent(P),P.defaultPrevented||(eD(aD(VP(u)),{select:!0}),document.activeElement===w&&Ri(u))}return()=>{u.removeEventListener(km,f),setTimeout(()=>{const P=new CustomEvent(Em,Y1);u.addEventListener(Em,h),u.dispatchEvent(P),P.defaultPrevented||Ri(w??document.body,{select:!0}),u.removeEventListener(Em,h),X1.remove(x)},0)}}},[u,f,h,x]);const k=g.useCallback(w=>{if(!r&&!n||x.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const O=w.currentTarget,[j,_]=tD(O);j&&_?!w.shiftKey&&P===_?(w.preventDefault(),r&&Ri(j,{select:!0})):w.shiftKey&&P===j&&(w.preventDefault(),r&&Ri(_,{select:!0})):P===O&&w.preventDefault()}},[r,n,x.paused]);return S.jsx(Wt.div,{tabIndex:-1,...s,ref:v,onKeyDown:k})});KP.displayName=JT;function eD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ri(n,{select:t}),document.activeElement!==r)return}function tD(e){const t=VP(e),r=Q1(t,e),n=Q1(t.reverse(),e);return[r,n]}function VP(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Q1(e,t){for(const r of e)if(!rD(r,{upTo:t}))return r}function rD(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 nD(e){return e instanceof HTMLInputElement&&"select"in e}function Ri(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&nD(e)&&t&&e.select()}}var X1=iD();function iD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Z1(e,t),e.unshift(t)},remove(t){var r;e=Z1(e,t),(r=e[0])==null||r.resume()}}}function Z1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function aD(e){return e.filter(t=>t.tagName!=="A")}var oD="Portal",qP=g.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[a,o]=g.useState(!1);Ys(()=>o(!0),[]);const s=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?_f.createPortal(S.jsx(Wt.div,{...n,ref:t}),s):null});qP.displayName=oD;function lD(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var jf=e=>{const{present:t,children:r}=e,n=sD(t),a=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),o=uD(n.ref,cD(a));return typeof r=="function"||n.isPresent?g.cloneElement(a,{ref:o}):null};jf.displayName="Presence";function sD(e){const[t,r]=g.useState(),n=g.useRef(null),a=g.useRef(e),o=g.useRef("none"),s=e?"mounted":"unmounted",[u,d]=lD(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const f=Gc(n.current);o.current=u==="mounted"?f:"none"},[u]),Ys(()=>{const f=n.current,h=a.current;if(h!==e){const v=o.current,x=Gc(f);e?d("MOUNT"):x==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&v!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Ys(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,m=x=>{const w=Gc(n.current).includes(CSS.escape(x.animationName));if(x.target===t&&w&&(d("ANIMATION_END"),!a.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=x=>{x.target===t&&(o.current=Gc(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:g.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function J1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uD(...e){const t=g.useRef(e);return t.current=e,g.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(s=>{const u=J1(s,r);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let s=0;s{mn||(mn={start:ew(),end:ew()});const{start:e,end:t}=mn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Yc++,()=>{Yc===1&&(mn==null||mn.start.remove(),mn==null||mn.end.remove(),mn=null),Yc=Math.max(0,Yc-1)}},[])}function ew(){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 Sn=function(){return Sn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return CD;var t=_D(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])}},ND=XP(),Vo="data-scroll-locked",ID=function(e,t,r,n){var a=e.left,o=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` .`.concat(hD,` { overflow: hidden `).concat(n,`; padding-right: `).concat(u,"px ").concat(n,`; } body[`).concat(Vo,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` padding-left: `.concat(a,`px; padding-top: `).concat(o,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(u,"px ").concat(n,`; `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` } .`).concat(vd,` { right: `).concat(u,"px ").concat(n,`; } .`).concat(yd,` { margin-right: `).concat(u,"px ").concat(n,`; } .`).concat(vd," .").concat(vd,` { right: 0 `).concat(n,`; } .`).concat(yd," .").concat(yd,` { margin-right: 0 `).concat(n,`; } body[`).concat(Vo,`] { `).concat(pD,": ").concat(u,`px; } `)},rw=function(){var e=parseInt(document.body.getAttribute(Vo)||"0",10);return isFinite(e)?e:0},MD=function(){g.useEffect(function(){return document.body.setAttribute(Vo,(rw()+1).toString()),function(){var e=rw()-1;e<=0?document.body.removeAttribute(Vo):document.body.setAttribute(Vo,e.toString())}},[])},TD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;MD();var o=g.useMemo(function(){return jD(a)},[a]);return g.createElement(ND,{styles:ID(o,!t,a,r?"":"!important")})},jv=!1;if(typeof window<"u")try{var Qc=Object.defineProperty({},"passive",{get:function(){return jv=!0,!0}});window.addEventListener("test",Qc,Qc),window.removeEventListener("test",Qc,Qc)}catch{jv=!1}var Oo=jv?{passive:!1}:!1,DD=function(e){return e.tagName==="TEXTAREA"},ZP=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!DD(e)&&r[t]==="visible")},RD=function(e){return ZP(e,"overflowY")},$D=function(e){return ZP(e,"overflowX")},nw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=JP(e,n);if(a){var o=eA(e,n),s=o[1],u=o[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},LD=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zD=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},JP=function(e,t){return e==="v"?RD(t):$D(t)},eA=function(e,t){return e==="v"?LD(t):zD(t)},FD=function(e,t){return e==="h"&&t==="rtl"?-1:1},BD=function(e,t,r,n,a){var o=FD(e,window.getComputedStyle(t).direction),s=o*n,u=r.target,d=t.contains(u),f=!1,h=s>0,m=0,v=0;do{if(!u)break;var x=eA(e,u),k=x[0],w=x[1],E=x[2],P=w-E-o*k;(k||P)&&JP(e,u)&&(m+=P,v+=k);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&Math.abs(m)<1||!h&&Math.abs(v)<1)&&(f=!0),f},Xc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iw=function(e){return[e.deltaX,e.deltaY]},aw=function(e){return e&&"current"in e?e.current:e},UD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},WD=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},HD=0,Co=[];function KD(e){var t=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),a=g.useState(HD++)[0],o=g.useState(XP)[0],s=g.useRef(e);g.useEffect(function(){s.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var w=fD([e.lockRef.current],(e.shards||[]).map(aw),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=g.useCallback(function(w,E){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!s.current.allowPinchZoom;var P=Xc(w),O=r.current,j="deltaX"in w?w.deltaX:O[0]-P[0],_="deltaY"in w?w.deltaY:O[1]-P[1],N,C=w.target,D=Math.abs(j)>Math.abs(_)?"h":"v";if("touches"in w&&D==="h"&&C.type==="range")return!1;var F=window.getSelection(),z=F&&F.anchorNode,q=z?z===C||z.contains(C):!1;if(q)return!1;var X=nw(D,C);if(!X)return!0;if(X?N=D:(N=D==="v"?"h":"v",X=nw(D,C)),!X)return!1;if(!n.current&&"changedTouches"in w&&(j||_)&&(n.current=N),!N)return!0;var B=n.current||N;return BD(B,E,w,B==="h"?j:_)},[]),d=g.useCallback(function(w){var E=w;if(!(!Co.length||Co[Co.length-1]!==o)){var P="deltaY"in E?iw(E):Xc(E),O=t.current.filter(function(N){return N.name===E.type&&(N.target===E.target||E.target===N.shadowParent)&&UD(N.delta,P)})[0];if(O&&O.should){E.cancelable&&E.preventDefault();return}if(!O){var j=(s.current.shards||[]).map(aw).filter(Boolean).filter(function(N){return N.contains(E.target)}),_=j.length>0?u(E,j[0]):!s.current.noIsolation;_&&E.cancelable&&E.preventDefault()}}},[]),f=g.useCallback(function(w,E,P,O){var j={name:w,delta:E,target:P,should:O,shadowParent:VD(P)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(_){return _!==j})},1)},[]),h=g.useCallback(function(w){r.current=Xc(w),n.current=void 0},[]),m=g.useCallback(function(w){f(w.type,iw(w),w.target,u(w,e.lockRef.current))},[]),v=g.useCallback(function(w){f(w.type,Xc(w),w.target,u(w,e.lockRef.current))},[]);g.useEffect(function(){return Co.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Oo),document.addEventListener("touchmove",d,Oo),document.addEventListener("touchstart",h,Oo),function(){Co=Co.filter(function(w){return w!==o}),document.removeEventListener("wheel",d,Oo),document.removeEventListener("touchmove",d,Oo),document.removeEventListener("touchstart",h,Oo)}},[]);var x=e.removeScrollBar,k=e.inert;return g.createElement(g.Fragment,null,k?g.createElement(o,{styles:WD(a)}):null,x?g.createElement(TD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function VD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qD=wD(QP,KD);var tA=g.forwardRef(function(e,t){return g.createElement(Nf,Sn({},e,{ref:t,sideCar:qD}))});tA.classNames=Nf.classNames;var GD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_o=new WeakMap,Zc=new WeakMap,Jc={},Cm=0,rA=function(e){return e&&(e.host||rA(e.parentNode))},YD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=rA(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})},QD=function(e,t,r,n){var a=YD(t,Array.isArray(e)?e:[e]);Jc[r]||(Jc[r]=new WeakMap);var o=Jc[r],s=[],u=new Set,d=new Set(a),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};a.forEach(f);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(u.has(v))h(v);else try{var x=v.getAttribute(n),k=x!==null&&x!=="false",w=(_o.get(v)||0)+1,E=(o.get(v)||0)+1;_o.set(v,w),o.set(v,E),s.push(v),w===1&&k&&Zc.set(v,!0),E===1&&v.setAttribute(r,"true"),k||v.setAttribute(n,"true")}catch(P){console.error("aria-hidden: cannot operate on ",v,P)}})};return h(t),u.clear(),Cm++,function(){s.forEach(function(m){var v=_o.get(m)-1,x=o.get(m)-1;_o.set(m,v),o.set(m,x),v||(Zc.has(m)||m.removeAttribute(n),Zc.delete(m)),x||m.removeAttribute(r)}),Cm--,Cm||(_o=new WeakMap,_o=new WeakMap,Zc=new WeakMap,Jc={})}},XD=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=GD(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),QD(n,a,r,"aria-hidden")):function(){return null}},If="Dialog",[nA]=PT(If),[ZD,sn]=nA(If),iA=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,u=g.useRef(null),d=g.useRef(null),[f,h]=jT({prop:n,defaultProp:a??!1,onChange:o,caller:If});return S.jsx(ZD,{scope:t,triggerRef:u,contentRef:d,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:f,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(m=>!m),[h]),modal:s,children:r})};iA.displayName=If;var aA="DialogTrigger",JD=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=sn(aA,r),o=Xa(t,a.triggerRef);return S.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Vy(a.open),...n,ref:o,onClick:Qi(e.onClick,a.onOpenToggle)})});JD.displayName=aA;var Ky="DialogPortal",[eR,oA]=nA(Ky,{forceMount:void 0}),lA=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=sn(Ky,t);return S.jsx(eR,{scope:t,forceMount:r,children:g.Children.map(n,s=>S.jsx(jf,{present:r||o.open,children:S.jsx(qP,{asChild:!0,container:a,children:s})}))})};lA.displayName=Ky;var Od="DialogOverlay",sA=g.forwardRef((e,t)=>{const r=oA(Od,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=sn(Od,e.__scopeDialog);return o.modal?S.jsx(jf,{present:n||o.open,children:S.jsx(rR,{...a,ref:t})}):null});sA.displayName=Od;var tR=UP("DialogOverlay.RemoveScroll"),rR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=sn(Od,r),o=QT(),s=Xa(t,o);return S.jsx(tA,{as:tR,allowPinchZoom:!0,shards:[a.contentRef],children:S.jsx(Wt.div,{"data-state":Vy(a.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})}),dl="DialogContent",uA=g.forwardRef((e,t)=>{const r=oA(dl,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=sn(dl,e.__scopeDialog);return S.jsx(jf,{present:n||o.open,children:o.modal?S.jsx(nR,{...a,ref:t}):S.jsx(iR,{...a,ref:t})})});uA.displayName=dl;var nR=g.forwardRef((e,t)=>{const r=sn(dl,e.__scopeDialog),n=g.useRef(null),a=Xa(t,r.contentRef,n);return g.useEffect(()=>{const o=n.current;if(o)return XD(o)},[]),S.jsx(cA,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Qi(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Qi(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&o.preventDefault()}),onFocusOutside:Qi(e.onFocusOutside,o=>o.preventDefault())})}),iR=g.forwardRef((e,t)=>{const r=sn(dl,e.__scopeDialog),n=g.useRef(!1),a=g.useRef(!1);return S.jsx(cA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,u;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=o.target;((f=r.triggerRef.current)==null?void 0:f.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),cA=g.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,u=sn(dl,r);return dD(),S.jsx(S.Fragment,{children:S.jsx(KP,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:S.jsx(WP,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Vy(u.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),dA="DialogTitle",aR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=sn(dA,r);return S.jsx(Wt.h2,{id:a.titleId,...n,ref:t})});aR.displayName=dA;var fA="DialogDescription",oR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=sn(fA,r);return S.jsx(Wt.p,{id:a.descriptionId,...n,ref:t})});oR.displayName=fA;var hA="DialogClose",lR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=sn(hA,r);return S.jsx(Wt.button,{type:"button",...n,ref:t,onClick:Qi(e.onClick,()=>a.onOpenChange(!1))})});lR.displayName=hA;function Vy(e){return e?"open":"closed"}var ws='[cmdk-group=""]',_m='[cmdk-group-items=""]',sR='[cmdk-group-heading=""]',pA='[cmdk-item=""]',ow=`${pA}:not([aria-disabled="true"])`,Nv="cmdk-item-select",zo="data-value",uR=(e,t,r)=>ET(e,t,r),mA=g.createContext(void 0),xu=()=>g.useContext(mA),vA=g.createContext(void 0),qy=()=>g.useContext(vA),yA=g.createContext(void 0),gA=g.forwardRef((e,t)=>{let r=Fo(()=>{var M,J;return{search:"",value:(J=(M=e.value)!=null?M:e.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Fo(()=>new Set),a=Fo(()=>new Map),o=Fo(()=>new Map),s=Fo(()=>new Set),u=xA(e),{label:d,children:f,value:h,onValueChange:m,filter:v,shouldFilter:x,loop:k,disablePointerSelection:w=!1,vimBindings:E=!0,...P}=e,O=Xn(),j=Xn(),_=Xn(),N=g.useRef(null),C=bR();Ua(()=>{if(h!==void 0){let M=h.trim();r.current.value=M,D.emit()}},[h]),Ua(()=>{C(6,ue)},[]);let D=g.useMemo(()=>({subscribe:M=>(s.current.add(M),()=>s.current.delete(M)),snapshot:()=>r.current,setState:(M,J,se)=>{var te,ce,ye,_e;if(!Object.is(r.current[M],J)){if(r.current[M]=J,M==="search")B(),q(),C(1,X);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(_);Z?Z.focus():(te=document.getElementById(O))==null||te.focus()}if(C(7,()=>{var Z;r.current.selectedItemId=(Z=Y())==null?void 0:Z.id,D.emit()}),se||C(5,ue),((ce=u.current)==null?void 0:ce.value)!==void 0){let Z=J??"";(_e=(ye=u.current).onValueChange)==null||_e.call(ye,Z);return}}D.emit()}},emit:()=>{s.current.forEach(M=>M())}}),[]),F=g.useMemo(()=>({value:(M,J,se)=>{var te;J!==((te=o.current.get(M))==null?void 0:te.value)&&(o.current.set(M,{value:J,keywords:se}),r.current.filtered.items.set(M,z(J,se)),C(2,()=>{q(),D.emit()}))},item:(M,J)=>(n.current.add(M),J&&(a.current.has(J)?a.current.get(J).add(M):a.current.set(J,new Set([M]))),C(3,()=>{B(),q(),r.current.value||X(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let se=Y();C(4,()=>{B(),(se==null?void 0:se.getAttribute("id"))===M&&X(),D.emit()})}),group:M=>(a.current.has(M)||a.current.set(M,new Set),()=>{o.current.delete(M),a.current.delete(M)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:O,inputId:_,labelId:j,listInnerRef:N}),[]);function z(M,J){var se,te;let ce=(te=(se=u.current)==null?void 0:se.filter)!=null?te:uR;return M?ce(M,r.current.search,J):0}function q(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,J=[];r.current.filtered.groups.forEach(te=>{let ce=a.current.get(te),ye=0;ce.forEach(_e=>{let Z=M.get(_e);ye=Math.max(Z,ye)}),J.push([te,ye])});let se=N.current;le().sort((te,ce)=>{var ye,_e;let Z=te.getAttribute("id"),we=ce.getAttribute("id");return((ye=M.get(we))!=null?ye:0)-((_e=M.get(Z))!=null?_e:0)}).forEach(te=>{let ce=te.closest(_m);ce?ce.appendChild(te.parentElement===ce?te:te.closest(`${_m} > *`)):se.appendChild(te.parentElement===se?te:te.closest(`${_m} > *`))}),J.sort((te,ce)=>ce[1]-te[1]).forEach(te=>{var ce;let ye=(ce=N.current)==null?void 0:ce.querySelector(`${ws}[${zo}="${encodeURIComponent(te[0])}"]`);ye==null||ye.parentElement.appendChild(ye)})}function X(){let M=le().find(se=>se.getAttribute("aria-disabled")!=="true"),J=M==null?void 0:M.getAttribute(zo);D.setState("value",J||void 0)}function B(){var M,J,se,te;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let ye of n.current){let _e=(J=(M=o.current.get(ye))==null?void 0:M.value)!=null?J:"",Z=(te=(se=o.current.get(ye))==null?void 0:se.keywords)!=null?te:[],we=z(_e,Z);r.current.filtered.items.set(ye,we),we>0&&ce++}for(let[ye,_e]of a.current)for(let Z of _e)if(r.current.filtered.items.get(Z)>0){r.current.filtered.groups.add(ye);break}r.current.filtered.count=ce}function ue(){var M,J,se;let te=Y();te&&(((M=te.parentElement)==null?void 0:M.firstChild)===te&&((se=(J=te.closest(ws))==null?void 0:J.querySelector(sR))==null||se.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function Y(){var M;return(M=N.current)==null?void 0:M.querySelector(`${pA}[aria-selected="true"]`)}function le(){var M;return Array.from(((M=N.current)==null?void 0:M.querySelectorAll(ow))||[])}function fe(M){let J=le()[M];J&&D.setState("value",J.getAttribute(zo))}function de(M){var J;let se=Y(),te=le(),ce=te.findIndex(_e=>_e===se),ye=te[ce+M];(J=u.current)!=null&&J.loop&&(ye=ce+M<0?te[te.length-1]:ce+M===te.length?te[0]:te[ce+M]),ye&&D.setState("value",ye.getAttribute(zo))}function K(M){let J=Y(),se=J==null?void 0:J.closest(ws),te;for(;se&&!te;)se=M>0?gR(se,ws):xR(se,ws),te=se==null?void 0:se.querySelector(ow);te?D.setState("value",te.getAttribute(zo)):de(M)}let ie=()=>fe(le().length-1),Q=M=>{M.preventDefault(),M.metaKey?ie():M.altKey?K(1):de(1)},R=M=>{M.preventDefault(),M.metaKey?fe(0):M.altKey?K(-1):de(-1)};return g.createElement(Wt.div,{ref:t,tabIndex:-1,...P,"cmdk-root":"",onKeyDown:M=>{var J;(J=P.onKeyDown)==null||J.call(P,M);let se=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||se))switch(M.key){case"n":case"j":{E&&M.ctrlKey&&Q(M);break}case"ArrowDown":{Q(M);break}case"p":case"k":{E&&M.ctrlKey&&R(M);break}case"ArrowUp":{R(M);break}case"Home":{M.preventDefault(),fe(0);break}case"End":{M.preventDefault(),ie();break}case"Enter":{M.preventDefault();let te=Y();if(te){let ce=new Event(Nv);te.dispatchEvent(ce)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:F.inputId,id:F.labelId,style:SR},d),Mf(e,M=>g.createElement(vA.Provider,{value:D},g.createElement(mA.Provider,{value:F},M))))}),cR=g.forwardRef((e,t)=>{var r,n;let a=Xn(),o=g.useRef(null),s=g.useContext(yA),u=xu(),d=xA(e),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;Ua(()=>{if(!f)return u.item(a,s==null?void 0:s.id)},[f]);let h=bA(a,o,[e.value,e.children,o],e.keywords),m=qy(),v=Ji(C=>C.value&&C.value===h.current),x=Ji(C=>f||u.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);g.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(Nv,k),()=>C.removeEventListener(Nv,k)},[x,e.onSelect,e.disabled]);function k(){var C,D;w(),(D=(C=d.current).onSelect)==null||D.call(C,h.current)}function w(){m.setState("value",h.current,!0)}if(!x)return null;let{disabled:E,value:P,onSelect:O,forceMount:j,keywords:_,...N}=e;return g.createElement(Wt.div,{ref:cl(o,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!v,"data-disabled":!!E,"data-selected":!!v,onPointerMove:E||u.getDisablePointerSelection()?void 0:w,onClick:E?void 0:k},e.children)}),dR=g.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,s=Xn(),u=g.useRef(null),d=g.useRef(null),f=Xn(),h=xu(),m=Ji(x=>a||h.filter()===!1?!0:x.search?x.filtered.groups.has(s):!0);Ua(()=>h.group(s),[]),bA(s,u,[e.value,e.heading,d]);let v=g.useMemo(()=>({id:s,forceMount:a}),[a]);return g.createElement(Wt.div,{ref:cl(u,t),...o,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},r&&g.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},r),Mf(e,x=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},g.createElement(yA.Provider,{value:v},x))))}),fR=g.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=g.useRef(null),o=Ji(s=>!s.search);return!r&&!o?null:g.createElement(Wt.div,{ref:cl(a,t),...n,"cmdk-separator":"",role:"separator"})}),hR=g.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=qy(),s=Ji(f=>f.search),u=Ji(f=>f.selectedItemId),d=xu();return g.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),g.createElement(Wt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:s,onChange:f=>{a||o.setState("search",f.target.value),r==null||r(f.target.value)}})}),pR=g.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=g.useRef(null),s=g.useRef(null),u=Ji(f=>f.selectedItemId),d=xu();return g.useEffect(()=>{if(s.current&&o.current){let f=s.current,h=o.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let x=f.offsetHeight;h.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(m),v.unobserve(f)}}},[]),g.createElement(Wt.div,{ref:cl(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:d.listId},Mf(e,f=>g.createElement("div",{ref:cl(s,d.listInnerRef),"cmdk-list-sizer":""},f)))}),mR=g.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:s,...u}=e;return g.createElement(iA,{open:r,onOpenChange:n},g.createElement(lA,{container:s},g.createElement(sA,{"cmdk-overlay":"",className:a}),g.createElement(uA,{"aria-label":e.label,"cmdk-dialog":"",className:o},g.createElement(gA,{ref:t,...u}))))}),vR=g.forwardRef((e,t)=>Ji(r=>r.filtered.count===0)?g.createElement(Wt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),yR=g.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return g.createElement(Wt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Mf(e,s=>g.createElement("div",{"aria-hidden":!0},s)))}),jo=Object.assign(gA,{List:pR,Item:cR,Input:hR,Group:dR,Separator:fR,Dialog:mR,Empty:vR,Loading:yR});function gR(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function xR(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function xA(e){let t=g.useRef(e);return Ua(()=>{t.current=e}),t}var Ua=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Fo(e){let t=g.useRef();return t.current===void 0&&(t.current=e()),t}function Ji(e){let t=qy(),r=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,r,r)}function bA(e,t,r,n=[]){let a=g.useRef(),o=xu();return Ua(()=>{var s;let u=(()=>{var f;for(let h of r){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():a.current}})(),d=n.map(f=>f.trim());o.value(e,u,d),(s=t.current)==null||s.setAttribute(zo,u),a.current=u}),a}var bR=()=>{let[e,t]=g.useState(),r=Fo(()=>new Map);return Ua(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function wR(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Mf({asChild:e,children:t},r){return e&&g.isValidElement(t)?g.cloneElement(wR(t),{ref:t.ref},r(t.props.children)):r(t)}var SR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function kR({onNavigate:e}){const[t,r]=g.useState(!1);return g.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),S.jsx(jo.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:S.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:[S.jsx(jo.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"}),S.jsxs(jo.List,{className:"max-h-80 overflow-y-auto p-2",children:[S.jsx(jo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),S.jsx(jo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Ko.map(n=>S.jsxs(jo.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:[S.jsx(n.icon,{className:"h-4 w-4 text-primary"}),S.jsx("span",{children:n.label}),S.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const wA="mc_expert_mode",Iv="mc-expert-mode-change",ER=()=>{try{return localStorage.getItem(wA)==="true"}catch{return!1}};function PR(e){return window.addEventListener(Iv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(Iv,e),window.removeEventListener("storage",e)}}function lw(e){localStorage.setItem(wA,String(e)),window.dispatchEvent(new Event(Iv))}function AR(){return g.useSyncExternalStore(PR,ER,()=>!1)}function SA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=_R(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const u=s.split(Gy);return u[0]===""&&u.length!==1&&u.shift(),kA(u,t)||CR(s)},getConflictingClassGroupIds:(s,u)=>{const d=r[s]||[];return u&&n[s]?[...d,...n[s]]:d}}},kA=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?kA(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Gy);return(s=t.validators.find(({validator:u})=>u(o)))==null?void 0:s.classGroupId},sw=/^\[(.+)\]$/,CR=e=>{if(sw.test(e)){const t=sw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_R=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return NR(Object.entries(e.classGroups),r).forEach(([o,s])=>{Mv(s,n,o,t)}),n},Mv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:uw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(jR(a)){Mv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,s])=>{Mv(s,uw(t,o),r,n)})})},uw=(e,t)=>{let r=e;return t.split(Gy).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},jR=e=>e.isThemeGetter,NR=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,u])=>[t+s,u])):o);return[r,a]}):e,IR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return a(o,s),s},set(o,s){r.has(o)?r.set(o,s):a(o,s)}}},EA="!",MR=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,s=u=>{const d=[];let f=0,h=0,m;for(let E=0;Eh?m-h:void 0;return{modifiers:d,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:w}};return r?u=>r({className:u,parseClassName:s}):s},TR=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},DR=e=>({cache:IR(e.cacheSize),parseClassName:MR(e),...OR(e)}),RR=/\s+/,$R=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],s=e.trim().split(RR);let u="";for(let d=s.length-1;d>=0;d-=1){const f=s[d],{modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:x}=r(f);let k=!!x,w=n(k?v.substring(0,x):v);if(!w){if(!k){u=f+(u.length>0?" "+u:u);continue}if(w=n(v),!w){u=f+(u.length>0?" "+u:u);continue}k=!1}const E=TR(h).join(":"),P=m?E+EA:E,O=P+w;if(o.includes(O))continue;o.push(O);const j=a(w,k);for(let _=0;_0?" "+u:u)}return u};function LR(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nm(h),e());return r=DR(f),n=r.cache.get,a=r.cache.set,o=u,u(d)}function u(d){const f=n(d);if(f)return f;const h=$R(d,r);return a(d,h),h}return function(){return o(LR.apply(null,arguments))}}const et=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},AA=/^\[(?:([a-z-]+):)?(.+)\]$/i,FR=/^\d+\/\d+$/,BR=new Set(["px","full","screen"]),UR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WR=/\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$/,HR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=e=>qo(e)||BR.has(e)||FR.test(e),Ii=e=>Sl(e,"length",e$),qo=e=>!!e&&!Number.isNaN(Number(e)),jm=e=>Sl(e,"number",qo),Ss=e=>!!e&&Number.isInteger(Number(e)),qR=e=>e.endsWith("%")&&qo(e.slice(0,-1)),Me=e=>AA.test(e),Mi=e=>UR.test(e),GR=new Set(["length","size","percentage"]),YR=e=>Sl(e,GR,OA),QR=e=>Sl(e,"position",OA),XR=new Set(["image","url"]),ZR=e=>Sl(e,XR,r$),JR=e=>Sl(e,"",t$),ks=()=>!0,Sl=(e,t,r)=>{const n=AA.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},e$=e=>WR.test(e)&&!HR.test(e),OA=()=>!1,t$=e=>KR.test(e),r$=e=>VR.test(e),n$=()=>{const e=et("colors"),t=et("spacing"),r=et("blur"),n=et("brightness"),a=et("borderColor"),o=et("borderRadius"),s=et("borderSpacing"),u=et("borderWidth"),d=et("contrast"),f=et("grayscale"),h=et("hueRotate"),m=et("invert"),v=et("gap"),x=et("gradientColorStops"),k=et("gradientColorStopPositions"),w=et("inset"),E=et("margin"),P=et("opacity"),O=et("padding"),j=et("saturate"),_=et("scale"),N=et("sepia"),C=et("skew"),D=et("space"),F=et("translate"),z=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Me,t],B=()=>[Me,t],ue=()=>["",Un,Ii],Y=()=>["auto",qo,Me],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],fe=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",Me],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[qo,Me];return{cacheSize:500,separator:":",theme:{colors:[ks],spacing:[Un,Ii],blur:["none","",Mi,Me],brightness:R(),borderColor:[e],borderRadius:["none","","full",Mi,Me],borderSpacing:B(),borderWidth:ue(),contrast:R(),grayscale:ie(),hueRotate:R(),invert:ie(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[qR,Ii],inset:X(),margin:X(),opacity:R(),padding:B(),saturate:R(),scale:R(),sepia:ie(),skew:R(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Me]}],container:["container"],columns:[{columns:[Mi]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...le(),Me]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ss,Me]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Me]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Ss,Me]}],"grid-cols":[{"grid-cols":[ks]}],"col-start-end":[{col:["auto",{span:["full",Ss,Me]},Me]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[ks]}],"row-start-end":[{row:["auto",{span:[Ss,Me]},Me]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Me]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"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",Me,t]}],"min-w":[{"min-w":[Me,t,"min","max","fit"]}],"max-w":[{"max-w":[Me,t,"none","full","min","max","fit","prose",{screen:[Mi]},Mi]}],h:[{h:[Me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Mi,Ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jm]}],"font-family":[{font:[ks]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Me]}],"line-clamp":[{"line-clamp":["none",qo,jm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Un,Me]}],"list-image":[{"list-image":["none",Me]}],"list-style-type":[{list:["none","disc","decimal",Me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Un,Ii]}],"underline-offset":[{"underline-offset":["auto",Un,Me]}],"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:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),QR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...fe(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:fe()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...fe()]}],"outline-offset":[{"outline-offset":[Un,Me]}],"outline-w":[{outline:[Un,Ii]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[Un,Ii]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Mi,JR]}],"shadow-color":[{shadow:[ks]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Mi,Me]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[j]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Me]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Me]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Ss,Me]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Me]}],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",Me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Un,Ii,jm]}],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"]}}},i$=zR(n$);function Te(...e){return i$(Qe(e))}function kQ(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function a$(){const e=AR();return S.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:[S.jsxs("button",{onClick:()=>lw(!1),"aria-pressed":!e,className:Te("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:[S.jsx(fT,{className:"h-3.5 w-3.5"})," Einfach"]}),S.jsxs("button",{onClick:()=>lw(!0),"aria-pressed":e,className:Te("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:[S.jsx(dT,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function $e(e,t){var d;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=((d=t==null?void 0:t.method)==null?void 0:d.toUpperCase())||"GET",a=n==="GET"?null:localStorage.getItem("mc_sudo_password"),o=n==="GET"?null:localStorage.getItem("mc_hf_token");a&&(r["X-Sudo-Password"]=a);let s=t==null?void 0:t.body;if(n==="POST"){if(typeof s=="string")try{const f=JSON.parse(s);let h=!1;a&&!("sudo_password"in f)&&(f.sudo_password=a,h=!0),o&&!("hf_token"in f)&&(f.hf_token=o,h=!0),h&&(s=JSON.stringify(f))}catch{}else if(!s){const f={};a&&(f.sudo_password=a),o&&(f.hf_token=o),Object.keys(f).length>0&&(s=JSON.stringify(f))}}const u=await fetch(e,{...t,headers:r,body:s});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const EQ=(e,t,r=!1,n=!0)=>$e("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),PQ=e=>$e("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)});function o$({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:s,onCancel:u}){const d=g.useRef(null);return S.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:S.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:[S.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),S.jsx("button",{onClick:u||(()=>s()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:S.jsx(Cf,{className:"h-4 w-4","aria-hidden":"true"})})]}),S.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:r}),e==="prompt"&&S.jsxs("div",{className:"flex gap-2",children:[S.jsx("input",{ref:d,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:f=>{var h;f.key==="Enter"&&s((h=d.current)==null?void 0:h.value)}}),a!==void 0&&S.jsx("button",{type:"button",onClick:()=>{d.current&&(d.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),S.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&S.jsx("button",{onClick:u,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"}),S.jsx("button",{onClick:()=>{var h;const f=e==="prompt"?(h=d.current)==null?void 0:h.value:void 0;s(f)},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 CA(){const[e,t]=g.useState(null),r=g.useCallback(()=>t(null),[]),n=g.useCallback((u,d,f)=>{t({type:"alert",title:u,message:d,onConfirm:()=>{t(null),f==null||f()}})},[]),a=g.useCallback((u,d,f,h)=>{t({type:"confirm",title:u,message:d,onConfirm:()=>{t(null),f()},onCancel:()=>{t(null),h==null||h()}})},[]),o=g.useCallback((u,d,f,h,m,v)=>{t({type:"prompt",title:u,message:d,defaultValue:f,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:x=>{t(null),h(x)},onCancel:()=>{t(null),m==null||m()}})},[]),s=e?S.jsx(o$,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:s}}let gd=!1;const l$=()=>gd;function s$(){const e=Pf();g.useEffect(()=>{const t=new EventSource("/api/events");return t.onopen=()=>{gd=!0},t.onerror=()=>{gd=!1},t.addEventListener("invalidate",r=>{var n;try{const a=((n=JSON.parse(r.data))==null?void 0:n.keys)??[];for(const o of a)e.invalidateQueries({queryKey:[o]})}catch{}}),()=>{gd=!1,t.close()}},[e])}const Be={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],governor:["governor"],eigenleben:["eigenleben"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},yr={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Tf=e=>()=>l$()?e*5:e,u$=(e=yr.schnell)=>ut({queryKey:Be.auftragsbuch,queryFn:()=>$e("/api/auftragsbuch"),refetchInterval:Tf(e)}),c$=(e=yr.gemuetlich)=>ut({queryKey:Be.ideen,queryFn:()=>$e("/api/ideen"),refetchInterval:Tf(e)}),AQ=(e,t=!1)=>ut({queryKey:["ideen-log",e],queryFn:()=>$e(`/api/ideen/${e}/log`),enabled:t,refetchInterval:4e3,staleTime:0}),OQ=(e=150,t=yr.gemuetlich)=>ut({queryKey:[...Be.chronik,e],queryFn:()=>$e(`/api/chronik?limit=${e}`),refetchInterval:Tf(t),select:r=>r.items??[]}),CQ=()=>ut({queryKey:Be.wissen,queryFn:()=>$e("/api/wissen")}),d$=(e=yr.traege,t=!0)=>ut({queryKey:Be.zeitmaschine,queryFn:()=>$e("/api/zeitmaschine"),refetchInterval:e,enabled:t}),f$=(e=12,t=yr.schnell)=>ut({queryKey:Be.voiceTrace,queryFn:()=>$e(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),_A=()=>ut({queryKey:Be.health,queryFn:()=>$e("/api/health"),refetchInterval:yr.normal}),Df=(e=yr.graph)=>ut({queryKey:Be.systemStatus,queryFn:()=>$e("/api/system/status"),refetchInterval:e}),h$=(e,t=!0)=>ut({queryKey:["metrics-history",e],queryFn:()=>$e(`/api/system/history?minutes=${e}`),enabled:t,refetchInterval:6e4}),Yy=(e=yr.normal)=>ut({queryKey:Be.services,queryFn:()=>$e("/api/system/services"),refetchInterval:e}),jA=(e=yr.schnell)=>ut({queryKey:Be.models,queryFn:()=>$e("/api/models"),refetchInterval:Tf(e)}),_Q=(e=yr.normal)=>ut({queryKey:Be.groups,queryFn:()=>$e("/api/groups"),refetchInterval:e}),jQ=()=>ut({queryKey:Be.routingPolicy,queryFn:()=>$e("/api/routing/policy")}),p$=(e=3e3,t=!0)=>ut({queryKey:Be.jobs,queryFn:()=>$e("/api/jobs"),refetchInterval:e,enabled:t,select:r=>r.jobs??[]}),m$=(e=yr.graph)=>ut({queryKey:Be.tokenStats,queryFn:()=>$e("/api/system/token-stats"),refetchInterval:e}),v$=(e=yr.normal)=>ut({queryKey:Be.agentStatus,queryFn:()=>$e("/api/agent/status"),refetchInterval:e}),NQ=(e=yr.traege)=>ut({queryKey:Be.hermesBrain,queryFn:()=>$e("/api/agent/brain"),refetchInterval:e}),NA=(e=yr.traege)=>ut({queryKey:Be.updates,queryFn:()=>$e("/api/maintenance/updates"),refetchInterval:e}),IQ=()=>ut({queryKey:Be.discover,queryFn:()=>$e("/api/discover")}),MQ=e=>ut({queryKey:Be.drafts(e),queryFn:()=>$e(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),TQ=e=>ut({queryKey:Be.connect(e),queryFn:()=>$e(e?`/api/connect?${e}`:"/api/connect")}),y$=()=>ut({queryKey:Be.connectHealth,queryFn:()=>$e("/api/connect/health"),refetchInterval:15e3});function Es(e,...t){for(const r of t)e.invalidateQueries({queryKey:r})}function No(e){return(e/1024**3).toFixed(1)}function Nm(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function DQ(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function RQ(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function $Q(e){return e?`${Math.round(e/1024)}k`:"—"}function LQ(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Ps({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:s,onAction:u}){return S.jsxs("div",{className:Te("flex items-center gap-3 rounded-lg border px-3 py-2",a?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[S.jsx(e,{className:Te("h-4 w-4 shrink-0",t)}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-xs text-foreground truncate",children:r}),S.jsx("div",{className:Te("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),S.jsx("button",{onClick:u,disabled:!a||o,className:Te("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",a?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":s})]})}function g$({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return S.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[S.jsx("span",{className:Te("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),S.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&S.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),S.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:S.jsx(Ho,{className:Te("h-3.5 w-3.5",n&&"animate-spin")})}),S.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:S.jsx(QM,{className:"h-3.5 w-3.5"})})]})}const x$=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,b$=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function w$(e){return x$.test(e)?"error":b$.test(e)?"warn":"info"}const S$={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function k$({service:e,text:t,loading:r,logStatus:n,onRefresh:a,onOpenSettings:o}){const[s,u]=g.useState(!1),[d,f]=g.useState(""),h=g.useRef(null),m=g.useMemo(()=>t?t.split(` `).map(E=>({t:E,level:w$(E)})):[],[t]),v=g.useMemo(()=>m.filter(E=>E.level!=="info").length,[m]),x=d.trim().toLowerCase(),k=m.filter(E=>(!s||E.level!=="info")&&(!x||E.t.toLowerCase().includes(x))),w=n==="password_required"||n==="incorrect_password";return S.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:[S.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:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[S.jsx(pT,{className:"h-3 w-3 text-primary"}),S.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsxs("div",{className:"relative",children:[S.jsx(uT,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),S.jsx("input",{value:d,onChange:E=>f(E.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"})]}),S.jsxs("button",{onClick:()=>u(E=>!E),title:"Nur Fehler und Warnungen zeigen",className:Te("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",s?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[S.jsx(Gs,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),S.jsx("button",{onClick:a,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:S.jsx(Ho,{className:Te("h-3 w-3",r&&"animate-spin")})})]})]}),S.jsx("div",{ref:h,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:w?S.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[S.jsx(Gs,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),S.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."}),S.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."]}),S.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?S.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):m.length===0?S.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):k.length===0?S.jsx("span",{className:"text-muted-foreground",children:s?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):k.map((E,P)=>S.jsx("div",{className:Te("whitespace-pre-wrap",S$[E.level]),children:E.t||" "},P))})]})}function E$({open:e,showAlert:t}){const[r,n]=g.useState(""),[a,o]=g.useState(""),[s,u]=g.useState(!1),[d,f]=g.useState(!1);return g.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),S.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."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[S.jsx(Wy,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:s?"text":"password",value:r,onChange:h=>n(h.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"}),S.jsx("button",{type:"button",onClick:()=>u(!s),"aria-label":s?"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:s?S.jsx(B1,{className:"h-4 w-4","aria-hidden":"true"}):S.jsx(Ov,{className:"h-4 w-4","aria-hidden":"true"})})]}),S.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."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[S.jsx(rT,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:d?"text":"password",value:a,onChange:h=>o(h.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"}),S.jsx("button",{type:"button",onClick:()=>f(!d),"aria-label":d?"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:d?S.jsx(B1,{className:"h-4 w-4","aria-hidden":"true"}):S.jsx(Ov,{className:"h-4 w-4","aria-hidden":"true"})})]}),S.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."})]}),S.jsxs("div",{className:"flex gap-3 pt-2",children:[S.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",a),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"}),S.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 P$({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var d,f;const a=e.data,o={os:{icon:Wy,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:Of,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:FP,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Af,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],s=o.icon,u=a?e.kind==="os"?(a.count??0)===0:e.kind==="hermes"?(a.behind??0)===0:a.installed_build!=null&&a.latest_build!=null&&a.latest_build<=a.installed_build:!0;return S.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[S.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),S.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:[S.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(s,{className:Te("h-4.5 w-4.5",o.cls)}),S.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),S.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:S.jsx(Cf,{className:"h-4 w-4"})})]}),S.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?S.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[S.jsx(Ho,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):a!=null&&a.error?S.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:a.error}):S.jsxs(S.Fragment,{children:[(a==null?void 0:a.action_needed)!=null&&S.jsxs("div",{className:Te("flex items-start gap-2 rounded-lg border p-3",a.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[a.action_needed?S.jsx(Gs,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):S.jsx(KM,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),S.jsxs("div",{className:"min-w-0",children:[S.jsxs("div",{className:Te("text-xs font-semibold",a.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",a.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),a.action_needed&&a.action_text&&S.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:a.action_text})]})]}),(a==null?void 0:a.summary)&&S.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[S.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),S.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:a.summary})]}),e.kind==="os"?S.jsxs(S.Fragment,{children:[((a==null?void 0:a.count)??0)===0?S.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"text-muted-foreground",children:[a.count," Paket(e) werden aktualisiert:"]}),S.jsx("div",{className:"space-y-1",children:a.packages.map(h=>S.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:[S.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[S.jsx(U1,{className:"h-3 w-3 text-cyan-400 shrink-0"}),h.name]}),S.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[S.jsx("span",{children:h.current}),S.jsx(F1,{className:"h-3 w-3"}),S.jsx("span",{className:"text-emerald-400",children:h.candidate})]})]},h.name))})]}),(((d=a==null?void 0:a.held_back)==null?void 0:d.length)??0)>0&&S.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[S.jsx(VM,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),S.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."}),S.jsx("div",{className:"space-y-1",children:a.held_back.map(h=>S.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:[S.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[S.jsx(U1,{className:"h-3 w-3 text-muted-foreground shrink-0"}),h.name]}),S.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:h.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},h.name))})]})]}):e.kind==="engine"||e.kind==="swap"?S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[S.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(a==null?void 0:a.installed_build)??"?"]}),S.jsx(F1,{className:"h-3.5 w-3.5 text-muted-foreground"}),S.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(a==null?void 0:a.latest_build)??"?"]})]}),((a==null?void 0:a.name)||(a==null?void 0:a.latest_tag))&&S.jsxs("div",{className:"text-muted-foreground",children:["Release: ",S.jsx("span",{className:"text-foreground",children:a==null?void 0:a.name}),a!=null&&a.latest_tag?` (${a.latest_tag})`:""]}),(a==null?void 0:a.url)&&S.jsxs("a",{href:a.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",S.jsx(YM,{className:"h-3 w-3"})]}),(a==null?void 0:a.body)&&S.jsxs("details",{className:"group",children:[S.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),S.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:a.body})]})]}):(((f=a==null?void 0:a.commits)==null?void 0:f.length)??0)===0?S.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"text-muted-foreground",children:[a.behind," neue Commit(s) auf ",S.jsxs("span",{className:"font-mono text-foreground",children:["origin/",a.branch]}),":"]}),S.jsx("div",{className:"space-y-1",children:a.commits.map(h=>S.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[S.jsx(ZM,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-[11px] truncate",children:h.subject}),S.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[h.hash," · ",h.when]})]})]},h.hash))})]}),e.kind!=="os"&&!u&&S.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[S.jsx(cT,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),S.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":"","."]})]})]})}),S.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[S.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"}),S.jsx("button",{onClick:n,disabled:e.loading||u||!!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 A$({open:e,onClose:t,defaultTab:r="maintenance"}){var or,fi;const n=Pf(),{showAlert:a,showConfirm:o,dialogElement:s}=CA(),{data:u}=NA(),{data:d}=Yy(),f=p$(3e3,e).data??[],{data:h}=d$(void 0,e),[m,v]=g.useState("llama-swap"),[x,k]=g.useState(""),[w,E]=g.useState(!1),[P,O]=g.useState(null),[j,_]=g.useState({}),[N,C]=g.useState("maintenance"),[D,F]=g.useState(!1),[z,q]=g.useState(""),[X,B]=g.useState(!1),[ue,Y]=g.useState(!1),[le,fe]=g.useState(null),de=(d==null?void 0:d.services)??[],K=()=>Es(n,Be.jobs);function ie(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"}g.useEffect(()=>{e&&r&&C(r)},[e,r]),g.useEffect(()=>{e&&Es(n,Be.updates,Be.services,Be.jobs,Be.zeitmaschine)},[e]);function Q(G){E(!0),O(null),$e(`/api/maintenance/logs?service=${G}&lines=150`).then(Ie=>{Ie.ok?k(Ie.text):(k(`Fehler beim Laden der Logs: ${Ie.err||"Unbekannter Fehler"}`),(Ie.status==="incorrect_password"||Ie.status==="password_required")&&O(Ie.status))}).catch(Ie=>k(`Fehler: ${Ie.message}`)).finally(()=>E(!1))}g.useEffect(()=>{!e||N!=="logs"||Q(m)},[e,N,m]);function R(G){return(G==null?void 0:G.status)==="busy"?(a("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),K(),!0):!1}function M(G){return(G==null?void 0:G.status)==="password_required"||(G==null?void 0:G.status)==="incorrect_password"?(a("Box-Passwort nötig",(G.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):G&&G.ok===!1?(a("Update fehlgeschlagen",G.err||"Unbekannter Fehler."),!0):!1}async function J(G){const Ie={os:"os-update",engine:"engine-update",swap:"swap-update"}[G];try{const Xe=await $e(`/api/maintenance/${Ie}`,{method:"POST"});if(R(Xe)||M(Xe))return;K(),C("maintenance")}catch(Xe){a("Fehler",`Update konnte nicht starten: ${Xe.message}`)}}async function se(){Y(!0);try{const G=await $e("/api/maintenance/hermes-update",{method:"POST"});if(R(G))return;K()}catch(G){a("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{Y(!1)}}async function te(G){fe({kind:G,loading:!0,data:null});try{const Ie=await $e(`/api/maintenance/update-details?kind=${G}`);fe({kind:G,loading:!1,data:Ie})}catch(Ie){fe({kind:G,loading:!1,data:{kind:G,error:Ie.message}})}}function ce(){const G=le==null?void 0:le.kind;fe(null),G==="os"||G==="engine"||G==="swap"?J(G):G==="hermes"&&se()}function ye(){var Ie;const G=[u!=null&&u.engine?"Engine":null,u!=null&&u.swap?"Router":null,(Ie=u==null?void 0:u.components)!=null&&Ie.some(Xe=>Xe.update===!0)?"Hermes-Agent":null,u!=null&&u.os?`OS (${u.os} Pakete)`:null].filter(Boolean);o("Alle Updates einspielen?",`Nacheinander in einem Job: ${G.join(" → ")}. Jeder Schritt sichert und prüft sich selbst; schlägt einer fehl, stoppt der Rest. (OS braucht das Box-Passwort aus den Einstellungen — fehlt es, wird OS übersprungen.)`,async()=>{try{const Xe=await $e("/api/maintenance/update-all",{method:"POST"});if(R(Xe)||M(Xe))return;if((Xe==null?void 0:Xe.status)==="nothing"){a("Nichts zu tun","Es stehen keine Updates aus.");return}K(),C("maintenance")}catch(Xe){a("Fehler",`„Alle aktualisieren" konnte nicht starten: ${Xe.message}`)}})}async function _e(){F(!0);try{await $e("/api/maintenance/check-updates",{method:"POST"}),Es(n,Be.jobs,Be.updates),C("maintenance")}catch(G){a("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{F(!1)}}async function Z(G,Ie){try{await $e("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Ie})}),a("Gestartet",`Modell-Upgrade für '${Ie}' (${G}) gestartet.`),K(),C("maintenance")}catch(Xe){a("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Xe.message}`)}}async function we(){o("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await $e("/api/maintenance/reboot",{method:"POST"}),a("Reboot","Reboot ausgelöst. System startet neu...",()=>t())}catch(G){a("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Pe(){B(!0),q("Snapshot wird erzeugt...");try{const G=await $e("/api/system/backup",{method:"POST"});q(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),Es(n,Be.zeitmaschine)}catch(G){q(`Fehler: ${G.message}`)}finally{B(!1)}}async function ne(G){_(Ie=>({...Ie,[G]:!0}));try{const Ie=await $e("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Ie.ok?(a("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&m===G&&Q(G)}),Es(n,Be.services,Be.health,Be.models)):a("Fehler",`Fehler beim Neustart: ${Ie.err||"Unbekannter Fehler"}`)}catch(Ie){a("Fehler",`Fehler beim Neustart: ${Ie.message}`)}finally{_(Ie=>({...Ie,[G]:!1}))}}async function ot(G){try{await $e(`/api/jobs/${G}/cancel`,{method:"POST"}),K()}catch(Ie){a("Fehler",`Fehler beim Abbrechen: ${Ie.message}`)}}const De=f.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance"),Ee=(u?(u.os>0?1:0)+(u.engine?1:0)+(u.swap?1:0):0)+(((or=u==null?void 0:u.components)==null?void 0:or.filter(G=>G.update===!0).length)??0),vt=(h==null?void 0:h.backups)??[];return S.jsxs(S.Fragment,{children:[S.jsx("div",{className:Te("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}),S.jsxs("div",{className:Te("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:[S.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(zP,{className:"h-4.5 w-4.5 text-primary"}),S.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),S.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:S.jsx(Cf,{className:"h-4 w-4"})})]}),S.jsx("div",{className:"flex border-b border-border/40 px-6",children:["maintenance","logs","settings"].map(G=>S.jsx("button",{onClick:()=>C(G),className:Te("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N===G?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:G==="maintenance"?"System-Wartung":G==="logs"?"System-Logs":"Einstellungen"},G))}),S.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"space-y-2.5",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),S.jsxs("div",{className:"flex items-center gap-3",children:[Ee>0&&S.jsxs("button",{onClick:ye,disabled:!!De,className:"flex items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-[10px] font-bold text-primary transition-colors hover:bg-primary/20 disabled:opacity-50",children:[S.jsx(qM,{className:"h-3 w-3"})," Alle aktualisieren (",Ee,")"]}),S.jsxs("button",{onClick:_e,disabled:D||!!De,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[S.jsx(Ho,{className:Te("h-3 w-3",D&&"animate-spin")})," Nach Updates suchen"]})]})]}),(u==null?void 0:u.last_check)&&S.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",ie(u.last_check)]}),De&&S.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:[S.jsx(Ho,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),S.jsxs("span",{children:["Update läuft: ",S.jsx("span",{className:"font-semibold",children:De.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),S.jsxs("div",{className:"space-y-1.5",children:[S.jsx(Ps,{icon:Wy,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(u!=null&&u.os),status:u!=null&&u.os?`${u.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>te("os")}),S.jsx(Ps,{icon:Of,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(u!=null&&u.engine),status:u!=null&&u.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("engine")}),S.jsx(Ps,{icon:FP,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(u!=null&&u.swap),status:u!=null&&u.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("swap")}),(()=>{var Ie;const G=(Ie=u==null?void 0:u.components)==null?void 0:Ie.find(Xe=>Xe.key==="hermes_agent");return S.jsx(Ps,{icon:Af,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:ue,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("hermes")})})(),(fi=u==null?void 0:u.model_list)==null?void 0:fi.map(G=>S.jsx(Ps,{icon:FM,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>Z(G.repo,G.role)},G.role))]})]}),S.jsxs("div",{className:"space-y-2.5",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),S.jsxs("div",{className:"space-y-1.5",children:[de.length===0&&S.jsx("div",{className:"rounded-lg border border-dashed border-border/50 p-4 text-center text-xs text-muted-foreground",children:"Dienste-Liste wird geladen …"}),de.map(G=>S.jsx(g$,{label:G.name,system:G.scope==="system",ok:G.ok,busy:j[G.unit],onRestart:()=>ne(G.unit),onLogs:()=>{v(G.unit),C("logs")}},G.unit))]})]}),S.jsxs("div",{className:"space-y-2.5",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),S.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-xs text-foreground truncate",children:vt[0]?`Letztes: ${vt[0].snapshot}`:"Noch kein Backup"}),S.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[vt.length," Snapshots · Wiederherstellen: Chronik → Zeitmaschine"]})]}),S.jsxs("button",{onClick:Pe,disabled:X,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:[S.jsx(UM,{className:Te("h-3.5 w-3.5",X&&"animate-pulse")})," Snapshot"]})]}),z&&S.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:z})]}),S.jsxs("div",{className:"space-y-2.5",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),S.jsxs("button",{onClick:we,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:[S.jsx(sT,{className:"h-4.5 w-4.5"}),S.jsxs("div",{children:[S.jsx("div",{children:"Host-System neu starten"}),S.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),S.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),S.jsx("div",{className:"space-y-3",children:f.length===0?S.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."}):f.map(G=>{const Ie=G.state==="running"||G.state==="queued";return S.jsxs("div",{className:Te("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:[S.jsxs("div",{className:"flex items-start justify-between gap-3",children:[S.jsxs("div",{className:"space-y-1",children:[S.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ie&&S.jsxs("span",{className:"flex h-2 w-2 relative",children:[S.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),S.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),S.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[S.jsxs("span",{children:["ID: ",G.id]}),S.jsx("span",{children:"•"}),S.jsx("span",{className:Te(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&&S.jsx("button",{onClick:()=>ot(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"&&S.jsxs("div",{className:"mt-3 space-y-1",children:[S.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:S.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),S.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[S.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&S.jsxs("span",{children:[Nm(G.done_bytes)," / ",Nm(G.total_bytes),G.rate_bps!=null&&` (${Nm(G.rate_bps)}/s)`]}),G.eta_s!=null&&S.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&S.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("select",{value:m,onChange:G=>v(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:de.map(G=>S.jsxs("option",{value:G.unit,children:[G.name," (",G.scope==="system"?"systemd-root":"user",")"]},G.unit))}),S.jsxs("button",{onClick:()=>ne(m),disabled:j[m],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:[S.jsx(Ho,{className:Te("h-3.5 w-3.5",j[m]&&"animate-spin")}),"Restart"]})]}),S.jsx(k$,{service:m,text:x,loading:w,logStatus:P,onRefresh:()=>Q(m),onOpenSettings:()=>C("settings")})]}),N==="settings"&&S.jsx(E$,{open:e,showAlert:a})]})]}),le&&S.jsx(P$,{detail:le,maintenanceJob:De,onClose:()=>fe(null),onApply:ce}),s]})}let Tv=[],cw=[];const Dv=new Set,IA=()=>Dv.forEach(e=>e());function O$(e){return Dv.add(e),()=>{Dv.delete(e)}}function C$(e){Tv=[...Tv,e].slice(-40),IA()}function _$(e){cw=[...cw,e].slice(-40),IA()}const j$=()=>g.useSyncExternalStore(O$,()=>Tv);function N$(){const{data:e,dataUpdatedAt:t}=Df(),{data:r,dataUpdatedAt:n}=m$(),a=g.useRef(null);g.useEffect(()=>{var o,s,u,d;e&&C$({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((s=e.ram)==null?void 0:s.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((d=e.disk)==null?void 0:d.percent)??null})},[t]),g.useEffect(()=>{if(!r)return;const o=Date.now(),s=r.prompt_tokens,u=r.completion_tokens;if(a.current){const d=Math.max((o-a.current.t)/1e3,.001);_$({t:o,prompt:Math.max(0,(s-a.current.p)/d),completion:Math.max(0,(u-a.current.c)/d)})}a.current={p:s,c:u,t:o}},[n])}function I$(){var F,z,q,X,B,ue;const{data:e,isError:t}=_A(),{data:r,isError:n}=Yy(),{data:a}=jA(),{data:o}=Df(),s=t||n,u=!!e&&!!r,d=Y=>{var le;return(le=r==null?void 0:r.services.find(fe=>fe.unit===Y))==null?void 0:le.ok},f=Y=>!!(r!=null&&r.services.some(le=>le.unit===Y)),h=e==null?void 0:e.engine_reachable,m=(F=e==null?void 0:e.brain)==null?void 0:F.ready,v=((z=e==null?void 0:e.brain)==null?void 0:z.model)||((q=a==null?void 0:a.models.find(Y=>Y.role==="hermes"))==null?void 0:q.name)||"",x=[];s&&x.push({id:"mc2",label:"Steuerpult (MC2)",icon:Of,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),x.push((()=>{const Y={id:"brain",label:"Lucys Hirn",icon:BM,critical:!0};return u?h===!1?{...Y,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}}:m===!1?{...Y,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:v?{kind:"loadModel",model:v,label:"Hirn aufwecken"}:void 0}:{...Y,status:"ok",detail:"Wach und ansprechbar."}:{...Y,status:"loading",detail:"Wird geprüft …"}})()),x.push((()=>{const Y={id:"vision",label:"Lucys Augen",icon:Ov,critical:!1};if(!u||!a)return{...Y,status:"loading",detail:"Wird geprüft …"};const le=a.models.find(de=>de.role==="vision");return le?(a.running??[]).includes(le.name)?{...Y,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...Y,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:le.name,label:"Augen wecken"}}:{...Y,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),x.push((()=>{const Y={id:"memory",label:"Lucys Gedächtnis",icon:zM,critical:!0},le=d("mem0-service");return!u||le===void 0?{...Y,status:"loading",detail:"Wird geprüft …"}:le?{...Y,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...Y,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"}}})()),x.push((()=>{const Y={id:"gateway",label:"Verbindung (Gateway)",icon:By,critical:!0},le=e?e.gateway_reachable:d("mc2-gateway");if(!u||le===void 0)return{...Y,status:"loading",detail:"Wird geprüft …"};const fe=f("mc2-gateway")?"mc2-gateway":"mission-control-2";return le?{...Y,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...Y,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:fe,label:"Gateway neu starten"}}})()),x.push((()=>{const Y={id:"steward",label:"Wächter (Steward)",icon:Uy,critical:!1};return u?f("mc2-steward")?d("mc2-steward")?{...Y,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...Y,status:"warn",detail:"Der Wächter schläft — niemand meldet gerade Ausfälle oder wärmt Modelle nach.",repair:{kind:"restart",service:"mc2-steward",label:"Wächter neu starten"}}:{...Y,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...Y,status:"loading",detail:"Wird geprüft …"}})()),x.push((()=>{const Y={id:"agent",label:"Lucys Agent (Hermes)",icon:Af,critical:!0},le=d("hermes-gateway");return!u||le===void 0?{...Y,status:"loading",detail:"Wird geprüft …"}:le?{...Y,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...Y,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),x.push((()=>{const Y={id:"voice",label:"Lucys Stimme",icon:lT,critical:!1},le=d("voice-service");return!u||le===void 0?{...Y,status:"loading",detail:"Wird geprüft …"}:le?{...Y,status:"ok",detail:"Lucy kann hören und sprechen."}:{...Y,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const k=((X=o==null?void 0:o.ram)==null?void 0:X.total)??0,w=((B=o==null?void 0:o.ram)==null?void 0:B.used)??0,E=((ue=o==null?void 0:o.ram)==null?void 0:ue.percent)??(k>0?Math.min(100,w/k*100):0),P=1024**3,O=k?E>=93?{status:"full",usedGb:w/P,totalGb:k/P,pct:E,text:"Speicher fast voll — Lucy könnte langsamer werden."}:E>=85?{status:"warn",usedGb:w/P,totalGb:k/P,pct:E,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:w/P,totalGb:k/P,pct:E,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},j=x.some(Y=>Y.status==="loading"),_=x.filter(Y=>Y.critical&&Y.status==="down"),N=x.filter(Y=>Y.status==="warn"||!Y.critical&&Y.status==="down"),C=O.status==="full";return{verdict:j&&!_.length?"loading":_.length?"problem":N.length||C?"warn":"gut",checks:x,memory:O,problems:_,warns:N,unreachable:s}}const M$={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},T$={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function As({icon:e,title:t,value:r,unit:n,tone:a="muted",hint:o,onClick:s}){return S.jsxs("button",{onClick:s,className:Te("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",T$[a]),children:[S.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[S.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:S.jsx(e,{className:"h-5 w-5"})}),S.jsx("span",{className:Te("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",M$[a]),title:o})]}),S.jsxs("div",{className:"flex items-baseline gap-1.5",children:[S.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&S.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),S.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[S.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),S.jsx(Bs,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&S.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function D$(){const{data:e,error:t}=Df(),r=j$();return{sys:e,hist:r,error:t}}var R$=["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 Qy(e){if(typeof e!="string")return!1;var t=R$;return t.includes(e)}var $$=["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"],L$=new Set($$);function MA(e){return typeof e!="string"?!1:L$.has(e)}function TA(e){return typeof e=="string"&&e.startsWith("data-")}function on(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(MA(r)||TA(r))&&(t[r]=e[r]);return t}function Rf(e){if(e==null)return null;if(g.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return on(t)}return typeof e=="object"&&!Array.isArray(e)?on(e):null}function Br(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(MA(r)||TA(r)||Qy(r))&&(t[r]=e[r]);return t}function z$(e){return e==null?null:g.isValidElement(e)?Br(e.props):typeof e=="object"&&!Array.isArray(e)?Br(e):null}var F$=["children","width","height","viewBox","className","style","title","desc"];function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,a=e.height,o=e.viewBox,s=e.className,u=e.style,d=e.title,f=e.desc,h=B$(e,F$),m=o||{width:n,height:a,x:0,y:0},v=Qe("recharts-surface",s);return g.createElement("svg",Rv({},Br(h),{className:v,width:n,height:a,style:u,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),g.createElement("title",null,d),g.createElement("desc",null,f),r)}),W$=["children","className"];function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,a=H$(e,W$),o=Qe("recharts-layer",n);return g.createElement("g",$v({className:o},Br(a),{ref:t}),r)}),V$=g.createContext(null);function ft(e){return function(){return e}}const Lv=Math.PI,zv=2*Lv,ba=1e-6,q$=zv-ba;function RA(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return RA;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;aba)if(!(Math.abs(m*d-f*h)>ba)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-s,k=a-u,w=d*d+f*f,E=x*x+k*k,P=Math.sqrt(w),O=Math.sqrt(v),j=o*Math.tan((Lv-Math.acos((w+v-E)/(2*P*O)))/2),_=j/O,N=j/P;Math.abs(_-1)>ba&&this._append`L${t+_*h},${r+_*m}`,this._append`A${o},${o},0,0,${+(m*x>h*k)},${this._x1=t+N*d},${this._y1=r+N*f}`}}arc(t,r,n,a,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(a),d=n*Math.sin(a),f=t+u,h=r+d,m=1^s,v=s?a-o:o-a;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>ba||Math.abs(this._y1-h)>ba)&&this._append`L${f},${h}`,n&&(v<0&&(v=v%zv+zv),v>q$?this._append`A${n},${n},0,1,${m},${t-u},${r-d}A${n},${n},0,1,${m},${this._x1=f},${this._y1=h}`:v>ba&&this._append`A${n},${n},0,${+(v>=Lv)},${m},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function $A(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 Y$(t)}function Xy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LA(e){this._context=e}LA.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 $f(e){return new LA(e)}function zA(e){return e[0]}function FA(e){return e[1]}function BA(e,t){var r=ft(!0),n=null,a=$f,o=null,s=$A(u);e=typeof e=="function"?e:e===void 0?zA:ft(e),t=typeof t=="function"?t:t===void 0?FA:ft(t);function u(d){var f,h=(d=Xy(d)).length,m,v=!1,x;for(n==null&&(o=a(x=s())),f=0;f<=h;++f)!(f=x;--k)u.point(j[k],_[k]);u.lineEnd(),u.areaEnd()}P&&(j[v]=+e(E,v,m),_[v]=+t(E,v,m),u.point(n?+n(E,v,m):j[v],r?+r(E,v,m):_[v]))}if(O)return u=null,O+""||null}function h(){return BA().defined(a).curve(s).context(o)}return f.x=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),n=null,f):e},f.x0=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),f):e},f.x1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:ft(+m),f):n},f.y=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),r=null,f):t},f.y0=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),f):t},f.y1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:ft(+m),f):r},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(r)},f.lineX1=function(){return h().x(n).y(t)},f.defined=function(m){return arguments.length?(a=typeof m=="function"?m:ft(!!m),f):a},f.curve=function(m){return arguments.length?(s=m,o!=null&&(u=s(o)),f):s},f.context=function(m){return arguments.length?(m==null?o=u=null:u=s(o=m),f):o},f}class UA{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 Q$(e){return new UA(e,!0)}function X$(e){return new UA(e,!1)}function Cd(){}function _d(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 WA(e){this._context=e}WA.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:_d(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:_d(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Z$(e){return new WA(e)}function HA(e){this._context=e}HA.prototype={areaStart:Cd,areaEnd:Cd,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:_d(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J$(e){return new HA(e)}function KA(e){this._context=e}KA.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:_d(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e3(e){return new KA(e)}function VA(e){this._context=e}VA.prototype={areaStart:Cd,areaEnd:Cd,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 t3(e){return new VA(e)}function dw(e){return e<0?-1:1}function fw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),u=(o*a+s*n)/(n+a);return(dw(o)+dw(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(u))||0}function hw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Im(e,t,r){var n=e._x0,a=e._y0,o=e._x1,s=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,a+u*t,o-u,s-u*r,o,s)}function jd(e){this._context=e}jd.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:Im(this,this._t0,hw(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,Im(this,hw(this,r=fw(this,e,t)),r);break;default:Im(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 qA(e){this._context=new GA(e)}(qA.prototype=Object.create(jd.prototype)).point=function(e,t){jd.prototype.point.call(this,t,e)};function GA(e){this._context=e}GA.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function r3(e){return new jd(e)}function n3(e){return new qA(e)}function YA(e){this._context=e}YA.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=pw(e),a=pw(t),o=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function a3(e){return new Lf(e,.5)}function o3(e){return new Lf(e,0)}function l3(e){return new Lf(e,1)}function Wa(e,t){if((s=e.length)>1)for(var r=1,n,a,o=e[t[0]],s,u=o.length;r=0;)r[t]=t;return r}function s3(e,t){return e[t]}function u3(e){const t=[];return t.key=e,t}function c3(){var e=ft([]),t=Fv,r=Wa,n=s3;function a(o){var s=Array.from(e.apply(this,arguments),u3),u,d=s.length,f=-1,h;for(const m of o)for(u=0,++f;u0){for(var r,n,a=0,o=e[0].length,s;a0){for(var r=0,n=e[t[0]],a,o=n.length;r0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,s;n1&&arguments[1]!==void 0?arguments[1]:m3,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Lt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[s-1];return typeof u=="string"?a+u+o:u!==void 0?a+Gi(u)+o:a+o},"")}var Lr=e=>e===0?0:e>0?1:-1,On=e=>typeof e=="number"&&e!=+e,Ha=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,be=e=>(typeof e=="number"||e instanceof Number)&&!On(e),Cn=e=>be(e)||typeof e=="string",v3=0,Xs=e=>{var t=++v3;return"".concat(e||"").concat(t)},ea=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!be(t)&&typeof t!="string")return n;var o;if(Ha(t)){if(r==null)return n;var s=t.indexOf("%");o=r*parseFloat(t.slice(0,s))/100}else o=+t;return On(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},ZA=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Za(n,t))===r)}var Ut=e=>e===null||typeof e>"u",eg=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function mr(e){return e!=null}function kl(){}var eO=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,tg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(g.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{Qy(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},y3=(e,t,r)=>n=>(e(t,r,n),null),g3=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];Qy(a)&&typeof o=="function"&&(n||(n={}),n[a]=y3(o,t,r))}),n};function mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function x3(e){for(var t=1;t(s[u]===void 0&&n[u]!==void 0&&(s[u]=n[u]),s),r);return o}function k3(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function rg(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const C3="[object RegExp]",rO="[object String]",nO="[object Number]",iO="[object Boolean]",aO="[object Arguments]",_3="[object Symbol]",j3="[object Date]",N3="[object Map]",I3="[object Set]",M3="[object Array]",T3="[object ArrayBuffer]",D3="[object Object]",R3="[object DataView]",$3="[object Uint8Array]",L3="[object Uint8ClampedArray]",z3="[object Uint16Array]",F3="[object Uint32Array]",B3="[object Int8Array]",U3="[object Int16Array]",W3="[object Int32Array]",H3="[object Float32Array]",K3="[object Float64Array]",vw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function V3(e){return typeof vw.Buffer<"u"&&vw.Buffer.isBuffer(e)}function q3(e,t){return Ea(e,void 0,e,new Map,t)}function Ea(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(Uv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const s=new Array(e.length);n.set(e,s);for(let u=0;u{}):Wv(e,t,function n(a,o,s,u,d,f){const h=r(a,o,s,u,d,f);return h!==void 0?!!h:Wv(a,o,n,f,!1)},new Map,!0)}function Wv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return Q3(e,t,r,n);case"function":return Object.keys(t).length>0?Wv(e,{...t},r,n,a):xd(e,t);default:return oO(e)&&a?typeof t=="string"?t==="":!0:xd(e,t)}}function Q3(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return sO(e,t,r,n);if(t instanceof Map)return X3(e,t,r,n);if(t instanceof Set)return Z3(e,t,r,n);const a=Object.keys(t);if(e==null||Uv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function J3(e){return e=Y3(e),t=>uO(t,e)}function eL(e,t){return q3(e,(r,n,a,o)=>{if(typeof e=="object"){if(rg(e)==="[object Object]"&&typeof e.constructor!="function"){const s={};return o.set(e,s),en(s,e,a,o),s}switch(Object.prototype.toString.call(e)){case nO:case rO:case iO:{const s=new e.constructor(e==null?void 0:e.valueOf());return en(s,e),s}case aO:{const s={};return en(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function tL(e){return eL(e)}const rL=/^(?:0|[1-9]\d*)$/;function cO(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function dO(e){return e!=null&&typeof e!="function"&&lL(e.length)}function sL(e){return typeof e=="object"&&e!==null}function uL(e){return sL(e)&&dO(e)}function yw(e,t=tO){return uL(e)?k3(Array.from(e),E3(oL(t),1)):[]}function cL(e,t,r){return t===!0?yw(e,r):typeof t=="function"?yw(e,t):e}var Mm={exports:{}},Tm={},Dm={exports:{}},Rm={};/** * @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 dL(){if(gw)return Rm;gw=1;var e=wl();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function u(m,v){var x=v(),k=n({inst:{value:x,getSnapshot:v}}),w=k[0].inst,E=k[1];return o(function(){w.value=x,w.getSnapshot=v,d(w)&&E({inst:w})},[m,x,v]),a(function(){return d(w)&&E({inst:w}),m(function(){d(w)&&E({inst:w})})},[m]),s(x),x}function d(m){var v=m.getSnapshot;m=m.value;try{var x=v();return!r(m,x)}catch{return!0}}function f(m,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Rm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Rm}var xw;function fL(){return xw||(xw=1,Dm.exports=dL()),Dm.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 bw;function hL(){if(bw)return Tm;bw=1;var e=wl(),t=fL();function r(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Tm.useSyncExternalStoreWithSelector=function(f,h,m,v,x){var k=o(null);if(k.current===null){var w={hasValue:!1,value:null};k.current=w}else w=k.current;k=u(function(){function P(C){if(!O){if(O=!0,j=C,C=v(C),x!==void 0&&w.hasValue){var D=w.value;if(x(D,C))return _=D}return _=C}if(D=_,n(j,C))return D;var F=v(C);return x!==void 0&&x(D,F)?(j=C,D):(j=C,_=F)}var O=!1,j,_,N=m===void 0?null:m;return[function(){return P(h())},N===null?void 0:function(){return P(N())}]},[h,m,v,x]);var E=a(f,k[0],k[1]);return s(function(){w.hasValue=!0,w.value=E},[E]),d(E),E},Tm}var ww;function pL(){return ww||(ww=1,Mm.exports=hL()),Mm.exports}var mL=pL(),ng=g.createContext(null),vL=e=>e,xt=()=>{var e=g.useContext(ng);return e?e.store.dispatch:vL},bd=()=>{},yL=()=>bd,gL=(e,t)=>e===t;function ke(e){var t=g.useContext(ng),r=g.useMemo(()=>t?n=>{if(n!=null)return e(n)}:bd,[t,e]);return mL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:yL,t?t.store.getState:bd,t?t.store.getState:bd,r,gL)}function xL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bL(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 Sw=e=>Array.isArray(e)?e:[e];function wL(e){const t=Array.isArray(e[0])?e[0]:e;return bL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function SL(e,t){const r=[],{length:n}=e;for(let a=0;atypeof WeakRef>"u"?kL:WeakRef,fO=EL(),PL=0,kw=1;function td(){return{s:PL,v:void 0,o:null,p:null}}function AL(e){return e instanceof fO?e.deref():e}function hO(e,t={}){let r=td();const{resultEqualityCheck:n}=t;let a,o=0;function s(){let u=r;const{length:d}=arguments;for(let m=0,v=d;m{r=td(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function OL(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,s=0,u,d={},f=a.pop();typeof f=="object"&&(d=f,f=a.pop()),xL(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...r,...d},{memoize:m,memoizeOptions:v=[],argsMemoize:x=hO,argsMemoizeOptions:k=[]}=h,w=Sw(v),E=Sw(k),P=wL(a),O=m(function(){return o++,f.apply(null,arguments)},...w),j=x(function(){s++;const N=SL(P,arguments);return u=O.apply(null,N),u},...E);return Object.assign(j,{resultFunc:f,memoizedResultFunc:O,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var H=OL(hO);function CL(e,t=1){const r=[],n=Math.floor(t),a=(o,s)=>{for(let u=0;u{if(e!==t){const n=Ew(e),a=Ew(t);if(n===a&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function pO(e){return typeof e=="symbol"||e instanceof Symbol}const jL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NL=/^\w*$/;function IL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||pO(e)?!0:typeof e=="string"&&(NL.test(e)||!jL.test(e))||t!=null}function ML(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(u=>String(u));const a=(u,d)=>{let f=u;for(let h=0;hd==null||u==null?d:typeof u=="object"&&"key"in u?Object.hasOwn(d,u.key)?d[u.key]:a(d,u.path):typeof u=="function"?u(d):Array.isArray(u)?a(d,u):typeof d=="object"?d[u]:d,s=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||IL(u)?u:{key:u,path:Jy(u)}));return e.map(u=>({original:u,criteria:s.map(d=>o(d,u))})).slice().sort((u,d)=>{for(let f=0;fu.original)}function zf(e,...t){const r=t.length;return r>1&&Hv(e,t[0],t[1])?t=[]:r>2&&Hv(t[0],t[1],t[2])&&(t=[t[0]]),ML(e,CL(t),["asc"])}var mO=e=>e.legend.settings,TL=e=>e.legend.size,DL=e=>e.legend.payload;H([DL,mO],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?zf(n,r):n});function RL(e,t){return FL(e)||zL(e,t)||LL(e,t)||$L()}function $L(){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 LL(e,t){if(e){if(typeof e=="string")return Pw(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)?Pw(e,t):void 0}}function Pw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rrd||Math.abs(e.left-t.left)>rd||Math.abs(e.top-t.top)>rd||Math.abs(e.width-t.width)>rd}function Ow(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function BL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=g.useState({height:0,left:0,top:0,width:0}),r=RL(t,2),n=r[0],a=r[1],o=g.useRef(null),s=g.useRef(n);s.current=n;var u=g.useCallback(d=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),d!=null){var f=Ow(d);if(Aw(f,s.current)&&a(f),typeof ResizeObserver<"u"){var h=new ResizeObserver(()=>{var m=Ow(d);Aw(m,s.current)&&a(m)});h.observe(d),o.current=h}}},[...e]);return g.useEffect(()=>()=>{var d;(d=o.current)===null||d===void 0||d.disconnect()},[]),[n,u]}function $t(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 UL=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cw=UL,$m=()=>Math.random().toString(36).substring(7).split("").join("."),WL={INIT:`@@redux/INIT${$m()}`,REPLACE:`@@redux/REPLACE${$m()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$m()}`},Nd=WL;function ig(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 vO(e,t,r){if(typeof e!="function")throw new Error($t(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error($t(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error($t(1));return r(vO)(e,t)}let n=e,a=t,o=new Map,s=o,u=0,d=!1;function f(){s===o&&(s=new Map,o.forEach((E,P)=>{s.set(P,E)}))}function h(){if(d)throw new Error($t(3));return a}function m(E){if(typeof E!="function")throw new Error($t(4));if(d)throw new Error($t(5));let P=!0;f();const O=u++;return s.set(O,E),function(){if(P){if(d)throw new Error($t(6));P=!1,f(),s.delete(O),o=null}}}function v(E){if(!ig(E))throw new Error($t(7));if(typeof E.type>"u")throw new Error($t(8));if(typeof E.type!="string")throw new Error($t(17));if(d)throw new Error($t(9));try{d=!0,a=n(a,E)}finally{d=!1}return(o=s).forEach(O=>{O()}),E}function x(E){if(typeof E!="function")throw new Error($t(10));n=E,v({type:Nd.REPLACE})}function k(){const E=m;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error($t(11));function O(){const _=P;_.next&&_.next(h())}return O(),{unsubscribe:E(O)}},[Cw](){return this}}}return v({type:Nd.INIT}),{dispatch:v,subscribe:m,getState:h,replaceReducer:x,[Cw]:k}}function HL(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Nd.INIT})>"u")throw new Error($t(12));if(typeof r(void 0,{type:Nd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function yO(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error($t(14));f[m]=k,d=d||k!==x}return d=d||n.length!==Object.keys(s).length,d?f:s}}function Id(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function KL(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error($t(15))};const s={getState:a.getState,dispatch:(d,...f)=>o(d,...f)},u=e.map(d=>d(s));return o=Id(...u)(a.dispatch),{...a,dispatch:o}}}function gO(e){return ig(e)&&"type"in e&&typeof e.type=="string"}var xO=Symbol.for("immer-nothing"),_w=Symbol.for("immer-draftable"),ir=Symbol.for("immer-state");function rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object,fl=Ar.getPrototypeOf,Md="constructor",Ff="prototype",Kv="configurable",Td="enumerable",wd="writable",Zs="value",ei=e=>!!e&&!!e[ir];function ln(e){var t;return e?bO(e)||Uf(e)||!!e[_w]||!!((t=e[Md])!=null&&t[_w])||Wf(e)||Hf(e):!1}var VL=Ar[Ff][Md].toString(),jw=new WeakMap;function bO(e){if(!e||!ag(e))return!1;const t=fl(e);if(t===null||t===Ar[Ff])return!0;const r=Ar.hasOwnProperty.call(t,Md)&&t[Md];if(r===Object)return!0;if(!Bo(r))return!1;let n=jw.get(r);return n===void 0&&(n=Function.toString.call(r),jw.set(r,n)),n===VL}function Bf(e,t,r=!0){bu(e)===0?(r?Reflect.ownKeys(e):Ar.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function bu(e){const t=e[ir];return t?t.type_:Uf(e)?1:Wf(e)?2:Hf(e)?3:0}var Nw=(e,t,r=bu(e))=>r===2?e.has(t):Ar[Ff].hasOwnProperty.call(e,t),Vv=(e,t,r=bu(e))=>r===2?e.get(t):e[t],Dd=(e,t,r,n=bu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function qL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Uf=Array.isArray,Wf=e=>e instanceof Map,Hf=e=>e instanceof Set,ag=e=>typeof e=="object",Bo=e=>typeof e=="function",Lm=e=>typeof e=="boolean";function GL(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Hn=e=>e.copy_||e.base_,og=e=>e.modified_?e.copy_:e.base_;function qv(e,t){if(Wf(e))return new Map(e);if(Hf(e))return new Set(e);if(Uf(e))return Array[Ff].slice.call(e);const r=bO(e);if(t===!0||t==="class_only"&&!r){const n=Ar.getOwnPropertyDescriptors(e);delete n[ir];let a=Reflect.ownKeys(n);for(let o=0;o1&&Ar.defineProperties(e,{set:nd,add:nd,clear:nd,delete:nd}),Ar.freeze(e),t&&Bf(e,(r,n)=>{lg(n,!0)},!1)),e}function YL(){rn(2)}var nd={[Zs]:YL};function Kf(e){return e===null||!ag(e)?!0:Ar.isFrozen(e)}var Rd="MapSet",Gv="Patches",Iw="ArrayMethods",wO={};function Ka(e){const t=wO[e];return t||rn(0,e),t}var Mw=e=>!!wO[e],Js,SO=()=>Js,QL=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Mw(Rd)?Ka(Rd):void 0,arrayMethodsPlugin_:Mw(Iw)?Ka(Iw):void 0});function Tw(e,t){t&&(e.patchPlugin_=Ka(Gv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yv(e){Qv(e),e.drafts_.forEach(XL),e.drafts_=null}function Qv(e){e===Js&&(Js=e.parent_)}var Dw=e=>Js=QL(Js,e);function XL(e){const t=e[ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[ir].modified_&&(Yv(t),rn(4)),ln(e)&&(e=$w(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[ir].base_,e,t)}else e=$w(t,r);return ZL(t,e,!0),Yv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xO?e:void 0}function $w(e,t){if(Kf(t))return t;const r=t[ir];if(!r)return $d(t,e.handledSet_,e);if(!Vf(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);PO(r,e)}return r.copy_}function ZL(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lg(t,r)}function kO(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vf=(e,t)=>e.scope_===t,JL=[];function EO(e,t,r,n){const a=Hn(e),o=e.type_;if(n!==void 0&&Vv(a,n,o)===t){Dd(a,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Bf(a,(d,f)=>{if(ei(f)){const h=u.get(f)||[];h.push(d),u.set(f,h)}})}const s=e.draftLocations_.get(t)??JL;for(const u of s)Dd(a,u,r,o)}function e5(e,t,r){e.callbacks_.push(function(a){var u;const o=t;if(!o||!Vf(o,a))return;(u=a.mapSetPlugin_)==null||u.fixSetContents(o);const s=og(o);EO(e,o.draft_??o,s,r),PO(o,a)})}function PO(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}kO(e)}}function t5(e,t,r){const{scope_:n}=e;if(ei(r)){const a=r[ir];Vf(a,n)&&a.callbacks_.push(function(){Sd(e);const s=og(a);EO(e,r,s,t)})}else ln(r)&&e.callbacks_.push(function(){const o=Hn(e);e.type_===3?o.has(r)&&$d(r,n.handledSet_,n):Vv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&$d(Vv(e.copy_,t,e.type_),n.handledSet_,n)})}function $d(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ei(e)||t.has(e)||!ln(e)||Kf(e)||(t.add(e),Bf(e,(n,a)=>{if(ei(a)){const o=a[ir];if(Vf(o,r)){const s=og(o);Dd(e,n,s,e.type_),kO(o)}}else ln(a)&&$d(a,t,r)})),e}function r5(e,t){const r=Uf(e),n={type_:r?1:0,scope_:t?t.scope_:SO(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=Ld;r&&(a=[n],o=eu);const{revoke:s,proxy:u}=Proxy.revocable(a,o);return n.draft_=u,n.revoke_=s,[u,n]}var Ld={get(e,t){if(t===ir)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Hn(e);if(!Nw(a,t,e.type_))return n5(e,a,t);const o=a[t];if(e.finalized_||!ln(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&GL(t))return o;if(o===zm(e.base_,t)){Sd(e);const s=e.type_===1?+t:t,u=Zv(e.scope_,o,e,s);return e.copy_[s]=u}return o},has(e,t){return t in Hn(e)},ownKeys(e){return Reflect.ownKeys(Hn(e))},set(e,t,r){const n=AO(Hn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=zm(Hn(e),t),o=a==null?void 0:a[ir];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(qL(r,a)&&(r!==void 0||Nw(e.base_,t,e.type_)))return!0;Sd(e),Xv(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),t5(e,t,r)),!0},deleteProperty(e,t){return Sd(e),zm(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Hn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[wd]:!0,[Kv]:e.type_!==1||t!=="length",[Td]:n[Td],[Zs]:r[t]}},defineProperty(){rn(11)},getPrototypeOf(e){return fl(e.base_)},setPrototypeOf(){rn(12)}},eu={};for(let e in Ld){let t=Ld[e];eu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}eu.deleteProperty=function(e,t){return eu.set.call(this,e,t,void 0)};eu.set=function(e,t,r){return Ld.set.call(this,e[0],t,r,e[0])};function zm(e,t){const r=e[ir];return(r?Hn(r):e)[t]}function n5(e,t,r){var a;const n=AO(t,r);return n?Zs in n?n[Zs]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function AO(e,t){if(!(t in e))return;let r=fl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=fl(r)}}function Xv(e){e.modified_||(e.modified_=!0,e.parent_&&Xv(e.parent_))}function Sd(e){e.copy_||(e.assigned_=new Map,e.copy_=qv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var i5=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(Bo(r)&&!Bo(n)){const s=n;n=r;const u=this;return function(f=s,...h){return u.produce(f,m=>n.call(this,m,...h))}}Bo(n)||rn(6),a!==void 0&&!Bo(a)&&rn(7);let o;if(ln(r)){const s=Dw(this),u=Zv(s,r,void 0);let d=!0;try{o=n(u),d=!1}finally{d?Yv(s):Qv(s)}return Tw(s,a),Rw(o,s)}else if(!r||!ag(r)){if(o=n(r),o===void 0&&(o=r),o===xO&&(o=void 0),this.autoFreeze_&&lg(o,!0),a){const s=[],u=[];Ka(Gv).generateReplacementPatches_(r,o,{patches_:s,inversePatches_:u}),a(s,u)}return o}else rn(1,r)},this.produceWithPatches=(r,n)=>{if(Bo(r))return(u,...d)=>this.produceWithPatches(u,f=>r(f,...d));let a,o;return[this.produce(r,n,(u,d)=>{a=u,o=d}),a,o]},Lm(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Lm(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Lm(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ln(t)||rn(8),ei(t)&&(t=zr(t));const r=Dw(this),n=Zv(r,t,void 0);return n[ir].isManual_=!0,Qv(r),n}finishDraft(t,r){const n=t&&t[ir];(!n||!n.isManual_)&&rn(9);const{scope_:a}=n;return Tw(a,r),Rw(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=Ka(Gv).applyPatches_;return ei(t)?a(t,r):this.produce(t,o=>a(o,r))}};function Zv(e,t,r,n){const[a,o]=Wf(t)?Ka(Rd).proxyMap_(t,r):Hf(t)?Ka(Rd).proxySet_(t,r):r5(t,r);return((r==null?void 0:r.scope_)??SO()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?e5(r,o,n):o.callbacks_.push(function(d){var h;(h=d.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:f}=d;o.modified_&&f&&f.generatePatches_(o,[],d)}),a}function zr(e){return ei(e)||rn(10,e),OO(e)}function OO(e){if(!ln(e)||Kf(e))return e;const t=e[ir];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=qv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=qv(e,!0);return Bf(r,(a,o)=>{Dd(r,a,OO(o))},n),t&&(t.finalized_=!1),r}var a5=new i5,CO=a5.produce;function _O(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var o5=_O(),l5=_O,s5=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Id:Id.apply(null,arguments)};function Cr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Or(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>gO(n)&&n.type===e,r}var jO=class Ls extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ls.prototype)}static get[Symbol.species](){return Ls}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ls(...t[0].concat(this)):new Ls(...t.concat(this))}};function Lw(e){return ln(e)?CO(e,()=>{}):e}function id(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function u5(e){return typeof e=="boolean"}var c5=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let s=new jO;return r&&(u5(r)?s.push(o5):s.push(l5(r.extraArgument))),s},NO="RTK_autoBatch",tt=()=>e=>({payload:e,meta:{[NO]:!0}}),zw=e=>t=>{setTimeout(t,e)},d5=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(a),s=setTimeout(a,t)},IO=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,s=!1;const u=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?d5(window.requestAnimationFrame,100):zw(10):e.type==="callback"?e.queueNotification:zw(e.timeout),f=()=>{s=!1,o&&(o=!1,u.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){const m=()=>a&&h(),v=n.subscribe(m);return u.add(h),()=>{v(),u.delete(h)}},dispatch(h){var m;try{return a=!((m=h==null?void 0:h.meta)!=null&&m[NO]),o=!a,o&&(s||(s=!0,d(f))),n.dispatch(h)}finally{a=!0}}})},f5=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new jO(e);return n&&a.push(IO(typeof n=="object"?n:void 0)),a};function h5(e){const t=c5(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(ig(r))u=yO(r);else throw new Error(Or(1));let d;typeof n=="function"?d=n(t):d=t();let f=Id;a&&(f=s5({trace:!1,...typeof a=="object"&&a}));const h=KL(...d),m=f5(h);let v=typeof s=="function"?s(m):m();const x=f(...v);return vO(u,o,x)}function MO(e){const t={},r=[];let n;const a={addCase(o,s){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Or(28));if(u in t)throw new Error(Or(29));return t[u]=s,a},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),a},addMatcher(o,s){return r.push({matcher:o,reducer:s}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function p5(e){return typeof e=="function"}function m5(e,t){let[r,n,a]=MO(t),o;if(p5(e))o=()=>Lw(e());else{const u=Lw(e);o=()=>u}function s(u=o(),d){let f=[r[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return f.filter(h=>!!h).length===0&&(f=[a]),f.reduce((h,m)=>{if(m)if(ei(h)){const x=m(h,d);return x===void 0?h:x}else{if(ln(h))return CO(h,v=>m(v,d));{const v=m(h,d);if(v===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return h},u)}return s.getInitialState=o,s}var v5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",y5=(e=21)=>{let t="",r=e;for(;r--;)t+=v5[Math.random()*64|0];return t},g5=Symbol.for("rtk-slice-createasyncthunk");function x5(e,t){return`${e}/${t}`}function b5({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[g5];return function(a){const{name:o,reducerPath:s=o}=a;if(!o)throw new Error(Or(11));const u=(typeof a.reducers=="function"?a.reducers(S5()):a.reducers)||{},d=Object.keys(u),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(_,N){const C=typeof _=="string"?_:_.type;if(!C)throw new Error(Or(12));if(C in f.sliceCaseReducersByType)throw new Error(Or(13));return f.sliceCaseReducersByType[C]=N,h},addMatcher(_,N){return f.sliceMatchers.push({matcher:_,reducer:N}),h},exposeAction(_,N){return f.actionCreators[_]=N,h},exposeCaseReducer(_,N){return f.sliceCaseReducersByName[_]=N,h}};d.forEach(_=>{const N=u[_],C={reducerName:_,type:x5(o,_),createNotation:typeof a.reducers=="function"};E5(N)?A5(C,N,h,t):k5(C,N,h)});function m(){const[_={},N=[],C=void 0]=typeof a.extraReducers=="function"?MO(a.extraReducers):[a.extraReducers],D={..._,...f.sliceCaseReducersByType};return m5(a.initialState,F=>{for(let z in D)F.addCase(z,D[z]);for(let z of f.sliceMatchers)F.addMatcher(z.matcher,z.reducer);for(let z of N)F.addMatcher(z.matcher,z.reducer);C&&F.addDefaultCase(C)})}const v=_=>_,x=new Map,k=new WeakMap;let w;function E(_,N){return w||(w=m()),w(_,N)}function P(){return w||(w=m()),w.getInitialState()}function O(_,N=!1){function C(F){let z=F[_];return typeof z>"u"&&N&&(z=id(k,C,P)),z}function D(F=v){const z=id(x,N,()=>new WeakMap);return id(z,F,()=>{const q={};for(const[X,B]of Object.entries(a.selectors??{}))q[X]=w5(B,F,()=>id(k,F,P),N);return q})}return{reducerPath:_,getSelectors:D,get selectors(){return D(C)},selectSlice:C}}const j={name:o,reducer:E,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:P,...O(s),injectInto(_,{reducerPath:N,...C}={}){const D=N??s;return _.inject({reducerPath:D,reducer:E},C),{...j,...O(D,!0)}}};return j}}function w5(e,t,r,n){function a(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return a.unwrapped=e,a}var Zt=b5();function S5(){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 k5({type:e,reducerName:t,createNotation:r},n,a){let o,s;if("reducer"in n){if(r&&!P5(n))throw new Error(Or(17));o=n.reducer,s=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Cr(e,s):Cr(e))}function E5(e){return e._reducerDefinitionType==="asyncThunk"}function P5(e){return e._reducerDefinitionType==="reducerWithPrepare"}function A5({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Or(18));const{payloadCreator:o,fulfilled:s,pending:u,rejected:d,settled:f,options:h}=r,m=a(e,o,h);n.exposeAction(t,m),s&&n.addCase(m.fulfilled,s),u&&n.addCase(m.pending,u),d&&n.addCase(m.rejected,d),f&&n.addMatcher(m.settled,f),n.exposeCaseReducer(t,{fulfilled:s||ad,pending:u||ad,rejected:d||ad,settled:f||ad})}function ad(){}var O5="task",TO="listener",DO="completed",sg="cancelled",C5=`task-${sg}`,_5=`task-${DO}`,Jv=`${TO}-${sg}`,j5=`${TO}-${DO}`,qf=class{constructor(e){xs(this,"code");xs(this,"name","TaskAbortError");xs(this,"message");this.code=e,this.message=`${O5} ${sg} (reason: ${e})`}},ug=(e,t)=>{if(typeof e!="function")throw new TypeError(Or(32))},zd=()=>{},RO=(e,t=zd)=>(e.catch(t),e),$O=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),za=e=>{if(e.aborted)throw new qf(e.reason)};function LO(e,t){let r=zd;return new Promise((n,a)=>{const o=()=>a(new qf(e.reason));if(e.aborted){o();return}r=$O(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=zd})}var N5=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof qf?"cancelled":"rejected",error:r}}finally{t==null||t()}},Fd=e=>t=>RO(LO(e,t).then(r=>(za(e),r))),zO=e=>{const t=Fd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Go}=Object,Fw={},Gf="listenerMiddleware",I5=(e,t)=>{const r=n=>$O(e,()=>n.abort(e.reason));return(n,a)=>{ug(n);const o=new AbortController;r(o);const s=N5(async()=>{za(e),za(o.signal);const u=await n({pause:Fd(o.signal),delay:zO(o.signal),signal:o.signal});return za(o.signal),u},()=>o.abort(_5));return a!=null&&a.autoJoin&&t.push(s.catch(zd)),{result:Fd(e)(s),cancel(){o.abort(C5)}}}},M5=(e,t)=>{const r=async(n,a)=>{za(t);let o=()=>{};const u=[new Promise((d,f)=>{let h=e({predicate:n,effect:(m,v)=>{v.unsubscribe(),d([m,v.getState(),v.getOriginalState()])}});o=()=>{h(),f()}})];a!=null&&u.push(new Promise(d=>setTimeout(d,a,null)));try{const d=await LO(t,Promise.race(u));return za(t),d}finally{o()}};return((n,a)=>RO(r(n,a)))},FO=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Cr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Or(21));return ug(o),{predicate:a,type:t,effect:o}},BO=Go(e=>{const{type:t,predicate:r,effect:n}=FO(e);return{id:y5(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Or(22))}}},{withTypes:()=>BO}),Bw=(e,t)=>{const{type:r,effect:n,predicate:a}=FO(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},ey=e=>{e.pending.forEach(t=>{t.abort(Jv)})},T5=(e,t)=>()=>{for(const r of t.keys())ey(r);e.clear()},Uw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},UO=Go(Cr(`${Gf}/add`),{withTypes:()=>UO}),D5=Cr(`${Gf}/removeAll`),WO=Go(Cr(`${Gf}/remove`),{withTypes:()=>WO}),R5=(...e)=>{console.error(`${Gf}/error`,...e)},wu=(e={})=>{const t=new Map,r=new Map,n=x=>{const k=r.get(x)??0;r.set(x,k+1)},a=x=>{const k=r.get(x)??1;k===1?r.delete(x):r.set(x,k-1)},{extra:o,onError:s=R5}=e;ug(s);const u=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),k=>{x.unsubscribe(),k!=null&&k.cancelActive&&ey(x)}),d=(x=>{const k=Bw(t,x)??BO(x);return u(k)});Go(d,{withTypes:()=>d});const f=x=>{const k=Bw(t,x);return k&&(k.unsubscribe(),x.cancelActive&&ey(k)),!!k};Go(f,{withTypes:()=>f});const h=async(x,k,w,E)=>{const P=new AbortController,O=M5(d,P.signal),j=[];try{x.pending.add(P),n(x),await Promise.resolve(x.effect(k,Go({},w,{getOriginalState:E,condition:(_,N)=>O(_,N).then(Boolean),take:O,delay:zO(P.signal),pause:Fd(P.signal),extra:o,signal:P.signal,fork:I5(P.signal,j),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((_,N,C)=>{_!==P&&(_.abort(Jv),C.delete(_))})},cancel:()=>{P.abort(Jv),x.pending.delete(P)},throwIfCancelled:()=>{za(P.signal)}})))}catch(_){_ instanceof qf||Uw(s,_,{raisedBy:"effect"})}finally{await Promise.all(j),P.abort(j5),a(x),x.pending.delete(P)}},m=T5(t,r);return{middleware:x=>k=>w=>{if(!gO(w))return k(w);if(UO.match(w))return d(w.payload);if(D5.match(w)){m();return}if(WO.match(w))return f(w.payload);let E=x.getState();const P=()=>{if(E===Fw)throw new Error(Or(23));return E};let O;try{if(O=k(w),t.size>0){const j=x.getState(),_=Array.from(t.values());for(const N of _){let C=!1;try{C=N.predicate(w,j,E)}catch(D){C=!1,Uw(s,D,{raisedBy:"predicate"})}C&&h(N,w,x,P)}}}finally{E=Fw}return O},startListening:d,stopListening:f,clearListeners:m}};function Or(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 $5={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},HO=Zt({name:"chartLayout",initialState:$5,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Yf=HO.actions,L5=Yf.setMargin,z5=Yf.setLayout,F5=Yf.setChartSize,B5=Yf.setScale,U5=HO.reducer;function KO(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ze(e){return Number.isFinite(e)}function _n(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Ww(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t{if(t&&r){var n=r.width,a=r.height,o=t.align,s=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&s==="middle")&&o!=="center"&&be(e[o]))return Uo(Uo({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&s!=="middle"&&be(e[s]))return Uo(Uo({},e),{},{[s]:e[s]+(a||0)})}return e},In=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",VO=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var a,o,s=e.map(u=>(u.coordinate===t&&(a=!0),u.coordinate===r&&(o=!0),u.coordinate));return a||s.push(t),o||s.push(r),s},qO=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,s=e.scale,u=e.realScaleType,d=e.isCategorical,f=e.categoricalDomain,h=e.tickCount,m=e.ticks,v=e.niceTicks,x=e.axisType;if(!s)return null;var k=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,w=a==="category"&&s.bandwidth?s.bandwidth()/k:0;if(w=x==="angleAxis"&&o&&o.length>=2?Lr(o[0]-o[1])*2*w:w,m||v){var E=(m||v||[]).map((P,O)=>{var j=n?n.indexOf(P):P,_=s.map(j);return ze(_)?{coordinate:_+w,value:P,offset:w,index:O}:null}).filter(mr);return E}return d&&f?f.map((P,O)=>{var j=s.map(P);return ze(j)?{coordinate:j+w,value:P,index:O,offset:w}:null}).filter(mr):s.ticks&&h!=null?s.ticks(h).map((P,O)=>{var j=s.map(P);return ze(j)?{coordinate:j+w,value:P,index:O,offset:w}:null}).filter(mr):s.domain().map((P,O)=>{var j=s.map(P);return ze(j)?{coordinate:j+w,value:n?n[P]:P,index:O,offset:w}:null}).filter(mr)},q5=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(f[0]=o,o+=v,f[1]=o):(f[0]=s,s+=v,f[1]=s)}}}},G5=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(d[0]=o,o+=f,d[1]=o):(d[0]=0,d[1]=0)}}}},Y5={sign:q5,expand:d3,none:Wa,silhouette:f3,wiggle:h3,positive:G5},Q5=(e,t,r)=>{var n,a=(n=Y5[r])!==null&&n!==void 0?n:Wa,o=c3().keys(t).value((u,d)=>Number(Nt(u,d,0))).order(Fv).offset(a),s=o(e);return s.forEach((u,d)=>{u.forEach((f,h)=>{var m=Nt(e[h],t[d],0);Array.isArray(m)&&m.length===2&&be(m[0])&&be(m[1])&&(f[0]=m[0],f[1]=m[1])})}),s};function X5(e){return e==null?void 0:String(e)}function Hw(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(a[t.dataKey])){var u=JA(r,"value",a[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var d=Nt(a,Ut(s)?t.dataKey:s),f=t.scale.map(d);return be(f)?f:null}var Z5=e=>{var t=e.flat(2).filter(be);return[Math.min(...t),Math.max(...t)]},J5=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],e4=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return J5(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var s=o.stackedData,u=s.reduce((d,f)=>{var h=KO(f,t,r),m=Z5(h);return!ze(m[0])||!ze(m[1])?d:[Math.min(d[0],m[0]),Math.max(d[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},Kw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Bd=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=zf(t,h=>h.coordinate),o=1/0,s=1,u=a.length;s{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},r4=(e,t)=>t==="centric"?e.angle:e.radius,ai=e=>e.layout.width,oi=e=>e.layout.height,n4=e=>e.layout.scale,YO=e=>e.layout.margin,Qf=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Xf=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),i4="data-recharts-item-index",a4="data-recharts-item-id",Su=60;function Gw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function od(e){for(var t=1;te.brush.height;function c4(e){var t=Xf(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Su;return r+a}return r},0)}function d4(e){var t=Xf(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Su;return r+a}return r},0)}function f4(e){var t=Qf(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function h4(e){var t=Qf(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ht=H([ai,oi,YO,u4,c4,d4,f4,h4,mO,TL],(e,t,r,n,a,o,s,u,d,f)=>{var h={left:(r.left||0)+a,right:(r.right||0)+o},m={top:(r.top||0)+s,bottom:(r.bottom||0)+u},v=od(od({},m),h),x=v.bottom;v.bottom+=n,v=V5(v,d,f);var k=e-v.left-v.right,w=t-v.top-v.bottom;return od(od({brushBottom:x},v),{},{width:Math.max(k,0),height:Math.max(w,0)})}),p4=H(Ht,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),QO=H(ai,oi,(e,t)=>({x:0,y:0,width:e,height:t})),m4=g.createContext(null),gr=()=>g.useContext(m4)!=null,Zf=e=>e.brush,Jf=H([Zf,Ht,YO],(e,t,r)=>({height:e.height,x:be(e.x)?e.x:t.left,y:be(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:be(e.width)?e.width:t.width}));function v4(e,t,{signal:r,edges:n}={}){let a,o=null;const s=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),d=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},f=()=>{u&&d(),x()};let h=null;const m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},t)},v=()=>{h!==null&&(clearTimeout(h),h=null)},x=()=>{v(),a=void 0,o=null},k=()=>{d()},w=function(...E){if(r!=null&&r.aborted)return;a=this,o=E;const P=h==null;m(),s&&P&&d()};return w.schedule=m,w.cancel=x,w.flush=k,r==null||r.addEventListener("abort",x,{once:!0}),w}function y4(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,s=Array(2);n&&(s[0]="leading"),a&&(s[1]="trailing");let u,d=null;const f=v4(function(...v){u=e.apply(this,v),d=null},t,{edges:s}),h=function(...v){return o!=null&&(d===null&&(d=Date.now()),Date.now()-d>=o)?(u=e.apply(this,v),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,v),u)},m=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=m,h}function g4(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return y4(e,t,{leading:n,maxWait:t,trailing:a})}var Ud=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;oa[s++]))}},kn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},XO=(e,t,r)=>{var n=r.width,a=n===void 0?kn.width:n,o=r.height,s=o===void 0?kn.height:o,u=r.aspect,d=r.maxHeight,f=Ha(a)?e:Number(a),h=Ha(s)?t:Number(s);return u&&u>0&&(f?h=f/u:h&&(f=h*u),d&&h!=null&&h>d&&(h=d)),{calculatedWidth:f,calculatedHeight:h}},x4={width:0,height:0,overflow:"visible"},b4={width:0,overflowX:"visible"},w4={height:0,overflowY:"visible"},S4={},k4=e=>{var t=e.width,r=e.height,n=Ha(t),a=Ha(r);return n&&a?x4:n?b4:a?w4:S4};function E4(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=kn.width,o=kn.height):a===void 0?a=n&&n>0?void 0:kn.width:o===void 0&&(o=n&&n>0?void 0:kn.height),{width:a,height:o}}var P4=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return R4(a)?g.createElement(ZO.Provider,{value:a},t):null}var cg=()=>g.useContext(ZO),$4=g.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?kn.initialDimension:n,o=e.width,s=e.height,u=e.minWidth,d=u===void 0?kn.minWidth:u,f=e.minHeight,h=e.maxHeight,m=e.children,v=e.debounce,x=v===void 0?kn.debounce:v,k=e.id,w=e.className,E=e.onResize,P=e.style,O=P===void 0?{}:P,j=T4(e,P4),_=g.useRef(null),N=g.useRef();N.current=E,g.useImperativeHandle(t,()=>_.current);var C=g.useState({containerWidth:a.width,containerHeight:a.height}),D=_4(C,2),F=D[0],z=D[1],q=g.useCallback((fe,de)=>{z(K=>{var ie=Math.round(fe),Q=Math.round(de);return K.containerWidth===ie&&K.containerHeight===Q?K:{containerWidth:ie,containerHeight:Q}})},[]);g.useEffect(()=>{if(_.current==null||typeof ResizeObserver>"u")return kl;var fe=R=>{var M,J=R[0];if(J!=null){var se=J.contentRect,te=se.width,ce=se.height;q(te,ce),(M=N.current)===null||M===void 0||M.call(N,te,ce)}};x>0&&(fe=g4(fe,x,{trailing:!0,leading:!1}));var de=new ResizeObserver(fe),K=_.current.getBoundingClientRect(),ie=K.width,Q=K.height;return q(ie,Q),de.observe(_.current),()=>{de.disconnect()}},[q,x]);var X=F.containerWidth,B=F.containerHeight;Ud(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ue=XO(X,B,{width:o,height:s,aspect:r,maxHeight:h}),Y=ue.calculatedWidth,le=ue.calculatedHeight;return Ud(X<0||B<0||Y!=null&&Y>0||le!=null&&le>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.`,Y,le,o,s,d,f,r),g.createElement("div",Wd({id:k?"".concat(k):void 0,className:Qe("recharts-responsive-container",w),style:Qw(Qw({},O),{},{width:o,height:s,minWidth:d,minHeight:f,maxHeight:h}),ref:_},j),g.createElement("div",{style:k4({width:o,height:s})},g.createElement(JO,{width:Y,height:le},m)))}),L4=g.forwardRef((e,t)=>{var r=cg();if(_n(r.width)&&_n(r.height))return e.children;var n=E4({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,s=XO(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=s.calculatedWidth,d=s.calculatedHeight;return be(u)&&be(d)?g.createElement(JO,{width:u,height:d},e.children):g.createElement($4,Wd({},e,{width:a,height:o,ref:t}))});function dg(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 eh=()=>{var e,t=gr(),r=ke(p4),n=ke(Jf),a=(e=ke(Zf))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},z4={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},eC=()=>{var e;return(e=ke(Ht))!==null&&e!==void 0?e:z4},tC=()=>ke(ai),rC=()=>ke(oi),at=e=>e.layout.layoutType,El=()=>ke(at),fg=()=>{var e=El();if(e==="horizontal"||e==="vertical")return e},nC=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},F4=()=>{var e=El();return e!==void 0},ku=e=>{var t=xt(),r=gr(),n=e.width,a=e.height,o=cg(),s=n,u=a;return o&&(s=o.width>0?o.width:n,u=o.height>0?o.height:a),g.useEffect(()=>{!r&&_n(s)&&_n(u)&&t(F5({width:s,height:u}))},[t,r,s,u]),null},iC=Symbol.for("immer-nothing"),Zw=Symbol.for("immer-draftable"),_r=Symbol.for("immer-state");function nn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tu=Object.getPrototypeOf;function hl(e){return!!e&&!!e[_r]}function Va(e){var t;return e?aC(e)||Array.isArray(e)||!!e[Zw]||!!((t=e.constructor)!=null&&t[Zw])||Eu(e)||rh(e):!1}var B4=Object.prototype.constructor.toString(),Jw=new WeakMap;function aC(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=Jw.get(r);return n===void 0&&(n=Function.toString.call(r),Jw.set(r,n)),n===B4}function Hd(e,t,r=!0){th(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function th(e){const t=e[_r];return t?t.type_:Array.isArray(e)?1:Eu(e)?2:rh(e)?3:0}function ty(e,t){return th(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oC(e,t,r){const n=th(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function U4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Eu(e){return e instanceof Map}function rh(e){return e instanceof Set}function wa(e){return e.copy_||e.base_}function ry(e,t){if(Eu(e))return new Map(e);if(rh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=aC(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[_r];let a=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:ld,add:ld,clear:ld,delete:ld}),Object.freeze(e),t&&Object.values(e).forEach(r=>hg(r,!0))),e}function W4(){nn(2)}var ld={value:W4};function nh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var H4={};function qa(e){const t=H4[e];return t||nn(0,e),t}var ru;function lC(){return ru}function K4(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function eS(e,t){t&&(qa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ny(e){iy(e),e.drafts_.forEach(V4),e.drafts_=null}function iy(e){e===ru&&(ru=e.parent_)}function tS(e){return ru=K4(ru,e)}function V4(e){const t=e[_r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[_r].modified_&&(ny(t),nn(4)),Va(e)&&(e=Kd(t,e),t.parent_||Vd(t,e)),t.patches_&&qa("Patches").generateReplacementPatches_(r[_r].base_,e,t.patches_,t.inversePatches_)):e=Kd(t,r,[]),ny(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iC?e:void 0}function Kd(e,t,r){if(nh(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[_r];if(!a)return Hd(t,(o,s)=>nS(e,a,t,o,s,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Vd(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let s=o,u=!1;a.type_===3&&(s=new Set(o),o.clear(),u=!0),Hd(s,(d,f)=>nS(e,a,o,d,f,r,u),n),Vd(e,o,!1),r&&e.patches_&&qa("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function nS(e,t,r,n,a,o,s){if(a==null||typeof a!="object"&&!s)return;const u=nh(a);if(!(u&&!s)){if(hl(a)){const d=o&&t&&t.type_!==3&&!ty(t.assigned_,n)?o.concat(n):void 0,f=Kd(e,a,d);if(oC(r,n,f),hl(f))e.canAutoFreeze_=!1;else return}else s&&r.add(a);if(Va(a)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&u)return;Kd(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Eu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Vd(e,a)}}}function Vd(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hg(t,r)}function q4(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:lC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=pg;r&&(a=[n],o=nu);const{revoke:s,proxy:u}=Proxy.revocable(a,o);return n.draft_=u,n.revoke_=s,u}var pg={get(e,t){if(t===_r)return e;const r=wa(e);if(!ty(r,t))return G4(e,r,t);const n=r[t];return e.finalized_||!Va(n)?n:n===Fm(e.base_,t)?(Bm(e),e.copy_[t]=oy(n,e)):n},has(e,t){return t in wa(e)},ownKeys(e){return Reflect.ownKeys(wa(e))},set(e,t,r){const n=sC(wa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=Fm(wa(e),t),o=a==null?void 0:a[_r];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(U4(r,a)&&(r!==void 0||ty(e.base_,t)))return!0;Bm(e),ay(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 Fm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Bm(e),ay(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=wa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){nn(11)},getPrototypeOf(e){return tu(e.base_)},setPrototypeOf(){nn(12)}},nu={};Hd(pg,(e,t)=>{nu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nu.deleteProperty=function(e,t){return nu.set.call(this,e,t,void 0)};nu.set=function(e,t,r){return pg.set.call(this,e[0],t,r,e[0])};function Fm(e,t){const r=e[_r];return(r?wa(r):e)[t]}function G4(e,t,r){var a;const n=sC(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function sC(e,t){if(!(t in e))return;let r=tu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=tu(r)}}function ay(e){e.modified_||(e.modified_=!0,e.parent_&&ay(e.parent_))}function Bm(e){e.copy_||(e.copy_=ry(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Y4=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 s=this;return function(d=o,...f){return s.produce(d,h=>r.call(this,h,...f))}}typeof r!="function"&&nn(6),n!==void 0&&typeof n!="function"&&nn(7);let a;if(Va(t)){const o=tS(this),s=oy(t,void 0);let u=!0;try{a=r(s),u=!1}finally{u?ny(o):iy(o)}return eS(o,n),rS(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===iC&&(a=void 0),this.autoFreeze_&&hg(a,!0),n){const o=[],s=[];qa("Patches").generateReplacementPatches_(t,a,o,s),n(o,s)}return a}else nn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,d=>t(d,...u));let n,a;return[this.produce(t,r,(s,u)=>{n=s,a=u}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Va(e)||nn(8),hl(e)&&(e=Q4(e));const t=tS(this),r=oy(e,void 0);return r[_r].isManual_=!0,iy(t),r}finishDraft(e,t){const r=e&&e[_r];(!r||!r.isManual_)&&nn(9);const{scope_:n}=r;return eS(n,t),rS(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=qa("Patches").applyPatches_;return hl(e)?n(e,t):this.produce(e,a=>n(a,t))}};function oy(e,t){const r=Eu(e)?qa("MapSet").proxyMap_(e,t):rh(e)?qa("MapSet").proxySet_(e,t):q4(e,t);return(t?t.scope_:lC()).drafts_.push(r),r}function Q4(e){return hl(e)||nn(10,e),uC(e)}function uC(e){if(!Va(e)||nh(e))return e;const t=e[_r];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ry(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ry(e,!0);return Hd(r,(a,o)=>{oC(r,a,uC(o))},n),t&&(t.finalized_=!1),r}var X4=new Y4;X4.produce;var Z4={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},cC=Zt({name:"legend",initialState:Z4,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:tt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=zr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:tt()},removeLegendPayload:{reducer(e,t){var r=zr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:tt()}}}),Pu=cC.actions;Pu.setLegendSize;Pu.setLegendSettings;var J4=Pu.addLegendPayload,ez=Pu.replaceLegendPayload,tz=Pu.removeLegendPayload,rz=cC.reducer,Um={exports:{}},Wm={};/** * @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 iS;function nz(){if(iS)return Wm;iS=1;var e=wl();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Wm.useSyncExternalStoreWithSelector=function(d,f,h,m,v){var x=a(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=s(function(){function E(N){if(!P){if(P=!0,O=N,N=m(N),v!==void 0&&k.hasValue){var C=k.value;if(v(C,N))return j=C}return j=N}if(C=j,r(O,N))return C;var D=m(N);return v!==void 0&&v(C,D)?(O=N,C):(O=N,j=D)}var P=!1,O,j,_=h===void 0?null:h;return[function(){return E(f())},_===null?void 0:function(){return E(_())}]},[f,h,m,v]);var w=n(d,x[0],x[1]);return o(function(){k.hasValue=!0,k.value=w},[w]),u(w),w},Wm}var aS;function iz(){return aS||(aS=1,Um.exports=nz()),Um.exports}iz();function az(e){e()}function oz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){az(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var oS={notify(){},get:()=>[]};function lz(e,t){let r,n=oS,a=0,o=!1;function s(w){h();const E=n.subscribe(w);let P=!1;return()=>{P||(P=!0,E(),m())}}function u(){n.notify()}function d(){k.onStateChange&&k.onStateChange()}function f(){return o}function h(){a++,r||(r=e.subscribe(d),n=oz())}function m(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=oS)}function v(){o||(o=!0,h())}function x(){o&&(o=!1,m())}const k={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>n};return k}var sz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uz=sz(),cz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",dz=cz(),fz=()=>uz||dz?g.useLayoutEffect:g.useEffect,hz=fz();function lS(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function pz(e,t){if(lS(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a{const d=lz(a);return{store:a,subscription:d,getServerState:n?()=>n:void 0}},[a,n]),s=g.useMemo(()=>a.getState(),[a]);hz(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),s!==a.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,s]);const u=r||vz;return g.createElement(u.Provider,{value:o},t)}var gz=yz,xz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function bz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function ih(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(xz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!pz(e[n],t[n]))return!1}else if(!bz(e[n],t[n]))return!1;return!0}function ly(){return ly=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Io.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,s=o===void 0?Io.labelStyle:o,u=e.payload,d=e.formatter,f=e.itemSorter,h=e.wrapperClassName,m=e.labelClassName,v=e.label,x=e.labelFormatter,k=e.accessibilityLayer,w=k===void 0?Io.accessibilityLayer:k,E=()=>{if(u&&u.length){var F={padding:0,margin:0},z=jz(u,f),q=z.map((X,B)=>{if(!X||X.type==="none")return null;var ue=X.formatter||d||_z,Y=X.value,le=X.name,fe=Y,de=le;if(ue){var K=ue(Y,le,X,B,u);if(Array.isArray(K)){var ie=Ez(K,2);fe=ie[0],de=ie[1]}else if(K!=null)fe=K;else return null}var Q=Os(Os({},Io.itemStyle),{},{color:X.color||Io.itemStyle.color},a);return g.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:Q},Cn(de)?g.createElement("span",{className:"recharts-tooltip-item-name"},de):null,Cn(de)?g.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,g.createElement("span",{className:"recharts-tooltip-item-value"},fe),g.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return g.createElement("ul",{className:"recharts-tooltip-item-list",style:F},q)}return null},P=Os(Os({},Io.contentStyle),n),O=Os({margin:0},s),j=!Ut(v),_=j?v:"",N=Qe("recharts-default-tooltip",h),C=Qe("recharts-tooltip-label",m);j&&x&&u!==void 0&&u!==null&&(_=x(v,u));var D=w?{role:"status","aria-live":"assertive"}:{};return g.createElement("div",ly({className:N,style:P},D),g.createElement("p",{className:C,style:O},g.isValidElement(_)?_:"".concat(_)),E())},Cs="recharts-tooltip-wrapper",Iz={visibility:"hidden"};function Mz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Qe(Cs,{["".concat(Cs,"-right")]:be(r)&&t&&be(t.x)&&r>=t.x,["".concat(Cs,"-left")]:be(r)&&t&&be(t.x)&&r=t.y,["".concat(Cs,"-top")]:be(n)&&t&&be(t.y)&&n0?a:0),m=r[n]+a;if(t[n])return s[n]?h:m;var v=d[n];if(v==null)return 0;if(s[n]){var x=h,k=v;return xE?Math.max(h,v):Math.max(m,v)}function Tz(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 Dz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,s=e.reverseDirection,u=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,h,m,v;return u.height>0&&u.width>0&&r?(m=cS({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:s,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),v=cS({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:s,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),h=Tz({translateX:m,translateY:v,useTranslate3d:d})):h=Iz,{cssProperties:h,cssClasses:Mz({translateX:m,translateY:v,coordinate:r})}}var Rz=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Au={isSsr:Rz()};function $z(e,t){return Bz(e)||Fz(e,t)||zz(e,t)||Lz()}function Lz(){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 zz(e,t){if(e){if(typeof e=="string")return dS(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)?dS(e,t):void 0}}function dS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rAu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=$z(e,2),r=t[0],n=t[1];return g.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function fS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),f=Kz(d,2),h=f[0],m=f[1];g.useEffect(()=>{var P=O=>{if(O.key==="Escape"){var j,_,N,C;m({dismissed:!0,dismissedAtCoordinate:{x:(j=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&j!==void 0?j:0,y:(N=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&N!==void 0?N:0}})}};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),h.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==h.dismissedAtCoordinate.x||((o=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)!==h.dismissedAtCoordinate.y)&&m(Mo(Mo({},h),{},{dismissed:!1}));var v=Dz({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}),x=v.cssClasses,k=v.cssProperties,w=e.hasPortalFromProps?{}:Mo(Mo({transition:Qz({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),E=Mo(Mo({},w),{},{visibility:!h.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return g.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:E,ref:e.innerRef},e.children)}var Zz=g.memo(Xz),fC=()=>{var e;return(e=ke(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;tze(e.x)&&ze(e.y),yS=e=>e.base!=null&&qd(e.base)&&qd(e),_s=e=>e.x,js=e=>e.y,rF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(eg(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=vS["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return vS[r]||$f},gS={connectNulls:!1,type:"linear"},nF=e=>{var t=e.type,r=t===void 0?gS.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,s=e.layout,u=e.connectNulls,d=u===void 0?gS.connectNulls:u,f=rF(r,s),h=d?a.filter(qd):a;if(Array.isArray(o)){var m,v=a.map((P,O)=>mS(mS({},P),{},{base:o[O]}));s==="vertical"?m=ed().y(js).x1(_s).x0(P=>P.base.x):m=ed().x(_s).y1(js).y0(P=>P.base.y);var x=m.defined(yS).curve(f),k=d?v.filter(yS):v;return x(k)}var w;s==="vertical"&&be(o)?w=ed().y(js).x1(_s).x0(o):be(o)?w=ed().x(_s).y1(js).y0(o):w=BA().x(_s).y(js);var E=w.defined(qd).curve(f);return E(h)},kd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=El();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?nF(s):n;return g.createElement("path",sy({},on(e),tg(e),{className:Qe("recharts-curve",t),d:u===null?void 0:u,ref:a}))},iF=["x","y","top","left","width","height","className"];function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),fF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,s=o===void 0?0:o,u=e.left,d=u===void 0?0:u,f=e.width,h=f===void 0?0:f,m=e.height,v=m===void 0?0:m,x=e.className,k=uF(e,iF),w=aF({x:r,y:a,top:s,left:d,width:h,height:v},k);return!be(r)||!be(a)||!be(h)||!be(v)||!be(s)||!be(d)?null:g.createElement("path",uy({},Br(w),{className:Qe("recharts-cross",x),d:dF(r,a,h,v,s,d)}))};function hF(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Gd=1e-4,hC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],pC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),bS=(e,t)=>r=>{var n=hC(e,t);return pC(n,r)},pF=(e,t)=>r=>{var n=hC(e,t),a=[...n.map((o,s)=>o*s).slice(1),0];return pC(a,r)},mF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},vF=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=bS(e,r),o=bS(t,n),s=pF(e,r),u=f=>f>1?1:f<0?0:f,d=f=>{for(var h=f>1?1:f,m=h,v=0;v<8;++v){var x=a(m)-h,k=s(m);if(Math.abs(x-h)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,s=t.dt,u=s===void 0?16.67:s,d=1,f=[0],h=0,m=0,v=1e4,x=0;x{var O,j,_;if(P<=0)return 0;if(P>=1)return d;var N=P*E,C=Math.floor(N),D=N-C;return((O=f[C])!==null&&O!==void 0?O:0)+(((j=f[C+1])!==null&&j!==void 0?j:0)-((_=f[C])!==null&&_!==void 0?_:0))*D}},xF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return wS(e);case"spring":return gF();default:if(e.split("(")[0]==="cubic-bezier")return wS(e)}return typeof e=="function"?e:null},bF=(e,t,r)=>{var n,a=o=>{var s=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,s);return}n=e.setTimeout(a,s)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},mC=g.createContext(bF);mC.Provider;function wF(e){var t=g.useContext(mC);return g.useMemo(()=>e??t,[e,t])}function SF(e,t,r){return(t=kF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kF(e){var t=EF(e,"string");return typeof t=="symbol"?t:t+""}function EF(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 SS="init",kS="pending",ES="active",PF="completed";function Vm(e){return Math.max(0,e)}class AF{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;SF(this,"state",SS),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Vm(t.animationDuration),this.animationBegin=Vm(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()===SS)return this.state=kS,this.beginStartedTime=t,this.animationBegin;if(this.getState()===kS){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=ES,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Vm(this.animationBegin-r)}if(this.getState()===ES){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=PF}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class OF extends AF{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Gn(this.getFrom(),this.getTo(),this.getProgress()))}}class CF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=s=>{s-n>=r?t(s):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function _F(e,t){return MF(e)||IF(e,t)||NF(e,t)||jF()}function jF(){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 NF(e,t){if(e){if(typeof e=="string")return PS(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)?PS(e,t):void 0}}function PS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},AS=0,qm=1;function vC(e){var t=Hr(e,TF),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,s=t.easing,u=t.begin,d=t.onAnimationEnd,f=t.onAnimationStart,h=t.children,m=dC(),v=n==="auto"?!Au.isSsr&&!m:n,x=wF(t.animationController),k=g.useState(v?AS:qm),w=_F(k,2),E=w[0],P=w[1];return g.useEffect(()=>{v||P(qm)},[v]),g.useEffect(()=>{var O=xF(s);if(!v||!a||O==null)return kl;var j=new CF,_=new OF({animationId:r,easing:O,animationDuration:o,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:AS,to:qm});return x(j,_,P)},[x,r,v,a,o,s,u,f,d]),h(Number(E))}function yC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=g.useRef(Xs(t)),n=g.useRef(e);return n.current!==e&&(r.current=Xs(t),n.current=e),r.current}var DF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),RF=(e,t,r)=>e.map(n=>"".concat(DF(n)," ").concat(t,"ms ").concat(r)).join(","),$F=["radius"],LF=["radius"],OS,CS,_S,jS,NS,IS,MS,TS,DS,RS;function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=Gi(r),s=Gi(n),u=Math.min(Math.abs(o)/2,Math.abs(s)/2),d=s>=0?1:-1,f=o>=0?1:-1,h=s>=0&&o>=0||s<0&&o<0?1:0,m;if(u>0&&Array.isArray(a)){for(var v=[0,0,0,0],x=0,k=4;xu?u:E}m=Lt(OS||(OS=vn(["M",",",""])),e,t+d*v[0]),v[0]>0&&(m+=Lt(CS||(CS=vn(["A ",",",",0,0,",",",",",""])),v[0],v[0],h,e+f*v[0],t)),m+=Lt(_S||(_S=vn(["L ",",",""])),e+r-f*v[1],t),v[1]>0&&(m+=Lt(jS||(jS=vn(["A ",",",",0,0,",`, `,",",""])),v[1],v[1],h,e+r,t+d*v[1])),m+=Lt(NS||(NS=vn(["L ",",",""])),e+r,t+n-d*v[2]),v[2]>0&&(m+=Lt(IS||(IS=vn(["A ",",",",0,0,",`, `,",",""])),v[2],v[2],h,e+r-f*v[2],t+n)),m+=Lt(MS||(MS=vn(["L ",",",""])),e+f*v[3],t+n),v[3]>0&&(m+=Lt(TS||(TS=vn(["A ",",",",0,0,",`, `,",",""])),v[3],v[3],h,e,t+n-d*v[3])),m+="Z"}else if(u>0&&a===+a&&a>0){var P=Math.min(u,a);m=Lt(DS||(DS=vn(["M ",",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",","," Z"])),e,t+d*P,P,P,h,e+f*P,t,e+r-f*P,t,P,P,h,e+r,t+d*P,e+r,t+n-d*P,P,P,h,e+r-f*P,t+n,e+f*P,t+n,P,P,h,e,t+n-d*P)}else m=Lt(RS||(RS=vn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return m},US={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},GF=e=>{var t=Hr(e,US),r=g.useRef(null),n=g.useState(-1),a=WF(n,2),o=a[0],s=a[1];g.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&s(K)}catch{}},[]);var u=t.x,d=t.y,f=t.width,h=t.height,m=t.radius,v=t.className,x=t.animationEasing,k=t.animationDuration,w=t.animationBegin,E=t.isAnimationActive,P=t.isUpdateAnimationActive,O=g.useRef(f),j=g.useRef(h),_=g.useRef(u),N=g.useRef(d),C=g.useMemo(()=>({x:u,y:d,width:f,height:h,radius:m}),[u,d,f,h,m]),D=yC(C,"rectangle-");if(u!==+u||d!==+d||f!==+f||h!==+h||f===0||h===0)return null;var F=Qe("recharts-rectangle",v);if(!P){var z=Br(t);z.radius;var q=zS(z,$F);return g.createElement("path",Yd({},q,{x:Gi(u),y:Gi(d),width:Gi(f),height:Gi(h),radius:typeof m=="number"?m:void 0,className:F,d:BS(u,d,f,h,m)}))}var X=O.current,B=j.current,ue=_.current,Y=N.current,le="0px ".concat(o===-1?1:o,"px"),fe="".concat(o,"px ").concat(o,"px"),de=RF(["strokeDasharray"],k,typeof x=="string"?x:US.animationEasing);return g.createElement(vC,{animationId:D,key:D,canBegin:o>0,duration:k,easing:x,isActive:P,begin:w},K=>{var ie=Gn(X,f,K),Q=Gn(B,h,K),R=Gn(ue,u,K),M=Gn(Y,d,K);r.current&&(O.current=ie,j.current=Q,_.current=R,N.current=M);var J;E?K>0?J={transition:de,strokeDasharray:fe}:J={strokeDasharray:le}:J={strokeDasharray:fe};var se=Br(t);se.radius;var te=zS(se,LF);return g.createElement("path",Yd({},te,{radius:typeof m=="number"?m:void 0,className:F,d:BS(R,M,ie,Q,m),ref:r,style:LS(LS({},J),t.style)}))})};function WS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function HS(e){for(var t=1;te*180/Math.PI,Bt=(e,t,r,n)=>({x:e+Math.cos(-Qd*n)*r,y:t+Math.sin(-Qd*n)*r}),JF=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},e6=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},t6=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,s=e6({x:r,y:n},{x:a,y:o});if(s<=0)return{radius:s,angle:0};var u=(r-a)/s,d=Math.acos(u);return n>o&&(d=2*Math.PI-d),{radius:s,angle:ZF(d),angleInRadian:d}},r6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},n6=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),s=Math.min(a,o);return e+s*360},i6=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=t6({x:r,y:n},t),o=a.radius,s=a.angle,u=t.innerRadius,d=t.outerRadius;if(od||o===0)return null;var f=r6(t),h=f.startAngle,m=f.endAngle,v=s,x;if(h<=m){for(;v>m;)v-=360;for(;v=h&&v<=m}else{for(;v>h;)v-=360;for(;v=m&&v<=h}return x?HS(HS({},t),{},{radius:o,angle:n6(v,t)}):null};function gC(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,s=Bt(t,r,n,a),u=Bt(t,r,n,o);return{points:[s,u],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var KS,VS,qS,GS,YS,QS,XS;function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Lr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},sd=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,s=e.isExternal,u=e.cornerRadius,d=e.cornerIsExternal,f=u*(s?1:-1)+n,h=Math.asin(u/f)/Qd,m=d?a:a+o*h,v=Bt(t,r,f,m),x=Bt(t,r,n,m),k=d?a-o*h:a,w=Bt(t,r,f*Math.cos(h*Qd),k);return{center:v,circleTangency:x,lineTangency:w,theta:h}},xC=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,s=e.endAngle,u=a6(o,s),d=o+u,f=Bt(t,r,a,o),h=Bt(t,r,a,d),m=Lt(KS||(KS=Pa(["M ",",",` A `,",",`,0, `,",",`, `,",",` `])),f.x,f.y,a,a,+(Math.abs(u)>180),+(o>d),h.x,h.y);if(n>0){var v=Bt(t,r,n,o),x=Bt(t,r,n,d);m+=Lt(VS||(VS=Pa(["L ",",",` A `,",",`,0, `,",",`, `,","," Z"])),x.x,x.y,n,n,+(Math.abs(u)>180),+(o<=d),v.x,v.y)}else m+=Lt(qS||(qS=Pa(["L ",","," Z"])),t,r);return m},o6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,d=e.startAngle,f=e.endAngle,h=Lr(f-d),m=sd({cx:t,cy:r,radius:a,angle:d,sign:h,cornerRadius:o,cornerIsExternal:u}),v=m.circleTangency,x=m.lineTangency,k=m.theta,w=sd({cx:t,cy:r,radius:a,angle:f,sign:-h,cornerRadius:o,cornerIsExternal:u}),E=w.circleTangency,P=w.lineTangency,O=w.theta,j=u?Math.abs(d-f):Math.abs(d-f)-k-O;if(j<0)return s?Lt(GS||(GS=Pa(["M ",",",` a`,",",",0,0,1,",`,0 a`,",",",0,0,1,",`,0 `])),x.x,x.y,o,o,o*2,o,o,-o*2):xC({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:d,endAngle:f});var _=Lt(YS||(YS=Pa(["M ",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",",` `])),x.x,x.y,o,o,+(h<0),v.x,v.y,a,a,+(j>180),+(h<0),E.x,E.y,o,o,+(h<0),P.x,P.y);if(n>0){var N=sd({cx:t,cy:r,radius:n,angle:d,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),C=N.circleTangency,D=N.lineTangency,F=N.theta,z=sd({cx:t,cy:r,radius:n,angle:f,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),q=z.circleTangency,X=z.lineTangency,B=z.theta,ue=u?Math.abs(d-f):Math.abs(d-f)-F-B;if(ue<0&&o===0)return"".concat(_,"L").concat(t,",").concat(r,"Z");_+=Lt(QS||(QS=Pa(["L",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",","Z"])),X.x,X.y,o,o,+(h<0),q.x,q.y,n,n,+(ue>180),+(h>0),C.x,C.y,o,o,+(h<0),D.x,D.y)}else _+=Lt(XS||(XS=Pa(["L",",","Z"])),t,r);return _},l6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},s6=e=>{var t=Hr(e,l6),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,m=t.className;if(o0&&Math.abs(f-h)<360?w=o6({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(k,x/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:h}):w=xC({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:f,endAngle:h}),g.createElement("path",cy({},Br(t),{className:v,d:w}))};function u6(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(eO(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,s=t.outerRadius,u=t.angle,d=Bt(n,a,o,u),f=Bt(n,a,s,u);return[{x:d.x,y:d.y},{x:f.x,y:f.y}]}return gC(t)}}function c6(e){return pO(e)?NaN:Number(e)}function Gm(e){return e?(e=c6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function bC(e,t,r){r&&typeof r!="number"&&Hv(e,t,r)&&(t=r=void 0),e=Gm(e),t===void 0?(t=e,e=0):t=Gm(t),r=r===void 0?ee.chartData,mg=H([un],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),ah=(e,t,r,n)=>n?mg(e):un(e),d6=(e,t,r)=>r?mg(e):un(e),f6=H([ah],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});H([mg],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var h6=H([un],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function vg(e,t){return y6(e)||v6(e,t)||m6(e,t)||p6()}function p6(){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 m6(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);re.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};ve.decimalPlaces=ve.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*rt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ve.dividedBy=ve.div=function(e){return Zn(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,r=t.constructor;return Ge(Zn(t,new r(e),0,1),r.precision)};ve.equals=ve.eq=function(e){return!this.cmp(e)};ve.exponent=function(){return gt(this)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){return this.cmp(e)>=0};ve.isInteger=ve.isint=function(){return this.e>this.d.length-2};ve.isNegative=ve.isneg=function(){return this.s<0};ve.isPositive=ve.ispos=function(){return this.s>0};ve.isZero=function(){return this.s===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Pr))throw Error(Wr+"NaN");if(r.s<1)throw Error(Wr+(r.s?"NaN":"-Infinity"));return r.eq(Pr)?new n(0):(it=!1,t=Zn(iu(r,o),iu(e,o),o),it=!0,Ge(t,a))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?PC(t,e):kC(t,(e.s=-e.s,e))};ve.modulo=ve.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Wr+"NaN");return r.s?(it=!1,t=Zn(r,e,0,1).times(e),it=!0,r.minus(t)):Ge(new n(r),a)};ve.naturalExponential=ve.exp=function(){return EC(this)};ve.naturalLogarithm=ve.ln=function(){return iu(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ve.plus=ve.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kC(t,e):PC(t,(e.s=-e.s,e))};ve.precision=ve.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Fa+e);if(t=gt(a)+1,n=a.d.length-1,r=n*rt+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ve.squareRoot=ve.sqrt=function(){var e,t,r,n,a,o,s,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Wr+"NaN")}for(e=gt(u),it=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=En(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Al((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new d(t)):n=new d(a.toString()),r=d.precision,a=s=r+3;;)if(o=n,n=o.plus(Zn(u,o,s+2)).times(.5),En(o.d).slice(0,s)===(t=En(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;s+=4}return it=!0,Ge(n,r)};ve.times=ve.mul=function(e){var t,r,n,a,o,s,u,d,f,h=this,m=h.constructor,v=h.d,x=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,r=h.e+e.e,d=v.length,f=x.length,d=0;){for(t=0,a=d+n;a>n;)u=o[a]+x[n]*v[a-n-1]+t,o[a--]=u%jt|0,t=u/jt|0;o[a]=(o[a]+t)%jt|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,it?Ge(e,m.precision):e};ve.toDecimalPlaces=ve.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(jn(e,0,Pl),t===void 0?t=n.rounding:jn(t,0,8),Ge(r,e+gt(r)+1,t))};ve.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Ga(n,!0):(jn(e,0,Pl),t===void 0?t=a.rounding:jn(t,0,8),n=Ge(new a(n),e+1,t),r=Ga(n,!0,e+1)),r};ve.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?Ga(a):(jn(e,0,Pl),t===void 0?t=o.rounding:jn(t,0,8),n=Ge(new o(a),e+gt(a)+1,t),r=Ga(n.abs(),!1,e+gt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};ve.toInteger=ve.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),gt(e)+1,t.rounding)};ve.toNumber=function(){return+this};ve.toPower=ve.pow=function(e){var t,r,n,a,o,s,u=this,d=u.constructor,f=12,h=+(e=new d(e));if(!e.s)return new d(Pr);if(u=new d(u),!u.s){if(e.s<1)throw Error(Wr+"Infinity");return u}if(u.eq(Pr))return u;if(n=d.precision,e.eq(Pr))return Ge(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=u.s,s){if((r=h<0?-h:h)<=SC){for(a=new d(Pr),t=Math.ceil(n/rt+4),it=!1;r%2&&(a=a.times(u),tk(a.d,t)),r=Al(r/2),r!==0;)u=u.times(u),tk(u.d,t);return it=!0,e.s<0?new d(Pr).div(a):Ge(a,n)}}else if(o<0)throw Error(Wr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,it=!1,a=e.times(iu(u,n+f)),it=!0,a=EC(a),a.s=o,a};ve.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=gt(a),n=Ga(a,r<=o.toExpNeg||r>=o.toExpPos)):(jn(e,1,Pl),t===void 0?t=o.rounding:jn(t,0,8),a=Ge(new o(a),e,t),r=gt(a),n=Ga(a,e<=r||r<=o.toExpNeg,e)),n};ve.toSignificantDigits=ve.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(jn(e,1,Pl),t===void 0?t=n.rounding:jn(t,0,8)),Ge(new n(r),e,t)};ve.toString=ve.valueOf=ve.val=ve.toJSON=ve[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=gt(e),r=e.constructor;return Ga(e,t<=r.toExpNeg||t>=r.toExpPos)};function kC(e,t){var r,n,a,o,s,u,d,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),it?Ge(t,m):t;if(d=e.d,f=t.d,s=e.e,a=t.e,d=d.slice(),o=s-a,o){for(o<0?(n=d,o=-o,u=f.length):(n=f,a=s,u=d.length),s=Math.ceil(m/rt),u=s>u?s+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=d.length,o=f.length,u-o<0&&(o=u,n=f,f=d,d=n),r=0;o;)r=(d[--o]=d[o]+f[o]+r)/jt|0,d[o]%=jt;for(r&&(d.unshift(r),++a),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=a,it?Ge(t,m):t}function jn(e,t,r){if(e!==~~e||er)throw Error(Fa+e)}function En(e){var t,r,n,a=e.length-1,o="",s=e[0];if(a>0){for(o+=s,t=1;ts?1:-1;else for(u=d=0;ua[u]?1:-1;break}return d}function r(n,a,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,a,o,s){var u,d,f,h,m,v,x,k,w,E,P,O,j,_,N,C,D,F,z=n.constructor,q=n.s==a.s?1:-1,X=n.d,B=a.d;if(!n.s)return new z(n);if(!a.s)throw Error(Wr+"Division by zero");for(d=n.e-a.e,D=B.length,N=X.length,x=new z(q),k=x.d=[],f=0;B[f]==(X[f]||0);)++f;if(B[f]>(X[f]||0)&&--d,o==null?O=o=z.precision:s?O=o+(gt(n)-gt(a))+1:O=o,O<0)return new z(0);if(O=O/rt+2|0,f=0,D==1)for(h=0,B=B[0],O++;(f1&&(B=e(B,h),X=e(X,h),D=B.length,N=X.length),_=D,w=X.slice(0,D),E=w.length;E=jt/2&&++C;do h=0,u=t(B,w,D,E),u<0?(P=w[0],D!=E&&(P=P*jt+(w[1]||0)),h=P/C|0,h>1?(h>=jt&&(h=jt-1),m=e(B,h),v=m.length,E=w.length,u=t(m,w,v,E),u==1&&(h--,r(m,D16)throw Error(yg+gt(e));if(!e.s)return new h(Pr);for(it=!1,u=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(n=Math.log(Sa(2,f))/Math.LN10*2+5|0,u+=n,r=a=o=new h(Pr),h.precision=u;;){if(a=Ge(a.times(e),u),r=r.times(++d),s=o.plus(Zn(a,r,u)),En(s.d).slice(0,u)===En(o.d).slice(0,u)){for(;f--;)o=Ge(o.times(o),u);return h.precision=m,t==null?(it=!0,Ge(o,m)):o}o=s}}function gt(e){for(var t=e.e*rt,r=e.d[0];r>=10;r/=10)t++;return t}function Ym(e,t,r){if(t>e.LN10.sd())throw it=!0,r&&(e.precision=r),Error(Wr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function $i(e){for(var t="";e--;)t+="0";return t}function iu(e,t){var r,n,a,o,s,u,d,f,h,m=1,v=10,x=e,k=x.d,w=x.constructor,E=w.precision;if(x.s<1)throw Error(Wr+(x.s?"NaN":"-Infinity"));if(x.eq(Pr))return new w(0);if(t==null?(it=!1,f=E):f=t,x.eq(10))return t==null&&(it=!0),Ym(w,f);if(f+=v,w.precision=f,r=En(k),n=r.charAt(0),o=gt(x),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=En(x.d),n=r.charAt(0),m++;o=gt(x),n>1?(x=new w("0."+r),o++):x=new w(n+"."+r.slice(1))}else return d=Ym(w,f+2,E).times(o+""),x=iu(new w(n+"."+r.slice(1)),f-v).plus(d),w.precision=E,t==null?(it=!0,Ge(x,E)):x;for(u=s=x=Zn(x.minus(Pr),x.plus(Pr),f),h=Ge(x.times(x),f),a=3;;){if(s=Ge(s.times(h),f),d=u.plus(Zn(s,new w(a),f)),En(d.d).slice(0,f)===En(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(Ym(w,f+2,E).times(o+""))),u=Zn(u,new w(m),f),w.precision=E,t==null?(it=!0,Ge(u,E)):u;u=d,a+=2}}function ek(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Al(r/rt),e.d=[],n=(r+1)%rt,r<0&&(n+=rt),nXd||e.e<-Xd))throw Error(yg+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,r){var n,a,o,s,u,d,f,h,m=e.d;for(s=1,o=m[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=rt,a=t,f=m[h=0];else{if(h=Math.ceil((n+1)/rt),o=m.length,h>=o)return e;for(f=o=m[h],s=1;o>=10;o/=10)s++;n%=rt,a=n-rt+s}if(r!==void 0&&(o=Sa(10,s-a-1),u=f/o%10|0,d=t<0||m[h+1]!==void 0||f%o,d=r<4?(u||d)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||d||r==6&&(n>0?a>0?f/Sa(10,s-a):0:m[h-1])%10&1||r==(e.s<0?8:7))),t<1||!m[0])return d?(o=gt(e),m.length=1,t=t-o-1,m[0]=Sa(10,(rt-t%rt)%rt),e.e=Al(-t/rt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(n==0?(m.length=h,o=1,h--):(m.length=h+1,o=Sa(10,rt-n),m[h]=a>0?(f/Sa(10,s-a)%Sa(10,a)|0)*o:0),d)for(;;)if(h==0){(m[0]+=o)==jt&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=jt)break;m[h--]=0,o=1}for(n=m.length;m[--n]===0;)m.pop();if(it&&(e.e>Xd||e.e<-Xd))throw Error(yg+gt(e));return e}function PC(e,t){var r,n,a,o,s,u,d,f,h,m,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),it?Ge(t,x):t;if(d=e.d,m=t.d,n=t.e,f=e.e,d=d.slice(),s=f-n,s){for(h=s<0,h?(r=d,s=-s,u=m.length):(r=m,n=f,u=d.length),a=Math.max(Math.ceil(x/rt),u)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=d.length,u=m.length,h=a0;--a)d[u++]=0;for(a=m.length;a>s;){if(d[--a]0?o=o.charAt(0)+"."+o.slice(1)+$i(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+$i(-a-1)+o,r&&(n=r-s)>0&&(o+=$i(n))):a>=s?(o+=$i(a+1-s),r&&(n=r-a-1)>0&&(o=o+"."+$i(n))):((n=a+1)0&&(a+1===s&&(o+="."),o+=$i(n))),e.s<0?"-"+o:o}function tk(e,t){if(e.length>t)return e.length=t,!0}function AC(e){var t,r,n;function a(o){var s=this;if(!(s instanceof a))return new a(o);if(s.constructor=a,o instanceof a){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Fa+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return ek(s,o.toString())}else if(typeof o!="string")throw Error(Fa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,b6.test(o))ek(s,o);else throw Error(Fa+o)}if(a.prototype=ve,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=AC,a.config=a.set=w6,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Fa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fa+r+": "+n);return this}var gg=AC(x6);Pr=new gg(1);const Ue=gg;function OC(e){var t;return e===0?t=1:t=Math.floor(new Ue(e).abs().log(10).toNumber())+1,t}function CC(e,t,r){for(var n=new Ue(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function au(e,t){return P6(e)||E6(e,t)||k6(e,t)||S6()}function S6(){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 k6(e,t){if(e){if(typeof e=="string")return rk(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)?rk(e,t):void 0}}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=au(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},xg=(e,t,r)=>{if(e.lte(0))return new Ue(0);var n=OC(e.toNumber()),a=new Ue(10).pow(n),o=e.div(a),s=n!==1?.05:.1,u=new Ue(Math.ceil(o.div(s).toNumber())).add(r).mul(s),d=u.mul(a);return t?new Ue(d.toNumber()):new Ue(Math.ceil(d.toNumber()))},jC=(e,t,r)=>{var n;if(e.lte(0))return new Ue(0);var a=[1,2,2.5,5],o=e.toNumber(),s=Math.floor(new Ue(o).abs().log(10).toNumber()),u=new Ue(10).pow(s),d=e.div(u).toNumber(),f=a.findIndex(x=>x>=d-1e-10);if(f===-1&&(u=u.mul(10),f=0),f+=r,f>=a.length){var h=Math.floor(f/a.length);f%=a.length,u=u.mul(new Ue(10).pow(h))}var m=(n=a[f])!==null&&n!==void 0?n:1,v=new Ue(m).mul(u);return t?v:new Ue(Math.ceil(v.toNumber()))},A6=(e,t,r)=>{var n=new Ue(1),a=new Ue(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ue(10).pow(OC(e)-1),a=new Ue(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ue(Math.floor(e)))}else e===0?a=new Ue(Math.floor((t-1)/2)):r||(a=new Ue(Math.floor(e)));for(var s=Math.floor((t-1)/2),u=[],d=0;d4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:xg;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ue(0),tickMin:new Ue(0),tickMax:new Ue(0)};var u=s(new Ue(r).sub(t).div(n-1),a,o),d;t<=0&&r>=0?d=new Ue(0):(d=new Ue(t).add(r).div(2),d=d.sub(new Ue(d).mod(u)));var f=Math.ceil(d.sub(t).div(u).toNumber()),h=Math.ceil(new Ue(r).sub(d).div(u).toNumber()),m=f+h+1;return m>n?NC(t,r,n,a,o+1,s):(m0?h+(n-m):h,f=r>0?f:f+(n-m)),{step:u,tickMin:d.sub(new Ue(f).mul(u)),tickMax:d.add(new Ue(h).mul(u))})},nk=function(t){var r=au(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=Math.max(o,2),f=_C([n,a]),h=au(f,2),m=h[0],v=h[1];if(m===-1/0||v===1/0){var x=v===1/0?[m,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>a?x.reverse():x}if(m===v)return A6(m,o,s);var k=u==="snap125"?jC:xg,w=NC(m,v,d,s,0,k),E=w.step,P=w.tickMin,O=w.tickMax,j=CC(P,O.add(new Ue(.1).mul(E)),E);return n>a?j.reverse():j},ik=function(t,r){var n=au(t,2),a=n[0],o=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=_C([a,o]),f=au(d,2),h=f[0],m=f[1];if(h===-1/0||m===1/0)return[a,o];if(h===m)return[h];var v=u==="snap125"?jC:xg,x=Math.max(r,2),k=v(new Ue(m).sub(h).div(x-1),s,0),w=[...CC(new Ue(h),new Ue(m),k),m];return s===!1&&(w=w.map(E=>Math.round(E))),a>o?w.reverse():w},O6=e=>e.rootProps.barCategoryGap,oh=e=>e.rootProps.stackOffset,IC=e=>e.rootProps.reverseStackOrder,bg=e=>e.options.chartName,wg=e=>e.rootProps.syncId,MC=e=>e.rootProps.syncMethod,Sg=e=>e.options.eventEmitter,C6=e=>e.rootProps.baseValue,rr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},va={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},yn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},lh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function sh(e,t,r){if(r!=="auto")return r;if(e!=null)return In(e,t)?"category":"number"}function ak(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zd(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},kg=H([I6,nC],(e,t)=>{var r;if(e!=null)return e;var n=(r=sh(t,"angleAxis",ok.type))!==null&&r!==void 0?r:"category";return Zd(Zd({},ok),{},{type:n})}),M6=(e,t)=>e.polarAxis.radiusAxis[t],Eg=H([M6,nC],(e,t)=>{var r;if(e!=null)return e;var n=(r=sh(t,"radiusAxis",lk.type))!==null&&r!==void 0?r:"category";return Zd(Zd({},lk),{},{type:n})}),uh=e=>e.polarOptions,Pg=H([ai,oi,Ht],JF),TC=H([uh,Pg],(e,t)=>{if(e!=null)return ea(e.innerRadius,t,0)}),DC=H([uh,Pg],(e,t)=>{if(e!=null)return ea(e.outerRadius,t,t*.8)}),T6=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},RC=H([uh],T6);H([kg,RC],lh);var $C=H([Pg,TC,DC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});H([Eg,$C],lh);var LC=H([at,uh,TC,DC,ai,oi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var s=t.cx,u=t.cy,d=t.startAngle,f=t.endAngle;return{cx:ea(s,a,a/2),cy:ea(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:d,endAngle:f,clockWise:!1}}}),It=(e,t)=>t,ch=(e,t,r)=>r;function Ag(e){return e==null?void 0:e.id}function zC(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,s=r.dataKey,u=new Map;return e.forEach(d=>{var f,h=(f=d.data)!==null&&f!==void 0?f:a;if(!(h==null||h.length===0)){var m=Ag(d);h.forEach((v,x)=>{var k=s==null||o?x:String(Nt(v,s,null)),w=Nt(v,d.dataKey,0),E;u.has(k)?E=u.get(k):E={},Object.assign(E,{[m]:w}),u.set(k,E)})}}),Array.from(u.values())}function Og(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var dh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function fh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function D6(e,t){if(e.length===t.length){for(var r=0;r{var t=at(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Ol=e=>e.tooltip.settings.axisId;function Cg(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function s(){return o.apply(this,arguments)}return s.toString=function(){return o.toString()},s})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var s=a[0],u=a[1];return s<=u?o>=s&&o<=u:o>=u&&o<=s},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,s)=>{var u=e(o);if(u!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var d=e.bandwidth();switch(s.position){case"middle":u+=d/2;break;case"end":u+=d;break}}return u}}}}}var R6=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Pn(t)){for(var r,n,a=0;an)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Xi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $6(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function _g(e){let t,r,n;e.length!==2?(t=Xi,r=(u,d)=>Xi(e(u),d),n=(u,d)=>e(u)-d):(t=e===Xi||e===$6?e:L6,r=e,n=e);function a(u,d,f=0,h=u.length){if(f>>1;r(u[m],d)<0?f=m+1:h=m}while(f>>1;r(u[m],d)<=0?f=m+1:h=m}while(ff&&n(u[m-1],d)>-n(u[m],d)?m-1:m}return{left:a,center:s,right:o}}function L6(){return 0}function FC(e){return e===null?NaN:+e}function*z6(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const F6=_g(Xi),Ou=F6.right;_g(FC).center;class sk extends Map{constructor(t,r=W6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(uk(this,t))}has(t){return super.has(uk(this,t))}set(t,r){return super.set(B6(this,t),r)}delete(t){return super.delete(U6(this,t))}}function uk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function B6({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function U6({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function W6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function H6(e=Xi){if(e===Xi)return BC;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 BC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const K6=Math.sqrt(50),V6=Math.sqrt(10),q6=Math.sqrt(2);function Jd(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),s=o>=K6?10:o>=V6?5:o>=q6?2:1;let u,d,f;return a<0?(f=Math.pow(10,-a)/s,u=Math.round(e*f),d=Math.round(t*f),u/ft&&--d,f=-f):(f=Math.pow(10,a)*s,u=Math.round(e/f),d=Math.round(t/f),u*ft&&--d),d0))return[];if(e===t)return[e];const n=t=a))return[];const u=o-a+1,d=new Array(u);if(n)if(s<0)for(let f=0;f=n)&&(r=n);return r}function dk(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function UC(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?BC:H6(a);n>r;){if(n-r>600){const d=n-r+1,f=t-r+1,h=Math.log(d),m=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*m*(d-m)/d)*(f-d/2<0?-1:1),x=Math.max(r,Math.floor(t-f*m/d+v)),k=Math.min(n,Math.floor(t+(d-f)*m/d+v));UC(e,t,x,k,a)}const o=e[t];let s=r,u=n;for(Ns(e,r,t),a(e[n],o)>0&&Ns(e,r,n);s0;)--u}a(e[r],o)===0?Ns(e,r,u):(++u,Ns(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Ns(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function G6(e,t,r){if(e=Float64Array.from(z6(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return dk(e);if(t>=1)return ck(e);var n,a=(n-1)*t,o=Math.floor(a),s=ck(UC(e,o).subarray(0,o+1)),u=dk(e.subarray(o+1));return s+(u-s)*(a-o)}}function Y6(e,t,r=FC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),s=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return s+(u-s)*(a-o)}}function Q6(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ud(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ud(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=J6.exec(e))?new vr(t[1],t[2],t[3],1):(t=e8.exec(e))?new vr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=t8.exec(e))?ud(t[1],t[2],t[3],t[4]):(t=r8.exec(e))?ud(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=n8.exec(e))?gk(t[1],t[2]/100,t[3]/100,1):(t=i8.exec(e))?gk(t[1],t[2]/100,t[3]/100,t[4]):fk.hasOwnProperty(e)?mk(fk[e]):e==="transparent"?new vr(NaN,NaN,NaN,0):null}function mk(e){return new vr(e>>16&255,e>>8&255,e&255,1)}function ud(e,t,r,n){return n<=0&&(e=t=r=NaN),new vr(e,t,r,n)}function l8(e){return e instanceof Cu||(e=su(e)),e?(e=e.rgb(),new vr(e.r,e.g,e.b,e.opacity)):new vr}function my(e,t,r,n){return arguments.length===1?l8(e):new vr(e,t,r,n??1)}function vr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ig(vr,my,HC(Cu,{brighter(e){return e=e==null?ef:Math.pow(ef,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ou:Math.pow(ou,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vr(Ba(this.r),Ba(this.g),Ba(this.b),tf(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:vk,formatHex:vk,formatHex8:s8,formatRgb:yk,toString:yk}));function vk(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function s8(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function yk(){const e=tf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ba(this.r)}, ${Ba(this.g)}, ${Ba(this.b)}${e===1?")":`, ${e})`}`}function tf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ba(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Aa(e){return e=Ba(e),(e<16?"0":"")+e.toString(16)}function gk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,r,n)}function KC(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Cu||(e=su(e)),!e)return new an;if(e instanceof an)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,u=o-a,d=(o+a)/2;return u?(t===o?s=(r-n)/u+(r0&&d<1?0:s,new an(s,u,d,e.opacity)}function u8(e,t,r,n){return arguments.length===1?KC(e):new an(e,t,r,n??1)}function an(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ig(an,u8,HC(Cu,{brighter(e){return e=e==null?ef:Math.pow(ef,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ou:Math.pow(ou,e),new an(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new vr(Qm(e>=240?e-240:e+120,a,n),Qm(e,a,n),Qm(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new an(xk(this.h),cd(this.s),cd(this.l),tf(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=tf(this.opacity);return`${e===1?"hsl(":"hsla("}${xk(this.h)}, ${cd(this.s)*100}%, ${cd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xk(e){return e=(e||0)%360,e<0?e+360:e}function cd(e){return Math.max(0,Math.min(1,e||0))}function Qm(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 Mg=e=>()=>e;function c8(e,t){return function(r){return e+r*t}}function d8(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 f8(e){return(e=+e)==1?VC:function(t,r){return r-t?d8(t,r,e):Mg(isNaN(t)?r:t)}}function VC(e,t){var r=t-e;return r?c8(e,r):Mg(isNaN(e)?t:e)}const bk=(function e(t){var r=f8(t);function n(a,o){var s=r((a=my(a)).r,(o=my(o)).r),u=r(a.g,o.g),d=r(a.b,o.b),f=VC(a.opacity,o.opacity);return function(h){return a.r=s(h),a.g=u(h),a.b=d(h),a.opacity=f(h),a+""}}return n.gamma=e,n})(1);function h8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;ar&&(o=t.slice(r,o),u[s]?u[s]+=o:u[++s]=o),(n=n[0])===(a=a[0])?u[s]?u[s]+=a:u[++s]=a:(u[++s]=null,d.push({i:s,x:rf(n,a)})),r=Xm.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function E8(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a2?P8:E8,d=f=null,m}function m(v){return v==null||isNaN(v=+v)?o:(d||(d=u(e.map(n),t,r)))(n(s(v)))}return m.invert=function(v){return s(a((f||(f=u(t,e.map(n),rf)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,nf),h()):e.slice()},m.range=function(v){return arguments.length?(t=Array.from(v),h()):t.slice()},m.rangeRound=function(v){return t=Array.from(v),r=Tg,h()},m.clamp=function(v){return arguments.length?(s=v?!0:nr,h()):s!==nr},m.interpolate=function(v){return arguments.length?(r=v,h()):r},m.unknown=function(v){return arguments.length?(o=v,m):o},function(v,x){return n=v,a=x,h()}}function Dg(){return hh()(nr,nr)}function A8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function af(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 pl(e){return e=af(Math.abs(e)),e?e[1]:NaN}function O8(e,t){return function(r,n){for(var a=r.length,o=[],s=0,u=e[0],d=0;a>0&&u>0&&(d+u+1>n&&(u=Math.max(1,n-d)),o.push(r.substring(a-=u,a+u)),!((d+=u+1)>n));)u=e[s=(s+1)%e.length];return o.reverse().join(t)}}function C8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var _8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uu(e){if(!(t=_8.exec(e)))throw new Error("invalid format: "+e);var t;return new Rg({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]})}uu.prototype=Rg.prototype;function Rg(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+""}Rg.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function j8(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var of;function N8(e,t){var r=af(e,t);if(!r)return of=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(of=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+af(e,Math.max(0,t+o-1))[0]}function Sk(e,t){var r=af(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const kk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:A8,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)=>Sk(e*100,t),r:Sk,s:N8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ek(e){return e}var Pk=Array.prototype.map,Ak=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function I8(e){var t=e.grouping===void 0||e.thousands===void 0?Ek:O8(Pk.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Ek:C8(Pk.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(m,v){m=uu(m);var x=m.fill,k=m.align,w=m.sign,E=m.symbol,P=m.zero,O=m.width,j=m.comma,_=m.precision,N=m.trim,C=m.type;C==="n"?(j=!0,C="g"):kk[C]||(_===void 0&&(_=12),N=!0,C="g"),(P||x==="0"&&k==="=")&&(P=!0,x="0",k="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(E==="$"?r:E==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),F=(E==="$"?n:/[%p]/.test(C)?s:"")+(v&&v.suffix!==void 0?v.suffix:""),z=kk[C],q=/[defgprs%]/.test(C);_=_===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function X(B){var ue=D,Y=F,le,fe,de;if(C==="c")Y=z(B)+Y,B="";else{B=+B;var K=B<0||1/B<0;if(B=isNaN(B)?d:z(Math.abs(B),_),N&&(B=j8(B)),K&&+B==0&&w!=="+"&&(K=!1),ue=(K?w==="("?w:u:w==="-"||w==="("?"":w)+ue,Y=(C==="s"&&!isNaN(B)&&of!==void 0?Ak[8+of/3]:"")+Y+(K&&w==="("?")":""),q){for(le=-1,fe=B.length;++lede||de>57){Y=(de===46?a+B.slice(le+1):B.slice(le))+Y,B=B.slice(0,le);break}}}j&&!P&&(B=t(B,1/0));var ie=ue.length+B.length+Y.length,Q=ie>1)+ue+B+Y+Q.slice(ie);break;default:B=Q+ue+B+Y;break}return o(B)}return X.toString=function(){return m+""},X}function h(m,v){var x=Math.max(-8,Math.min(8,Math.floor(pl(v)/3)))*3,k=Math.pow(10,-x),w=f((m=uu(m),m.type="f",m),{suffix:Ak[8+x/3]});return function(E){return w(k*E)}}return{format:f,formatPrefix:h}}var dd,$g,qC;M8({thousands:",",grouping:[3],currency:["$",""]});function M8(e){return dd=I8(e),$g=dd.format,qC=dd.formatPrefix,dd}function T8(e){return Math.max(0,-pl(Math.abs(e)))}function D8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pl(t)/3)))*3-pl(Math.abs(e)))}function R8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pl(t)-pl(e))+1}function GC(e,t,r,n){var a=hy(e,t,r),o;switch(n=uu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=D8(a,s))&&(n.precision=o),qC(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=R8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=T8(a))&&(n.precision=o-(n.type==="%")*2);break}}return $g(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return dy(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return GC(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,s=n[a],u=n[o],d,f,h=10;for(u0;){if(f=fy(s,u,r),f===d)return n[a]=s,n[o]=u,t(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function YC(){var e=Dg();return e.copy=function(){return _u(e,YC())},Kr.apply(e,arguments),ta(e)}function QC(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,nf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return QC(e).unknown(t)},e=arguments.length?Array.from(e,nf):[0,1],ta(r)}function XC(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],s;return oMath.pow(e,t)}function B8(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 _k(e){return(t,r)=>-e(-t,r)}function Lg(e){const t=e(Ok,Ck),r=t.domain;let n=10,a,o;function s(){return a=B8(n),o=F8(n),r()[0]<0?(a=_k(a),o=_k(o),e($8,L8)):e(Ok,Ck),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const d=r();let f=d[0],h=d[d.length-1];const m=h0){for(;v<=x;++v)for(k=1;kh)break;P.push(w)}}else for(;v<=x;++v)for(k=n-1;k>=1;--k)if(w=v>0?k/o(-v):k*o(v),!(wh)break;P.push(w)}P.length*2{if(u==null&&(u=10),d==null&&(d=n===10?"s":","),typeof d!="function"&&(!(n%1)&&(d=uu(d)).precision==null&&(d.trim=!0),d=$g(d)),u===1/0)return d;const f=Math.max(1,n*u/t.ticks().length);return h=>{let m=h/o(Math.round(a(h)));return m*nr(XC(r(),{floor:u=>o(Math.floor(a(u))),ceil:u=>o(Math.ceil(a(u)))})),t}function ZC(){const e=Lg(hh()).domain([1,10]);return e.copy=()=>_u(e,ZC()).base(e.base()),Kr.apply(e,arguments),e}function jk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Nk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zg(e){var t=1,r=e(jk(t),Nk(t));return r.constant=function(n){return arguments.length?e(jk(t=+n),Nk(t)):t},ta(r)}function JC(){var e=zg(hh());return e.copy=function(){return _u(e,JC()).constant(e.constant())},Kr.apply(e,arguments)}function Ik(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function U8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function W8(e){return e<0?-e*e:e*e}function Fg(e){var t=e(nr,nr),r=1;function n(){return r===1?e(nr,nr):r===.5?e(U8,W8):e(Ik(r),Ik(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ta(t)}function Bg(){var e=Fg(hh());return e.copy=function(){return _u(e,Bg()).exponent(e.exponent())},Kr.apply(e,arguments),e}function H8(){return Bg.apply(null,arguments).exponent(.5)}function Mk(e){return Math.sign(e)*e*e}function K8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function e2(){var e=Dg(),t=[0,1],r=!1,n;function a(o){var s=K8(e(o));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(o){return e.invert(Mk(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,nf)).map(Mk)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return e2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kr.apply(a,arguments),ta(a)}function t2(){var e=[],t=[],r=[],n;function a(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[f-1],n[f]]},s.unknown=function(d){return arguments.length&&(o=d),s},s.thresholds=function(){return n.slice()},s.copy=function(){return r2().domain([e,t]).range(a).unknown(o)},Kr.apply(ta(s),arguments)}function n2(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Ou(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return n2().domain(e).range(t).unknown(r)},Kr.apply(a,arguments)}const Zm=new Date,Jm=new Date;function Et(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const s=a(o),u=a.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),a.range=(o,s,u)=>{const d=[];if(o=a.ceil(o),u=u==null?1:Math.floor(u),!(o0))return d;let f;do d.push(f=new Date(+o)),t(o,u),e(o);while(fEt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!o(s););else for(;--u>=0;)for(;t(s,1),!o(s););}),r&&(a.count=(o,s)=>(Zm.setTime(+o),Jm.setTime(+s),e(Zm),e(Jm),Math.floor(r(Zm,Jm))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?s=>n(s)%o===0:s=>a.count(0,s)%o===0):a)),a}const lf=Et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);lf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Et(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):lf);lf.range;const Yn=1e3,Fr=Yn*60,Qn=Fr*60,ti=Qn*24,Ug=ti*7,Tk=ti*30,ev=ti*365,Oa=Et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Yn)},(e,t)=>(t-e)/Yn,e=>e.getUTCSeconds());Oa.range;const Wg=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes());Wg.range;const Hg=Et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes());Hg.range;const Kg=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yn-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getHours());Kg.range;const Vg=Et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCHours());Vg.range;const ju=Et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/ti,e=>e.getDate()-1);ju.range;const ph=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ti,e=>e.getUTCDate()-1);ph.range;const i2=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ti,e=>Math.floor(e/ti));i2.range;function Ja(e){return Et(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())*Fr)/Ug)}const mh=Ja(0),sf=Ja(1),V8=Ja(2),q8=Ja(3),ml=Ja(4),G8=Ja(5),Y8=Ja(6);mh.range;sf.range;V8.range;q8.range;ml.range;G8.range;Y8.range;function eo(e){return Et(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)/Ug)}const vh=eo(0),uf=eo(1),Q8=eo(2),X8=eo(3),vl=eo(4),Z8=eo(5),J8=eo(6);vh.range;uf.range;Q8.range;X8.range;vl.range;Z8.range;J8.range;const qg=Et(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());qg.range;const Gg=Et(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());Gg.range;const ri=Et(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());ri.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(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)});ri.range;const ni=Et(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());ni.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(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)});ni.range;function a2(e,t,r,n,a,o){const s=[[Oa,1,Yn],[Oa,5,5*Yn],[Oa,15,15*Yn],[Oa,30,30*Yn],[o,1,Fr],[o,5,5*Fr],[o,15,15*Fr],[o,30,30*Fr],[a,1,Qn],[a,3,3*Qn],[a,6,6*Qn],[a,12,12*Qn],[n,1,ti],[n,2,2*ti],[r,1,Ug],[t,1,Tk],[t,3,3*Tk],[e,1,ev]];function u(f,h,m){const v=hE).right(s,v);if(x===s.length)return e.every(hy(f/ev,h/ev,m));if(x===0)return lf.every(Math.max(hy(f,h,m),1));const[k,w]=s[v/s[x-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(De=rv(Is(ne.y,0,1)),Ee=De.getUTCDay(),De=Ee>4||Ee===0?uf.ceil(De):uf(De),De=ph.offset(De,(ne.V-1)*7),ne.y=De.getUTCFullYear(),ne.m=De.getUTCMonth(),ne.d=De.getUTCDate()+(ne.w+6)%7):(De=tv(Is(ne.y,0,1)),Ee=De.getDay(),De=Ee>4||Ee===0?sf.ceil(De):sf(De),De=ju.offset(De,(ne.V-1)*7),ne.y=De.getFullYear(),ne.m=De.getMonth(),ne.d=De.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ee="Z"in ne?rv(Is(ne.y,0,1)).getUTCDay():tv(Is(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ee+5)%7:ne.w+ne.U*7-(Ee+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,rv(ne)):tv(ne)}}function F(Z,we,Pe,ne){for(var ot=0,De=we.length,Ee=Pe.length,vt,or;ot=Ee)return-1;if(vt=we.charCodeAt(ot++),vt===37){if(vt=we.charAt(ot++),or=N[vt in Dk?we.charAt(ot++):vt],!or||(ne=or(Z,Pe,ne))<0)return-1}else if(vt!=Pe.charCodeAt(ne++))return-1}return ne}function z(Z,we,Pe){var ne=f.exec(we.slice(Pe));return ne?(Z.p=h.get(ne[0].toLowerCase()),Pe+ne[0].length):-1}function q(Z,we,Pe){var ne=x.exec(we.slice(Pe));return ne?(Z.w=k.get(ne[0].toLowerCase()),Pe+ne[0].length):-1}function X(Z,we,Pe){var ne=m.exec(we.slice(Pe));return ne?(Z.w=v.get(ne[0].toLowerCase()),Pe+ne[0].length):-1}function B(Z,we,Pe){var ne=P.exec(we.slice(Pe));return ne?(Z.m=O.get(ne[0].toLowerCase()),Pe+ne[0].length):-1}function ue(Z,we,Pe){var ne=w.exec(we.slice(Pe));return ne?(Z.m=E.get(ne[0].toLowerCase()),Pe+ne[0].length):-1}function Y(Z,we,Pe){return F(Z,t,we,Pe)}function le(Z,we,Pe){return F(Z,r,we,Pe)}function fe(Z,we,Pe){return F(Z,n,we,Pe)}function de(Z){return s[Z.getDay()]}function K(Z){return o[Z.getDay()]}function ie(Z){return d[Z.getMonth()]}function Q(Z){return u[Z.getMonth()]}function R(Z){return a[+(Z.getHours()>=12)]}function M(Z){return 1+~~(Z.getMonth()/3)}function J(Z){return s[Z.getUTCDay()]}function se(Z){return o[Z.getUTCDay()]}function te(Z){return d[Z.getUTCMonth()]}function ce(Z){return u[Z.getUTCMonth()]}function ye(Z){return a[+(Z.getUTCHours()>=12)]}function _e(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var we=C(Z+="",j);return we.toString=function(){return Z},we},parse:function(Z){var we=D(Z+="",!1);return we.toString=function(){return Z},we},utcFormat:function(Z){var we=C(Z+="",_);return we.toString=function(){return Z},we},utcParse:function(Z){var we=D(Z+="",!0);return we.toString=function(){return Z},we}}}var Dk={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,aB=/^%/,oB=/[\\^$*+?|[\]().{}]/g;function Ke(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o[t.toLowerCase(),r]))}function sB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function uB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function dB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Rk(e,t,r){var n=Tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function $k(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hB(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 pB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Lk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vB(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function yB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function gB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xB(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bB(e,t,r){var n=Tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wB(e,t,r){var n=aB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function SB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function kB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Fk(e,t){return Ke(e.getDate(),t,2)}function EB(e,t){return Ke(e.getHours(),t,2)}function PB(e,t){return Ke(e.getHours()%12||12,t,2)}function AB(e,t){return Ke(1+ju.count(ri(e),e),t,3)}function o2(e,t){return Ke(e.getMilliseconds(),t,3)}function OB(e,t){return o2(e,t)+"000"}function CB(e,t){return Ke(e.getMonth()+1,t,2)}function _B(e,t){return Ke(e.getMinutes(),t,2)}function jB(e,t){return Ke(e.getSeconds(),t,2)}function NB(e){var t=e.getDay();return t===0?7:t}function IB(e,t){return Ke(mh.count(ri(e)-1,e),t,2)}function l2(e){var t=e.getDay();return t>=4||t===0?ml(e):ml.ceil(e)}function MB(e,t){return e=l2(e),Ke(ml.count(ri(e),e)+(ri(e).getDay()===4),t,2)}function TB(e){return e.getDay()}function DB(e,t){return Ke(sf.count(ri(e)-1,e),t,2)}function RB(e,t){return Ke(e.getFullYear()%100,t,2)}function $B(e,t){return e=l2(e),Ke(e.getFullYear()%100,t,2)}function LB(e,t){return Ke(e.getFullYear()%1e4,t,4)}function zB(e,t){var r=e.getDay();return e=r>=4||r===0?ml(e):ml.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function FB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function Bk(e,t){return Ke(e.getUTCDate(),t,2)}function BB(e,t){return Ke(e.getUTCHours(),t,2)}function UB(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function WB(e,t){return Ke(1+ph.count(ni(e),e),t,3)}function s2(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function HB(e,t){return s2(e,t)+"000"}function KB(e,t){return Ke(e.getUTCMonth()+1,t,2)}function VB(e,t){return Ke(e.getUTCMinutes(),t,2)}function qB(e,t){return Ke(e.getUTCSeconds(),t,2)}function GB(e){var t=e.getUTCDay();return t===0?7:t}function YB(e,t){return Ke(vh.count(ni(e)-1,e),t,2)}function u2(e){var t=e.getUTCDay();return t>=4||t===0?vl(e):vl.ceil(e)}function QB(e,t){return e=u2(e),Ke(vl.count(ni(e),e)+(ni(e).getUTCDay()===4),t,2)}function XB(e){return e.getUTCDay()}function ZB(e,t){return Ke(uf.count(ni(e)-1,e),t,2)}function JB(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function eU(e,t){return e=u2(e),Ke(e.getUTCFullYear()%100,t,2)}function tU(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function rU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?vl(e):vl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function nU(){return"+0000"}function Uk(){return"%"}function Wk(e){return+e}function Hk(e){return Math.floor(+e/1e3)}var To,c2,d2;iU({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 iU(e){return To=iB(e),c2=To.format,To.parse,d2=To.utcFormat,To.utcParse,To}function aU(e){return new Date(e)}function oU(e){return e instanceof Date?+e:+new Date(+e)}function Yg(e,t,r,n,a,o,s,u,d,f){var h=Dg(),m=h.invert,v=h.domain,x=f(".%L"),k=f(":%S"),w=f("%I:%M"),E=f("%I %p"),P=f("%a %d"),O=f("%b %d"),j=f("%B"),_=f("%Y");function N(C){return(d(C)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>G6(e,o/n))},r.copy=function(){return m2(t).domain(e)},li.apply(r,arguments)}function gh(){var e=0,t=.5,r=1,n=1,a,o,s,u,d,f=nr,h,m=!1,v;function x(w){return isNaN(w=+w)?v:(w=.5+((w=+h(w))-o)*(n*w{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return hU(n)?n:"point"}};function pU(e,t){for(var r=0,n=e.length,a=e[0]t)?r=o+1:n=o}return r}function w2(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var s;return(s=e(o))!==null&&s!==void 0?s:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var s,u,d=pU(n,o);if(d<=0)return r[0];if(d>=r.length)return r[r.length-1];var f=(s=n[d-1])!==null&&s!==void 0?s:0,h=(u=n[d])!==null&&u!==void 0?u:0;return Math.abs(o-f)<=Math.abs(o-h)?r[d-1]:r[d]}}}function mU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):w2(e,void 0)}function Vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],si=(e,t)=>{var r=k2(e,t);return r??St},kt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:gy,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:Su},E2=(e,t)=>e.cartesianAxis.yAxis[t],ui=(e,t)=>{var r=E2(e,t);return r??kt},kU={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:""},Jg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??kU},ar=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);case"zAxis":return Jg(e,r);case"angleAxis":return kg(e,r);case"radiusAxis":return Eg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},EU=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Nu=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);case"angleAxis":return kg(e,r);case"radiusAxis":return Eg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},P2=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function A2(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 O2=e=>e.graphicalItems.cartesianItems,PU=H([It,ch],A2),C2=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),_l=H([O2,ar,PU],C2,{memoizeOptions:{resultEqualityCheck:fh}}),_2=H([_l],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Og)),j2=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),AU=H([_l],j2),N2=e=>e.map(t=>t.data).filter(Boolean).flat(1),OU=H([_l],e=>e.some(t=>!t.data)),I2=H([_l],N2,{memoizeOptions:{resultEqualityCheck:fh}}),M2=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},e0=H([I2,ah],M2),CU=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Nt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Nt(a,n)}))):e.map(n=>({value:n})),T2=(e,t,r,n,a,o)=>{var s=n.chartData,u=s===void 0?[]:s,d=n.dataStartIndex,f=n.dataEndIndex,h=CU(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var m=u.slice(d,f+1),v=m.map(x=>({value:Nt(x,t.dataKey)})).filter(x=>x.value!=null);return[...v,...h]}return h},Iu=H([e0,ar,_l,ah,OU,I2],T2);function Qo(e){if(Cn(e)||e instanceof Date){var t=Number(e);if(ze(t))return t}}function Gk(e){if(Array.isArray(e)){var t=[Qo(e[0]),Qo(e[1])];return Pn(t)?t:void 0}var r=Qo(e);if(r!=null)return[r,r]}function Nn(e){return e.map(Qo).filter(mr)}function _U(e,t){var r=Qo(e),n=Qo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var jU=H([Iu],e=>e==null?void 0:e.map(t=>t.value).sort(_U));function D2(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function NU(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!On(t))n=t;else if(Array.isArray(t)){var a=Nn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Nn(r.flatMap(o=>{var s=Nt(e,o.dataKey),u,d;if(Array.isArray(s)){var f=S2(s,2);u=f[0],d=f[1]}else u=d=s;if(!(!ze(u)||!ze(d)))return[n-u,n+d]}))}var Pt=e=>{var t=Mt(e),r=Ol(e);return Nu(e,t,r)},yl=H([Pt],e=>e==null?void 0:e.dataKey),IU=H([_2,ah,Pt],zC),R2=(e,t,r,n)=>{var a={},o=t.reduce((s,u)=>{if(u.stackId==null)return s;var d=s[u.stackId];return d==null&&(d=[]),d.push(u),s[u.stackId]=d,s},a);return Object.fromEntries(Object.entries(o).map(s=>{var u=S2(s,2),d=u[0],f=u[1],h=n?[...f].reverse():f,m=h.map(Ag);return[d,{stackedData:Q5(e,m,r),graphicalItems:h}]}))},$2=H([IU,_2,oh,IC],R2),L2=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return e4(e,a,o)},MU=H([ar],e=>e.allowDataOverflow),t0=e=>{var t;if(e==null||!("domain"in e))return gy;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Nn(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:gy},z2=H([ar],t0),F2=H([z2,MU],wC),TU=H([$2,un,It,F2],L2,{memoizeOptions:{resultEqualityCheck:dh}}),r0=e=>e.errorBars,DU=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>D2(r,n)),df=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],u,d;if(n.length>0&&n.forEach(f=>{var h,m=f.data!=null?[...f.data]:s,v=(h=a[f.id])===null||h===void 0?void 0:h.filter(x=>D2(o,x));m.forEach(x=>{var k,w=Nt(x,(k=r.dataKey)!==null&&k!==void 0?k:f.dataKey),E=NU(x,w,v);if(E.length>=2){var P=Math.min(...E),O=Math.max(...E);(u==null||Pd)&&(d=O)}var j=Gk(w);j!=null&&(u=u==null?j[0]:Math.min(u,j[0]),d=d==null?j[1]:Math.max(d,j[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(f=>{var h=Gk(Nt(f,r.dataKey));h!=null&&(u=u==null?h[0]:Math.min(u,h[0]),d=d==null?h[1]:Math.max(d,h[1]))}),ze(u)&&ze(d))return[u,d]},RU=H([e0,ar,AU,r0,It,f6],B2,{memoizeOptions:{resultEqualityCheck:dh}});function $U(e){var t=e.value;if(Cn(t)||t instanceof Date)return t}var LU=(e,t,r)=>{var n=e.map($U).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&ZA(n))?bC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},U2=e=>e.referenceElements.dots,jl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),zU=H([U2,It,ch],jl),W2=e=>e.referenceElements.areas,FU=H([W2,It,ch],jl),H2=e=>e.referenceElements.lines,BU=H([H2,It,ch],jl),K2=(e,t)=>{if(e!=null){var r=Nn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},UU=H(zU,It,K2),V2=(e,t)=>{if(e!=null){var r=Nn(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)]}},WU=H([FU,It],V2);function HU(e){var t;if(e.x!=null)return Nn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Nn(r)}function KU(e){var t;if(e.y!=null)return Nn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Nn(r)}var q2=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?HU(n):KU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},VU=H([BU,It],q2),qU=H(UU,VU,WU,(e,t,r)=>df(e,r,t)),G2=(e,t,r,n,a,o,s,u)=>{if(r!=null)return r;var d=s==="vertical"&&u==="xAxis"||s==="horizontal"&&u==="yAxis",f=d?df(n,o,a):df(o,a);return g6(t,f,e.allowDataOverflow)},GU=H([ar,z2,F2,TU,RU,qU,at,It],G2,{memoizeOptions:{resultEqualityCheck:dh}}),YU=[0,1],Y2=(e,t,r,n,a,o,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var u=e.dataKey,d=e.type,f=In(t,o);if(f&&u==null){var h;return bC(0,(h=r==null?void 0:r.length)!==null&&h!==void 0?h:0)}return d==="category"?LU(n,e,f):a==="expand"&&!f?YU:s}},n0=H([ar,at,e0,Iu,oh,It,GU],Y2),Nl=H([ar,P2,bg],b2),Q2=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=t0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Pn(e)){if(o)return nk(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return ik(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Pn(e))return nk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Pn(e))return ik(e,t.tickCount,t.allowDecimals,"adaptive")}}},i0=H([n0,Nu,Nl],Q2),X2=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Pn(t)&&Array.isArray(r)&&r.length>0){var a,o,s=t[0],u=(a=r[0])!==null&&a!==void 0?a:0,d=t[1],f=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(s,u),Math.max(d,f)]}return t},QU=H([ar,n0,i0,It],X2),XU=H(Iu,ar,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Nn(e.map(m=>m.value))).sort((m,v)=>m-v),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var s=o-a;if(s===0)return 1/0;for(var u=0;ua,(e,t,r,n,a)=>{if(!ze(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var s=ea(r,e*o),u=e*o/2;return u-s-(u-s)/o*s}return 0}),ZU=(e,t,r)=>{var n=si(e,t);return n==null||typeof n.padding!="string"?0:Z2(e,"xAxis",t,r,n.padding)},JU=(e,t,r)=>{var n=ui(e,t);return n==null||typeof n.padding!="string"?0:Z2(e,"yAxis",t,r,n.padding)},e7=H(si,ZU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),t7=H(ui,JU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),J2=H([Ht,e7,Jf,Zf,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),e_=H([Ht,at,t7,Jf,Zf,(e,t,r)=>r],(e,t,r,n,a,o)=>{var s=a.padding;return o?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Mu=(e,t,r,n)=>{var a;switch(t){case"xAxis":return J2(e,r,n);case"yAxis":return e_(e,r,n);case"zAxis":return(a=Jg(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return RC(e);case"radiusAxis":return $C(e,r);default:return}},t_=H([ar,Mu],lh),r7=H([Nl,QU],R6),a0=H([ar,Nl,r7,t_],Zg),r_=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,s=In(e,n);if(s&&(a==="number"||o!=="auto"))return t.map(u=>u.value)}},o0=H([at,Iu,Nu,It],r_),xh=H([a0],Cg);H([a0],mU);H([a0,jU],w2);H([_l,r0,It],DU);function n_(e,t){return e.idt.id?1:0}var bh=(e,t)=>t,wh=(e,t,r)=>r,n7=H(Qf,bh,wh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(n_)),i7=H(Xf,bh,wh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(n_)),i_=(e,t)=>({width:e.width,height:t.height}),a7=(e,t)=>{var r=typeof t.width=="number"?t.width:Su;return{width:r,height:e.height}},o7=H(Ht,si,i_),l7=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},s7=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},u7=H(oi,Ht,n7,bh,wh,(e,t,r,n,a)=>{var o={},s;return r.forEach(u=>{var d=i_(t,u);s==null&&(s=l7(t,n,e));var f=n==="top"&&!a||n==="bottom"&&a;o[u.id]=s-Number(f)*d.height,s+=(f?-1:1)*d.height}),o}),c7=H(ai,Ht,i7,bh,wh,(e,t,r,n,a)=>{var o={},s;return r.forEach(u=>{var d=a7(t,u);s==null&&(s=s7(t,n,e));var f=n==="left"&&!a||n==="right"&&a;o[u.id]=s-Number(f)*d.width,s+=(f?-1:1)*d.width}),o}),d7=(e,t)=>{var r=si(e,t);if(r!=null)return u7(e,r.orientation,r.mirror)},f7=H([Ht,si,d7,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),h7=(e,t)=>{var r=ui(e,t);if(r!=null)return c7(e,r.orientation,r.mirror)},p7=H([Ht,ui,h7,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),m7=H(Ht,ui,(e,t)=>{var r=typeof t.width=="number"?t.width:Su;return{width:r,height:e.height}}),a_=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,s=r.dataKey,u=In(e,n),d=t.map(h=>h.value),f=d.filter(h=>h!=null);if(s&&u&&o==="category"&&a&&ZA(f))return d}},l0=H([at,Iu,ar,It],a_),Yk=H([at,EU,Nl,xh,l0,o0,Mu,i0,It],(e,t,r,n,a,o,s,u,d)=>{if(t!=null){var f=In(e,d);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:d,categoricalDomain:o,duplicateDomain:a,isCategorical:f,niceTicks:u,range:s,realScaleType:r,scale:n}}}),v7=(e,t,r,n,a,o,s,u,d)=>{if(!(t==null||n==null)){var f=In(e,d),h=t.type,m=t.ticks,v=t.tickCount,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=h==="category"&&n.bandwidth?n.bandwidth()/x:0;k=d==="angleAxis"&&o!=null&&o.length>=2?Lr(o[0]-o[1])*2*k:k;var w=m||a;return w?w.map((E,P)=>{var O=s?s.indexOf(E):E,j=n.map(O);return ze(j)?{index:P,coordinate:j+k,value:E,offset:k}:null}).filter(mr):f&&u?u.map((E,P)=>{var O=n.map(E);return ze(O)?{coordinate:O+k,value:E,index:P,offset:k}:null}).filter(mr):n.ticks?n.ticks(v).map((E,P)=>{var O=n.map(E);return ze(O)?{coordinate:O+k,value:E,index:P,offset:k}:null}).filter(mr):n.domain().map((E,P)=>{var O=n.map(E);return ze(O)?{coordinate:O+k,value:s?s[E]:E,index:P,offset:k}:null}).filter(mr)}},o_=H([at,Nu,Nl,xh,i0,Mu,l0,o0,It],v7),y7=(e,t,r,n,a,o,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=In(e,s),d=t.tickCount,f=0;return f=s==="angleAxis"&&(n==null?void 0:n.length)>=2?Lr(n[0]-n[1])*2*f:f,u&&o?o.map((h,m)=>{var v=r.map(h);return ze(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(mr):r.ticks?r.ticks(d).map((h,m)=>{var v=r.map(h);return ze(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(mr):r.domain().map((h,m)=>{var v=r.map(h);return ze(v)?{coordinate:v+f,value:a?a[h]:h,index:m,offset:f}:null}).filter(mr)}},l_=H([at,Nu,xh,Mu,l0,o0,It],y7),s_=H(ar,xh,(e,t)=>{if(!(e==null||t==null))return cf(cf({},e),{},{scale:t})}),g7=H([ar,Nl,n0,t_],Zg),x7=H([g7],Cg);H((e,t,r)=>Jg(e,r),x7,(e,t)=>{if(!(e==null||t==null))return cf(cf({},e),{},{scale:t})});var b7=H([at,Qf,Xf],(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}}),w7=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};H([w7],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var s=Math.abs(o.coordinate-t);se.options.defaultTooltipEventType,c_=e=>e.options.validateTooltipEventTypes;function d_(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Tu(e,t){var r=u_(e),n=c_(e);return d_(t,r,n)}function S7(e){return ke(t=>Tu(t,e))}var f_=(e,t)=>{var r,n=Number(t);if(!(On(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},k7=e=>e.tooltip.settings,zi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},E7={itemInteraction:{click:zi,hover:zi},axisInteraction:{click:zi,hover:zi},keyboardInteraction:zi,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}},h_=Zt({name:"tooltip",initialState:E7,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:tt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=zr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:tt()},removeTooltipEntrySettings:{reducer(e,t){var r=zr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:tt()},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}}}),Vr=h_.actions,P7=Vr.addTooltipEntrySettings,A7=Vr.replaceTooltipEntrySettings,O7=Vr.removeTooltipEntrySettings,C7=Vr.setTooltipSettingsState,_7=Vr.setActiveMouseOverItemIndex;Vr.mouseLeaveItem;var p_=Vr.mouseLeaveChart;Vr.setActiveClickItemIndex;var m_=Vr.setMouseOverAxisIndex,j7=Vr.setMouseClickAxisIndex,zs=Vr.setSyncInteraction,ff=Vr.setKeyboardInteraction,N7=h_.reducer;function Qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fd(e){for(var t=1;t{if(t==null)return zi;var a=D7(e,t,r);if(a==null)return zi;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(R7(a)){if(o)return fd(fd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return fd(fd({},zi),{},{coordinate:a.coordinate})};function $7(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 L7(e,t){var r=$7(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),s=Math.max(n,a);return r>=o&&r<=s}function z7(e,t,r){if(r==null||t==null)return!0;var n=Nt(e,t);return n==null||!Pn(r)?!0:L7(n,r)}var Us=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!ze(o))return a;var s=0,u=1/0;t.length>0&&(u=t.length-1);var d=Math.max(s,Math.min(o,u)),f=t[d];return f==null||z7(f,r,n)?String(d):null},y_=(e,t,r,n,a,o,s)=>{if(o!=null){var u=s[0],d=u==null?void 0:u.getPosition(o);if(d!=null)return d;var f=a==null?void 0:a[Number(o)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},g_=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(s=>{var u;return((u=s.settings)===null||u===void 0?void 0:u.graphicalItemId)===a})},x_=e=>e.options.tooltipPayloadSearcher,Il=e=>e.tooltip;function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zk(e){for(var t=1;te(t)}function Jk(e){if(typeof e=="string")return e}function V7(e){if(!(e==null||typeof e!="object")){var t="name"in e?W7(e.name):void 0,r="unit"in e?H7(e.unit):void 0,n="dataKey"in e?K7(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?Jk(e.color):void 0,s="fill"in e?Jk(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:s}}}function q7(e,t){return e??t}var b_=(e,t,r,n,a,o,s)=>{if(!(t==null||o==null)){var u=r.chartData,d=r.computedData,f=r.dataStartIndex,h=r.dataEndIndex,m=[];return e.reduce((v,x)=>{var k,w=x.dataDefinedOnItem,E=x.settings,P=q7(w,u),O=Array.isArray(P)?KO(P,f,h):P,j=(k=E==null?void 0:E.dataKey)!==null&&k!==void 0?k:n,_=E==null?void 0:E.nameKey,N;if(n&&Array.isArray(O)&&!Array.isArray(O[0])&&s==="axis"?N=JA(O,n,a):N=o(O,t,d,_),Array.isArray(N))N.forEach(D=>{var F,z,q=V7(D),X=q==null?void 0:q.name,B=q==null?void 0:q.dataKey,ue=q==null?void 0:q.payload,Y=Zk(Zk({},E),{},{name:X,unit:q==null?void 0:q.unit,color:(F=q==null?void 0:q.color)!==null&&F!==void 0?F:E==null?void 0:E.color,fill:(z=q==null?void 0:q.fill)!==null&&z!==void 0?z:E==null?void 0:E.fill});v.push(qw({tooltipEntrySettings:Y,dataKey:B,payload:ue,value:Nt(ue,B),name:X==null?void 0:String(X)}))});else{var C;v.push(qw({tooltipEntrySettings:E,dataKey:j,payload:N,value:Nt(N,j),name:(C=Nt(N,_))!==null&&C!==void 0?C:E==null?void 0:E.name}))}return v},m)}},s0=H([Pt,P2,bg],b2),G7=H([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Y7=H([Mt,Ol],A2),to=H([G7,Pt,Y7],C2,{memoizeOptions:{resultEqualityCheck:fh}}),Q7=H([to],e=>e.filter(Og)),w_=H([to],N2,{memoizeOptions:{resultEqualityCheck:fh}}),X7=H([to],e=>e.some(t=>!t.data)),Ya=H([w_,un],M2),Z7=H([Q7,un,Pt],zC),u0=H([Ya,Pt,to,un,X7,w_],T2),S_=H([Pt],t0),J7=H([Pt],e=>e.allowDataOverflow),k_=H([S_,J7],wC),eW=H([to],e=>e.filter(Og)),tW=H([Z7,eW,oh,IC],R2),rW=H([tW,un,Mt,k_],L2),nW=H([to],j2),iW=H([Ya,Pt,nW,r0,Mt,h6],B2,{memoizeOptions:{resultEqualityCheck:dh}}),aW=H([U2,Mt,Ol],jl),oW=H([aW,Mt],K2),lW=H([W2,Mt,Ol],jl),sW=H([lW,Mt],V2),uW=H([H2,Mt,Ol],jl),cW=H([uW,Mt],q2),dW=H([oW,cW,sW],df),fW=H([Pt,S_,k_,rW,iW,dW,at,Mt],G2),gl=H([Pt,at,Ya,u0,oh,Mt,fW],Y2),hW=H([gl,Pt,s0],Q2),pW=H([Pt,gl,hW,Mt],X2),E_=e=>{var t=Mt(e),r=Ol(e),n=!1;return Mu(e,t,r,n)},P_=H([Pt,E_],lh),mW=H([Pt,s0,pW,P_],Zg),A_=H([mW],Cg),vW=H([at,u0,Pt,Mt],a_),yW=H([at,u0,Pt,Mt],r_),gW=(e,t,r,n,a,o,s,u)=>{if(t){var d=t.type,f=In(e,u);if(n){var h=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,m=d==="category"&&n.bandwidth?n.bandwidth()/h:0;return m=u==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Lr(a[0]-a[1])*2*m:m,f&&s?s.map((v,x)=>{var k=n.map(v);return ze(k)?{coordinate:k+m,value:v,index:x,offset:m}:null}).filter(mr):n.domain().map((v,x)=>{var k=n.map(v);return ze(k)?{coordinate:k+m,value:o?o[v]:v,index:x,offset:m}:null}).filter(mr)}}},ci=H([at,Pt,s0,A_,E_,vW,yW,Mt],gW),c0=H([u_,c_,k7],(e,t,r)=>d_(r.shared,e,t)),O_=e=>e.tooltip.settings.trigger,d0=e=>e.tooltip.settings.defaultIndex,Du=H([Il,c0,O_,d0],v_),cu=H([Du,Ya,yl,gl],Us),C_=H([ci,cu],f_),xW=H([Du],e=>{if(e)return e.dataKey}),bW=H([Du],e=>{if(e)return e.graphicalItemId}),__=H([Il,c0,O_,d0],g_),wW=H([ai,oi,at,Ht,ci,d0,__],y_),SW=H([Du,wW],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),kW=H([Du],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),EW=H([__,cu,un,yl,C_,x_,c0],b_),PW=H([EW],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;tke(Pt),jW=()=>{var e=_W(),t=ke(ci),r=ke(A_);return Bd(!e||!r?void 0:tE(tE({},e),{},{scale:r}),t)};function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Do(e){for(var t=1;t{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},DW=(e,t,r,n)=>{var a=t.find(f=>f&&f.index===r);if(a){if(e==="centric"){var o=a.coordinate,s=n.radius;return Do(Do(Do({},n),Bt(n.cx,n.cy,s,o)),{},{angle:o,radius:s})}var u=a.coordinate,d=n.angle;return Do(Do(Do({},n),Bt(n.cx,n.cy,u,d)),{},{angle:d,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function RW(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 j_=(e,t,r,n,a)=>{var o,s=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var u=0;u0?(d=r[u-1])===null||d===void 0?void 0:d.coordinate:(f=r[s-1])===null||f===void 0?void 0:f.coordinate,k=(h=r[u])===null||h===void 0?void 0:h.coordinate,w=u>=s-1?(m=r[0])===null||m===void 0?void 0:m.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,E=void 0;if(!(x==null||k==null||w==null))if(Lr(k-x)!==Lr(w-k)){var P=[];if(Lr(w-k)===Lr(a[1]-a[0])){E=w;var O=k+a[1]-a[0];P[0]=Math.min(O,(O+x)/2),P[1]=Math.max(O,(O+x)/2)}else{E=x;var j=w+a[1]-a[0];P[0]=Math.min(k,(j+k)/2),P[1]=Math.max(k,(j+k)/2)}var _=[Math.min(k,(E+k)/2),Math.max(k,(E+k)/2)];if(e>_[0]&&e<=_[1]||e>=P[0]&&e<=P[1]){var N;return(N=r[u])===null||N===void 0?void 0:N.index}}else{var C=Math.min(x,w),D=Math.max(x,w);if(e>(C+k)/2&&e<=(D+k)/2){var F;return(F=r[u])===null||F===void 0?void 0:F.index}}}else if(t)for(var z=0;z(q.coordinate+B.coordinate)/2||z>0&&z(q.coordinate+B.coordinate)/2&&e<=(q.coordinate+X.coordinate)/2)return q.index}}return-1},N_=()=>ke(bg),f0=(e,t)=>t,I_=(e,t,r)=>r,h0=(e,t,r,n)=>n,$W=H(ci,e=>zf(e,t=>t.coordinate)),p0=H([Il,f0,I_,h0],v_),m0=H([p0,Ya,yl,gl],Us),LW=(e,t,r)=>{if(t!=null){var n=Il(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},M_=H([Il,f0,I_,h0],g_),hf=H([ai,oi,at,Ht,ci,h0,M_],y_),zW=H([p0,hf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),T_=H([ci,m0],f_),FW=H([M_,m0,un,yl,T_,x_,f0],b_),BW=H([p0,m0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),UW=(e,t,r,n,a,o,s)=>{if(!(!e||!r||!n||!a)&&RW(e,s)){var u=t4(e,t),d=j_(u,o,a,r,n),f=TW(t,a,d,e);return{activeIndex:String(d),activeCoordinate:f}}},WW=(e,t,r,n,a,o,s)=>{if(!(!e||!n||!a||!o||!r)){var u=i6(e,r);if(u){var d=r4(u,t),f=j_(d,s,o,n,a),h=DW(t,o,f,u);return{activeIndex:String(f),activeCoordinate:h}}}},HW=(e,t,r,n,a,o,s,u)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?UW(e,t,n,a,o,s,u):WW(e,t,r,n,a,o,s)},KW=H(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}}),VW=H(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(rr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:D6}});function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iE(e){for(var t=1;tiE(iE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),QW)},ZW=new Set(Object.values(rr));function JW(e){return ZW.has(e)}var D_=Zt({name:"zIndex",initialState:XW,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:tt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!JW(r)&&delete e.zIndexMap[r])},prepare:tt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:tt()},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:tt()}}}),Sh=D_.actions,e9=Sh.registerZIndexPortal,nv=Sh.unregisterZIndexPortal,t9=Sh.registerZIndexPortalElement,r9=Sh.unregisterZIndexPortalElement,n9=D_.reducer;function di(e){var t=e.zIndex,r=e.children,n=F4(),a=n&&t!==void 0&&t!==0,o=gr(),s=g.useRef(void 0),u=g.useRef(new Set),d=xt(),f=ke(m=>KW(m,t,o));if(g.useLayoutEffect(()=>{if(!a){var m=u.current;m.forEach(x=>{d(nv({zIndex:x}))}),m.clear(),s.current=void 0;return}if(u.current.has(t)||(d(e9({zIndex:t})),u.current.add(t)),f){s.current=f;var v=u.current;v.forEach(x=>{x!==t&&(d(nv({zIndex:x})),v.delete(x))})}},[d,t,a,f]),g.useLayoutEffect(()=>{var m=u.current;return()=>{m.forEach(v=>{d(nv({zIndex:v}))}),m.clear()}},[d]),!a)return r;var h=f??s.current;return h?_f.createPortal(r,h):null}function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.useContext(R_),iv={exports:{}},oE;function d9(){return oE||(oE=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(d,f,h){this.fn=d,this.context=f,this.once=h||!1}function o(d,f,h,m,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var x=new a(h,m||d,v),k=r?r+f:f;return d._events[k]?d._events[k].fn?d._events[k]=[d._events[k],x]:d._events[k].push(x):(d._events[k]=x,d._eventsCount++),d}function s(d,f){--d._eventsCount===0?d._events=new n:delete d._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],h,m;if(this._eventsCount===0)return f;for(m in h=this._events)t.call(h,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},u.prototype.listeners=function(f){var h=r?r+f:f,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var v=0,x=m.length,k=new Array(x);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!On(r))return e[r]}},m9={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},$_=Zt({name:"options",initialState:m9,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),v9=$_.reducer,y9=$_.actions.createEventEmitter;function g9(e){return e.tooltip.syncInteraction}var x9={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},L_=Zt({name:"chartData",initialState:x9,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),v0=L_.actions,sE=v0.setChartData,b9=v0.setDataStartEndIndexes;v0.setComputedData;var w9=L_.reducer,S9=["x","y"];function uE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ro(e){for(var t=1;td.rootProps.className);g.useEffect(()=>{if(e==null)return kl;var d=(f,h,m)=>{if(t!==m&&e===f){if(h.payload.active===!1){r(zs({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(s&&h!==null&&h!==void 0&&(v=h.payload)!==null&&v!==void 0&&v.coordinate&&h.payload.sourceViewBox){var x=h.payload.coordinate,k=x.x,w=x.y,E=A9(x,S9),P=h.payload.sourceViewBox,O=P.x,j=P.y,_=P.width,N=P.height,C=Ro(Ro({},E),{},{x:s.x+(_?(k-O)/_:0)*s.width,y:s.y+(N?(w-j)/N:0)*s.height});r(Ro(Ro({},h),{},{payload:Ro(Ro({},h.payload),{},{coordinate:C})}))}else r(h);return}if(a!=null){var D;if(typeof n=="function"){var F={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},z=n(a,F);D=a[z]}else n==="value"&&(D=a.find(de=>String(de.value)===h.payload.label));var q=h.payload.coordinate;if(q==null||s==null){r(zs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(zs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:void 0}));return}var X=q.x,B=q.y,ue=Math.min(X,s.x+s.width),Y=Math.min(B,s.y+s.height),le={x:o==="horizontal"?D.coordinate:ue,y:o==="horizontal"?Y:D.coordinate},fe=zs({active:h.payload.active,coordinate:le,dataKey:h.payload.dataKey,index:String(D.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});r(fe)}}};return du.on(by,d),()=>{du.off(by,d)}},[u,r,t,e,n,a,o,s])}function _9(){var e=ke(wg),t=ke(Sg),r=xt();g.useEffect(()=>{if(e==null)return kl;var n=(a,o,s)=>{t!==s&&e===a&&r(b9(o))};return du.on(lE,n),()=>{du.off(lE,n)}},[r,t,e])}function j9(){var e=xt();g.useEffect(()=>{e(y9())},[e]),C9(),_9()}function N9(e,t,r,n,a,o){var s=ke(k=>LW(k,e,t)),u=ke(bW),d=ke(Sg),f=ke(wg),h=ke(MC),m=ke(g9),v=(m==null?void 0:m.sourceViewBox)!=null,x=eh();g.useEffect(()=>{if(!v&&f!=null&&d!=null){var k=zs({active:o,coordinate:r,dataKey:s,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:u});du.emit(by,f,k,d)}},[v,r,s,u,a,n,d,f,h,o,x])}function cE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dE(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{D(C7({shared:O,trigger:j,axisId:C,active:a,defaultIndex:F}))},[D,O,j,C,a,F]);var z=eh(),q=fC(),X=S7(O),B=(t=ke(Pe=>BW(Pe,X,j,F)))!==null&&t!==void 0?t:{},ue=B.activeIndex,Y=B.isActive,le=ke(Pe=>FW(Pe,X,j,F)),fe=ke(Pe=>T_(Pe,X,j,F)),de=ke(Pe=>zW(Pe,X,j,F)),K=le,ie=c9(),Q=(r=a??Y)!==null&&r!==void 0?r:!1,R=BL([K,Q]),M=D9(R,2),J=M[0],se=M[1],te=X==="axis"?fe:void 0;N9(X,j,de,te,ue,Q);var ce=N??ie;if(ce==null||z==null||X==null)return null;var ye=K??hE;Q||(ye=hE),f&&ye.length&&(ye=cL(ye.filter(Pe=>Pe.value!=null&&(Pe.hide!==!0||n.includeHidden)),v,F9));var _e=ye.length>0,Z=dE(dE({},n),{},{payload:ye,label:te,active:Q,activeIndex:ue,coordinate:de,accessibilityLayer:q}),we=g.createElement(Zz,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:h,active:Q,coordinate:de,hasPayload:_e,offset:m,position:x,reverseDirection:k,useTranslate3d:w,viewBox:z,wrapperStyle:E,lastBoundingBox:J,innerRef:se,hasPortalFromProps:!!N},B9(d,Z));return g.createElement(g.Fragment,null,_f.createPortal(we,ce),Q&&g.createElement(u9,{cursor:P,tooltipEventType:X,coordinate:de,payload:ye,index:ue}))}function H9(e,t,r){return(t=K9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K9(e){var t=V9(e,"string");return typeof t=="symbol"?t:t+""}function V9(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 q9{constructor(t){H9(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 pE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function G9(e){for(var t=1;t{try{var r=document.getElementById(vE);r||(r=document.createElement("span"),r.setAttribute("id",vE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,J9,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ws=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Au.isSsr)return{width:0,height:0};if(!z_.enableCache)return yE(t,r);var n=eH(t,r),a=mE.get(n);if(a)return a;var o=yE(t,r);return mE.set(n,o),o},F_;function pf(e,t){return iH(e)||nH(e,t)||rH(e,t)||tH()}function tH(){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 rH(e,t){if(e){if(typeof e=="string")return gE(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)?gE(e,t):void 0}}function gE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Ut(t)||(r?a=t.toString().split(""):a=t.toString().split(U_));var o=a.map(u=>({word:u,width:Ws(u,n).width})),s=r?0:Ws(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function H_(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function EH(e){return Ut(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var K_=(e,t,r,n)=>e.reduce((a,o)=>{var s=o.word,u=o.width,d=a[a.length-1];if(d&&u!=null&&(t==null||n||d.width+u+re.reduce((t,r)=>t.width>r.width?t:r),PH="…",PE=(e,t,r,n,a,o,s,u)=>{var d=e.slice(0,t),f=W_({breakAll:r,style:n,children:d+PH});if(!f)return[!1,[]];var h=K_(f.wordsWithComputedWidth,o,s,u),m=h.length>a||V_(h).width>Number(o);return[m,h]},AH=(e,t,r,n,a)=>{var o=e.maxLines,s=e.children,u=e.style,d=e.breakAll,f=be(o),h=String(s),m=K_(t,n,r,a);if(!f||a)return m;var v=m.length>o||V_(m).width>Number(n);if(!v)return m;for(var x=0,k=h.length-1,w=0,E;x<=k&&w<=h.length-1;){var P=Math.floor((x+k)/2),O=P-1,j=PE(h,O,d,u,o,n,r,a),_=kE(j,2),N=_[0],C=_[1],D=PE(h,P,d,u,o,n,r,a),F=kE(D,1),z=F[0];if(!N&&!z&&(x=P+1),N&&z&&(k=P-1),!N&&z){E=C;break}w++}return E||m},AE=e=>{var t=Ut(e)?[]:e.toString().split(U_);return[{words:t,width:void 0}]},OH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,s=e.maxLines;if((t||r)&&!Au.isSsr){var u,d,f=W_({breakAll:o,children:n,style:a});if(f){var h=f.wordsWithComputedWidth,m=f.spaceWidth;u=h,d=m}else return AE(n);return AH({breakAll:o,children:n,maxLines:s,style:a},u,d,t,!!r)}return AE(n)},q_="#808080",CH={angle:0,breakAll:!1,capHeight:"0.71em",fill:q_,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},y0=g.forwardRef((e,t)=>{var r=Hr(e,CH),n=r.x,a=r.y,o=r.lineHeight,s=r.capHeight,u=r.fill,d=r.scaleToFit,f=r.textAnchor,h=r.verticalAnchor,m=SE(r,yH),v=g.useMemo(()=>OH({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:d,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,d,m.style,m.width]),x=m.dx,k=m.dy,w=m.angle,E=m.className,P=m.breakAll,O=SE(m,gH);if(!Cn(n)||!Cn(a)||v.length===0)return null;var j=Number(n)+(be(x)?x:0),_=Number(a)+(be(k)?k:0);if(!ze(j)||!ze(_))return null;var N;switch(h){case"start":N=av("calc(".concat(s,")"));break;case"middle":N=av("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:N=av("calc(".concat(v.length-1," * -").concat(o,")"));break}var C=[],D=v[0];if(d&&D!=null){var F=D.width,z=m.width;C.push("scale(".concat(be(z)&&be(F)?z/F:1,")"))}return w&&C.push("rotate(".concat(w,", ").concat(j,", ").concat(_,")")),C.length&&(O.transform=C.join(" ")),g.createElement("text",wy({},Br(O),{ref:t,x:j,y:_,className:Qe("recharts-text",E),textAnchor:f,fill:u.includes("url")?q_:u}),v.map((q,X)=>{var B=q.words.join(P?"":" ");return g.createElement("tspan",{x:j,dy:X===0?N:o,key:"".concat(B,"-").concat(X)},B)}))});y0.displayName="Text";function OE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,s=dg(t),u=s.x,d=s.y,f=s.height,h=s.upperWidth,m=s.lowerWidth,v=u,x=u+(h-m)/2,k=(v+x)/2,w=(h+m)/2,E=v+h/2,P=f>=0?1:-1,O=P*a,j=P>0?"end":"start",_=P>0?"start":"end",N=h>=0?1:-1,C=N*a,D=N>0?"end":"start",F=N>0?"start":"end",z=o;if(r==="top"){var q={x:v+h/2,y:d-O,horizontalAnchor:"middle",verticalAnchor:j};return z&&(q.height=Math.max(d-z.y,0),q.width=h),q}if(r==="bottom"){var X={x:x+m/2,y:d+f+O,horizontalAnchor:"middle",verticalAnchor:_};return z&&(X.height=Math.max(z.y+z.height-(d+f),0),X.width=m),X}if(r==="left"){var B={x:k-C,y:d+f/2,horizontalAnchor:D,verticalAnchor:"middle"};return z&&(B.width=Math.max(B.x-z.x,0),B.height=f),B}if(r==="right"){var ue={x:k+w+C,y:d+f/2,horizontalAnchor:F,verticalAnchor:"middle"};return z&&(ue.width=Math.max(z.x+z.width-ue.x,0),ue.height=f),ue}var Y=z?{width:w,height:f}:{};return r==="insideLeft"?gn({x:k+C,y:d+f/2,horizontalAnchor:F,verticalAnchor:"middle"},Y):r==="insideRight"?gn({x:k+w-C,y:d+f/2,horizontalAnchor:D,verticalAnchor:"middle"},Y):r==="insideTop"?gn({x:v+h/2,y:d+O,horizontalAnchor:"middle",verticalAnchor:_},Y):r==="insideBottom"?gn({x:x+m/2,y:d+f-O,horizontalAnchor:"middle",verticalAnchor:j},Y):r==="insideTopLeft"?gn({x:v+C,y:d+O,horizontalAnchor:F,verticalAnchor:_},Y):r==="insideTopRight"?gn({x:v+h-C,y:d+O,horizontalAnchor:D,verticalAnchor:_},Y):r==="insideBottomLeft"?gn({x:x+C,y:d+f-O,horizontalAnchor:F,verticalAnchor:j},Y):r==="insideBottomRight"?gn({x:x+m-C,y:d+f-O,horizontalAnchor:D,verticalAnchor:j},Y):r&&typeof r=="object"&&(be(r.x)||Ha(r.x))&&(be(r.y)||Ha(r.y))?gn({x:u+ea(r.x,w),y:d+ea(r.y,f),horizontalAnchor:"end",verticalAnchor:"end"},Y):gn({x:E,y:d+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},Y)},MH=["labelRef"],TH=["content"];function CE(e,t){if(e==null)return{};var r,n,a=DH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,s=e.height,u=e.children,d=g.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:s}),[t,r,n,a,o,s]);return g.createElement(G_.Provider,{value:d},u)},Y_=()=>{var e=g.useContext(G_),t=eh();return e||(t?dg(t):void 0)},FH=g.createContext(null),BH=()=>{var e=g.useContext(FH),t=ke(LC);return e||t},UH=e=>{var t=e.value,r=e.formatter,n=Ut(e.children)?t:e.children;return typeof r=="function"?r(n):n},g0=e=>e!=null&&typeof e=="function",WH=(e,t)=>{var r=Lr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},HH=(e,t,r,n,a)=>{var o=e.offset,s=e.className,u=a.cx,d=a.cy,f=a.innerRadius,h=a.outerRadius,m=a.startAngle,v=a.endAngle,x=a.clockWise,k=(f+h)/2,w=WH(m,v),E=w>=0?1:-1,P,O;switch(t){case"insideStart":P=m+E*o,O=x;break;case"insideEnd":P=v-E*o,O=!x;break;case"end":P=v+E*o,O=x;break;default:throw new Error("Unsupported position ".concat(t))}O=w<=0?O:!O;var j=Bt(u,d,k,P),_=Bt(u,d,k,P+(O?1:-1)*359),N="M".concat(j.x,",").concat(j.y,` A`).concat(k,",").concat(k,",0,1,").concat(O?0:1,`, `).concat(_.x,",").concat(_.y),C=Ut(e.id)?Xs("recharts-radial-line-"):e.id;return g.createElement("text",qn({},n,{dominantBaseline:"central",className:Qe("recharts-radial-bar-label",s)}),g.createElement("defs",null,g.createElement("path",{id:C,d:N})),g.createElement("textPath",{xlinkHref:"#".concat(C)},r))},KH=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,s=e.outerRadius,u=e.startAngle,d=e.endAngle,f=(u+d)/2;if(r==="outside"){var h=Bt(n,a,s+t,f),m=h.x,v=h.y;return{x:m,y:v,textAnchor:m>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var x=(o+s)/2,k=Bt(n,a,x,f),w=k.x,E=k.y;return{x:w,y:E,textAnchor:"middle",verticalAnchor:"middle"}},Ed=e=>e!=null&&"cx"in e&&be(e.cx),VH={angle:0,offset:5,zIndex:rr.label,position:"middle",textBreakAll:!1};function qH(e){if(!Ed(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function Li(e){var t=Hr(e,VH),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,s=t.children,u=t.content,d=t.className,f=d===void 0?"":d,h=t.textBreakAll,m=t.labelRef,v=BH(),x=Y_(),k=a==="center"?x:v??x,w,E,P;r==null?w=k:Ed(r)?w=r:w=dg(r);var O=qH(w);if(!w||Ut(o)&&Ut(s)&&!g.isValidElement(u)&&typeof u!="function")return null;var j=Fs(Fs({},t),{},{viewBox:w});if(g.isValidElement(u)){j.labelRef;var _=CE(j,MH);return g.cloneElement(u,_)}if(typeof u=="function"){j.content;var N=CE(j,TH);if(E=g.createElement(u,N),g.isValidElement(E))return E}else E=UH(t);var C=Br(t);if(Ed(w)){if(a==="insideStart"||a==="insideEnd"||a==="end")return HH(t,a,E,C,w);P=KH(w,t.offset,t.position)}else{if(!O)return null;var D=IH({viewBox:O,position:a,offset:t.offset,parentViewBox:Ed(n)?void 0:n});P=Fs(Fs({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 g.createElement(di,{zIndex:t.zIndex},g.createElement(y0,qn({ref:m,className:Qe("recharts-label",f)},C,P,{textAnchor:H_(C.textAnchor)?C.textAnchor:P.textAnchor,breakAll:h}),E))}Li.displayName="Label";var GH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?g.createElement(Li,qn({key:"label-implicit"},n)):Cn(e)?g.createElement(Li,qn({key:"label-implicit",value:e},n)):g.isValidElement(e)?e.type===Li?g.cloneElement(e,Fs({key:"label-implicit"},n)):g.createElement(Li,qn({key:"label-implicit",content:e},n)):g0(e)?g.createElement(Li,qn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?g.createElement(Li,qn({},e,{key:"label-implicit"},n)):null};function YH(e){var t=e.label,r=e.labelRef,n=Y_();return GH(t,n,r)||null}var QH=["valueAccessor"],XH=["dataKey","clockWise","id","textBreakAll","zIndex"];function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(EH(t))return t},Q_=g.createContext(void 0),eK=Q_.Provider,X_=g.createContext(void 0);X_.Provider;function tK(){return g.useContext(Q_)}function rK(){return g.useContext(X_)}function Pd(e){var t=e.valueAccessor,r=t===void 0?JH:t,n=jE(e,QH),a=n.dataKey;n.clockWise;var o=n.id,s=n.textBreakAll,u=n.zIndex,d=jE(n,XH),f=tK(),h=rK(),m=f||h;return!m||!m.length?null:g.createElement(di,{zIndex:u??rr.label},g.createElement(Ur,{className:"recharts-label-list"},m.map((v,x)=>{var k,w=Ut(a)?r(v,x):Nt(v.payload,a),E=Ut(o)?{}:{id:"".concat(o,"-").concat(x)};return g.createElement(Li,mf({key:"label-".concat(x)},Br(v),d,E,{fill:(k=n.fill)!==null&&k!==void 0?k:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:s,viewBox:v.viewBox,index:x,zIndex:0}))})))}Pd.displayName="LabelList";function nK(e){var t=e.label;return t?t===!0?g.createElement(Pd,{key:"labelList-implicit"}):g.isValidElement(t)||g0(t)?g.createElement(Pd,{key:"labelList-implicit",content:t}):typeof t=="object"?g.createElement(Pd,mf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Sy(){return Sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=Qe("recharts-dot",a);return be(t)&&be(r)&&be(n)?g.createElement("circle",Sy({},on(e),tg(e),{className:o,cx:t,cy:r,r:n})):null},iK={radiusAxis:{},angleAxis:{}},J_=Zt({name:"polarAxis",initialState:iK,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]}}}),kh=J_.actions;kh.addRadiusAxis;kh.removeRadiusAxis;kh.addAngleAxis;kh.removeAngleAxis;var aK=J_.reducer;function oK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var ej=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function NE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function IE(e){for(var t=1;t{n||(a.current===null?r(P7(t)):a.current!==t&&r(A7({prev:a.current,next:t})),a.current=t)},[t,r,n]),g.useLayoutEffect(()=>()=>{a.current&&(r(O7(a.current)),a.current=null)},[r]),null}function vK(e){var t=e.legendPayload,r=xt(),n=gr(),a=g.useRef(null);return g.useLayoutEffect(()=>{n||(a.current===null?r(J4(t)):a.current!==t&&r(ez({prev:a.current,next:t})),a.current=t)},[r,n,t]),g.useLayoutEffect(()=>()=>{a.current&&(r(tz(a.current)),a.current=null)},[r]),null}function yK(e,t){return wK(e)||bK(e,t)||xK(e,t)||gK()}function gK(){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 xK(e,t){if(e){if(typeof e=="string")return ME(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)?ME(e,t):void 0}}function ME(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;oe[Math.floor(o*r)]);return b0(n,t)}function EK(e,t){var r=t.map((n,a)=>e[a]);return b0(r,t)}function PK(e,t){for(var r=new Map,n=0;n{var x=r(m,v);if(x!=null){var k=n.get(x);if(k!==void 0)return a.add(x),k}}),s=[];for(var u of n){var d=yK(u,2),f=d[0],h=d[1];a.has(f)||s.push(h)}return b0(o,t,s)}function ky(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===x0?kK(e,t):r===SK?EK(e,t):AK(e,t,r)}function rj(e,t){var r=g.useRef(e),n=g.useRef(t.current),a=g.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=g.useCallback(function(s,u){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){a.current=!0;return}u===1&&(n.current=s),u>0&&a.current&&d&&(t.current=s)},[t]);return{startValue:n.current,syncStepValue:o}}function OK(e,t){return NK(e)||jK(e,t)||_K(e,t)||CK()}function CK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(e,t){if(e){if(typeof e=="string")return TE(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)?TE(e,t):void 0}}function TE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),u=g.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:s,handleAnimationEnd:u}}function MK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,s=e.isAnimationActive,u=e.animationBegin,d=e.animationDuration,f=e.animationEasing,h=e.onAnimationStart,m=e.onAnimationEnd,v=e.animationInterpolateFn,x=e.animationMatchBy,k=e.shouldUpdatePreviousRef,w=e.children,E=e.layout,P=yC(r,n),O=rj(P,o),j=(t=O.startValue)!==null&&t!==void 0?t:null,_=ky(j,a,x??x0);return g.createElement(vC,{animationId:P,begin:u,duration:d,isActive:s,easing:f,onAnimationEnd:m,onAnimationStart:h,key:P},N=>{var C=j==null,D=a==null?a:v(_,N,E),F=k?k(N):N>0;return O.syncStepValue(D,N,F),D==null?null:w(D,N,C)})}var ov;function TK(e,t){return LK(e)||$K(e,t)||RK(e,t)||DK()}function DK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RK(e,t){if(e){if(typeof e=="string")return DE(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)?DE(e,t):void 0}}function DE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=g.useState(()=>Xs("uid-")),t=TK(e,1),r=t[0];return r},nj=(ov=Ef.useId)!==null&&ov!==void 0?ov:zK;function FK(e,t){var r=nj();return t||(e?"".concat(e,"-").concat(r):r)}var BK=g.createContext(void 0),UK=e=>{var t=e.id,r=e.type,n=e.children,a=FK("recharts-".concat(r),t);return g.createElement(BK.Provider,{value:a},n(a))},WK={cartesianItems:[],polarItems:[]},ij=Zt({name:"graphicalItems",initialState:WK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:tt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=zr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:tt()},removeCartesianGraphicalItem:{reducer(e,t){var r=zr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:tt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:tt()},removePolarGraphicalItem:{reducer(e,t){var r=zr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:tt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=zr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:tt()}}}),Ml=ij.actions,HK=Ml.addCartesianGraphicalItem,KK=Ml.replaceCartesianGraphicalItem,VK=Ml.removeCartesianGraphicalItem;Ml.addPolarGraphicalItem;Ml.removePolarGraphicalItem;Ml.replacePolarGraphicalItem;var qK=ij.reducer,GK=e=>{var t=xt(),r=g.useRef(null);return g.useLayoutEffect(()=>{r.current===null?t(HK(e)):r.current!==e&&t(KK({prev:r.current,next:e})),r.current=e},[t,e]),g.useLayoutEffect(()=>()=>{r.current&&(t(VK(r.current)),r.current=null)},[t]),null},YK=g.memo(GK),QK=["points"];function RE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lv(e){for(var t=1;t{var P,O,j=lv(lv(lv({r:3},s),v),{},{index:E,cx:(P=w.x)!==null&&P!==void 0?P:void 0,cy:(O=w.y)!==null&&O!==void 0?O:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return g.createElement(rV,{key:"dot-".concat(E),option:r,dotProps:j,className:a})}),k={};return u&&d!=null&&(k.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(d,")")),g.createElement(di,{zIndex:h},g.createElement(Ur,vf({className:n},k),x))}function $E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LE(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),gV=H([yV,ai,oi],(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)}}),w0=()=>ke(gV),xV=()=>ke(PW);function zE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sv(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,s=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var u={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},d=sv(sv(sv({},u),Rf(a)),tg(a)),f;return g.isValidElement(a)?f=g.cloneElement(a,d):typeof a=="function"?f=a(d):f=g.createElement(Z_,d),g.createElement(Ur,{className:"recharts-active-dot",clipPath:s},f)};function FE(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,s=e.zIndex,u=s===void 0?rr.activeDot:s,d=ke(cu),f=xV();if(t==null||f==null)return null;var h=t.find(m=>f.includes(m.payload));return Ut(h)?null:g.createElement(di,{zIndex:u},g.createElement(kV,{point:h,childIndex:Number(d),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var EV=e=>{var t=e.chartData,r=xt(),n=gr();return g.useEffect(()=>n?()=>{}:(r(sE(t)),()=>{r(sE(void 0))}),[t,r,n]),null},BE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},lj=Zt({name:"brush",initialState:BE,reducers:{setBrushSettings(e,t){return t.payload==null?BE:t.payload}}});lj.actions.setBrushSettings;var PV=lj.reducer;function AV(e){return(e%180+180)%180}var OV=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=AV(a),s=o*Math.PI/180,u=Math.atan(n/r),d=s>u&&s{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=zr(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=zr(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=zr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),Tl=sj.actions;Tl.addDot;Tl.removeDot;Tl.addArea;Tl.removeArea;Tl.addLine;Tl.removeLine;var _V=sj.reducer;function jV(e,t){return TV(e)||MV(e,t)||IV(e,t)||NV()}function NV(){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 IV(e,t){if(e){if(typeof e=="string")return UE(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)?UE(e,t):void 0}}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=g.useState("".concat(Xs("recharts"),"-clip")),n=jV(r,1),a=n[0],o=w0();if(o==null)return null;var s=o.x,u=o.y,d=o.width,f=o.height;return g.createElement(DV.Provider,{value:a},g.createElement("defs",null,g.createElement("clipPath",{id:a},g.createElement("rect",{x:s,y:u,height:f,width:d}))),t)};function uj(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function zV(e,t){return uj(e,t+1)}function FV(e,t,r,n,a){for(var o=(n||[]).slice(),s=t.start,u=t.end,d=0,f=1,h=s,m=function(){var k=n==null?void 0:n[d];if(k===void 0)return{v:uj(n,f)};var w=d,E,P=()=>(E===void 0&&(E=r(k,w)),E),O=k.coordinate,j=d===0||fu(e,O,P,h,u);j||(d=0,h=s,f+=1),j&&(h=O+e*(P()/2+a),d+=f)},v;f<=o.length;)if(v=m(),v)return v.v;return[]}function BV(e,t,r,n,a){var o=(n||[]).slice(),s=o.length;if(s===0)return[];for(var u=t.start,d=t.end,f=1;f<=s;f++){for(var h=(s-1)%f,m=u,v=!0,x=function(){var _=n[w];if(_==null)return 0;var N=w,C,D=()=>(C===void 0&&(C=r(_,N)),C),F=_.coordinate,z=w===h||fu(e,F,D,m,d);if(!z)return v=!1,1;z&&(m=F+e*(D()/2+a))},k,w=h;w(w===void 0&&(w=r(x,v)),w);if(v===s-1){var P=e*(k.coordinate+e*E()/2-d);o[v]=k=Qt(Qt({},k),{},{tickCoord:P>0?k.coordinate-P*e:k.coordinate})}else o[v]=k=Qt(Qt({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var O=fu(e,k.tickCoord,E,u,d);O&&(d=k.tickCoord-e*(E()/2+a),o[v]=Qt(Qt({},k),{},{isShow:!0}))}},h=s-1;h>=0;h--)f(h);return o}function VV(e,t,r,n,a,o){var s=(n||[]).slice(),u=s.length,d=t.start,f=t.end;if(o){var h=n[u-1];if(h!=null){var m=r(h,u-1),v=e*(h.coordinate+e*m/2-f);if(s[u-1]=h=Qt(Qt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate}),h.tickCoord!=null){var x=fu(e,h.tickCoord,()=>m,d,f);x&&(f=h.tickCoord-e*(m/2+a),s[u-1]=Qt(Qt({},h),{},{isShow:!0}))}}}for(var k=o?u-1:u,w=function(O){var j=s[O];if(j==null)return 1;var _=j,N,C=()=>(N===void 0&&(N=r(j,O)),N);if(O===0){var D=e*(_.coordinate-e*C()/2-d);s[O]=_=Qt(Qt({},_),{},{tickCoord:D<0?_.coordinate-D*e:_.coordinate})}else s[O]=_=Qt(Qt({},_),{},{tickCoord:_.coordinate});if(_.tickCoord!=null){var F=fu(e,_.tickCoord,C,d,f);F&&(d=_.tickCoord+e*(C()/2+a),s[O]=Qt(Qt({},_),{},{isShow:!0}))}},E=0;E{var D=typeof f=="function"?f(N.value,C):N.value;return k==="width"?$V(Ws(D,{fontSize:t,letterSpacing:r}),w,m):Ws(D,{fontSize:t,letterSpacing:r})[k]},P=a[0],O=a[1],j=a.length>=2&&P!=null&&O!=null?Lr(O.coordinate-P.coordinate):1,_=LV(o,j,k);return d==="equidistantPreserveStart"?FV(j,_,E,a,s):d==="equidistantPreserveEnd"?BV(j,_,E,a,s):(d==="preserveStart"||d==="preserveStartEnd"?x=VV(j,_,E,a,s,d==="preserveStartEnd"):x=KV(j,_,E,a,s),x.filter(N=>N.isShow))}var qV=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,s=o===void 0?0:o,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(x=>{if(x){var k=x.getBoundingClientRect();k.width>f&&(f=k.width)}});var h=r?r.getBoundingClientRect().width:0,m=s+d,v=f+m+h+(r?a:0);return Math.round(v)}return 0},GV={xAxis:{},yAxis:{}},cj=Zt({name:"renderedTicks",initialState:GV,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),dj=cj.actions,YV=dj.setRenderedTicks,QV=dj.removeRenderedTicks,XV=cj.reducer,ZV=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function HE(e,t){return rq(e)||tq(e,t)||eq(e,t)||JV()}function JV(){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 eq(e,t){if(e){if(typeof e=="string")return KE(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)?KE(e,t):void 0}}function KE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return kl;var o=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return a(YV({ticks:o,axisId:n,axisType:r})),()=>{a(QV({axisId:n,axisType:r}))}},[a,t,n,r]),null}var pq=g.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,s=e.stroke,u=e.tickFormatter,d=e.unit,f=e.padding,h=e.tickTextProps,m=e.orientation,v=e.mirror,x=e.x,k=e.y,w=e.width,E=e.height,P=e.tickSize,O=e.tickMargin,j=e.fontSize,_=e.letterSpacing,N=e.getTicksConfig,C=e.events,D=e.axisType,F=e.axisId,z=S0(ht(ht({},N),{},{ticks:n}),j,_),q=on(N),X=Rf(a),B=H_(q.textAnchor)?q.textAnchor:cq(m,v),ue=dq(m,v),Y={};typeof o=="object"&&(Y=o);var le=ht(ht({},q),{},{fill:"none"},Y),fe=z.map(ie=>ht({entry:ie},uq(ie,x,k,w,E,m,P,v,O))),de=fe.map(ie=>{var Q=ie.entry,R=ie.line;return g.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},o&&g.createElement("line",Qa({},le,R,{className:Qe("recharts-cartesian-axis-tick-line",Za(o,"className"))})))}),K=fe.map((ie,Q)=>{var R,M,J=ie.entry,se=ie.tick,te=ht(ht(ht(ht({verticalAnchor:ue},q),{},{textAnchor:B,stroke:"none",fill:s},se),{},{index:Q,payload:J,visibleTicksCount:z.length,tickFormatter:u,padding:f},h),{},{angle:(R=(M=h==null?void 0:h.angle)!==null&&M!==void 0?M:q.angle)!==null&&R!==void 0?R:0}),ce=ht(ht({},te),X);return g.createElement(Ur,Qa({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},g3(C,J,Q)),a&&g.createElement(fq,{option:a,tickProps:ce,value:"".concat(typeof u=="function"?u(J.value,Q):J.value).concat(d||"")}))});return g.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},g.createElement(hq,{ticks:z,axisId:F,axisType:D}),K.length>0&&g.createElement(di,{zIndex:rr.label},g.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},K)),de.length>0&&g.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},de))}),mq=g.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,s=e.hide,u=e.ticks,d=e.axisType,f=e.axisId,h=nq(e,ZV),m=g.useState(""),v=HE(m,2),x=v[0],k=v[1],w=g.useState(""),E=HE(w,2),P=E[0],O=E[1],j=g.useRef(null);g.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var N;return qV({ticks:j.current,label:(N=e.labelRef)===null||N===void 0?void 0:N.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var _=g.useCallback(N=>{if(N){var C=N.getElementsByClassName("recharts-cartesian-axis-tick-value");j.current=C;var D=C[0];if(D){var F=window.getComputedStyle(D),z=F.fontSize,q=F.letterSpacing;(z!==x||q!==P)&&(k(z),O(q))}}},[x,P]);return s||n!=null&&n<=0||a!=null&&a<=0?null:g.createElement(di,{zIndex:e.zIndex},g.createElement(Ur,{className:Qe("recharts-cartesian-axis",o)},g.createElement(sq,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:on(e)}),g.createElement(pq,{ref:_,axisType:d,events:h,fontSize:x,getTicksConfig:e,height:e.height,letterSpacing:P,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),g.createElement(zH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},g.createElement(YH,{label:e.label,labelRef:e.labelRef}),e.children)))}),k0=g.forwardRef((e,t)=>{var r=Hr(e,Jn);return g.createElement(mq,Qa({},r,{ref:t}))});k0.displayName="CartesianAxis";var vq=["x1","y1","x2","y2","key"],yq=["offset"],gq=["xAxisId","yAxisId"],xq=["xAxisId","yAxisId"];function qE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,s=e.height,u=e.ry;return g.createElement("rect",{x:n,y:a,ry:u,width:o,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function fj(e){var t=e.option,r=e.lineItemProps,n;if(g.isValidElement(t))n=g.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,s=r.y1,u=r.x2,d=r.y2,f=r.key,h=yf(r,vq),m=(a=on(h))!==null&&a!==void 0?a:{};m.offset;var v=yf(m,yq);n=g.createElement("line",Ca({},v,{x1:o,y1:s,x2:u,y2:d,fill:"none",key:f}))}return n}function Pq(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=yf(e,gq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:t,y1:d,x2:t+r,y2:d,key:"line-".concat(f),index:f});return g.createElement(fj,{key:"line-".concat(f),option:a,lineItemProps:h})});return g.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Aq(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=yf(e,xq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:d,y1:t,x2:d,y2:t+r,key:"line-".concat(f),index:f});return g.createElement(fj,{option:a,lineItemProps:h,key:"line-".concat(f)})});return g.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Oq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,s=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length||u==null)return null;var h=u.map(v=>Math.round(v+a-a)).sort((v,x)=>v-x);a!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],w=k==null,E=w?a+s-v:k-v;if(E<=0)return null;var P=x%t.length;return g.createElement("rect",{key:"react-".concat(x),y:v,x:n,height:E,width:o,stroke:"none",fill:t[P],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Cq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,s=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(v=>Math.round(v+o-o)).sort((v,x)=>v-x);o!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],w=k==null,E=w?o+u-v:k-v;if(E<=0)return null;var P=x%n.length;return g.createElement("rect",{key:"react-".concat(x),x:v,y:s,width:E,height:d,stroke:"none",fill:n[P],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var _q=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return VO(S0(Xt(Xt(Xt({},Jn),r),{},{ticks:qO(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},jq=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return VO(S0(Xt(Xt(Xt({},Jn),r),{},{ticks:qO(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},Nq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:rr.grid};function hj(e){var t=tC(),r=rC(),n=eC(),a=Xt(Xt({},Hr(e,Nq)),{},{x:be(e.x)?e.x:n.left,y:be(e.y)?e.y:n.top,width:be(e.width)?e.width:n.width,height:be(e.height)?e.height:n.height}),o=a.xAxisId,s=a.yAxisId,u=a.x,d=a.y,f=a.width,h=a.height,m=a.syncWithTicks,v=a.horizontalValues,x=a.verticalValues,k=gr(),w=ke(z=>Yk(z,"xAxis",o,k)),E=ke(z=>Yk(z,"yAxis",s,k));if(!_n(f)||!_n(h)||!be(u)||!be(d))return null;var P=a.verticalCoordinatesGenerator||_q,O=a.horizontalCoordinatesGenerator||jq,j=a.horizontalPoints,_=a.verticalPoints;if((!j||!j.length)&&typeof O=="function"){var N=v&&v.length,C=O({yAxis:E?Xt(Xt({},E),{},{ticks:N?v:E.ticks}):void 0,width:t??f,height:r??h,offset:n},N?!0:m);Ud(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(j=C)}if((!_||!_.length)&&typeof P=="function"){var D=x&&x.length,F=P({xAxis:w?Xt(Xt({},w),{},{ticks:D?x:w.ticks}):void 0,width:t??f,height:r??h,offset:n},D?!0:m);Ud(Array.isArray(F),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof F,"]")),Array.isArray(F)&&(_=F)}return g.createElement(di,{zIndex:a.zIndex},g.createElement("g",{className:"recharts-cartesian-grid"},g.createElement(Eq,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),g.createElement(Oq,Ca({},a,{horizontalPoints:j})),g.createElement(Cq,Ca({},a,{verticalPoints:_})),g.createElement(Pq,Ca({},a,{offset:n,horizontalPoints:j,xAxis:w,yAxis:E})),g.createElement(Aq,Ca({},a,{offset:n,verticalPoints:_,xAxis:w,yAxis:E}))))}hj.displayName="CartesianGrid";var Iq={},pj=Zt({name:"errorBars",initialState:Iq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(s=>s.dataKey===a.dataKey&&s.direction===a.direction?o:s))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),E0=pj.actions;E0.addErrorBar;E0.replaceErrorBar;E0.removeErrorBar;var Mq=pj.reducer;function mj(e,t){var r,n,a=ke(f=>si(f,e)),o=ke(f=>ui(f,t)),s=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:St.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:kt.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function Tq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=w0(),o=mj(t,r),s=o.needClipX,u=o.needClipY,d=o.needClip,f=ke(j=>J2(j,t,!1)),h=ke(j=>e_(j,r,!1));if(!d||!a)return null;var m=a.x,v=a.y,x=a.width,k=a.height,w=s&&f?Math.min(f[0],f[1]):m-x/2,E=u&&h?Math.min(h[0],h[1]):v-k/2,P=s&&f?Math.abs(f[1]-f[0]):x*2,O=u&&h?Math.abs(h[1]-h[0]):k*2;return g.createElement("clipPath",{id:"clipPath-".concat(n)},g.createElement("rect",{x:w,y:E,width:P,height:O}))}function Dq(e){var t=Rf(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,s=Number(a),u=Number(o);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(u)||u<0)&&(u=n),{r:s,strokeWidth:u}}return{r,strokeWidth:n}}function P0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:aj}function A0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:aj}var vj=(e,t,r)=>s_(e,"xAxis",P0(e,t),r),yj=(e,t,r)=>l_(e,"xAxis",P0(e,t),r),gj=(e,t,r)=>s_(e,"yAxis",A0(e,t),r),xj=(e,t,r)=>l_(e,"yAxis",A0(e,t),r),Rq=H([at,vj,gj,yj,xj],(e,t,r,n,a)=>In(e,"xAxis")?Bd(t,n,!1):Bd(r,a,!1)),$q=(e,t)=>t,bj=H([O2,$q],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),wj=e=>{var t=at(e),r=In(t,"xAxis");return r?"yAxis":"xAxis"},Lq=(e,t)=>{var r=wj(e);return r==="yAxis"?A0(e,t):P0(e,t)},zq=(e,t,r)=>$2(e,wj(e),Lq(e,t),r),Fq=H([bj,zq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Ag(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,s=o==null?void 0:o.find(u=>u.key===a);if(s!=null)return s.map(u=>[u[0],u[1]])}}}),Bq=H([at,vj,gj,yj,xj,Fq,d6,Rq,bj,C6],(e,t,r,n,a,o,s,u,d,f)=>{var h=s.chartData,m=s.dataStartIndex,v=s.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||u==null)){var x=d.data,k;if(x&&x.length>0?k=x:k=h==null?void 0:h.slice(m,v+1),k!=null)return hG({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:m,areaSettings:d,stackedData:o,displayedData:k,chartBaseValue:f,bandSize:u})}}),Uq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Wq=["id","baseLine"];function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.y||0));return be(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(m=>m.y||0),h)),be(h)?g.createElement("rect",{x:um.x||0));return be(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(m=>m.x||0),h)),be(h)?g.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[xl(xl({},r.next),{},{x:Gn(r.prev.x,r.next.x,t),y:Gn(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),kj={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:x0,animationInterpolateFn:tG,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:Gq,xAxisId:0,yAxisId:0,zIndex:rr.area};function xf(e,t){return e&&e!=="none"?e:t}var rG=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,s=e.hide;return[{inactive:s,dataKey:t,type:o,color:xf(n,a),value:GO(r,t),payload:e}]},nG=g.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,s=e.name,u=e.hide,d=e.unit,f=e.tooltipType,h=e.id,m={dataDefinedOnItem:r,getPosition:kl,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:GO(s,t),hide:u,type:f,color:xf(n,o),unit:d,graphicalItemId:h}};return g.createElement(mK,{tooltipEntrySettings:m})});function iG(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,s=n.dataKey,u=on(n);return g.createElement(iV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:a,clipPathId:t})}function aG(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var s,u,d={x:(s=o.x)!==null&&s!==void 0?s:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xl(xl({},d),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return g.createElement(eK,{value:t?a:void 0},r)}function oG(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,s=e.animationElapsedTime,u=e.isAnimating,d=e.isEntrance,f=o.layout,h=o.type,m=o.stroke,v=o.connectNulls,x=o.isRange,k=o.shape,w=o.id,E=Sj(o,Yq),P=Br(E),O=xl(xl({},P),{},{id:w,points:t,connectNulls:v,type:h,baseLine:r,layout:f,stroke:m,isRange:x,animationElapsedTime:s,isAnimating:u,isEntrance:d});return g.createElement(g.Fragment,null,(t==null?void 0:t.length)>1&&g.createElement(Ur,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},g.createElement(pK,{option:k,DefaultShape:kj.shape,shapeProps:O})),g.createElement(iG,{points:t,props:E,clipPathId:a}))}function lG(e,t,r){if(be(e)){var n=be(t)?t:void 0;return Gn(n,e,r)}if(Ut(e)||On(e)){var a=be(t)?t:void 0;return Gn(a,0,r)}return e}function sG(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,s=n.points,u=n.baseLine,d=n.isAnimationActive,f=n.animationBegin,h=n.animationDuration,m=n.animationEasing,v=n.animationMatchBy,x=n.animationInterpolateFn,k=g.useMemo(()=>({points:s,baseLine:u}),[s,u]),w=rj(k,o),E=fg(),P=IK(n.onAnimationStart,n.onAnimationEnd),O=P.isAnimating,j=P.handleAnimationStart,_=P.handleAnimationEnd,N=w.startValue;if(E==null)return null;var C;return Array.isArray(u)&&Array.isArray(N)?C=ky(N,u,v):Array.isArray(u)?C=ky(null,u,v):C=null,g.createElement(MK,{animationInput:k,animationIdPrefix:"recharts-area-",items:s,previousItemsRef:a,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:m,onAnimationStart:j,onAnimationEnd:_,animationInterpolateFn:x,animationMatchBy:v,layout:E},(D,F,z)=>{var q;return F===1?q=u:Array.isArray(u)?q=x(C,F,E):q=z?u:lG(u,N,F),w.syncStepValue(q,F),g.createElement(aG,{showLabels:!O,points:s},n.children,g.createElement(oG,{points:D,baseLine:q,needClip:t,clipPathId:r,props:n,animationElapsedTime:F,isAnimating:O||F<1,isEntrance:z}),g.createElement(nK,{label:n.label}))})}function uG(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=g.useRef(null),o=g.useRef();return g.createElement(sG,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class cG extends g.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,s=t.top,u=t.left,d=t.needClip,f=t.xAxisId,h=t.yAxisId,m=t.width,v=t.height,x=t.id,k=t.baseLine,w=t.zIndex;if(r)return null;var E=Qe("recharts-area",o),P=x,O=Dq(n),j=O.r,_=O.strokeWidth,N=ej(n),C=j*2+_,D=d?"url(#clipPath-".concat(N?"":"dots-").concat(P,")"):void 0;return g.createElement(di,{zIndex:w},g.createElement(Ur,{className:E},d&&g.createElement("defs",null,g.createElement(Tq,{clipPathId:P,xAxisId:f,yAxisId:h}),!N&&g.createElement("clipPath",{id:"clipPath-dots-".concat(P)},g.createElement("rect",{x:u-C/2,y:s-C/2,width:m+C,height:v+C}))),g.createElement(uG,{needClip:d,clipPathId:P,props:this.props})),g.createElement(FE,{points:a,mainColor:xf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(k)&&g.createElement(FE,{points:k,mainColor:xf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function dG(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,s=e.connectNulls,u=e.dot,d=e.fill,f=e.fillOpacity,h=e.hide,m=e.isAnimationActive,v=e.legendType,x=e.stroke,k=e.xAxisId,w=e.yAxisId,E=Sj(e,Qq),P=El(),O=N_(),j=mj(k,w),_=j.needClip,N=gr(),C=(t=ke(le=>Bq(le,e.id,N)))!==null&&t!==void 0?t:{},D=C.points,F=C.isRange,z=C.baseLine,q=w0();if(P!=="horizontal"&&P!=="vertical"||q==null||O!=="AreaChart"&&O!=="ComposedChart")return null;var X=q.height,B=q.width,ue=q.x,Y=q.y;return!D||!D.length?null:g.createElement(cG,gf({},E,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:z,connectNulls:s,dot:u,fill:d,fillOpacity:f,height:X,hide:h,layout:P,isAnimationActive:m,isRange:F,legendType:v,needClip:_,points:D,stroke:x,width:B,left:ue,top:Y,xAxisId:k,yAxisId:w}))}var fG=(e,t,r,n,a)=>{var o=r??t;if(be(o))return o;var s=e==="horizontal"?a:n,u=s.scale.domain();if(s.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function hG(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,s=e.layout,u=e.chartBaseValue,d=e.xAxis,f=e.yAxis,h=e.displayedData,m=e.dataStartIndex,v=e.xAxisTicks,x=e.yAxisTicks,k=e.bandSize,w=o&&o.length,E=fG(s,u,n,d,f),P=s==="horizontal",O=!1,j=h.map((N,C)=>{var D,F,z,q;if(w)q=o[m+C];else{var X=Nt(N,a);Array.isArray(X)?(q=X,O=!0):q=[E,X]}var B=(D=(F=q)===null||F===void 0?void 0:F[1])!==null&&D!==void 0?D:null,ue=B==null||w&&!r&&Nt(N,a)==null;if(P){var Y;return{x:Hw({axis:d,ticks:v,bandSize:k,entry:N,index:C}),y:ue?null:(Y=f.scale.map(B))!==null&&Y!==void 0?Y:null,value:q,payload:N}}return{x:ue?null:(z=d.scale.map(B))!==null&&z!==void 0?z:null,y:Hw({axis:f,ticks:x,bandSize:k,entry:N,index:C}),value:q,payload:N}}),_;return w||O?_=j.map(N=>{var C,D=Array.isArray(N.value)?N.value[0]:null;if(P){var F;return{x:N.x,y:D!=null&&N.y!=null&&(F=f.scale.map(D))!==null&&F!==void 0?F:null,payload:N.payload}}return{x:D!=null&&(C=d.scale.map(D))!==null&&C!==void 0?C:null,y:N.y,payload:N.payload}}):_=P?f.scale.map(E):d.scale.map(E),{points:j,baseLine:_??0,isRange:O}}function pG(e){var t=Hr(e,kj),r=gr();return g.createElement(UK,{id:t.id,type:"area"},n=>g.createElement(g.Fragment,null,g.createElement(vK,{legendPayload:rG(t)}),g.createElement(nG,{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}),g.createElement(YK,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:X5(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),g.createElement(dG,gf({},t,{id:n}))))}var Ej=g.memo(pG,ih);Ej.displayName="Area";var mG=["domain","range"],vG=["domain","range"];function QE(e,t){if(e==null)return{};var r,n,a=yG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(s!=null)return JE(JE({},o),{},{type:s})},[o,s]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(uV(u)):r.current!==u&&t(cV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(dV(r.current)),r.current=null)},[t]),null}var AG=e=>{var t=e.xAxisId,r=e.className,n=ke(QO),a=gr(),o="xAxis",s=ke(v=>o_(v,o,t,a)),u=ke(v=>o7(v,t)),d=ke(v=>f7(v,t)),f=ke(v=>k2(v,t));if(u==null||d==null||f==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=Py(e,xG);f.id,f.scale;var m=Py(f,bG);return g.createElement(k0,Ey({},h,m,{x:d.x,y:d.y,width:u.width,height:u.height,className:Qe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:s,axisType:o,axisId:t}))},OG={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:Jn.axisLine,height:St.height,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:Jn.tickLine,tickSize:Jn.tickSize,type:St.type,niceTicks:St.niceTicks,xAxisId:0},CG=e=>{var t=Hr(e,OG);return g.createElement(g.Fragment,null,g.createElement(PG,{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}),g.createElement(AG,t))},Ay=g.memo(CG,Pj);Ay.displayName="XAxis";var _G=["type"],jG=["dangerouslySetInnerHTML","ticks","scale"],NG=["id","scale"];function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(s!=null)return tP(tP({},o),{},{type:s})},[s,o]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(fV(u)):r.current!==u&&t(hV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(pV(r.current)),r.current=null)},[t]),null}function $G(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=g.useRef(null),s=g.useRef(null),u=ke(QO),d=gr(),f=xt(),h="yAxis",m=ke(P=>m7(P,t)),v=ke(P=>p7(P,t)),x=ke(P=>o_(P,h,t,d)),k=ke(P=>E2(P,t));if(g.useLayoutEffect(()=>{if(!(n!=="auto"||!m||g0(a)||g.isValidElement(a)||k==null)){var P=o.current;if(P){var O=P.getCalculatedWidth();Math.round(m.width)!==Math.round(O)&&f(mV({id:t,width:O}))}}},[x,m,f,a,t,n,k]),m==null||v==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var w=Cy(e,jG);k.id,k.scale;var E=Cy(k,NG);return g.createElement(k0,Oy({},w,E,{ref:o,labelRef:s,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:m.width,height:m.height,className:Qe("recharts-".concat(h," ").concat(h),r),viewBox:u,ticks:x,axisType:h,axisId:t}))}var LG={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:Jn.axisLine,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:Jn.tickLine,tickSize:Jn.tickSize,type:kt.type,niceTicks:kt.niceTicks,width:kt.width,yAxisId:0},zG=e=>{var t=Hr(e,LG);return g.createElement(g.Fragment,null,g.createElement(RG,{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}),g.createElement($G,t))},Aj=g.memo(zG,Pj);Aj.displayName="YAxis";var FG=(e,t)=>t,O0=H([FG,at,LC,Mt,P_,ci,$W,Ht],HW);function BG(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function C0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(BG(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var s=(u,d)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((d-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>s(u.clientX,u.clientY)):s(e.clientX,e.clientY)}var Oj=Cr("mouseClick"),Cj=wu();Cj.startListening({actionCreator:Oj,effect:(e,t)=>{var r=e.payload,n=O0(t.getState(),C0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(j7({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var _y=Cr("mouseMove"),_j=wu(),$o=null,ya=null,uv=null;_j.startListening({actionCreator:_y,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,s=a.throttledEvents,u=s==="all"||(s==null?void 0:s.includes("mousemove"));$o!==null&&(cancelAnimationFrame($o),$o=null),ya!==null&&(typeof o!="number"||!u)&&(clearTimeout(ya),ya=null),uv=C0(r);var d=()=>{var f=t.getState(),h=Tu(f,f.tooltip.settings.shared);if(!uv){$o=null,ya=null;return}if(h==="axis"){var m=O0(f,uv);(m==null?void 0:m.activeIndex)!=null?t.dispatch(m_({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(p_())}$o=null,ya=null};if(!u){d();return}o==="raf"?$o=requestAnimationFrame(d):typeof o=="number"&&ya===null&&(ya=setTimeout(d,o))}});function UG(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var rP={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},jj=Zt({name:"rootProps",initialState:rP,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:rP.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}}}),WG=jj.reducer,HG=jj.actions.updateOptions,KG=null,VG={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)},Nj=Zt({name:"polarOptions",initialState:KG,reducers:VG});Nj.actions.updatePolarOptions;var qG=Nj.reducer,Ij=Cr("keyDown"),Mj=Cr("focus"),Tj=Cr("blur"),Eh=wu(),Lo=null,ga=null,pd=null;Eh.startListening({actionCreator:Ij,effect:(e,t)=>{pd=e.payload,Lo!==null&&(cancelAnimationFrame(Lo),Lo=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,s=o==="all"||o.includes("keydown");ga!==null&&(typeof a!="number"||!s)&&(clearTimeout(ga),ga=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var h=d.tooltip.keyboardInteraction,m=pd;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var v=Us(h,Ya(d),yl(d),gl(d)),x=v==null?-1:Number(v),k=!Number.isFinite(x)||x<0,w=ci(d),E=Ya(d),P=Tu(d,d.tooltip.settings.shared);if(m==="Enter"){if(k)return;var O=hf(d,P,"hover",String(h.index));t.dispatch(ff({active:!h.active,activeIndex:h.index,activeCoordinate:O}));return}var j=b7(d),_=j==="left-to-right"?1:-1,N=m==="ArrowRight"?1:-1,C;if(k){var D=yl(d),F=gl(d),z=N*_,q=le=>({active:!1,index:String(le),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,z>0){for(var X=0;X=0;B--)if(Us(q(B),E,D,F)!=null){C=B;break}if(C<0)return}else{C=x+N*_;var ue=(w==null?void 0:w.length)||E.length;if(ue===0||C>=ue||C<0)return}var Y=hf(d,P,"hover",String(C));t.dispatch(ff({active:!0,activeIndex:C.toString(),activeCoordinate:Y}))}finally{Lo=null,ga=null}};if(!s){u();return}a==="raf"?Lo=requestAnimationFrame(u):typeof a=="number"&&ga===null&&(u(),pd=null,ga=setTimeout(()=>{pd?u():(ga=null,Lo=null)},a))}});Eh.startListening({actionCreator:Mj,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",s=Tu(r,r.tooltip.settings.shared),u=hf(r,s,"hover",String(o));t.dispatch(ff({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Eh.startListening({actionCreator:Tj,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(ff({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function Dj(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Rr=Cr("externalEvent"),Rj=wu(),md=new Map,Ds=new Map,cv=new Map;Rj.startListening({actionCreator:Rr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,s=Dj(a);cv.set(o,{handler:n,reactEvent:s});var u=md.get(o);u!==void 0&&(cancelAnimationFrame(u),md.delete(o));var d=t.getState(),f=d.eventSettings,h=f.throttleDelay,m=f.throttledEvents,v=m,x=v==="all"||(v==null?void 0:v.includes(o)),k=Ds.get(o);k!==void 0&&(typeof h!="number"||!x)&&(clearTimeout(k),Ds.delete(o));var w=()=>{var O=cv.get(o);try{if(!O)return;var j=O.handler,_=O.reactEvent,N=t.getState(),C={activeCoordinate:SW(N),activeDataKey:xW(N),activeIndex:cu(N),activeLabel:C_(N),activeTooltipIndex:cu(N),isTooltipActive:kW(N)};j&&j(C,_)}finally{md.delete(o),Ds.delete(o),cv.delete(o)}};if(!x){w();return}if(h==="raf"){var E=requestAnimationFrame(w);md.set(o,E)}else if(typeof h=="number"){if(!Ds.has(o)){w();var P=setTimeout(w,h);Ds.set(o,P)}}else w()}}});var GG=H([Il],e=>e.tooltipItemPayloads),YG=H([GG,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),$j=Cr("touchMove"),Lj=wu(),xa=null,Ti=null,nP=null,Rs=null;Lj.startListening({actionCreator:$j,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Rs=Dj(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,s=a.throttledEvents,u=s==="all"||s.includes("touchmove");xa!==null&&(cancelAnimationFrame(xa),xa=null),Ti!==null&&(typeof o!="number"||!u)&&(clearTimeout(Ti),Ti=null),nP=Array.from(r.touches).map(f=>C0({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if(Rs!=null){var f=t.getState(),h=Tu(f,f.tooltip.settings.shared);if(h==="axis"){var m,v=(m=nP)===null||m===void 0?void 0:m[0];if(v==null){xa=null,Ti=null;return}var x=O0(f,v);(x==null?void 0:x.activeIndex)!=null&&t.dispatch(m_({activeIndex:x.activeIndex,activeDataKey:void 0,activeCoordinate:x.activeCoordinate}))}else if(h==="item"){var k,w=Rs.touches[0];if(document.elementFromPoint==null||w==null)return;var E=document.elementFromPoint(w.clientX,w.clientY);if(!E||!E.getAttribute)return;var P=E.getAttribute(i4),O=(k=E.getAttribute(a4))!==null&&k!==void 0?k:void 0,j=to(f).find(C=>C.id===O);if(P==null||j==null||O==null)return;var _=j.dataKey,N=YG(f,P,O);t.dispatch(_7({activeDataKey:_,activeIndex:P,activeCoordinate:N,activeGraphicalItemId:O}))}xa=null,Ti=null}};if(!u){d();return}o==="raf"?xa=requestAnimationFrame(d):typeof o=="number"&&Ti===null&&(d(),Rs=null,Ti=setTimeout(()=>{Rs?d():(Ti=null,xa=null)},o))}}});var zj={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Fj=Zt({name:"eventSettings",initialState:zj,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),QG=Fj.actions.setEventSettings,XG=Fj.reducer,ZG=yO({brush:PV,cartesianAxis:vV,chartData:w9,errorBars:Mq,eventSettings:XG,graphicalItems:qK,layout:U5,legend:rz,options:v9,polarAxis:aK,polarOptions:qG,referenceElements:_V,renderedTicks:XV,rootProps:WG,tooltip:N7,zIndex:n9}),JG=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return h5({reducer:ZG,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([Cj.middleware,_j.middleware,Eh.middleware,Rj.middleware,Lj.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(IO({type:"raf"}))},devTools:{serialize:{replacer:UG},name:"recharts-".concat(r)}})};function eY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=gr(),o=g.useRef(null);if(a)return r;o.current==null&&(o.current=JG(t,n));var s=ng;return g.createElement(gz,{context:s,store:o.current},r)}function tY(e){var t=e.layout,r=e.margin,n=xt(),a=gr();return g.useEffect(()=>{a||(n(z5(t)),n(L5(r)))},[n,a,t,r]),null}var rY=g.memo(tY,ih);function nY(e){var t=xt();return g.useEffect(()=>{t(HG(e))},[t,e]),null}var iY=e=>{var t=xt();return g.useEffect(()=>{t(QG(e))},[t,e]),null},aY=g.memo(iY,ih);function iP(e){var t=e.zIndex,r=e.isPanorama,n=g.useRef(null),a=xt();return g.useLayoutEffect(()=>(n.current&&a(t9({zIndex:t,element:n.current,isPanorama:r})),()=>{a(r9({zIndex:t,isPanorama:r}))}),[a,t,r]),g.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function aP(e){var t=e.children,r=e.isPanorama,n=ke(VW);if(!n||n.length===0)return t;var a=n.filter(s=>s<0),o=n.filter(s=>s>0);return g.createElement(g.Fragment,null,a.map(s=>g.createElement(iP,{key:s,zIndex:s,isPanorama:r})),t,o.map(s=>g.createElement(iP,{key:s,zIndex:s,isPanorama:r})))}var oY=["children"];function lY(e,t){if(e==null)return{};var r,n,a=sY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=tC(),n=rC(),a=fC();if(!_n(r)||!_n(n))return null;var o=e.children,s=e.otherAttributes,u=e.title,d=e.desc,f,h;return s!=null&&(typeof s.tabIndex=="number"?f=s.tabIndex:f=a?0:void 0,typeof s.role=="string"?h=s.role:h=a?"application":void 0),g.createElement(DA,bf({},s,{title:u,desc:d,role:h,tabIndex:f,width:r,height:n,style:uY,ref:t}),o)}),dY=e=>{var t=e.children,r=ke(Jf);if(!r)return null;var n=r.width,a=r.height,o=r.y,s=r.x;return g.createElement(DA,{width:n,height:a,x:s,y:o},t)},oP=g.forwardRef((e,t)=>{var r=e.children,n=lY(e,oY),a=gr();return a?g.createElement(dY,null,g.createElement(aP,{isPanorama:!0},r)):g.createElement(cY,bf({ref:t},n),g.createElement(aP,{isPanorama:!1},r))});function fY(e,t){return vY(e)||mY(e,t)||pY(e,t)||hY()}function hY(){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 pY(e,t){if(e){if(typeof e=="string")return lP(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)?lP(e,t):void 0}}function lP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var s=n.getBoundingClientRect(),u=s.width/n.offsetWidth;ze(u)&&u!==o&&e(B5(u))}},[n,e,o]),a}function sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(j9(),null);function Sf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var OY=g.forwardRef((e,t)=>{var r,n,a=g.useRef(null),o=g.useState({containerWidth:Sf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Sf((n=e.style)===null||n===void 0?void 0:n.height)}),s=wf(o,2),u=s[0],d=s[1],f=g.useCallback((m,v)=>{d(x=>{var k=Math.round(m),w=Math.round(v);return x.containerWidth===k&&x.containerHeight===w?x:{containerWidth:k,containerHeight:w}})},[]),h=g.useCallback(m=>{if(typeof t=="function"&&t(m),a.current!=null&&(a.current.disconnect(),a.current=null),m!=null&&typeof ResizeObserver<"u"){var v=m.getBoundingClientRect(),x=v.width,k=v.height;f(x,k);var w=P=>{var O=P[0];if(O!=null){var j=O.contentRect,_=j.width,N=j.height;f(_,N)}},E=new ResizeObserver(w);E.observe(m),a.current=E}},[t,f]);return g.useEffect(()=>()=>{var m=a.current;m!=null&&m.disconnect()},[f]),g.createElement(g.Fragment,null,g.createElement(ku,{width:u.containerWidth,height:u.containerHeight}),g.createElement("div",Zi({ref:h},e)))}),CY=g.forwardRef((e,t)=>{var r=e.width,n=e.height,a=g.useState({containerWidth:Sf(r),containerHeight:Sf(n)}),o=wf(a,2),s=o[0],u=o[1],d=g.useCallback((h,m)=>{u(v=>{var x=Math.round(h),k=Math.round(m);return v.containerWidth===x&&v.containerHeight===k?v:{containerWidth:x,containerHeight:k}})},[]),f=g.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,x=m.height;d(v,x)}},[t,d]);return g.createElement(g.Fragment,null,g.createElement(ku,{width:s.containerWidth,height:s.containerHeight}),g.createElement("div",Zi({ref:f},e)))}),_Y=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return g.createElement(g.Fragment,null,g.createElement(ku,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))}),jY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?g.createElement(CY,Zi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?g.createElement(_Y,Zi({},e,{width:r,height:n,ref:t})):g.createElement(g.Fragment,null,g.createElement(ku,{width:r,height:n}),g.createElement("div",Zi({ref:t},e)))});function NY(e){return e?OY:jY}var IY=g.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,s=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onMouseMove,v=e.onMouseUp,x=e.onTouchEnd,k=e.onTouchMove,w=e.onTouchStart,E=e.style,P=e.width,O=e.responsive,j=e.dispatchTouchEvents,_=j===void 0?!0:j,N=g.useRef(null),C=xt(),D=g.useState(null),F=wf(D,2),z=F[0],q=F[1],X=g.useState(null),B=wf(X,2),ue=B[0],Y=B[1],le=yY(),fe=cg(),de=(fe==null?void 0:fe.width)>0?fe.width:P,K=(fe==null?void 0:fe.height)>0?fe.height:a,ie=g.useCallback(Ee=>{le(Ee),typeof t=="function"&&t(Ee),q(Ee),Y(Ee),Ee!=null&&(N.current=Ee)},[le,t,q,Y]),Q=g.useCallback(Ee=>{C(Oj(Ee)),C(Rr({handler:o,reactEvent:Ee}))},[C,o]),R=g.useCallback(Ee=>{C(_y(Ee)),C(Rr({handler:f,reactEvent:Ee}))},[C,f]),M=g.useCallback(Ee=>{C(p_()),C(Rr({handler:h,reactEvent:Ee}))},[C,h]),J=g.useCallback(Ee=>{C(_y(Ee)),C(Rr({handler:m,reactEvent:Ee}))},[C,m]),se=g.useCallback(()=>{C(Mj())},[C]),te=g.useCallback(()=>{C(Tj())},[C]),ce=g.useCallback(Ee=>{C(Ij(Ee.key))},[C]),ye=g.useCallback(Ee=>{C(Rr({handler:s,reactEvent:Ee}))},[C,s]),_e=g.useCallback(Ee=>{C(Rr({handler:u,reactEvent:Ee}))},[C,u]),Z=g.useCallback(Ee=>{C(Rr({handler:d,reactEvent:Ee}))},[C,d]),we=g.useCallback(Ee=>{C(Rr({handler:v,reactEvent:Ee}))},[C,v]),Pe=g.useCallback(Ee=>{C(Rr({handler:w,reactEvent:Ee}))},[C,w]),ne=g.useCallback(Ee=>{_&&C($j(Ee)),C(Rr({handler:k,reactEvent:Ee}))},[C,_,k]),ot=g.useCallback(Ee=>{C(Rr({handler:x,reactEvent:Ee}))},[C,x]),De=NY(O);return g.createElement(R_.Provider,{value:z},g.createElement(V$.Provider,{value:ue},g.createElement(De,{width:de??(E==null?void 0:E.width),height:K??(E==null?void 0:E.height),className:Qe("recharts-wrapper",n),style:gY({position:"relative",cursor:"default",width:de,height:K},E),onClick:Q,onContextMenu:ye,onDoubleClick:_e,onFocus:se,onBlur:te,onKeyDown:ce,onMouseDown:Z,onMouseEnter:R,onMouseLeave:M,onMouseMove:J,onMouseUp:we,onTouchEnd:ot,onTouchMove:ne,onTouchStart:Pe,ref:ie},g.createElement(AY,null),r)))}),MY=["width","height","responsive","children","className","style","compact","title","desc"];function TY(e,t){if(e==null)return{};var r,n,a=DY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,a=e.responsive,o=e.children,s=e.className,u=e.style,d=e.compact,f=e.title,h=e.desc,m=TY(e,MY),v=on(m);return d?g.createElement(g.Fragment,null,g.createElement(ku,{width:r,height:n}),g.createElement(oP,{otherAttributes:v,title:f,desc:h},o)):g.createElement(IY,{className:s,style:u,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},g.createElement(oP,{otherAttributes:v,title:f,desc:h,ref:t},g.createElement(RV,null,o)))});function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.createElement(WY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:HY,tooltipPayloadSearcher:p9,categoricalChartProps:e,ref:t}));const VY="rgba(130,130,150,0.14)",dv="rgba(130,130,150,0.85)";function qY(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 Bj(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function GY({active:e,payload:t,unit:r,label:n}){return!e||!(t!=null&&t.length)?null:S.jsxs("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:[Number.isFinite(n)&&S.jsx("div",{className:"mb-1 border-b border-border/40 pb-1 font-mono text-[10px] text-muted-foreground/80",children:new Date(n).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),S.jsx("div",{className:"space-y-1",children:t.map(a=>S.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[S.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),S.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:a.name}),S.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:Bj(a.value,r)})]},a.dataKey))})]})}function YY({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176,showTime:o=!1}){var h,m;const s=e.reduce((v,x)=>t.reduce((k,w)=>Math.max(k,Number(x[w.key])||0),v),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(s*1.2/25)*25)):Math.max(qY(s*1.15),10),d=e.length>1?Number((h=e[e.length-1])==null?void 0:h.t)-Number((m=e[0])==null?void 0:m.t):0,f=v=>new Date(v).toLocaleTimeString("de-DE",d<=10*6e4?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"2-digit",minute:"2-digit"});return S.jsx("div",{style:{height:a},className:"w-full",children:S.jsx(L4,{width:"100%",height:"100%",children:S.jsxs(KY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[S.jsx("defs",{children:t.map(v=>S.jsxs("linearGradient",{id:`grad-${v.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[S.jsx("stop",{offset:"0%",stopColor:v.color,stopOpacity:.22}),S.jsx("stop",{offset:"100%",stopColor:v.color,stopOpacity:0})]},v.key))}),S.jsx(hj,{vertical:!1,stroke:VY}),o?S.jsx(Ay,{dataKey:"t",type:"number",domain:["dataMin","dataMax"],tickFormatter:f,tickCount:5,minTickGap:40,interval:"preserveStartEnd",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv},height:18}):S.jsx(Ay,{dataKey:"t",hide:!0}),S.jsx(Aj,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:v=>Bj(v,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:dv}}),S.jsx(W9,{content:S.jsx(GY,{unit:r}),cursor:{stroke:dv,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(v=>S.jsx(Ej,{type:"monotone",dataKey:v.key,name:v.label,stroke:v.color,strokeWidth:2,fill:`url(#grad-${v.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},v.key))]})})})}const QY={"1h":60,"24h":1440},dP={live:"Live","1h":"1 h","24h":"24 h"};function XY({value:e,onChange:t}){return S.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(dP).map(r=>S.jsx("button",{onClick:()=>t(r),className:Te("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:dP[r]},r))})}const ZY=[{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 JY(){var h,m,v,x;const{sys:e,hist:t}=D$(),[r,n]=g.useState("live"),a=h$(r==="live"?60:QY[r],r!=="live"),o=g.useMemo(()=>{var k;return r==="live"?t:(((k=a.data)==null?void 0:k.points)??[]).map(w=>({t:w.t*1e3,cpu:w.cpu,ram:w.ram,gpu:w.gpu,disk:w.disk}))},[r,t,a.data]),s=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),u=ZY.filter(k=>k.key!=="gpu"||s),d={cpu:(h=e==null?void 0:e.cpu)==null?void 0:h.percent,ram:(m=e==null?void 0:e.ram)==null?void 0:m.percent,gpu:s?e.gpu.busy_percent:null,disk:(v=e==null?void 0:e.disk)==null?void 0:v.percent},f={cpu:(x=e==null?void 0:e.cpu)!=null&&x.cores?`${e.cpu.cores} Cores`:"",ram:e?`${No(e.ram.used)}/${No(e.ram.total)} GB`:"",gpu:s?`${No(e.gpu.gtt_used)}/${No(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${No(e.disk.used)}/${No(e.disk.total)} GB`:""};return S.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[S.jsxs("div",{children:[S.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[S.jsx(zP,{className:"h-4.5 w-4.5 text-primary"}),S.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),r==="live"&&S.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[S.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),S.jsx("div",{className:"ml-auto",children:S.jsx(XY,{value:r,onChange:n})})]}),e?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:u.map(k=>S.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[S.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:k.color}}),S.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),S.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(d[k.key]??0),"%"]}),f[k.key]&&S.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:f[k.key]})]},k.key))}),r!=="live"&&o.length===0&&S.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(r==="live"||o.length>0)&&S.jsx(YY,{data:o,series:u,unit:"%",yMode:"percent",height:176,showTime:!0})]}):S.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)&&S.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&&S.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&S.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const bl=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],_a=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function eQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Ny(e){return bl.reduce((t,r)=>t+(e[r.key]??0),0)}function tQ(e){let t=null;for(const r of bl){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function rQ({t:e,scale:t}){const r=bl.map(n=>`${n.label} ${_a(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${_a(e.mem0_ms)})`:"");return S.jsxs("div",{className:"flex items-center gap-2.5",children:[S.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:eQ(e.ts)}),S.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[S.jsx("div",{className:"absolute inset-0 flex",children:bl.map(n=>{const a=e[n.key];return!a||a<=0?null:S.jsx("div",{style:{width:`${a/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&S.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),S.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":_a(Ny(e))})]})}function nQ(){const{data:e}=f$(12),t=e??[],r=Math.max(1,...t.map(o=>Ny(o))),n=t[0],a=n?tQ(n):null;return S.jsxs("div",{className:"mc-card p-5",children:[S.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(XM,{className:"h-4.5 w-4.5 text-primary"}),S.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),S.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[S.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?S.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[S.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":_a(Ny(n))}),S.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&a&&S.jsxs(S.Fragment,{children:[" · Täter: ",S.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",_a(a.ms)]})]})]}):S.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&S.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[bl.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${_a(n[o.key])}`).join(" · "),n.mem0_ms!=null&&S.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",_a(n.mem0_ms)]})]})]}),S.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:bl.map(o=>S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),S.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?S.jsx("div",{className:"space-y-1.5",children:t.map(o=>S.jsx(rQ,{t:o,scale:r},o.id))}):S.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),S.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const kf=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function iQ({onNavigate:e}){var Y,le,fe,de;const{data:t}=jA(),{data:r}=Yy(),{data:n}=NA(),{data:a}=v$(),{data:o}=y$(),{data:s}=u$(),{data:u}=c$(),d=I$(),{showAlert:f,dialogElement:h}=CA(),m=Pf(),[v,x]=g.useState({});async function k(K,ie){x(Q=>({...Q,[K]:!0}));try{if(ie.kind==="loadModel")await $e(`/api/models/${encodeURIComponent(ie.model)}/load`,{method:"POST"});else{const Q=await $e("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ie.service})});Q.ok||f("Reparatur nicht ganz geklappt",(Q.err||"Unbekannter Fehler")+(ie.needsSudo?` Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}m.invalidateQueries({queryKey:Be.health}),m.invalidateQueries({queryKey:Be.services}),m.invalidateQueries({queryKey:Be.models})}catch(Q){f("Reparatur fehlgeschlagen",String((Q==null?void 0:Q.message)||Q))}finally{x(Q=>({...Q,[K]:!1}))}}const w=((Y=t==null?void 0:t.running)==null?void 0:Y.length)??0,E=(r==null?void 0:r.services.filter(K=>K.ok).length)??0,P=(r==null?void 0:r.services.length)??0,O=P-E,j=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((le=n==null?void 0:n.components)==null?void 0:le.filter(K=>K.update===!0).length)??0),_=s!=null&&s.available?s.open_count:0,N=u!=null&&u.available?u.items.filter(K=>K.status==="blocked").length:0,C=o?[o.gateway,o.memory,o.desktop_gateway]:[],D=C.filter(K=>K==null?void 0:K.ok).length,F=o?o.gateway.ok?o.memory.ok?o.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",z=(fe=t==null?void 0:t.models)==null?void 0:fe.find(K=>K.role==="hermes"),q=z!=null&&z.name?(de=z.name.split("/").pop())==null?void 0:de.replace(/\.gguf$/i,""):"",X=r==null?void 0:r.services.filter(K=>!K.ok).map(K=>K.name).join(", "),B=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],ue=B.length>0?B.join(" + "):"";return S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{children:[S.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),S.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[S.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[S.jsx(aQ,{verdict:d.verdict,memory:d.memory,warns:d.warns,problems:d.problems}),S.jsxs("section",{children:[S.jsx(fv,{children:"Leistung"}),S.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:S.jsx(JY,{})}),S.jsx("div",{className:"mt-4",children:S.jsx(nQ,{})})]}),S.jsxs("section",{children:[S.jsx(fv,{children:"Bereiche"}),S.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[S.jsx(As,{icon:zy,title:"Auftragsbuch",value:s!=null&&s.available?_:"—",unit:_===1?"Vorschlag":"Vorschläge",tone:s?N>0||_>0?"warn":"ok":"loading",hint:N>0?`${N} Karte${N===1?"":"n"} wartet auf deine Antwort`:_>0?`${_} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),S.jsx(As,{icon:$P,title:"Modelle",value:w,unit:"warm",tone:w>0?"ok":"muted",hint:q?`Hirn: ${q}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),S.jsx(As,{icon:Of,title:"Dienste",value:r?`${E}/${P}`:"…",unit:"laufen",tone:r?O>0?"warn":"ok":"loading",hint:X?`Ausfall: ${X}`:"Alle Dienste online",onClick:()=>kf("maintenance")}),S.jsx(As,{icon:Uy,title:"Updates",value:n?j>0?j:"0":"…",unit:j>0?"bereit":"aktuell",tone:n?j>0?"warn":"ok":"loading",hint:j>0?`Verfügbar: ${ue}`:"Alles auf dem neuesten Stand",onClick:()=>kf("maintenance")}),S.jsx(As,{icon:By,title:"Verbinden",value:o?`${D}/${C.length}`:"…",unit:"Leitungen",tone:o?D===C.length?"ok":"warn":"loading",hint:F?`Gestört: ${F}`:"Hermes Desktop & IDEs bereit",onClick:()=>e("connect")})]})]})]}),S.jsxs("div",{className:"space-y-6",children:[S.jsx(oQ,{problems:d.problems,pendingCount:j,openAuftraege:_,blockedIdeen:N,busy:v,onRepair:k,onNavigate:e}),S.jsxs("section",{children:[S.jsx(fv,{children:"Werkzeuge & Diagnose"}),S.jsx(lQ,{agent:a,svcErrors:O,onNavigate:e})]})]})]}),h]})}function fv({children:e}){return S.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function aQ({verdict:e,memory:t,warns:r,problems:n}){const a=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",o=n.length?`${n[0].label}: ${n[0].detail}${n.length>1?` (+${n.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",s={loading:{ring:"border-border/60 bg-card/45",icon:Fy,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:eT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Gs,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Gs,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:o}}[e],u=s.icon,d={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],f={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return S.jsxs("div",{className:Te("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",s.ring),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:S.jsx(u,{className:Te("h-6 w-6",s.iconCls)})}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:s.title}),S.jsx("p",{className:"text-xs text-muted-foreground",children:s.sub})]})]}),S.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[S.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[S.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[S.jsx(JM,{className:"h-3.5 w-3.5"})," Speicher"]}),S.jsx("span",{className:Te("font-mono font-bold",d),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),S.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:S.jsx("div",{className:Te("h-full rounded-full transition-all duration-500",f),style:{width:`${t.pct}%`}})})]})]})}function oQ({problems:e,pendingCount:t,openAuftraege:r,blockedIdeen:n,busy:a,onRepair:o,onNavigate:s}){const u=t>0,d=r>0,f=n>0,h=e.length===0&&!u&&!d&&!f;return S.jsx("div",{className:"h-full flex flex-col justify-between",children:h?S.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[S.jsx(WM,{className:"h-5 w-5 shrink-0 text-emerald-400"}),S.jsxs("div",{children:[S.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),S.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):S.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(m=>S.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[S.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[S.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:S.jsx(m.icon,{className:"h-4.5 w-4.5"})}),S.jsxs("div",{className:"min-w-0 flex-1",children:[S.jsx("p",{className:"text-sm font-bold text-foreground",children:m.label}),S.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.detail})]})]}),m.repair&&S.jsxs("button",{onClick:()=>m.repair&&o(m.id,m.repair),disabled:!!a[m.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[a[m.id]?S.jsx(Fy,{className:"h-3.5 w-3.5 animate-spin"}):S.jsx(mT,{className:"h-3.5 w-3.5"}),m.repair.label]})]},m.id)),f&&S.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:S.jsx(LP,{className:"h-4.5 w-4.5"})}),S.jsxs("div",{children:[S.jsxs("p",{className:"text-sm font-bold text-foreground",children:[n," Karte",n===1?"":"n"," braucht deine Antwort"]}),S.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),S.jsx(Bs,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&S.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:S.jsx(zy,{className:"h-4.5 w-4.5"})}),S.jsxs("div",{children:[S.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),S.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),S.jsx(Bs,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),u&&S.jsxs("button",{onClick:()=>kf("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:S.jsx(Uy,{className:"h-4.5 w-4.5"})}),S.jsxs("div",{children:[S.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),S.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),S.jsx(Bs,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function lQ({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Konsole (Box-Shell)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>kf("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return S.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:S.jsx("div",{className:"divide-y divide-border/20",children:n.map((a,o)=>{const s={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[a.tone];return S.jsxs("button",{onClick:a.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[S.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:a.label}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:Te("text-[10px] font-semibold font-mono",a.tone==="ok"?"text-emerald-400":a.tone==="warn"?"text-amber-400":a.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:a.status}),S.jsx("span",{className:Te("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const sQ=g.lazy(()=>ii(()=>import("./ModelsView-HKWdUr_n.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.ModelsView}))),uQ=g.lazy(()=>ii(()=>import("./ConnectView-BVQISUp-.js"),__vite__mapDeps([6,4,7])).then(e=>({default:e.ConnectView}))),cQ=g.lazy(()=>ii(()=>import("./AgentView-S7O3i54n.js"),[]).then(e=>({default:e.AgentView}))),dQ=g.lazy(()=>ii(()=>import("./KonsoleView-Dr5m__LA.js"),[]).then(e=>({default:e.KonsoleView}))),fQ=g.lazy(()=>ii(()=>import("./GuideView-BejVWV-I.js"),__vite__mapDeps([8,3,5])).then(e=>({default:e.GuideView}))),hQ=g.lazy(()=>ii(()=>import("./AuftragsbuchView-Cg2IAINl.js"),__vite__mapDeps([9,10,4])).then(e=>({default:e.AuftragsbuchView}))),pQ=g.lazy(()=>ii(()=>import("./IdeenView-CK4Z-iQS.js"),__vite__mapDeps([11,10,1,5,4,2])).then(e=>({default:e.IdeenView}))),mQ=g.lazy(()=>ii(()=>import("./ChronikView-DyY4WTcV.js"),__vite__mapDeps([12,2])).then(e=>({default:e.ChronikView}))),vQ=g.lazy(()=>ii(()=>import("./WissenView-CunsLEvo.js"),__vite__mapDeps([13,7])).then(e=>({default:e.WissenView})));function yQ(){return S.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:S.jsx(Fy,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const gQ=/Mac|iPhone|iPad/.test(navigator.platform);function xQ(){N$(),s$();const[e,t]=g.useState(()=>{const w=window.location.hash.slice(1);return Ko.some(E=>E.id===w)?w:"dashboard"}),r=g.useCallback(w=>{window.location.hash.slice(1)===w?t(w):window.location.hash=w},[]),[n,a]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,s]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState("maintenance"),{data:m,isError:v}=_A(),{data:x}=Df();g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const w=E=>{var O;h(((O=E.detail)==null?void 0:O.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",w),()=>window.removeEventListener("open-system-drawer",w)},[]),g.useEffect(()=>{const w=E=>{var O;const P=(O=E.detail)==null?void 0:O.view;P&&r(P)};return window.addEventListener("mc-navigate",w),()=>window.removeEventListener("mc-navigate",w)},[r]),g.useEffect(()=>{const w=()=>{const E=window.location.hash.slice(1);Ko.some(P=>P.id===E)&&t(E)};return window.addEventListener("hashchange",w),()=>window.removeEventListener("hashchange",w)},[]),g.useEffect(()=>{s(!1)},[e]);const k=Ko.find(w=>w.id===e);return S.jsxs("div",{className:"flex h-full relative",children:[S.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),S.jsx(kR,{onNavigate:r}),S.jsx(A$,{open:u,onClose:()=>d(!1),defaultTab:f}),S.jsx("aside",{className:Te("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:S.jsx(fP,{collapsed:n,onToggleCollapse:()=>{a(w=>{const E=!w;return localStorage.setItem("mc_sidebar_collapsed",E.toString()),E})},view:e,health:m,backendDown:v,sysStatus:x})}),S.jsxs("div",{className:Te("md:hidden fixed inset-0 z-50 transition-opacity duration-200",o?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!o,children:[S.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),S.jsx("aside",{className:Te("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",o?"translate-x-0":"-translate-x-full"),children:S.jsx(fP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,backendDown:v,sysStatus:x})})]}),S.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[S.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[S.jsx("button",{onClick:()=>s(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:S.jsx(oT,{className:"h-5 w-5","aria-hidden":"true"})}),S.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:k.hint})]}),S.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[S.jsx(a$,{}),S.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),S.jsxs("button",{onClick:()=>{const w=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(w)},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:[S.jsx(GM,{className:"h-3.5 w-3.5"}),S.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),S.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:gQ?"⌘K":"Strg+K"})]})]})]}),S.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:S.jsxs(g.Suspense,{fallback:S.jsx(yQ,{}),children:[e==="dashboard"&&S.jsx(iQ,{onNavigate:w=>r(w)}),e==="ideen"&&S.jsx(pQ,{}),e==="auftraege"&&S.jsx(hQ,{}),e==="models"&&S.jsx(sQ,{}),e==="connect"&&S.jsx(uQ,{}),e==="wissen"&&S.jsx(vQ,{}),e==="chronik"&&S.jsx(mQ,{}),e==="agent"&&S.jsx(cQ,{}),e==="konsole"&&S.jsx(dQ,{}),e==="guide"&&S.jsx(fQ,{})]})})]})]})}function fP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:a,backendDown:o,sysStatus:s}){var u,d,f,h,m;return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Te("flex items-center py-4 border-b border-border/40 shrink-0",e?"flex-col gap-3 px-2":"justify-between px-5"),children:[S.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[S.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&S.jsxs("div",{className:"leading-tight",children:[S.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),S.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&S.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":e?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:e?"Maximieren":"Minimieren",children:e?S.jsx(Bs,{className:"h-4 w-4","aria-hidden":"true"}):S.jsx(HM,{className:"h-4 w-4","aria-hidden":"true"})}),r&&S.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:S.jsx(Cf,{className:"h-4 w-4","aria-hidden":"true"})})]}),S.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let v=null;return Ko.map(x=>{const k=x.group!==v;return v=x.group,S.jsxs("div",{className:"space-y-1",children:[k&&(e?v!==Ko[0].group&&S.jsx("div",{className:"my-3 border-t border-border/30"}):S.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:x.group})),S.jsxs("a",{href:`#${x.id}`,onClick:r,"aria-current":n===x.id?"page":void 0,className:Te("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",e?"justify-center p-2.5":"gap-3 px-3 py-2",n===x.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?x.label:void 0,"aria-label":e?x.label:void 0,children:[S.jsx(x.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&S.jsx("span",{className:"truncate",children:x.label})]})]},x.id)})})()}),S.jsx("div",{className:Te("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",e?"px-2 text-center":"px-5"),children:e?S.jsx("div",{className:"flex justify-center",children:S.jsx("span",{className:Te("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",o||!a?"bg-red-500":a.engine_reachable?a.brain&&!a.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:o?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":a?a.engine_reachable?a.brain&&!a.brain.ready?`Hirn offline (${a.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):S.jsxs("div",{className:"space-y-2 text-left",children:[o?S.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[S.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),S.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?S.jsxs(S.Fragment,{children:[S.jsxs("span",{className:"flex items-center gap-2",children:[S.jsx("span",{className:Te("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),S.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&S.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[S.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),S.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):S.jsxs("span",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",S.jsx("span",{className:"truncate",children:"Backend offline"})]}),(s==null?void 0:s.versions)&&S.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[S.jsxs("div",{className:"truncate",title:s.versions.mc2?`${s.versions.mc2.branch}-${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""} (${s.versions.mc2.date})`:"nicht gefunden",children:[S.jsx("strong",{children:"MC2:"})," ",s.versions.mc2?`${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""}`:"—"]}),S.jsxs("div",{className:"truncate",title:((u=s.versions.engine)==null?void 0:u.type)==="git"?`${s.versions.engine.branch}-${s.versions.engine.hash}${s.versions.engine.dirty?"*":""} (${s.versions.engine.date})`:((d=s.versions.engine)==null?void 0:d.version_text)||"unbekannt",children:[S.jsx("strong",{children:"Engine:"})," ",((f=s.versions.engine)==null?void 0:f.type)==="git"?`${s.versions.engine.hash}${s.versions.engine.dirty?"*":""}`:((m=(h=s.versions.engine)==null?void 0:h.version_text)==null?void 0:m.split(" ").pop())||"—"]}),S.jsxs("div",{className:"truncate",title:s.versions.hermes_agent?`${s.versions.hermes_agent.branch}-${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""} (${s.versions.hermes_agent.date})`:"nicht gefunden",children:[S.jsx("strong",{children:"Hermes Agent:"})," ",s.versions.hermes_agent?`${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class bQ extends Ty.Component{constructor(){super(...arguments);xs(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?S.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:S.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[S.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),S.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),S.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 wQ=new wM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});YI.createRoot(document.getElementById("root")).render(S.jsx(Ty.StrictMode,{children:S.jsx(bQ,{children:S.jsx(SM,{client:wQ,children:S.jsx(xQ,{})})})}));export{aT as $,NA as A,BM as B,WM as C,TQ as D,Ov as E,y$ as F,F1 as G,JM as H,Bs as I,KM as J,v$ as K,Fy as L,YM as M,kQ as N,Af as O,sT as P,Wy as Q,Ho as R,uT as S,Gs as T,hT as U,Es as V,mT as W,Cf as X,Of as Y,$P as Z,By as _,p$ as a,XM as a0,fT as a1,u$ as a2,c$ as a3,VM as a4,LQ as a5,zy as a6,AQ as a7,LP as a8,QM as a9,OQ as aa,tT as ab,Uy as ac,eT as ad,d$ as ae,CQ as af,iT as ag,CA as b,je as c,RQ as d,Te as e,Nm as f,$e as g,jQ as h,PQ as i,S as j,zM as k,jA as l,_Q as m,Df as n,NQ as o,DQ as p,Be as q,g as r,EQ as s,MQ as t,Pf as u,No as v,AR as w,zP as x,$Q as y,IQ as z};