@wandelbots/wandelbots-js-react-components 3.1.1 → 3.2.0-pr.feat-improve-exports.414.40b4b4e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -2
- package/dist/3d.cjs.js +2 -0
- package/dist/3d.cjs.js.map +1 -0
- package/dist/3d.d.ts +11 -0
- package/dist/3d.d.ts.map +1 -0
- package/dist/3d.es.js +16 -0
- package/dist/3d.es.js.map +1 -0
- package/dist/PoseJointValues-C3bsJdfd.js +5446 -0
- package/dist/PoseJointValues-C3bsJdfd.js.map +1 -0
- package/dist/PoseJointValues-wLOjcYDe.cjs +21 -0
- package/dist/PoseJointValues-wLOjcYDe.cjs.map +1 -0
- package/dist/ProgramStateIndicator-CTT-CAcJ.js +268 -0
- package/dist/ProgramStateIndicator-CTT-CAcJ.js.map +1 -0
- package/dist/ProgramStateIndicator-DYKBcj1s.cjs +2 -0
- package/dist/ProgramStateIndicator-DYKBcj1s.cjs.map +1 -0
- package/dist/VelocitySlider-2Zme2MN7.cjs +5 -0
- package/dist/VelocitySlider-2Zme2MN7.cjs.map +1 -0
- package/dist/VelocitySlider-QSg_8eb1.js +1906 -0
- package/dist/VelocitySlider-QSg_8eb1.js.map +1 -0
- package/dist/components/jogging/JoggingStore.d.ts +1 -1
- package/dist/core.cjs.js +2 -0
- package/dist/core.cjs.js.map +1 -0
- package/dist/core.d.ts +23 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.es.js +46 -0
- package/dist/core.es.js.map +1 -0
- package/dist/createSvgIcon-BG4_bQuX.cjs +56 -0
- package/dist/createSvgIcon-BG4_bQuX.cjs.map +1 -0
- package/dist/createSvgIcon-D3GRPlVu.js +3072 -0
- package/dist/createSvgIcon-D3GRPlVu.js.map +1 -0
- package/dist/data.cjs.js +2 -0
- package/dist/data.cjs.js.map +1 -0
- package/dist/data.d.ts +4 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.es.js +7 -0
- package/dist/data.es.js.map +1 -0
- package/dist/externalizeComponent-C12Qf79R.cjs +24 -0
- package/dist/externalizeComponent-C12Qf79R.cjs.map +1 -0
- package/dist/externalizeComponent-RpcZ_G17.js +491 -0
- package/dist/externalizeComponent-RpcZ_G17.js.map +1 -0
- package/dist/index-8UEqiXug.cjs +7 -0
- package/dist/index-8UEqiXug.cjs.map +1 -0
- package/dist/index-CQDi5W62.cjs +2 -0
- package/dist/index-CQDi5W62.cjs.map +1 -0
- package/dist/index-DSz82V23.js +1801 -0
- package/dist/index-DSz82V23.js.map +1 -0
- package/dist/index-DZubFUuo.js +4909 -0
- package/dist/index-DZubFUuo.js.map +1 -0
- package/dist/index-MyU3fVEK.cjs +50 -0
- package/dist/index-MyU3fVEK.cjs.map +1 -0
- package/dist/index-VURe0U2S.js +9443 -0
- package/dist/index-VURe0U2S.js.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +72 -0
- package/dist/index.es.js.map +1 -0
- package/dist/interpolation-CVSmVNjc.cjs +2 -0
- package/dist/interpolation-CVSmVNjc.cjs.map +1 -0
- package/dist/interpolation-DjBX_Si-.js +138 -0
- package/dist/interpolation-DjBX_Si-.js.map +1 -0
- package/dist/jogging.cjs.js +2 -0
- package/dist/jogging.cjs.js.map +1 -0
- package/dist/jogging.d.ts +9 -0
- package/dist/jogging.d.ts.map +1 -0
- package/dist/jogging.es.js +12 -0
- package/dist/jogging.es.js.map +1 -0
- package/dist/manufacturerHomePositions-DHqcbFON.js +979 -0
- package/dist/manufacturerHomePositions-DHqcbFON.js.map +1 -0
- package/dist/manufacturerHomePositions-zd-CKEiQ.cjs +2 -0
- package/dist/manufacturerHomePositions-zd-CKEiQ.cjs.map +1 -0
- package/dist/theming-BO8z_Hpa.js +2198 -0
- package/dist/theming-BO8z_Hpa.js.map +1 -0
- package/dist/theming-D5DvGuxX.cjs +4 -0
- package/dist/theming-D5DvGuxX.cjs.map +1 -0
- package/dist/useThemeProps-P648Ox74.cjs +2 -0
- package/dist/useThemeProps-P648Ox74.cjs.map +1 -0
- package/dist/useThemeProps-jE_Qg6SI.js +40 -0
- package/dist/useThemeProps-jE_Qg6SI.js.map +1 -0
- package/package.json +24 -3
- package/src/3d.ts +15 -0
- package/src/core.ts +23 -0
- package/src/data.ts +4 -0
- package/src/jogging.ts +9 -0
- package/dist/index.cjs +0 -155
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -30530
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";const M=require("./externalizeComponent-C12Qf79R.cjs"),Jn=require("mobx-react-lite"),I=require("react"),N=require("@mui/material"),tn=require("react-i18next"),w=require("prop-types"),U=require("./createSvgIcon-BG4_bQuX.cjs"),es=require("./useThemeProps-P648Ox74.cjs"),ts=require("./interpolation-CVSmVNjc.cjs"),ce=require("@mui/x-data-grid"),To=require("@mui/x-charts");function Co(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const j=Co(I);function Ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(null,arguments)}function Te(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ns(){const e=es.useTheme(U.defaultTheme);return process.env.NODE_ENV!=="production"&&j.useDebugValue(e),e[U.THEME_ID]||e}function Ao({props:e,name:t}){return es.useThemeProps({props:e,name:t,defaultTheme:U.defaultTheme,themeId:U.THEME_ID})}let Lr=0;function Io(e){const[t,n]=j.useState(e),r=t;return j.useEffect(()=>{t==null&&(Lr+=1,n(`mui-${Lr}`))},[t]),r}const ko={...j},Gr=ko.useId;function Do(e){return Gr!==void 0?Gr():Io(e)}class Po{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{const r=n(this.value);r!==this.value&&(this.value=r,this.listeners.forEach(i=>i(r)))},this.value=t,this.listeners=new Set}}const nn=({params:e,store:t})=>{j.useEffect(()=>{t.update(r=>T({},r,{animation:T({},r.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const n=j.useCallback(()=>{let r=!1;return t.update(i=>T({},i,{animation:T({},i.animation,{skipAnimationRequests:i.animation.skipAnimationRequests+1})})),()=>{r||(r=!0,t.update(i=>T({},i,{animation:T({},i.animation,{skipAnimationRequests:i.animation.skipAnimationRequests-1})})))}},[t]);return U.useEnhancedEffect(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let i;const s=a=>{a.matches?i=n():i==null||i()},o=window.matchMedia("(prefers-reduced-motion)");return s(o),o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[n,t]),{instance:{disableAnimation:n}}};nn.params={skipAnimation:!0};nn.getDefaultizedParams=({params:e})=>T({},e,{skipAnimation:e.skipAnimation??!1});nn.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),n=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:n?1:0}}};var Oo=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const i={};e(i)===i&&(r=!0)}catch{}if(r){let i;try{throw new Error}catch(s){({stack:i}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
2
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
3
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
4
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},jo=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:s,inputSelectorResultsCopy:o}=e,a=r(()=>({}),...i);if(!(a.apply(null,s)===a.apply(null,o))){let u;try{throw new Error}catch(c){({stack:u}=c)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
5
|
+
This means your output selector will likely run more frequently than intended.
|
|
6
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
7
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:o,stack:u})}},_o={inputStabilityCheck:"once",identityFunctionCheck:"once"},Gt=Symbol("NOT_FOUND");function $o(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function No(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fo(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var zr=e=>Array.isArray(e)?e:[e];function Lo(e){const t=Array.isArray(e[0])?e[0]:e;return Fo(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ur(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Go=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={..._o,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Oo},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:jo}}};function zo(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Gt},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Uo(e,t){let n=[];function r(a){const l=n.findIndex(u=>t(a,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Gt}function i(a,l){r(a)===Gt&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function s(){return n}function o(){n=[]}return{get:r,put:i,getEntries:s,clear:o}}var Ho=(e,t)=>e===t;function Yo(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let s=0;s<i;s++)if(!e(n[s],r[s]))return!1;return!0}}function Wo(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Ho,maxSize:i=1,resultEqualityCheck:s}=n,o=Yo(r);let a=0;const l=i<=1?zo(o):Uo(i,o);function u(){let c=l.get(arguments);if(c===Gt){if(c=e.apply(null,arguments),a++,s){const f=l.getEntries().find(h=>s(h.value,c));f&&(c=f.value,a!==0&&a--)}l.put(arguments,c)}return c}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var Bo=class{constructor(e){this.value=e}deref(){return this.value}},Vo=typeof WeakRef<"u"?WeakRef:Bo,qo=0,Hr=1;function Rt(){return{s:qo,v:void 0,o:null,p:null}}function rs(e,t={}){let n=Rt();const{resultEqualityCheck:r}=t;let i,s=0;function o(){var d;let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const g=p.get(m);g===void 0?(a=Rt(),p.set(m,a)):a=g}else{let p=a.p;p===null&&(a.p=p=new Map);const g=p.get(m);g===void 0?(a=Rt(),p.set(m,a)):a=g}}const u=a;let c;if(a.s===Hr)c=a.v;else if(c=e.apply(null,arguments),s++,r){const f=((d=i==null?void 0:i.deref)==null?void 0:d.call(i))??i;f!=null&&r(f,c)&&(c=f,s!==0&&s--),i=typeof c=="object"&&c!==null||typeof c=="function"?new Vo(c):c}return u.s=Hr,u.v=c,c}return o.clearCache=()=>{n=Rt(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function is(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let s=0,o=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),$o(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=rs,argsMemoizeOptions:m=[],devModeChecks:p={}}=c,g=zr(f),x=zr(m),S=Lo(i),y=d(function(){return s++,u.apply(null,arguments)},...g);let E=!0;const b=h(function(){o++;const C=Ur(S,arguments);if(a=y.apply(null,C),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:D,inputStabilityCheck:P}=Go(E,p);if(D.shouldRun&&D.run(u,C,a),P.shouldRun){const _=Ur(S,arguments);P.run({inputSelectorResults:C,inputSelectorResultsCopy:_},{memoize:d,memoizeOptions:g},arguments)}E&&(E=!1)}return a},...x);return Object.assign(b,{resultFunc:u,memoizedResultFunc:y,dependencies:S,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var Xo=is(rs),Ko=Object.assign((e,t=Xo)=>{No(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((o,a,l)=>(o[n[l]]=a,o),{}))},{withTypes:()=>Ko});const Zo=is({memoize:Wo,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Yr=new WeakMap,G=(...e)=>(n,...r)=>{const i=n.cacheKey;let s=Yr.get(i);s||(s=new Map,Yr.set(i,s));const o=s.get(e);if(o)return o(n,...r);const a=Zo(...e);return s.set(e,a),a(n,...r)},Qo=e=>e.animation,Jo=G([Qo],e=>e.skip||e.skipAnimationRequests>0);function ea(e){return U.ownerDocument(e).defaultView||window}var At={exports:{}},bn={},It={exports:{}},En={};/**
|
|
8
|
+
* @license React
|
|
9
|
+
* use-sync-external-store-shim.production.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/var Wr;function ta(){if(Wr)return En;Wr=1;var e=I;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),p=m[0].inst,g=m[1];return s(function(){p.value=h,p.getSnapshot=f,l(p)&&g({inst:p})},[d,h,f]),i(function(){return l(p)&&g({inst:p}),d(function(){l(p)&&g({inst:p})})},[d]),o(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function u(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return En.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,En}var wn={};/**
|
|
16
|
+
* @license React
|
|
17
|
+
* use-sync-external-store-shim.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/var Br;function na(){return Br||(Br=1,process.env.NODE_ENV!=="production"&&function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=m();if(!d){var g=m();s(p,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=o({inst:{value:p,getSnapshot:m}});var x=g[0].inst,S=g[1];return l(function(){x.value=p,x.getSnapshot=m,n(x)&&S({inst:x})},[h,p,m]),a(function(){return n(x)&&S({inst:x}),h(function(){n(x)&&S({inst:x})})},[h]),u(p),p}function n(h){var m=h.getSnapshot;h=h.value;try{var p=m();return!s(h,p)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=I,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;wn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wn}var Vr;function ss(){return Vr||(Vr=1,process.env.NODE_ENV==="production"?It.exports=ta():It.exports=na()),It.exports}/**
|
|
24
|
+
* @license React
|
|
25
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/var qr;function ra(){if(qr)return bn;qr=1;var e=I,t=ss();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,l=e.useDebugValue;return bn.useSyncExternalStoreWithSelector=function(u,c,d,f,h){var m=s(null);if(m.current===null){var p={hasValue:!1,value:null};m.current=p}else p=m.current;m=a(function(){function x(v){if(!S){if(S=!0,y=v,v=f(v),h!==void 0&&p.hasValue){var C=p.value;if(h(C,v))return E=C}return E=v}if(C=E,r(y,v))return C;var D=f(v);return h!==void 0&&h(C,D)?(y=v,C):(y=v,E=D)}var S=!1,y,E,b=d===void 0?null:d;return[function(){return x(c())},b===null?void 0:function(){return x(b())}]},[c,d,f,h]);var g=i(u,m[0],m[1]);return o(function(){p.hasValue=!0,p.value=g},[g]),l(g),g},bn}var Mn={};/**
|
|
32
|
+
* @license React
|
|
33
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/var Xr;function ia(){return Xr||(Xr=1,process.env.NODE_ENV!=="production"&&function(){function e(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=I,n=ss(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,s=t.useRef,o=t.useEffect,a=t.useMemo,l=t.useDebugValue;Mn.useSyncExternalStoreWithSelector=function(u,c,d,f,h){var m=s(null);if(m.current===null){var p={hasValue:!1,value:null};m.current=p}else p=m.current;m=a(function(){function x(v){if(!S){if(S=!0,y=v,v=f(v),h!==void 0&&p.hasValue){var C=p.value;if(h(C,v))return E=C}return E=v}if(C=E,r(y,v))return C;var D=f(v);return h!==void 0&&h(C,D)?(y=v,C):(y=v,E=D)}var S=!1,y,E,b=d===void 0?null:d;return[function(){return x(c())},b===null?void 0:function(){return x(b())}]},[c,d,f,h]);var g=i(u,m[0],m[1]);return o(function(){p.hasValue=!0,p.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Mn}var Kr;function sa(){return Kr||(Kr=1,process.env.NODE_ENV==="production"?At.exports=ra():At.exports=ia()),At.exports}var oa=sa();const aa=Object.is,ne=(e,t,n=[],r=aa)=>{const i=s=>t(s,...n);return oa.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i,r)},ua="DEFAULT_X_AXIS_KEY",la="DEFAULT_Y_AXIS_KEY",ca={top:20,bottom:20,left:20,right:20},da=45,fa=25,os=20,Qe=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Je=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},ha=G([Je],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="left"?t+(n.width||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),ma=G([Je],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="right"?t+(n.width||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),pa=G([Qe],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="top"?t+(n.height||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),ga=G([Qe],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="bottom"?t+(n.height||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),ya=e=>e.dimensions,as=e=>e.dimensions.width,us=e=>e.dimensions.height,xa=e=>e.dimensions.margin.top,va=e=>e.dimensions.margin.right,ba=e=>e.dimensions.margin.bottom,Ea=e=>e.dimensions.margin.left,Et=G([as,us,xa,va,ba,Ea,pa,ma,ga,ha],(e,t,n,r,i,s,o,a,l,u)=>({width:e-s-r-u-a,left:s+u,right:r+a,height:t-n-i-o-l,top:n+o,bottom:i+l})),wa=G([ya],e=>({width:e.propsWidth,height:e.propsHeight})),Ma=G([as,us],(e,t)=>({width:e,height:t}));function ls(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?T({},t,e):e}const Sa=10,rn=({params:e,store:t,svgRef:n})=>{const r=e.width!==void 0&&e.height!==void 0,i=j.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,o]=j.useState(0),[a,l]=j.useState(0),u=j.useCallback(()=>{const m=n==null?void 0:n.current;if(!m)return{};const g=ea(m).getComputedStyle(m),x=Math.floor(parseFloat(g.height))||0,S=Math.floor(parseFloat(g.width))||0;return t.update(y=>y.dimensions.width===S&&y.dimensions.height===x?y:T({},y,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??S,height:e.height??x,propsWidth:e.width,propsHeight:e.height}})),{height:x,width:S}},[t,n,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);j.useEffect(()=>{t.update(m=>{const p=e.width??m.dimensions.width,g=e.height??m.dimensions.height;return T({},m,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:p,height:g,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),j.useEffect(()=>{i.current.displayError=!0},[]),U.useEnhancedEffect(()=>{if(r||!i.current.initialCompute||i.current.computeRun>Sa)return;const m=u();m.width!==s||m.height!==a?(i.current.computeRun+=1,m.width!==void 0&&o(m.width),m.height!==void 0&&l(m.height)):i.current.initialCompute&&(i.current.initialCompute=!1)},[a,s,u,r]),U.useEnhancedEffect(()=>{if(r)return()=>{};u();const m=n.current;if(typeof ResizeObserver>"u")return()=>{};let p;const g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{u()})});return m&&g.observe(m),()=>{p&&cancelAnimationFrame(p),m&&g.unobserve(m)}},[u,r,n]),process.env.NODE_ENV!=="production"&&(i.current.displayError&&e.width===void 0&&s===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),i.current.displayError=!1),i.current.displayError&&e.height===void 0&&a===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),i.current.displayError=!1));const c=ne(t,Et),d=j.useCallback(m=>m>=c.left-1&&m<=c.left+c.width,[c.left,c.width]),f=j.useCallback(m=>m>=c.top-1&&m<=c.top+c.height,[c.height,c.top]);return{instance:{isPointInside:j.useCallback((m,p,g)=>g&&"closest"in g&&g.closest("[data-drawing-container]")?!0:d(m)&&f(p),[d,f]),isXInside:d,isYInside:f}}};rn.params={width:!0,height:!0,margin:!0};rn.getDefaultizedParams=({params:e})=>T({},e,{margin:ls(e.margin,ca)});rn.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const er=({params:e,store:t})=>(U.useEnhancedEffect(()=>{t.update(n=>T({},n,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});er.params={experimentalFeatures:!0};er.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Ta=e=>e.experimentalFeatures,cs=G([Ta],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let Zr=0;const Ca=()=>(Zr+=1,`mui-chart-${Zr}`),tr=({params:e,store:t})=>(j.useEffect(()=>{t.update(n=>e.id===void 0||e.id===n.id.providedChartId&&n.id.chartId!==void 0?n:T({},n,{id:T({},n.id,{chartId:e.id??Ca()})}))},[t,e.id]),{});tr.params={id:!0};tr.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const Ra=e=>e.id,Aa=G([Ra],e=>e.chartId),Ia=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],ka=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],ds=e=>e==="dark"?ka:Ia,fs=({series:e,colors:t,seriesConfig:n,dataset:r})=>{const i={};e.forEach((o,a)=>{var c;const l=n[o.type].getSeriesWithDefaultValues(o,a,t),u=l.id;if(i[o.type]===void 0&&(i[o.type]={series:{},seriesOrder:[]}),((c=i[o.type])==null?void 0:c.series[u])!==void 0)throw new Error(`MUI X Charts: series' id "${u}" is not unique.`);i[o.type].series[u]=l,i[o.type].seriesOrder.push(u)});const s={};return Object.keys(n).forEach(o=>{var l,u;const a=i[o];a!==void 0&&(s[o]=((u=(l=n[o])==null?void 0:l.seriesProcessor)==null?void 0:u.call(l,a,r))??i[o])}),s},sn=({params:e,store:t,seriesConfig:n})=>{const{series:r,dataset:i,theme:s,colors:o}=e,a=j.useRef(!0);return j.useEffect(()=>{if(a.current){a.current=!1;return}t.update(l=>T({},l,{series:T({},l.series,{processedSeries:fs({series:r,colors:typeof o=="function"?o(s):o,seriesConfig:n,dataset:i})})}))},[o,i,r,s,n,t]),{}};sn.params={dataset:!0,series:!0,colors:!0,theme:!0};const Da=[];sn.getDefaultizedParams=({params:e})=>{var t;return T({},e,{series:(t=e.series)!=null&&t.length?e.series:Da,colors:e.colors??ds,theme:e.theme??"light"})};sn.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},i,s)=>({series:{seriesConfig:s,processedSeries:fs({series:e,colors:typeof t=="function"?t(n):t,seriesConfig:s,dataset:r})}});const hs=e=>e.series,wt=G([hs],e=>e.processedSeries),on=G([hs],e=>e.seriesConfig),Pa={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class ms{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in Pa)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,n,r,i){this.element=t,this.pointerManager=n,this.gesturesRegistry=r,this.keyboardManager=i;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const o=`${this.name}ChangeState`;this.element.addEventListener(o,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const n=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(r=>n[r])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const n=`${this.name}ChangeState`;this.element.removeEventListener(n,this.handleStateChange.bind(this))}}class Oa{constructor(){this.activeGestures=new Map}registerActiveGesture(t,n){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const r=this.activeGestures.get(t),i={gesture:n,element:t};r.add(i)}unregisterActiveGesture(t,n){const r=this.activeGestures.get(t);r&&(r.forEach(i=>{i.gesture===n&&r.delete(i)}),r.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const n=this.activeGestures.get(t);return n?Array.from(n).reduce((r,i)=>(r[i.gesture.name]=!0,r),{}):{}}isGestureActive(t,n){const r=this.activeGestures.get(t);return r?Array.from(r).some(i=>i.gesture===n):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class ja{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(n=>n==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(n))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class _a{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=n=>{if(this.preventEventInterruption&&"pointerType"in n&&n.pointerType==="touch"){n.preventDefault();return}const r=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),i=this.pointers.values().next().value;if(this.pointers.size>0&&i){Object.defineProperties(r,{clientX:{value:i.clientX},clientY:{value:i.clientY},pointerId:{value:i.pointerId},pointerType:{value:i.pointerType}});for(const[s,o]of this.pointers.entries()){const a=T({},o,{type:"forceCancel"});this.pointers.set(s,a)}}this.notifyHandlers(r),this.pointers.clear()},this.handlePointerEvent=n=>{const{type:r,pointerId:i}=n;if(r==="pointerdown"){if(this.pointers.set(i,this.createPointerData(n)),n.target instanceof Element)try{n.target.setPointerCapture(i)}catch{}}else if(r==="pointermove")this.pointers.set(i,this.createPointerData(n));else if(r==="pointerup"||r==="pointercancel"||r==="forceCancel"){if(n.target instanceof Element)try{n.target.releasePointerCapture(i)}catch{}this.pointers.set(i,this.createPointerData(n)),this.notifyHandlers(n),this.pointers.delete(i);return}this.notifyHandlers(n)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(n=>n(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class $a{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new Oa,this.pointerManager=void 0,this.keyboardManager=new ja,this.pointerManager=new _a({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(n=>{this.addGestureTemplate(n)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,n,r){const i=this.elementGestureMap.get(n);if(!i||!i.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeOptions`,{detail:r,bubbles:!1,cancelable:!1});n.dispatchEvent(s)}setGestureState(t,n,r){const i=this.elementGestureMap.get(n);if(!i||!i.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeState`,{detail:r,bubbles:!1,cancelable:!1});n.dispatchEvent(s)}registerElement(t,n,r){if(Array.isArray(t))return t.forEach(s=>{const o=r==null?void 0:r[s];this.registerSingleGesture(s,n,o)}),n;const i=r==null?void 0:r[t];return this.registerSingleGesture(t,n,i),n}registerSingleGesture(t,n,r){const i=this.gestureTemplates.get(t);if(!i)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(n)||this.elementGestureMap.set(n,new Map);const s=this.elementGestureMap.get(n);s.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,n));const o=i.clone(r);return o.init(n,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,o),!0}unregisterElement(t,n){const r=this.elementGestureMap.get(n);return!r||!r.has(t)?!1:(r.get(t).destroy(),r.delete(t),this.activeGesturesRegistry.unregisterElement(n),r.size===0&&this.elementGestureMap.delete(n),!0)}unregisterAllGestures(t){const n=this.elementGestureMap.get(t);if(n){for(const[,r]of n)r.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class Mt extends ms{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,n,r,i){super.init(t,n,r,i),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,o)=>this.handlePointerEvent(s,o))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,n){return t.filter(r=>this.isPointerTypeAllowed(r.pointerType)&&(n===r.target||r.target===this.originalTarget||n===this.originalTarget||n.contains(r.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function Na(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function Sn(e){if(e.length<2)return 0;let t=0,n=0;for(let r=0;r<e.length;r+=1)for(let i=r+1;i<e.length;i+=1)t+=Na({x:e[r].clientX,y:e[r].clientY},{x:e[i].clientX,y:e[i].clientY}),n+=1;return n>0?t/n:0}function xe(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((n,r)=>(n.x+=r.clientX,n.y+=r.clientY,n),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function et(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const kt=1e-5,Se=1e-5,Qr=.15;function Fa(e,t){const n=t.x-e.x,r=t.y-e.y,i={vertical:null,horizontal:null,mainAxis:null},s=La(t,e),o=Math.abs(n)>Math.abs(r)?"horizontal":"vertical",a=s||o==="horizontal"?kt:Qr,l=s?kt:o==="horizontal"?Qr:kt;return Math.abs(n)>a&&(i.horizontal=n>0?"right":"left"),Math.abs(r)>l&&(i.vertical=r>0?"down":"up"),i.mainAxis=s?"diagonal":o,i}function La(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.atan2(r,n)*180/Math.PI;return i>=-45+Se&&i<=-22.5+Se||i>=22.5+Se&&i<=45+Se||i>=135+Se&&i<=157.5+Se||i>=-157.5+Se&&i<=-135+Se}function Ga(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const n=e.vertical===null||t.includes(e.vertical),r=e.horizontal===null||t.includes(e.horizontal);return n&&r}const za=0,Ua=e=>e>za?1:e<-0?-1:0;class nr extends Mt{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new nr(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,n,r,i){super.init(t,n,r,i),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const n=this.pointerManager.getPointers()||new Map,r=Array.from(n.values());if(r.length>=this.minPointers&&r.length<=this.maxPointers){this.isActive=!0;const i={x:t.clientX,y:t.clientY};this.state.lastPosition=i,this.emitMoveEvent(this.element,"start",r,t),this.emitMoveEvent(this.element,"ongoing",r,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const n=this.pointerManager.getPointers()||new Map,r=Array.from(n.values());this.emitMoveEvent(this.element,"end",r,t),this.resetState()}handlePointerEvent(t,n){if(n.type!=="pointermove"||n.pointerType!=="mouse"&&n.pointerType!=="pen")return;this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i||r.length<this.minPointers||r.length>this.maxPointers)return;if(this.shouldPreventGesture(i)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(i,"end",r,n);return}const s={x:n.clientX,y:n.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(i,"start",r,n)),this.emitMoveEvent(i,"ongoing",r,n)}emitMoveEvent(t,n,r,i){const s=this.state.lastPosition||xe(r),o=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:s,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,activeGestures:o,customData:this.customData},l=et(this.name,n),u=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(u)}}class rr extends Mt{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new rr(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=T({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,n){const r=Array.from(t.values());if(n.type==="forceCancel"){this.cancel(n.target,r,n);return}const i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.cancel(i,r,n);return}const s=this.getRelevantPointers(r,i);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(i,s,n);return}switch(n.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(o=>{this.state.startPointers.set(o.pointerId,o)}),this.originalTarget=i,this.state.startCentroid=xe(s),this.state.lastCentroid=T({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const o=xe(s),a=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y,u=Math.sqrt(a*a+l*l),c=Fa(this.state.lastCentroid??this.state.startCentroid,o),d=this.state.lastCentroid?o.x-this.state.lastCentroid.x:0,f=this.state.lastCentroid?o.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&u>=this.threshold&&Ga(c,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:f},this.state.totalDeltaX+=d,this.state.totalDeltaY+=f,this.state.activeDeltaX+=d,this.state.activeDeltaY+=f,this.emitPanEvent(i,"start",s,n,o),this.emitPanEvent(i,"ongoing",s,n,o)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:f},this.state.totalDeltaX+=d,this.state.totalDeltaY+=f,this.state.activeDeltaX+=d,this.state.activeDeltaY+=f,this.emitPanEvent(i,"ongoing",s,n,o)),this.state.lastCentroid=o,this.state.lastDirection=c}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(o=>o.type!=="pointerup"&&o.type!=="pointercancel").length<this.minPointers){const o=this.state.lastCentroid||this.state.startCentroid;n.type==="pointercancel"&&this.emitPanEvent(i,"cancel",s,n,o),this.emitPanEvent(i,"end",s,n,o),this.resetState()}}else this.resetState();break}}emitPanEvent(t,n,r,i,s){var x,S;if(!this.state.startCentroid)return;const o=((x=this.state.lastDeltas)==null?void 0:x.x)??0,a=((S=this.state.lastDeltas)==null?void 0:S.y)??0,l=this.state.startPointers.values().next().value,u=l?(i.timeStamp-l.timeStamp)/1e3:0,c=u>0?o/u:0,d=u>0?a/u:0,f=Math.sqrt(c*c+d*d),h=this.gesturesRegistry.getActiveGestures(t),m={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:s,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,deltaX:o,deltaY:a,direction:this.state.lastDirection,velocityX:c,velocityY:d,velocity:f,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:h,customData:this.customData},p=et(this.name,n),g=new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:m});t.dispatchEvent(g),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancel(t,n,r){if(this.isActive){const i=t??this.element;this.emitPanEvent(i,"cancel",n,r,this.state.lastCentroid),this.emitPanEvent(i,"end",n,r,this.state.lastCentroid)}this.resetState()}}class ir extends Mt{constructor(t){super(T({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new ir(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=T({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,n){const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.isActive&&(this.emitPinchEvent(i,"cancel",r,n),this.resetState());return}const s=this.getRelevantPointers(r,i);switch(n.type){case"pointerdown":if(s.length>=2&&!this.isActive){const o=Sn(s);this.state.startDistance=o,this.state.lastDistance=o,this.state.lastTime=n.timeStamp,this.originalTarget=i}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const o=Sn(s),a=Math.abs(o-this.state.lastDistance);if(a!==0&&a>=this.threshold){const l=this.state.startDistance?o/this.state.startDistance:1,u=l/this.state.lastScale;this.state.totalScale*=u;const c=(n.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const f=(o-this.state.lastDistance)/c;this.state.velocity=Number.isNaN(f)?0:f}this.state.lastDistance=o,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=n.timeStamp,this.isActive?this.emitPinchEvent(i,"ongoing",s,n):(this.isActive=!0,this.emitPinchEvent(i,"start",s,n),this.emitPinchEvent(i,"ongoing",s,n))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const o=s.filter(a=>a.type!=="pointerup"&&a.type!=="pointercancel");if(o.length<this.minPointers)n.type==="pointercancel"&&this.emitPinchEvent(i,"cancel",s,n),this.emitPinchEvent(i,"end",s,n),this.resetState();else if(o.length>=2){const a=Sn(o);this.state.startDistance=a/this.state.lastScale}}break}}emitPinchEvent(t,n,r,i){const s=xe(r),o=this.state.lastDistance,a=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),u={gestureName:this.name,centroid:s,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,scale:a,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:o,velocity:this.state.velocity,activeGestures:l,direction:Ua(this.state.velocity),customData:this.customData};this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation();const c=et(this.name,n),d=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:u});t.dispatchEvent(d)}}class sr extends Mt{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new sr(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=T({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,n){const r=Array.from(t.values());if(n.type==="forceCancel"){this.cancelPress(n.target,r,n);return}const i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.isActive&&this.cancelPress(i,r,n);return}const s=this.getRelevantPointers(r,i);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(i,s,n);return}switch(n.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=xe(s),this.state.lastPosition=T({},this.state.startCentroid),this.state.startTime=n.timeStamp,this.isActive=!0,this.originalTarget=i,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const o=this.state.lastPosition;this.emitPressEvent(i,"start",s,n,o),this.emitPressEvent(i,"ongoing",s,n,o)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=xe(s);this.state.lastPosition=o;const a=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(a*a+l*l)>this.maxDistance&&this.cancelPress(i,s,n)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(i,"end",s,n,o)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(i,s,n);break}}emitPressEvent(t,n,r,i,s){const o=this.gesturesRegistry.getActiveGestures(t),a=i.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,x:s.x,y:s.y,duration:a,activeGestures:o,customData:this.customData},u=et(this.name,n),c=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(c),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancelPress(t,n,r){if(this.isActive&&this.state.pressThresholdReached){const i=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",n,r,i),this.emitPressEvent(t??this.element,"end",n,r,i)}this.resetState()}}class or extends Mt{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new or(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,n){const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i)return;const s=this.getRelevantPointers(r,i);if(this.shouldPreventGesture(i)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(i,s,n);return}switch(n.type){case"pointerdown":this.isActive||(this.state.startCentroid=xe(s),this.state.lastPosition=T({},this.state.startCentroid),this.isActive=!0,this.originalTarget=i);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=xe(s);this.state.lastPosition=o;const a=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(a*a+l*l)>this.maxDistance&&this.cancelTap(i,s,n)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const o=this.state.lastPosition||this.state.startCentroid;if(!o){this.cancelTap(i,s,n);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(i,s,n,o),this.resetState()):(this.state.lastTapTime=n.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(i,s,n);break}}fireTapEvent(t,n,r,i){const s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:"end",pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},a=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(a),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancelTap(t,n,r){if(this.state.startCentroid||this.state.lastPosition){const i=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:"cancel",pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},a=et(this.name,"cancel"),l=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(l)}this.resetState()}}class ar extends ms{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new ar(T({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,n,r,i){super.init(t,n,r,i),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const n=this.pointerManager.getPointers()||new Map,r=Array.from(n.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(i=>{this.state[i]<this.min&&(this.state[i]=this.min),this.state[i]>this.max&&(this.state[i]=this.max)}),this.emitWheelEvent(r,t)}emitWheelEvent(t,n){const r=t.length>0?xe(t):{x:n.clientX,y:n.clientY},i=this.gesturesRegistry.getActiveGestures(this.element),s={gestureName:this.name,centroid:r,target:n.target,srcEvent:n,phase:"ongoing",pointers:t,timeStamp:n.timeStamp,deltaX:n.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:n.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:n.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:n.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:i,customData:this.customData};this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const o=et(this.name,"ongoing"),a=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(a)}}const Ge=e=>e.preventDefault(),ur=({svgRef:e})=>{j.useEffect(()=>{const n=e.current;if(!n)return;const r=new $a({gestures:[new rr({name:"pan",threshold:0,maxPointers:1}),new nr({name:"move",preventIf:["pan","pinch"]}),new ir({name:"pinch",threshold:5,preventIf:["pan"]}),new ar({name:"turnWheel",sensitivity:.01,initialDelta:1}),new or({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new sr({name:"quickPress",duration:50,maxDistance:10})]});return r.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],n),()=>{r.destroy()}},[e]);const t=j.useCallback((n,r,i)=>{const s=e.current;return s==null||s.addEventListener(n,r,i),{cleanup:()=>s==null?void 0:s.removeEventListener(n,r)}},[e]);return j.useEffect(()=>{const n=e.current;return n==null||n.addEventListener("gesturestart",Ge),n==null||n.addEventListener("gesturechange",Ge),n==null||n.addEventListener("gestureend",Ge),()=>{n==null||n.removeEventListener("gesturestart",Ge),n==null||n.removeEventListener("gesturechange",Ge),n==null||n.removeEventListener("gestureend",Ge)}},[e]),{instance:{addInteractionListener:t}}};ur.params={};ur.getInitialState=()=>({});const Ha=[tr,er,rn,sn,ur,nn],Ya=["apiRef"],Wa=e=>{let{plugins:t}=e,n=Te(e.props,Ya);const r={};t.forEach(o=>{Object.assign(r,o.params)});const i={};return Object.keys(n).forEach(o=>{const a=n[o];r[o]&&(i[o]=a)}),t.reduce((o,a)=>a.getDefaultizedParams?a.getDefaultizedParams({params:o}):o,i)};let Jr=0;function Ba(e,t,n){const r=Do(),i=j.useMemo(()=>[...Ha,...e],[e]),s=Wa({plugins:i,props:t});s.id=s.id??r;const a=j.useRef({}).current,l=qa(t.apiRef),u=j.useRef(null),c=j.useRef(null),d=j.useRef(null);if(d.current==null){Jr+=1;const m={cacheKey:{id:Jr}};i.forEach(p=>{p.getInitialState&&Object.assign(m,p.getInitialState(s,m,n))}),d.current=new Po(m)}const f=m=>{const p=m({instance:a,params:s,plugins:i,store:d.current,svgRef:c,chartRootRef:u,seriesConfig:n});p.publicAPI&&Object.assign(l.current,p.publicAPI),p.instance&&Object.assign(a,p.instance)};return i.forEach(f),{contextValue:j.useMemo(()=>({store:d.current,publicAPI:l.current,instance:a,svgRef:c,chartRootRef:u}),[a,l])}}function Va(e){return e.current==null&&(e.current={}),e}function qa(e){const t=j.useRef({});return e?Va(e):t}const lr=j.createContext(null);process.env.NODE_ENV!=="production"&&(lr.displayName="ChartContext");const ei=new Set;function mt(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
|
|
40
|
+
`):e;ei.has(n)||(ei.add(n),t==="error"?console.error(n):console.warn(n))}function Xa(e){const{componentName:t,propName:n,controlled:r,defaultValue:i,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:o,isControlled:a}]=j.useState({initialDefaultValue:i,isControlled:r!==void 0});a!==(r!==void 0)&&mt([`${s}: A component is changing the ${a?"":"un"}controlled ${n} state of ${t} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(o)!==JSON.stringify(i)&&mt([`${s}: A component is changing the default ${n} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const ps=process.env.NODE_ENV==="production"?()=>{}:Xa,gs=4,ys=20+2*gs,Ka=40+2*gs,Za="hover",Dt={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:ys,showTooltip:Za}},cr=(e,t,n)=>{var r;if(e)return e===!0?T({axisId:t,axisDirection:n},Dt):T({axisId:t,axisDirection:n},Dt,e,{slider:T({},Dt.slider,{size:((r=e.slider)==null?void 0:r.preview)??Dt.slider.preview?Ka:ys},e.slider)})};function xs(e,t){const n={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:ua,scaleType:"linear"}]).map((s,o)=>{var h;const a=s.dataKey,l=o===0?"bottom":"none",u=s.position??l,c=fa+(s.label?os:0),d=s.id??`defaultized-x-axis-${o}`,f=T({offset:n[u]},s,{id:d,position:u,height:s.height??c,zoom:cr(s.zoom,d,"x")});if(u!=="none"&&(n[u]+=f.height,(h=f.zoom)!=null&&h.slider.enabled&&(n[u]+=f.zoom.slider.size)),a===void 0||s.data!==void 0)return f;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return T({},f,{data:t.map(m=>m[a])})})}function vs(e,t){const n={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:la,scaleType:"linear"}]).map((s,o)=>{var h;const a=s.dataKey,l=o===0?"left":"none",u=s.position??l,c=da+(s.label?os:0),d=s.id??`defaultized-y-axis-${o}`,f=T({offset:n[u]},s,{id:d,position:u,width:s.width??c,zoom:cr(s.zoom,d,"y")});if(u!=="none"&&(n[u]+=f.width,(h=f.zoom)!=null&&h.slider.enabled&&(n[u]+=f.zoom.slider.size)),a===void 0||s.data!==void 0)return f;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return T({},f,{data:t.map(m=>m[a])})})}function Nt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qa(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function dr(e){let t,n,r;e.length!==2?(t=Nt,n=(a,l)=>Nt(e(a),l),r=(a,l)=>e(a)-l):(t=e===Nt||e===Qa?e:Ja,n=e,r=e);function i(a,l,u=0,c=a.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(a[d],l)<0?u=d+1:c=d}while(u<c)}return u}function s(a,l,u=0,c=a.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(a[d],l)<=0?u=d+1:c=d}while(u<c)}return u}function o(a,l,u=0,c=a.length){const d=i(a,l,u,c-1);return d>u&&r(a[d-1],l)>-r(a[d],l)?d-1:d}return{left:i,center:o,right:s}}function Ja(){return 0}function eu(e){return e===null?NaN:+e}const tu=dr(Nt),bs=tu.right;dr(eu).center;class ti extends Map{constructor(t,n=iu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ni(this,t))}has(t){return super.has(ni(this,t))}set(t,n){return super.set(nu(this,t),n)}delete(t){return super.delete(ru(this,t))}}function ni({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function nu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ru({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function iu(e){return e!==null&&typeof e=="object"?e.valueOf():e}const su=Math.sqrt(50),ou=Math.sqrt(10),au=Math.sqrt(2);function zt(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=su?10:s>=ou?5:s>=au?2:1;let a,l,u;return i<0?(u=Math.pow(10,-i)/o,a=Math.round(e*u),l=Math.round(t*u),a/u<e&&++a,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,a=Math.round(e/u),l=Math.round(t/u),a*u<e&&++a,l*u>t&&--l),l<a&&.5<=n&&n<2?zt(e,t,n*2):[a,l,u]}function Gn(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,o]=r?zt(t,e,n):zt(e,t,n);if(!(s>=i))return[];const a=s-i+1,l=new Array(a);if(r)if(o<0)for(let u=0;u<a;++u)l[u]=(s-u)/-o;else for(let u=0;u<a;++u)l[u]=(s-u)*o;else if(o<0)for(let u=0;u<a;++u)l[u]=(i+u)/-o;else for(let u=0;u<a;++u)l[u]=(i+u)*o;return l}function zn(e,t,n){return t=+t,e=+e,n=+n,zt(e,t,n)[2]}function Un(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?zn(t,e,n):zn(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function uu(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function Ce(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function lu(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ri=Symbol("implicit");function Ut(){var e=new ti,t=[],n=[],r=ri;function i(s){let o=e.get(s);if(o===void 0){if(r!==ri)return r;e.set(s,o=t.push(s)-1)}return n[o%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new ti;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return Ut(t,n).unknown(r)},Ce.apply(i,arguments),i}function fr(){var e=Ut().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,o,a=!1,l=0,u=0,c=.5;delete e.unknown;function d(){var f=t().length,h=i<r,m=h?i:r,p=h?r:i;s=(p-m)/Math.max(1,f-l+u*2),a&&(s=Math.floor(s)),m+=(p-m-s*(f-l))*c,o=s*(1-l),a&&(m=Math.round(m),o=Math.round(o));var g=uu(f).map(function(x){return m+s*x});return n(h?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,a=!0,d()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(f){return arguments.length?(a=!!f,d()):a},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,d()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),d()):c},e.copy=function(){return fr(t(),[r,i]).round(a).paddingInner(l).paddingOuter(u).align(c)},Ce.apply(d(),arguments)}function Es(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Es(t())},e}function cu(){return Es(fr.apply(null,arguments).paddingInner(1))}function hr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ws(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function St(){}var pt=.7,Ht=1/pt,Ye="\\s*([+-]?\\d+)\\s*",gt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",du=/^#([0-9a-f]{3,8})$/,fu=new RegExp(`^rgb\\(${Ye},${Ye},${Ye}\\)$`),hu=new RegExp(`^rgb\\(${pe},${pe},${pe}\\)$`),mu=new RegExp(`^rgba\\(${Ye},${Ye},${Ye},${gt}\\)$`),pu=new RegExp(`^rgba\\(${pe},${pe},${pe},${gt}\\)$`),gu=new RegExp(`^hsl\\(${gt},${pe},${pe}\\)$`),yu=new RegExp(`^hsla\\(${gt},${pe},${pe},${gt}\\)$`),ii={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hr(St,yt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:si,formatHex:si,formatHex8:xu,formatHsl:vu,formatRgb:oi,toString:oi});function si(){return this.rgb().formatHex()}function xu(){return this.rgb().formatHex8()}function vu(){return Ms(this).formatHsl()}function oi(){return this.rgb().formatRgb()}function yt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=du.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ai(t):n===3?new re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pt(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=fu.exec(e))?new re(t[1],t[2],t[3],1):(t=hu.exec(e))?new re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mu.exec(e))?Pt(t[1],t[2],t[3],t[4]):(t=pu.exec(e))?Pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gu.exec(e))?ci(t[1],t[2]/100,t[3]/100,1):(t=yu.exec(e))?ci(t[1],t[2]/100,t[3]/100,t[4]):ii.hasOwnProperty(e)?ai(ii[e]):e==="transparent"?new re(NaN,NaN,NaN,0):null}function ai(e){return new re(e>>16&255,e>>8&255,e&255,1)}function Pt(e,t,n,r){return r<=0&&(e=t=n=NaN),new re(e,t,n,r)}function bu(e){return e instanceof St||(e=yt(e)),e?(e=e.rgb(),new re(e.r,e.g,e.b,e.opacity)):new re}function Hn(e,t,n,r){return arguments.length===1?bu(e):new re(e,t,n,r??1)}function re(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}hr(re,Hn,ws(St,{brighter(e){return e=e==null?Ht:Math.pow(Ht,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pt:Math.pow(pt,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new re(Pe(this.r),Pe(this.g),Pe(this.b),Yt(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:ui,formatHex:ui,formatHex8:Eu,formatRgb:li,toString:li}));function ui(){return`#${ke(this.r)}${ke(this.g)}${ke(this.b)}`}function Eu(){return`#${ke(this.r)}${ke(this.g)}${ke(this.b)}${ke((isNaN(this.opacity)?1:this.opacity)*255)}`}function li(){const e=Yt(this.opacity);return`${e===1?"rgb(":"rgba("}${Pe(this.r)}, ${Pe(this.g)}, ${Pe(this.b)}${e===1?")":`, ${e})`}`}function Yt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ke(e){return e=Pe(e),(e<16?"0":"")+e.toString(16)}function ci(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new de(e,t,n,r)}function Ms(e){if(e instanceof de)return new de(e.h,e.s,e.l,e.opacity);if(e instanceof St||(e=yt(e)),!e)return new de;if(e instanceof de)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-t)/a+2:o=(t-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new de(o,a,l,e.opacity)}function wu(e,t,n,r){return arguments.length===1?Ms(e):new de(e,t,n,r??1)}function de(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hr(de,wu,ws(St,{brighter(e){return e=e==null?Ht:Math.pow(Ht,e),new de(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pt:Math.pow(pt,e),new de(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new re(Tn(e>=240?e-240:e+120,i,r),Tn(e,i,r),Tn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new de(di(this.h),Ot(this.s),Ot(this.l),Yt(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=Yt(this.opacity);return`${e===1?"hsl(":"hsla("}${di(this.h)}, ${Ot(this.s)*100}%, ${Ot(this.l)*100}%${e===1?")":`, ${e})`}`}}));function di(e){return e=(e||0)%360,e<0?e+360:e}function Ot(e){return Math.max(0,Math.min(1,e||0))}function Tn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const mr=e=>()=>e;function Mu(e,t){return function(n){return e+n*t}}function Su(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Tu(e){return(e=+e)==1?Ss:function(t,n){return n-t?Su(t,n,e):mr(isNaN(t)?n:t)}}function Ss(e,t){var n=t-e;return n?Mu(e,n):mr(isNaN(e)?t:e)}const fi=function e(t){var n=Tu(t);function r(i,s){var o=n((i=Hn(i)).r,(s=Hn(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),u=Ss(i.opacity,s.opacity);return function(c){return i.r=o(c),i.g=a(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function Cu(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Ru(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Au(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=an(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(a){for(o=0;o<r;++o)s[o]=i[o](a);return s}}function pr(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Iu(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=an(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var Yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(Yn.source,"g");function ku(e){return function(){return e}}function Du(e){return function(t){return e(t)+""}}function Pu(e,t){var n=Yn.lastIndex=Cn.lastIndex=0,r,i,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(r=Yn.exec(e))&&(i=Cn.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:fe(r,i)})),n=Cn.lastIndex;return n<t.length&&(s=t.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?Du(l[0].x):ku(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)a[(d=l[c]).i]=d.x(u);return a.join("")})}function an(e,t){var n=typeof t,r;return t==null||n==="boolean"?mr(t):(n==="number"?fe:n==="string"?(r=yt(t))?(t=r,fi):Pu:t instanceof yt?fi:t instanceof Date?pr:Ru(t)?Cu:Array.isArray(t)?Au:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Iu:fe)(e,t)}function Ts(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ou(e){return function(){return e}}function ju(e){return+e}var hi=[0,1];function oe(e){return e}function Wn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Ou(isNaN(t)?NaN:.5)}function _u(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function $u(e,t,n){var r=e[0],i=e[1],s=t[0],o=t[1];return i<r?(r=Wn(i,r),s=n(o,s)):(r=Wn(r,i),s=n(s,o)),function(a){return s(r(a))}}function Nu(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Wn(e[o],e[o+1]),s[o]=n(t[o],t[o+1]);return function(a){var l=bs(e,a,1,r)-1;return s[l](i[l](a))}}function un(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function gr(){var e=hi,t=hi,n=an,r,i,s,o=oe,a,l,u;function c(){var f=Math.min(e.length,t.length);return o!==oe&&(o=_u(e[0],e[f-1])),a=f>2?Nu:$u,l=u=null,d}function d(f){return f==null||isNaN(f=+f)?s:(l||(l=a(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((u||(u=a(t,e.map(r),fe)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,ju),c()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ts,c()},d.clamp=function(f){return arguments.length?(o=f?!0:oe,c()):o!==oe},d.interpolate=function(f){return arguments.length?(n=f,c()):n},d.unknown=function(f){return arguments.length?(s=f,d):s},function(f,h){return r=f,i=h,c()}}function Cs(){return gr()(oe,oe)}function Fu(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wt(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function We(e){return e=Wt(Math.abs(e)),e?e[1]:NaN}function Lu(e,t){return function(n,r){for(var i=n.length,s=[],o=0,a=e[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=e[o=(o+1)%e.length];return s.reverse().join(t)}}function Gu(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var zu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xt(e){if(!(t=zu.exec(e)))throw new Error("invalid format: "+e);var t;return new yr({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]})}xt.prototype=yr.prototype;function yr(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+""}yr.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 Uu(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Rs;function Hu(e,t){var n=Wt(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Rs=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Wt(e,Math.max(0,t+s-1))[0]}function mi(e,t){var n=Wt(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const pi={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fu,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)=>mi(e*100,t),r:mi,s:Hu,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function gi(e){return e}var yi=Array.prototype.map,xi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yu(e){var t=e.grouping===void 0||e.thousands===void 0?gi:Lu(yi.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?gi:Gu(yi.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=xt(d);var f=d.fill,h=d.align,m=d.sign,p=d.symbol,g=d.zero,x=d.width,S=d.comma,y=d.precision,E=d.trim,b=d.type;b==="n"?(S=!0,b="g"):pi[b]||(y===void 0&&(y=12),E=!0,b="g"),(g||f==="0"&&h==="=")&&(g=!0,f="0",h="=");var v=p==="$"?n:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",C=p==="$"?r:/[%p]/.test(b)?o:"",D=pi[b],P=/[defgprs%]/.test(b);y=y===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function _(k){var F=v,A=C,$,q,X;if(b==="c")A=D(k)+A,k="";else{k=+k;var Y=k<0||1/k<0;if(k=isNaN(k)?l:D(Math.abs(k),y),E&&(k=Uu(k)),Y&&+k==0&&m!=="+"&&(Y=!1),F=(Y?m==="("?m:a:m==="-"||m==="("?"":m)+F,A=(b==="s"?xi[8+Rs/3]:"")+A+(Y&&m==="("?")":""),P){for($=-1,q=k.length;++$<q;)if(X=k.charCodeAt($),48>X||X>57){A=(X===46?i+k.slice($+1):k.slice($))+A,k=k.slice(0,$);break}}}S&&!g&&(k=t(k,1/0));var V=F.length+k.length+A.length,B=V<x?new Array(x-V+1).join(f):"";switch(S&&g&&(k=t(B+k,B.length?x-A.length:1/0),B=""),h){case"<":k=F+k+A+B;break;case"=":k=F+B+k+A;break;case"^":k=B.slice(0,V=B.length>>1)+F+k+A+B.slice(V);break;default:k=B+F+k+A;break}return s(k)}return _.toString=function(){return d+""},_}function c(d,f){var h=u((d=xt(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(We(f)/3)))*3,p=Math.pow(10,-m),g=xi[8+m/3];return function(x){return h(p*x)+g}}return{format:u,formatPrefix:c}}var jt,xr,As;Wu({thousands:",",grouping:[3],currency:["$",""]});function Wu(e){return jt=Yu(e),xr=jt.format,As=jt.formatPrefix,jt}function Bu(e){return Math.max(0,-We(Math.abs(e)))}function Vu(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(We(t)/3)))*3-We(Math.abs(e)))}function qu(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,We(t)-We(e))+1}function Xu(e,t,n,r){var i=Un(e,t,n),s;switch(r=xt(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Vu(i,o))&&(r.precision=s),As(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=qu(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Bu(i))&&(r.precision=s-(r.type==="%")*2);break}}return xr(r)}function vr(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gn(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Xu(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,o=r[i],a=r[s],l,u,c=10;for(a<o&&(u=o,o=a,a=u,u=i,i=s,s=u);c-- >0;){if(u=zn(o,a,n),u===l)return r[i]=o,r[s]=a,t(r);if(u>0)o=Math.floor(o/u)*u,a=Math.ceil(a/u)*u;else if(u<0)o=Math.ceil(o*u)/u,a=Math.floor(a*u)/u;else break;l=u}return e},e}function Is(){var e=Cs();return e.copy=function(){return un(e,Is())},Ce.apply(e,arguments),vr(e)}function ks(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),e[n]=t.floor(i),e[r]=t.ceil(s),e}function vi(e){return Math.log(e)}function bi(e){return Math.exp(e)}function Ku(e){return-Math.log(-e)}function Zu(e){return-Math.exp(-e)}function Qu(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ju(e){return e===10?Qu:e===Math.E?Math.exp:t=>Math.pow(e,t)}function el(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 Ei(e){return(t,n)=>-e(-t,n)}function tl(e){const t=e(vi,bi),n=t.domain;let r=10,i,s;function o(){return i=el(r),s=Ju(r),n()[0]<0?(i=Ei(i),s=Ei(s),e(Ku,Zu)):e(vi,bi),t}return t.base=function(a){return arguments.length?(r=+a,o()):r},t.domain=function(a){return arguments.length?(n(a),o()):n()},t.ticks=a=>{const l=n();let u=l[0],c=l[l.length-1];const d=c<u;d&&([u,c]=[c,u]);let f=i(u),h=i(c),m,p;const g=a==null?10:+a;let x=[];if(!(r%1)&&h-f<g){if(f=Math.floor(f),h=Math.ceil(h),u>0){for(;f<=h;++f)for(m=1;m<r;++m)if(p=f<0?m/s(-f):m*s(f),!(p<u)){if(p>c)break;x.push(p)}}else for(;f<=h;++f)for(m=r-1;m>=1;--m)if(p=f>0?m/s(-f):m*s(f),!(p<u)){if(p>c)break;x.push(p)}x.length*2<g&&(x=Gn(u,c,g))}else x=Gn(f,h,Math.min(h-f,g)).map(s);return d?x.reverse():x},t.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=xt(l)).precision==null&&(l.trim=!0),l=xr(l)),a===1/0)return l;const u=Math.max(1,r*a/t.ticks().length);return c=>{let d=c/s(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=()=>n(ks(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),t}function Ds(){const e=tl(gr()).domain([1,10]);return e.copy=()=>un(e,Ds()).base(e.base()),Ce.apply(e,arguments),e}function wi(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function nl(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function rl(e){return e<0?-e*e:e*e}function il(e){var t=e(oe,oe),n=1;function r(){return n===1?e(oe,oe):n===.5?e(nl,rl):e(wi(n),wi(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},vr(t)}function br(){var e=il(gr());return e.copy=function(){return un(e,br()).exponent(e.exponent())},Ce.apply(e,arguments),e}function sl(){return br.apply(null,arguments).exponent(.5)}function Ps(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[bs(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Ps().domain(e).range(t).unknown(n)},Ce.apply(i,arguments)}const Rn=new Date,An=new Date;function Z(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o<a-s?o:a},i.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const l=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let u;do l.push(u=new Date(+s)),t(s,a),e(s);while(u<s&&s<o);return l},i.filter=s=>Z(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;t(o,-1),!s(o););else for(;--a>=0;)for(;t(o,1),!s(o););}),n&&(i.count=(s,o)=>(Rn.setTime(+s),An.setTime(+o),e(Rn),e(An),Math.floor(n(Rn,An))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Bt=Z(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bt.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Z(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Bt);Bt.range;const ge=1e3,ae=ge*60,ye=ae*60,ve=ye*24,Er=ve*7,Mi=ve*30,In=ve*365,De=Z(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getUTCSeconds());De.range;const wr=Z(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ge)},(e,t)=>{e.setTime(+e+t*ae)},(e,t)=>(t-e)/ae,e=>e.getMinutes());wr.range;const Mr=Z(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ae)},(e,t)=>(t-e)/ae,e=>e.getUTCMinutes());Mr.range;const Sr=Z(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ge-e.getMinutes()*ae)},(e,t)=>{e.setTime(+e+t*ye)},(e,t)=>(t-e)/ye,e=>e.getHours());Sr.range;const Tr=Z(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ye)},(e,t)=>(t-e)/ye,e=>e.getUTCHours());Tr.range;const Tt=Z(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ae)/ve,e=>e.getDate()-1);Tt.range;const ln=Z(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>e.getUTCDate()-1);ln.range;const Os=Z(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>Math.floor(e/ve));Os.range;function je(e){return Z(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ae)/Er)}const cn=je(0),Vt=je(1),ol=je(2),al=je(3),Be=je(4),ul=je(5),ll=je(6);cn.range;Vt.range;ol.range;al.range;Be.range;ul.range;ll.range;function _e(e){return Z(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Er)}const dn=_e(0),qt=_e(1),cl=_e(2),dl=_e(3),Ve=_e(4),fl=_e(5),hl=_e(6);dn.range;qt.range;cl.range;dl.range;Ve.range;fl.range;hl.range;const Cr=Z(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());Cr.range;const Rr=Z(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());Rr.range;const be=Z(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());be.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Z(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});be.range;const Ee=Z(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());Ee.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Z(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ee.range;function js(e,t,n,r,i,s){const o=[[De,1,ge],[De,5,5*ge],[De,15,15*ge],[De,30,30*ge],[s,1,ae],[s,5,5*ae],[s,15,15*ae],[s,30,30*ae],[i,1,ye],[i,3,3*ye],[i,6,6*ye],[i,12,12*ye],[r,1,ve],[r,2,2*ve],[n,1,Er],[t,1,Mi],[t,3,3*Mi],[e,1,In]];function a(u,c,d){const f=c<u;f&&([u,c]=[c,u]);const h=d&&typeof d.range=="function"?d:l(u,c,d),m=h?h.range(u,+c+1):[];return f?m.reverse():m}function l(u,c,d){const f=Math.abs(c-u)/d,h=dr(([,,g])=>g).right(o,f);if(h===o.length)return e.every(Un(u/In,c/In,d));if(h===0)return Bt.every(Math.max(Un(u,c,d),1));const[m,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return m.every(p)}return[a,l]}const[ml,pl]=js(Ee,Rr,dn,Os,Tr,Mr),[gl,yl]=js(be,Cr,cn,Tt,Sr,wr);function kn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Dn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ot(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xl(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,o=e.shortDays,a=e.months,l=e.shortMonths,u=at(i),c=ut(i),d=at(s),f=ut(s),h=at(o),m=ut(o),p=at(a),g=ut(a),x=at(l),S=ut(l),y={a:Y,A:V,b:B,B:ue,c:null,d:Ii,e:Ii,f:zl,g:Zl,G:Jl,H:Fl,I:Ll,j:Gl,L:_s,m:Ul,M:Hl,p:Me,q:Le,Q:Pi,s:Oi,S:Yl,u:Wl,U:Bl,V:Vl,w:ql,W:Xl,x:null,X:null,y:Kl,Y:Ql,Z:ec,"%":Di},E={a:tt,A:nt,b:le,B:rt,c:null,d:ki,e:ki,f:ic,g:mc,G:gc,H:tc,I:nc,j:rc,L:Ns,m:sc,M:oc,p:it,q:st,Q:Pi,s:Oi,S:ac,u:uc,U:lc,V:cc,w:dc,W:fc,x:null,X:null,y:hc,Y:pc,Z:yc,"%":Di},b={a:_,A:k,b:F,B:A,c:$,d:Ri,e:Ri,f:jl,g:Ci,G:Ti,H:Ai,I:Ai,j:kl,L:Ol,m:Il,M:Dl,p:P,q:Al,Q:$l,s:Nl,S:Pl,u:Ml,U:Sl,V:Tl,w:wl,W:Cl,x:q,X,y:Ci,Y:Ti,Z:Rl,"%":_l};y.x=v(n,y),y.X=v(r,y),y.c=v(t,y),E.x=v(n,E),E.X=v(r,E),E.c=v(t,E);function v(O,L){return function(z){var R=[],ee=-1,W=0,ie=O.length,se,Re,Fr;for(z instanceof Date||(z=new Date(+z));++ee<ie;)O.charCodeAt(ee)===37&&(R.push(O.slice(W,ee)),(Re=Si[se=O.charAt(++ee)])!=null?se=O.charAt(++ee):Re=se==="e"?" ":"0",(Fr=L[se])&&(se=Fr(z,Re)),R.push(se),W=ee+1);return R.push(O.slice(W,ee)),R.join("")}}function C(O,L){return function(z){var R=ot(1900,void 0,1),ee=D(R,O,z+="",0),W,ie;if(ee!=z.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(L&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(W=Dn(ot(R.y,0,1)),ie=W.getUTCDay(),W=ie>4||ie===0?qt.ceil(W):qt(W),W=ln.offset(W,(R.V-1)*7),R.y=W.getUTCFullYear(),R.m=W.getUTCMonth(),R.d=W.getUTCDate()+(R.w+6)%7):(W=kn(ot(R.y,0,1)),ie=W.getDay(),W=ie>4||ie===0?Vt.ceil(W):Vt(W),W=Tt.offset(W,(R.V-1)*7),R.y=W.getFullYear(),R.m=W.getMonth(),R.d=W.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ie="Z"in R?Dn(ot(R.y,0,1)).getUTCDay():kn(ot(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ie+5)%7:R.w+R.U*7-(ie+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Dn(R)):kn(R)}}function D(O,L,z,R){for(var ee=0,W=L.length,ie=z.length,se,Re;ee<W;){if(R>=ie)return-1;if(se=L.charCodeAt(ee++),se===37){if(se=L.charAt(ee++),Re=b[se in Si?L.charAt(ee++):se],!Re||(R=Re(O,z,R))<0)return-1}else if(se!=z.charCodeAt(R++))return-1}return R}function P(O,L,z){var R=u.exec(L.slice(z));return R?(O.p=c.get(R[0].toLowerCase()),z+R[0].length):-1}function _(O,L,z){var R=h.exec(L.slice(z));return R?(O.w=m.get(R[0].toLowerCase()),z+R[0].length):-1}function k(O,L,z){var R=d.exec(L.slice(z));return R?(O.w=f.get(R[0].toLowerCase()),z+R[0].length):-1}function F(O,L,z){var R=x.exec(L.slice(z));return R?(O.m=S.get(R[0].toLowerCase()),z+R[0].length):-1}function A(O,L,z){var R=p.exec(L.slice(z));return R?(O.m=g.get(R[0].toLowerCase()),z+R[0].length):-1}function $(O,L,z){return D(O,t,L,z)}function q(O,L,z){return D(O,n,L,z)}function X(O,L,z){return D(O,r,L,z)}function Y(O){return o[O.getDay()]}function V(O){return s[O.getDay()]}function B(O){return l[O.getMonth()]}function ue(O){return a[O.getMonth()]}function Me(O){return i[+(O.getHours()>=12)]}function Le(O){return 1+~~(O.getMonth()/3)}function tt(O){return o[O.getUTCDay()]}function nt(O){return s[O.getUTCDay()]}function le(O){return l[O.getUTCMonth()]}function rt(O){return a[O.getUTCMonth()]}function it(O){return i[+(O.getUTCHours()>=12)]}function st(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var L=v(O+="",y);return L.toString=function(){return O},L},parse:function(O){var L=C(O+="",!1);return L.toString=function(){return O},L},utcFormat:function(O){var L=v(O+="",E);return L.toString=function(){return O},L},utcParse:function(O){var L=C(O+="",!0);return L.toString=function(){return O},L}}}var Si={"-":"",_:" ",0:"0"},Q=/^\s*\d+/,vl=/^%/,bl=/[\\^$*+?|[\]().{}]/g;function H(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function El(e){return e.replace(bl,"\\$&")}function at(e){return new RegExp("^(?:"+e.map(El).join("|")+")","i")}function ut(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function wl(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ml(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Sl(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Tl(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Cl(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Ti(e,t,n){var r=Q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ci(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Rl(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Al(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Il(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ri(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function kl(e,t,n){var r=Q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ai(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Dl(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Pl(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ol(e,t,n){var r=Q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function jl(e,t,n){var r=Q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _l(e,t,n){var r=vl.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $l(e,t,n){var r=Q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Nl(e,t,n){var r=Q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ii(e,t){return H(e.getDate(),t,2)}function Fl(e,t){return H(e.getHours(),t,2)}function Ll(e,t){return H(e.getHours()%12||12,t,2)}function Gl(e,t){return H(1+Tt.count(be(e),e),t,3)}function _s(e,t){return H(e.getMilliseconds(),t,3)}function zl(e,t){return _s(e,t)+"000"}function Ul(e,t){return H(e.getMonth()+1,t,2)}function Hl(e,t){return H(e.getMinutes(),t,2)}function Yl(e,t){return H(e.getSeconds(),t,2)}function Wl(e){var t=e.getDay();return t===0?7:t}function Bl(e,t){return H(cn.count(be(e)-1,e),t,2)}function $s(e){var t=e.getDay();return t>=4||t===0?Be(e):Be.ceil(e)}function Vl(e,t){return e=$s(e),H(Be.count(be(e),e)+(be(e).getDay()===4),t,2)}function ql(e){return e.getDay()}function Xl(e,t){return H(Vt.count(be(e)-1,e),t,2)}function Kl(e,t){return H(e.getFullYear()%100,t,2)}function Zl(e,t){return e=$s(e),H(e.getFullYear()%100,t,2)}function Ql(e,t){return H(e.getFullYear()%1e4,t,4)}function Jl(e,t){var n=e.getDay();return e=n>=4||n===0?Be(e):Be.ceil(e),H(e.getFullYear()%1e4,t,4)}function ec(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+H(t/60|0,"0",2)+H(t%60,"0",2)}function ki(e,t){return H(e.getUTCDate(),t,2)}function tc(e,t){return H(e.getUTCHours(),t,2)}function nc(e,t){return H(e.getUTCHours()%12||12,t,2)}function rc(e,t){return H(1+ln.count(Ee(e),e),t,3)}function Ns(e,t){return H(e.getUTCMilliseconds(),t,3)}function ic(e,t){return Ns(e,t)+"000"}function sc(e,t){return H(e.getUTCMonth()+1,t,2)}function oc(e,t){return H(e.getUTCMinutes(),t,2)}function ac(e,t){return H(e.getUTCSeconds(),t,2)}function uc(e){var t=e.getUTCDay();return t===0?7:t}function lc(e,t){return H(dn.count(Ee(e)-1,e),t,2)}function Fs(e){var t=e.getUTCDay();return t>=4||t===0?Ve(e):Ve.ceil(e)}function cc(e,t){return e=Fs(e),H(Ve.count(Ee(e),e)+(Ee(e).getUTCDay()===4),t,2)}function dc(e){return e.getUTCDay()}function fc(e,t){return H(qt.count(Ee(e)-1,e),t,2)}function hc(e,t){return H(e.getUTCFullYear()%100,t,2)}function mc(e,t){return e=Fs(e),H(e.getUTCFullYear()%100,t,2)}function pc(e,t){return H(e.getUTCFullYear()%1e4,t,4)}function gc(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ve(e):Ve.ceil(e),H(e.getUTCFullYear()%1e4,t,4)}function yc(){return"+0000"}function Di(){return"%"}function Pi(e){return+e}function Oi(e){return Math.floor(+e/1e3)}var ze,Ls,Gs;xc({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 xc(e){return ze=xl(e),Ls=ze.format,ze.parse,Gs=ze.utcFormat,ze.utcParse,ze}function vc(e){return new Date(e)}function bc(e){return e instanceof Date?+e:+new Date(+e)}function Ar(e,t,n,r,i,s,o,a,l,u){var c=Cs(),d=c.invert,f=c.domain,h=u(".%L"),m=u(":%S"),p=u("%I:%M"),g=u("%I %p"),x=u("%a %d"),S=u("%b %d"),y=u("%B"),E=u("%Y");function b(v){return(l(v)<v?h:a(v)<v?m:o(v)<v?p:s(v)<v?g:r(v)<v?i(v)<v?x:S:n(v)<v?y:E)(v)}return c.invert=function(v){return new Date(d(v))},c.domain=function(v){return arguments.length?f(Array.from(v,bc)):f().map(vc)},c.ticks=function(v){var C=f();return e(C[0],C[C.length-1],v??10)},c.tickFormat=function(v,C){return C==null?b:u(C)},c.nice=function(v){var C=f();return(!v||typeof v.range!="function")&&(v=t(C[0],C[C.length-1],v??10)),v?f(ks(C,v)):c},c.copy=function(){return un(c,Ar(e,t,n,r,i,s,o,a,l,u))},c}function zs(){return Ce.apply(Ar(gl,yl,be,Cr,cn,Tt,Sr,wr,De,Ls).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ec(){return Ce.apply(Ar(ml,pl,Ee,Rr,dn,ln,Tr,Mr,De,Gs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function wc(){var e=0,t=1,n,r,i,s,o=oe,a=!1,l;function u(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(s(d)-n)*i,a?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(a=!!d,u):a},u.interpolator=function(d){return arguments.length?(o=d,u):o};function c(d){return function(f){var h,m;return arguments.length?([h,m]=f,o=d(h,m),u):[o(0),o(1)]}}return u.range=c(an),u.rangeRound=c(Ts),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return s=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function Mc(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Us(){var e=vr(wc()(oe));return e.copy=function(){return Mc(e,Us())},lu.apply(e,arguments)}function Sc(e,t){return function(r,i){return i.location==="tick"?i.scale.tickFormat(e)(r):i.location==="zoom-slider-tooltip"?t.tickFormat(2)(r):`${r}`}}function Tc(e){return e.scaleType==="band"}function Cc(e){return e.scaleType==="point"}function Rc(e){return e.type==="piecewise"?Ps(e.thresholds,e.colors):Us([e.min??0,e.max??100],e.color)}function Xt(e){return e.values?Ut(e.values,e.colors).unknown(e.unknownColor??null):Ut(e.colors.map((t,n)=>n),e.colors).unknown(e.unknownColor??null)}function Ft(e){return e.type==="ordinal"?Xt(e):Rc(e)}function Ac(e){const{tickMaxStep:t,tickMinStep:n,tickNumber:r,range:i,domain:s}=e,o=n===void 0?999:Math.floor(Math.abs(s[1]-s[0])/n),a=t===void 0?2:Math.ceil(Math.abs(s[1]-s[0])/t),l=r??Math.floor(Math.abs(i[1]-i[0])/50);return Math.min(o,Math.max(a,l))}function Ic(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Bn(e,t,n){switch(e){case"log":return Ds(t,n);case"pow":return br(t,n);case"sqrt":return sl(t,n);case"time":return zs(t,n);case"utc":return Ec(t,n);default:return Is(t,n)}}const ji=e=>(e==null?void 0:e[0])instanceof Date;function _i(e,t){const n=zs(e.data,t);return(r,{location:i})=>i==="tick"?n.tickFormat(e.tickNumber)(r):`${r.toLocaleString()}`}const Pn=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0],i=e[0]-t[0]*n/r,s=e[1]+(100-t[1])*n/r;return[i,s]};let $i,Ni;class kc{constructor(){if(this.types=new Set,$i)throw new Error("You can only create one instance!");$i=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class Dc{constructor(){if(this.types=new Set,Ni)throw new Error("You can only create one instance!");Ni=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const fn=new kc;fn.addType("bar");fn.addType("line");fn.addType("scatter");const Pc=new Dc;Pc.addType("radar");function Hs(e){return fn.getTypes().has(e)}const Oc=(e,t,n,r,i,s,o,a)=>{var m;const l=r==="x"?i[t].xExtremumGetter:i[t].yExtremumGetter,u=((m=o[t])==null?void 0:m.series)??{},[c,d]=(l==null?void 0:l({series:u,axis:n,axisIndex:s,isDefaultAxis:s===0,getFilters:a}))??[1/0,-1/0],[f,h]=e;return[Math.min(c,f),Math.max(d,h)]},Ys=(e,t,n,r,i,s)=>{const a=Object.keys(n).filter(Hs).reduce((l,u)=>Oc(l,u,e,t,n,r,i,s),[1/0,-1/0]);return Number.isNaN(a[0])||Number.isNaN(a[1])?[1/0,-1/0]:a},jc=(e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(Hs).forEach(o=>{var u,c,d;const a=((u=n[o])==null?void 0:u.series)??{},l=(d=(c=t[o]).axisTooltipGetter)==null?void 0:d.call(c,a);l!==void 0&&l.forEach(({axisId:f,direction:h})=>{h===e&&i.add(f??r)})}),i},_c=(e,t,n,r)=>{var i;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((i=r.line)==null?void 0:i.seriesOrder)??[]){const o=r.line.series[s];if(o.xAxisId===e.id||o.xAxisId===void 0&&n===0)return"strict"}return"nice"};function $c(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}const Nc=.2,Fc=.1;function Ws({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:i,zoomMap:s,zoomOptions:o,getFilters:a,preferStrictDomainInLineCharts:l}){if(n===void 0)return{axis:{},axisIds:[]};const u=jc(i,r,t,n[0].id),c={};return n.forEach((d,f)=>{const h=d,m=o==null?void 0:o[h.id],p=s==null?void 0:s.get(h.id),g=p?[p.start,p.end]:[0,100],x=$c(e,i,h),[S,y]=Ys(h,i,r,f,t,p===void 0&&!m?a:void 0),E=!h.ignoreTooltip&&u.has(h.id),b=h.data??[];if(Tc(h)){const Y=h.categoryGapRatio??Nc,V=h.barGapRatio??Fc,B=i==="y"?[x[1],x[0]]:x,ue=Pn(B,g);if(c[h.id]=T({offset:0,height:0,categoryGapRatio:Y,barGapRatio:V,triggerTooltip:E},h,{data:b,scale:fr(h.data,ue).paddingInner(Y).paddingOuter(Y/2),tickNumber:h.data.length,colorScale:h.colorMap&&(h.colorMap.type==="ordinal"?Xt(T({values:h.data},h.colorMap)):Ft(h.colorMap))}),ji(h.data)){const Me=_i(h,B);c[h.id].valueFormatter=h.valueFormatter??Me}}if(Cc(h)){const Y=i==="y"?[...x].reverse():x,V=Pn(Y,g);if(c[h.id]=T({offset:0,height:0,triggerTooltip:E},h,{data:b,scale:cu(h.data,V),tickNumber:h.data.length,colorScale:h.colorMap&&(h.colorMap.type==="ordinal"?Xt(T({values:h.data},h.colorMap)):Ft(h.colorMap))}),ji(h.data)){const B=_i(h,Y);c[h.id].valueFormatter=h.valueFormatter??B}}if(h.scaleType==="band"||h.scaleType==="point")return;const v=h.scaleType??"linear",C=l?_c(h,i,f,t):h.domainLimit??"nice",D=[h.min??S,h.max??y];if(typeof C=="function"){const{min:Y,max:V}=C(S,y);D[0]=Y,D[1]=V}const P=Ac(T({},h,{range:x,domain:D})),_=Ic(P,g),k=Pn(x,g),F=Bn(v,D,k),A=C==="nice"?F.nice(P):F,[$,q]=A.domain(),X=[h.min??$,h.max??q];c[h.id]=T({offset:0,height:0,triggerTooltip:E},h,{data:b,scaleType:v,scale:A.domain(X),tickNumber:_,colorScale:h.colorMap&&Ft(h.colorMap),valueFormatter:h.valueFormatter??Sc(_,Bn(v,x.map(Y=>F.invert(Y)),x))})}),{axis:c,axisIds:n.map(({id:d})=>d)}}function Lc(e){return e!=null}function Bs({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:i}){return(s,o)=>{var g;const a=t[s.id];if(!a||a.filterMode!=="discard")return null;const l=e==null?void 0:e.get(s.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let u=[];const c=s.scaleType;c==="point"||c==="band"?u=[0,(((g=s.data)==null?void 0:g.length)??1)-1]:u=Ys(s,i,n,o,r);let d,f;[d,f]=Bn(!c||c==="band"||c==="point"?"linear":c,u,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,f=f instanceof Date?f.getTime():f;const m=d+l.start*(f-d)/100,p=d+l.end*(f-d)/100;return(x,S)=>{var E;const y=x[i]??((E=s.data)==null?void 0:E[S]);return y==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof y=="string"?S>=m&&S<=p:y>=m&&y<=p}}}const Gc=e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:i})=>(s,o)=>{var u,c;return!(t===n?r:n)||i?((c=(u=Object.values(e??{}))[0])==null?void 0:c.call(u,s,o))??!0:[r,n].filter(d=>d!==t).map(d=>e[d??""]).filter(Lc).every(d=>d(s,o))},Fi=e=>(t=[])=>t.reduce((n,r)=>{const{zoom:i,id:s}=r,o=cr(i,s,e);return o&&(n[s]=o),n},{}),zc=e=>{const t=new Map;return e.forEach(n=>{t.set(n.axisId,n)}),t},Vs=e=>e.zoom;G([Vs],e=>e==null?void 0:e.isInteracting);const hn=G([Vs],e=>(e==null?void 0:e.zoomData)&&zc(e==null?void 0:e.zoomData)),Ct=G([Qe,Je],(e,t)=>T({},Fi("x")(e),Fi("y")(t)));G([Ct,(e,t)=>t],(e,t)=>e[t]);const Uc=G([hn,Ct,on,wt],(e,t,n,r)=>e&&t&&Bs({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:"x"})),Hc=G([hn,Ct,on,wt],(e,t,n,r)=>e&&t&&Bs({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:"y"})),qs=G([Uc,Hc,Qe,Je],(e,t,n,r)=>{if(e===void 0||t===void 0)return;const i=n==null?void 0:n.reduce((o,a,l)=>{const u=e(a,l);return u!==null&&(o[a.id]=u),o},{}),s=r==null?void 0:r.reduce((o,a,l)=>{const u=t(a,l);return u!==null&&(o[a.id]=u),o},{});if(!(Object.keys(i??{}).length===0&&Object.keys(s??{}).length===0))return Gc(T({},i,s))}),$e=G([Qe,Et,wt,on,hn,Ct,qs,cs],(e,t,n,r,i,s,o,a)=>Ws({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"x",zoomMap:i,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:a})),Ne=G([Je,Et,wt,on,hn,Ct,qs,cs],(e,t,n,r,i,s,o,a)=>Ws({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"y",zoomMap:i,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:a}));G([$e,Ne,(e,t)=>t],(e,t,n)=>(e==null?void 0:e.axis[n])??(t==null?void 0:t.axis[n]));G([Qe,Je,(e,t)=>t],(e,t,n)=>{const r=(e==null?void 0:e.find(i=>i.id===n))??(t==null?void 0:t.find(i=>i.id===n))??null;if(r)return r});function Xs(e){return e.bandwidth!==void 0}function Ue(e){return e instanceof Date?e.getTime():e}function qe(e,t){const{scale:n,data:r,reverse:i}=e;if(!Xs(n)){const o=n.invert(t);if(r===void 0)return-1;const a=Ue(o);return r==null?void 0:r.findIndex((u,c)=>{const d=Ue(u);return d>a&&(c===0||Math.abs(a-d)<=Math.abs(a-Ue(r[c-1])))||d<=a&&(c===r.length-1||Math.abs(Ue(o)-d)<Math.abs(Ue(o)-Ue(r[c+1])))})}const s=n.bandwidth()===0?Math.floor((t-Math.min(...n.range())+n.step()/2)/n.step()):Math.floor((t-Math.min(...n.range()))/n.step());return s<0||s>=r.length?-1:i?r.length-1-s:s}function Li(e,t,n){const{scale:r,data:i}=e;if(!Xs(r)){const s=r.invert(t);return n<0?s:i[n]}return n<0||n>=i.length?null:i[n]}function Gi(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}const Yc=Object.is;function Ks(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const i in e)if(n+=1,!Yc(e[i],t[i])||!(i in t))return!1;for(const i in t)r+=1;return n===r}const Ir=({store:e})=>{const t=U.useEventCallback(function(){e.update(o=>T({},o,{interaction:{pointer:null,item:null}}))}),n=U.useEventCallback(function(o){e.update(a=>{const l=a.interaction.item;return o?l===null||Object.keys(o).some(u=>o[u]!==l[u])?a:T({},a,{interaction:T({},a.interaction,{item:null})}):l===null?a:T({},a,{interaction:T({},a.interaction,{item:null})})})}),r=U.useEventCallback(function(o){e.update(a=>Ks(a.interaction.item,o)?a:T({},a,{interaction:T({},a.interaction,{item:o})}))}),i=U.useEventCallback(function(o){e.update(a=>T({},a,{interaction:T({},a.interaction,{pointer:o})}))});return{instance:{cleanInteraction:t,setItemInteraction:r,removeItemInteraction:n,setPointerCoordinate:i}}};Ir.getInitialState=()=>({interaction:{item:null,pointer:null}});Ir.params={};const kr=e=>e.interaction,Wc=G([kr],e=>e!==void 0),Bc=G([kr],e=>(e==null?void 0:e.item)??null),Zs=G([kr],e=>(e==null?void 0:e.pointer)??null),mn=G([Zs],e=>e&&e.x),pn=G([Zs],e=>e&&e.y);G([Bc],e=>e!==null);function ht(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s+=1)if(!ht(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const i=Array.from(e.entries());for(let s=0;s<i.length;s+=1)if(!t.has(i[s][0]))return!1;for(let s=0;s<i.length;s+=1){const o=i[s];if(!ht(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const i=Array.from(e.entries());for(let s=0;s<i.length;s+=1)if(!t.has(i[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s+=1)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(let i=0;i<r;i+=1){const s=n[i];if(!ht(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const gn=(e,t)=>t;function Vn(e,t,n=t.axisIds[0]){return Array.isArray(n)?n.map(r=>qe(t.axis[r],e)):qe(t.axis[n],e)}const Qs=(e,t,n)=>{if(e===null)return null;const r=Vn(e,t,n);return r===-1?null:r},Vc=G([mn,$e,gn],Qs),qc=G([pn,Ne,gn],Qs),Xc=G([mn,pn,$e,Ne],(e,t,n,r)=>[...e===null?[]:n.axisIds.map(i=>({axisId:i,dataIndex:Vn(e,n,i)})),...t===null?[]:r.axisIds.map(i=>({axisId:i,dataIndex:Vn(t,r,i)}))].filter(i=>i.dataIndex!==null&&i.dataIndex>=0));function Js(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((i,s)=>Li(t.axis[i],e,n[s])):Li(t.axis[r],e,n)}G([mn,$e,Vc,gn],(e,t,n,r)=>e===null||n===null||t.axisIds.length===0?null:Js(e,t,n,r));G([pn,Ne,qc,gn],(e,t,n,r)=>e===null||n===null||t.axisIds.length===0?null:Js(e,t,n,r));const Kc=G([mn,$e],(e,t)=>e===null?[]:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:qe(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0),{memoizeOptions:{resultEqualityCheck:ht}}),Zc=G([pn,Ne],(e,t)=>e===null?[]:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:qe(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0),{memoizeOptions:{resultEqualityCheck:ht}});G([Kc,Zc],(e,t)=>e.length>0||t.length>0);const zi={};function Qc(e,t){const n=j.useRef(zi);return n.current===zi&&(n.current=e(t)),n}const Jc=()=>{};function ed(e,t,n,r){const i=Qc(td,{store:e,selector:t,skip:r}).current;i.effect=n,j.useEffect(i.onMount(r),[r])}function td(e){const{store:t,selector:n,skip:r}=e;let i=!1,s;const o=()=>{a.dispose??(a.dispose=t.subscribe(l=>{const u=n(l);a.effect(s,u),s=u}))},a={effect:Jc,dispose:null,onMount:l=>()=>{if(!l)return i||(i=!0,s=n(t.value)),o(),()=>{var u;(u=a.dispose)==null||u.call(a),a.dispose=null}}};return r||(i=!0,s=n(t.value),o()),a}const yn=({params:e,store:t,seriesConfig:n,svgRef:r,instance:i})=>{const{xAxis:s,yAxis:o,dataset:a,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const y=[...s??[],...o??[]].filter(b=>b.id).map(b=>b.id),E=new Set(y.filter((b,v)=>y.indexOf(b)!==v));E.size>0&&mt([`MUI X Charts: The following axis ids are duplicated: ${Array.from(E).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
41
|
+
`),"error")}const u=ne(t,Et),c=ne(t,wt),d=ne(t,Wc),{axis:f,axisIds:h}=ne(t,$e),{axis:m,axisIds:p}=ne(t,Ne);ps({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),U.useEnhancedEffect(()=>{e.highlightedAxis!==void 0&&t.update(y=>y.controlledCartesianAxisHighlight===e.highlightedAxis?y:T({},y,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const g=j.useRef(!0);j.useEffect(()=>{if(g.current){g.current=!1;return}t.update(y=>T({},y,{cartesianAxis:T({},y.cartesianAxis,{x:xs(s,a),y:vs(o,a)})}))},[n,u,s,o,a,t]);const x=h[0],S=p[0];return ed(t,Xc,(y,E)=>{if(!Object.is(y,E)){if(y.length!==E.length){l(E);return}y!=null&&y.some(({axisId:b,dataIndex:v},C)=>E[C].axisId!==b||E[C].dataIndex!==v)&&l(E)}},!l),j.useEffect(()=>{const y=r.current;if(!d||!y||e.disableAxisListener)return()=>{};const E=i.addInteractionListener("moveEnd",k=>{var F;k.detail.activeGestures.pan||(F=i.cleanInteraction)==null||F.call(i)}),b=i.addInteractionListener("panEnd",k=>{var F;k.detail.activeGestures.move||(F=i.cleanInteraction)==null||F.call(i)}),v=i.addInteractionListener("quickPressEnd",k=>{var F;!k.detail.activeGestures.move&&!k.detail.activeGestures.pan&&((F=i.cleanInteraction)==null||F.call(i))}),C=k=>{var q,X;const F=k.detail.srcEvent,A=k.detail.target,$=Gi(y,F);if(k.detail.srcEvent.buttons>=1&&(A!=null&&A.hasPointerCapture(k.detail.srcEvent.pointerId))&&!(A!=null&&A.closest("[data-charts-zoom-slider]"))&&(A==null||A.releasePointerCapture(k.detail.srcEvent.pointerId)),!i.isPointInside($.x,$.y,A)){(q=i.cleanInteraction)==null||q.call(i);return}(X=i.setPointerCoordinate)==null||X.call(i,$)},D=i.addInteractionListener("move",C),P=i.addInteractionListener("pan",C),_=i.addInteractionListener("quickPress",C);return()=>{D.cleanup(),E.cleanup(),P.cleanup(),b.cleanup(),_.cleanup(),v.cleanup()}},[r,t,f,x,m,S,i,e.disableAxisListener,d]),j.useEffect(()=>{const y=r.current,E=e.onAxisClick;if(y===null||!E)return()=>{};const b=i.addInteractionListener("tap",v=>{let C=null,D=!1;const P=Gi(y,v.detail.srcEvent),_=qe(f[x],P.x);D=_!==-1,C=D?_:qe(m[S],P.y);const k=D?h[0]:p[0];if(C==null||C===-1)return;const F=(D?f:m)[k].data[C],A={};Object.keys(c).filter($=>["bar","line"].includes($)).forEach($=>{var q;(q=c[$])==null||q.seriesOrder.forEach(X=>{const Y=c[$].series[X],V=Y.xAxisId,B=Y.yAxisId,ue=D?V:B;(ue===void 0||ue===k)&&(A[X]=Y.data[C])})}),E(v.detail.srcEvent,{dataIndex:C,axisValue:F,seriesValues:A})});return()=>{b.cleanup()}},[e.onAxisClick,c,r,f,h,m,p,x,S,i]),{}};yn.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};yn.getDefaultizedParams=({params:e})=>T({},e,{colors:e.colors??ds,theme:e.theme??"light",defaultizedXAxis:xs(e.xAxis,e.dataset),defaultizedYAxis:vs(e.yAxis,e.dataset)});yn.getInitialState=e=>T({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Ui(e,t){return e.id!==void 0?e:T({id:t},e)}function Hi(e){return e.colorMap?T({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Xt(T({values:e.data},e.colorMap)):Ft(e.colorMap.type==="continuous"?T({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function eo(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const n={},r=[];return e.forEach((i,s)=>{const o=i.dataKey,a=i.id??`defaultized-z-axis-${s}`;if(o===void 0||i.data!==void 0){n[a]=Hi(Ui(i,a)),r.push(a);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");n[a]=Hi(Ui(T({},i,{data:t.map(l=>l[o])}),a)),r.push(a)}),{axis:n,axisIds:r}}const Dr=({params:e,store:t})=>{const{zAxis:n,dataset:r}=e,i=j.useRef(!0);return j.useEffect(()=>{if(i.current){i.current=!1;return}t.update(s=>T({},s,{zAxis:eo(n,r)}))},[n,r,t]),{}};Dr.params={zAxis:!0,dataset:!0};Dr.getInitialState=e=>({zAxis:eo(e.zAxis,e.dataset)});const nd=e=>e,rd=G([nd],e=>e.zAxis),xn=({store:e,params:t})=>{ps({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),U.useEnhancedEffect(()=>{e.update(i=>i.highlight.item===t.highlightedItem?i:T({},i,{highlight:T({},i.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const n=U.useEventCallback(()=>{var i;(i=t.onHighlightChange)==null||i.call(t,null),e.update(s=>T({},s,{highlight:{item:null}}))}),r=U.useEventCallback(i=>{var o;const s=e.getSnapshot().highlight.item;Ks(s,i)||((o=t.onHighlightChange)==null||o.call(t,i),e.update(a=>T({},a,{highlight:{item:i}})))});return{instance:{clearHighlight:n,setHighlight:r}}};xn.getDefaultizedParams=({params:e})=>T({},e,{highlightedItem:e.highlightedItem??null});xn.getInitialState=e=>({highlight:{item:e.highlightedItem}});xn.params={highlightedItem:!0,onHighlightChange:!0};const Yi=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},to=e=>{var l;const{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n==null?void 0:n({currentAxisId:t.id,isDefaultAxis:r}),s=i?(l=t.data)==null?void 0:l.filter((u,c)=>i({x:null,y:null},c)):t.data,o=Math.min(...s??[]),a=Math.max(...s??[]);return[o,a]},no=e=>t=>{const{series:n,axis:r,getFilters:i,isDefaultAxis:s}=t;return Object.keys(n).filter(o=>{const a=e==="x"?n[o].xAxisId:n[o].yAxisId;return a===r.id||s&&a===void 0}).reduce((o,a)=>{const{stackedData:l}=n[a],u=i==null?void 0:i({currentAxisId:r.id,isDefaultAxis:s,seriesXAxisId:n[a].xAxisId,seriesYAxisId:n[a].yAxisId}),[c,d]=(l==null?void 0:l.reduce((f,h,m)=>u&&(!u(Yi(h[0],e),m)||!u(Yi(h[1],e),m))?f:[Math.min(...h,f[0]),Math.max(...h,f[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(c,o[0]),Math.max(d,o[1])]},[1/0,-1/0])},id=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?no("x")(e):to(e),sd=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?to(e):no("y")(e);function K(e){return function(){return e}}const Wi=Math.abs,J=Math.atan2,Ae=Math.cos,od=Math.max,On=Math.min,he=Math.sin,He=Math.sqrt,te=1e-12,vt=Math.PI,Kt=vt/2,Lt=2*vt;function ad(e){return e>1?0:e<-1?vt:Math.acos(e)}function Bi(e){return e>=1?Kt:e<=-1?-Kt:Math.asin(e)}const qn=Math.PI,Xn=2*qn,Ie=1e-6,ud=Xn-Ie;function ro(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ld(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ro;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class cd{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ro:ld(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,a=this._y1,l=r-t,u=i-n,c=o-t,d=a-n,f=c*c+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Ie)if(!(Math.abs(d*l-u*c)>Ie)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,m=i-a,p=l*l+u*u,g=h*h+m*m,x=Math.sqrt(p),S=Math.sqrt(f),y=s*Math.tan((qn-Math.acos((p+f-g)/(2*x*S)))/2),E=y/S,b=y/x;Math.abs(E-1)>Ie&&this._append`L${t+E*c},${n+E*d}`,this._append`A${s},${s},0,0,${+(d*h>c*m)},${this._x1=t+b*l},${this._y1=n+b*u}`}}arc(t,n,r,i,s,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),u=t+a,c=n+l,d=1^o,f=o?i-s:s-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Ie||Math.abs(this._y1-c)>Ie)&&this._append`L${u},${c}`,r&&(f<0&&(f=f%Xn+Xn),f>ud?this._append`A${r},${r},0,1,${d},${t-a},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=c}`:f>Ie&&this._append`A${r},${r},0,${+(f>=qn)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function dd(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new cd(t)}function fd(e){return e.innerRadius}function hd(e){return e.outerRadius}function md(e){return e.startAngle}function pd(e){return e.endAngle}function gd(e){return e&&e.padAngle}function yd(e,t,n,r,i,s,o,a){var l=n-e,u=r-t,c=o-i,d=a-s,f=d*l-c*u;if(!(f*f<te))return f=(c*(t-s)-d*(e-i))/f,[e+f*l,t+f*u]}function _t(e,t,n,r,i,s,o){var a=e-n,l=t-r,u=(o?s:-s)/He(a*a+l*l),c=u*l,d=-u*a,f=e+c,h=t+d,m=n+c,p=r+d,g=(f+m)/2,x=(h+p)/2,S=m-f,y=p-h,E=S*S+y*y,b=i-s,v=f*p-m*h,C=(y<0?-1:1)*He(od(0,b*b*E-v*v)),D=(v*y-S*C)/E,P=(-v*S-y*C)/E,_=(v*y+S*C)/E,k=(-v*S+y*C)/E,F=D-g,A=P-x,$=_-g,q=k-x;return F*F+A*A>$*$+q*q&&(D=_,P=k),{cx:D,cy:P,x01:-c,y01:-d,x11:D*(i/b-1),y11:P*(i/b-1)}}function io(){var e=fd,t=hd,n=K(0),r=null,i=md,s=pd,o=gd,a=null,l=dd(u);function u(){var c,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),m=i.apply(this,arguments)-Kt,p=s.apply(this,arguments)-Kt,g=Wi(p-m),x=p>m;if(a||(a=c=l()),h<f&&(d=h,h=f,f=d),!(h>te))a.moveTo(0,0);else if(g>Lt-te)a.moveTo(h*Ae(m),h*he(m)),a.arc(0,0,h,m,p,!x),f>te&&(a.moveTo(f*Ae(p),f*he(p)),a.arc(0,0,f,p,m,x));else{var S=m,y=p,E=m,b=p,v=g,C=g,D=o.apply(this,arguments)/2,P=D>te&&(r?+r.apply(this,arguments):He(f*f+h*h)),_=On(Wi(h-f)/2,+n.apply(this,arguments)),k=_,F=_,A,$;if(P>te){var q=Bi(P/f*he(D)),X=Bi(P/h*he(D));(v-=q*2)>te?(q*=x?1:-1,E+=q,b-=q):(v=0,E=b=(m+p)/2),(C-=X*2)>te?(X*=x?1:-1,S+=X,y-=X):(C=0,S=y=(m+p)/2)}var Y=h*Ae(S),V=h*he(S),B=f*Ae(b),ue=f*he(b);if(_>te){var Me=h*Ae(y),Le=h*he(y),tt=f*Ae(E),nt=f*he(E),le;if(g<vt)if(le=yd(Y,V,tt,nt,Me,Le,B,ue)){var rt=Y-le[0],it=V-le[1],st=Me-le[0],O=Le-le[1],L=1/he(ad((rt*st+it*O)/(He(rt*rt+it*it)*He(st*st+O*O)))/2),z=He(le[0]*le[0]+le[1]*le[1]);k=On(_,(f-z)/(L-1)),F=On(_,(h-z)/(L+1))}else k=F=0}C>te?F>te?(A=_t(tt,nt,Y,V,h,F,x),$=_t(Me,Le,B,ue,h,F,x),a.moveTo(A.cx+A.x01,A.cy+A.y01),F<_?a.arc(A.cx,A.cy,F,J(A.y01,A.x01),J($.y01,$.x01),!x):(a.arc(A.cx,A.cy,F,J(A.y01,A.x01),J(A.y11,A.x11),!x),a.arc(0,0,h,J(A.cy+A.y11,A.cx+A.x11),J($.cy+$.y11,$.cx+$.x11),!x),a.arc($.cx,$.cy,F,J($.y11,$.x11),J($.y01,$.x01),!x))):(a.moveTo(Y,V),a.arc(0,0,h,S,y,!x)):a.moveTo(Y,V),!(f>te)||!(v>te)?a.lineTo(B,ue):k>te?(A=_t(B,ue,Me,Le,f,-k,x),$=_t(Y,V,tt,nt,f,-k,x),a.lineTo(A.cx+A.x01,A.cy+A.y01),k<_?a.arc(A.cx,A.cy,k,J(A.y01,A.x01),J($.y01,$.x01),!x):(a.arc(A.cx,A.cy,k,J(A.y01,A.x01),J(A.y11,A.x11),!x),a.arc(0,0,f,J(A.cy+A.y11,A.cx+A.x11),J($.cy+$.y11,$.cx+$.x11),x),a.arc($.cx,$.cy,k,J($.y11,$.x11),J($.y01,$.x01),!x))):a.arc(0,0,f,b,E,x)}if(a.closePath(),c)return a=null,c+""||null}return u.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-vt/2;return[Ae(d)*c,he(d)*c]},u.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:K(+c),u):e},u.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:K(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:K(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:K(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:K(+c),u):i},u.endAngle=function(c){return arguments.length?(s=typeof c=="function"?c:K(+c),u):s},u.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:K(+c),u):o},u.context=function(c){return arguments.length?(a=c??null,u):a},u}function so(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xd(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function vd(e){return e}function bd(){var e=vd,t=xd,n=null,r=K(0),i=K(Lt),s=K(0);function o(a){var l,u=(a=so(a)).length,c,d,f=0,h=new Array(u),m=new Array(u),p=+r.apply(this,arguments),g=Math.min(Lt,Math.max(-Lt,i.apply(this,arguments)-p)),x,S=Math.min(Math.abs(g)/u,s.apply(this,arguments)),y=S*(g<0?-1:1),E;for(l=0;l<u;++l)(E=m[h[l]=l]=+e(a[l],l,a))>0&&(f+=E);for(t!=null?h.sort(function(b,v){return t(m[b],m[v])}):n!=null&&h.sort(function(b,v){return n(a[b],a[v])}),l=0,d=f?(g-u*y)/f:0;l<u;++l,p=x)c=h[l],E=m[c],x=p+(E>0?E*d:0)+y,m[c]={data:a[c],index:l,value:E,startAngle:p,endAngle:x,padAngle:S};return m}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:K(+a),o):e},o.sortValues=function(a){return arguments.length?(t=a,n=null,o):t},o.sort=function(a){return arguments.length?(n=a,t=null,o):n},o.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:K(+a),o):r},o.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:K(+a),o):i},o.padAngle=function(a){return arguments.length?(s=typeof a=="function"?a:K(+a),o):s},o}function Xe(e,t){if((o=e.length)>1)for(var n=1,r,i,s=e[t[0]],o,a=s.length;n<o;++n)for(i=s,s=e[t[n]],r=0;r<a;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ke(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Ed(e,t){return e[t]}function wd(e){const t=[];return t.key=e,t}function oo(){var e=K([]),t=Ke,n=Xe,r=Ed;function i(s){var o=Array.from(e.apply(this,arguments),wd),a,l=o.length,u=-1,c;for(const d of s)for(a=0,++u;a<l;++a)(o[a][u]=[0,+r(d,o[a].key,u,s)]).data=d;for(a=0,c=so(t(o));a<l;++a)o[c[a]].index=a;return n(o,c),o}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:K(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:K(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?Ke:typeof s=="function"?s:K(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Xe,i):n},i}function Md(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,o;i<s;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Xe(e,t)}}function Sd(e,t){if((l=e.length)>0)for(var n,r=0,i,s,o,a,l,u=e[t[0]].length;r<u;++r)for(o=a=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=s):s<0?(i[1]=a,i[0]=a+=s):(i[0]=0,i[1]=s)}function Td(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var o=0,a=0;o<i;++o)a+=e[o][n][1]||0;r[n][1]+=r[n][0]=-a/2}Xe(e,t)}}function Cd(e,t){if(!(!((o=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,o;r<s;++r){for(var a=0,l=0,u=0;a<o;++a){for(var c=e[t[a]],d=c[r][1]||0,f=c[r-1][1]||0,h=(d-f)/2,m=0;m<a;++m){var p=e[t[m]],g=p[r][1]||0,x=p[r-1][1]||0;h+=g-x}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,Xe(e,t)}}function ao(e){var t=e.map(Rd);return Ke(e).sort(function(n,r){return t[n]-t[r]})}function Rd(e){for(var t=-1,n=0,r=e.length,i,s=-1/0;++t<r;)(i=+e[t][1])>s&&(s=i,n=t);return n}function uo(e){var t=e.map(lo);return Ke(e).sort(function(n,r){return t[n]-t[r]})}function lo(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function Ad(e){return uo(e).reverse()}function Id(e){var t=e.length,n,r,i=e.map(lo),s=ao(e),o=0,a=0,l=[],u=[];for(n=0;n<t;++n)r=s[n],o<a?(o+=i[r],l.push(r)):(a+=i[r],u.push(r));return u.reverse().concat(l)}function kd(e){return Ke(e).reverse()}const jn={appearance:ao,ascending:uo,descending:Ad,insideOut:Id,none:Ke,reverse:kd},_n={expand:Md,diverging:Sd,none:Xe,silhouette:Td,wiggle:Cd},co=e=>{const{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],s={};return n.forEach(o=>{const{stack:a,stackOrder:l,stackOffset:u}=t[o];a===void 0?i.push({ids:[o],stackingOrder:jn.none,stackingOffset:_n.none}):s[a]===void 0?(s[a]=i.length,i.push({ids:[o],stackingOrder:jn[l??(r==null?void 0:r.stackOrder)??"none"],stackingOffset:_n[u??(r==null?void 0:r.stackOffset)??"diverging"]})):(i[s[a]].ids.push(o),l!==void 0&&(i[s[a]].stackingOrder=jn[l]),u!==void 0&&(i[s[a]].stackingOffset=_n[u]))}),i},Dd=e=>e==null?"":e.toLocaleString(),Pd=(e,t)=>{const{seriesOrder:n,series:r}=e,i=co(e),s=t??[];n.forEach(a=>{const l=r[a].data;if(l!==void 0)l.forEach((u,c)=>{s.length<=c?s.push({[a]:u}):s[c][a]=u});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${a}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
42
|
+
`))});const o={};return i.forEach(a=>{const{ids:l,stackingOffset:u,stackingOrder:c}=a,d=oo().keys(l.map(f=>{const h=r[f].dataKey;return r[f].data===void 0&&h!==void 0?h:f})).value((f,h)=>f[h]??0).order(c).offset(u)(s);l.forEach((f,h)=>{const m=r[f].dataKey;o[f]=T({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:r[f].valueFormatter??Dd},r[f],{data:m?t.map(p=>{const g=p[m];return typeof g!="number"?(process.env.NODE_ENV!=="production"&&g!==null&&mt([`MUI X Charts: your dataset key "${m}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):g}):r[f].data,stackedData:d[h].map(([p,g])=>[p,g])})})}),{seriesOrder:n,stackingGroups:i,series:o}};function we(e,t){return typeof e=="function"?e(t):e}const Od=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=we(n[i].label,"legend");return s===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:s}),r},[])},jd=(e,t,n)=>{const r=e.layout==="vertical",i=r?t==null?void 0:t.colorScale:n==null?void 0:n.colorScale,s=r?n==null?void 0:n.colorScale:t==null?void 0:t.colorScale,o=r?t==null?void 0:t.data:n==null?void 0:n.data;return s?a=>{if(a===void 0)return e.color;const l=e.data[a],u=l===null?e.color:s(l);return u===null?e.color:u}:i&&o?a=>{if(a===void 0)return e.color;const l=o[a],u=l===null?e.color:i(l);return u===null?e.color:u}:()=>e.color},_d=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=we(t.label,"tooltip"),s=t.data[r.dataIndex];if(s==null)return null;const o=t.valueFormatter(s,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:s,formattedValue:o,markType:t.labelMarkType}},$d=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),Nd=(e,t,n)=>T({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),Fd={seriesProcessor:Pd,colorProcessor:jd,legendGetter:Od,tooltipGetter:_d,axisTooltipGetter:$d,xExtremumGetter:id,yExtremumGetter:sd,getSeriesWithDefaultValues:Nd},Zt=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],Ld=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].xAxisId;return o===n.id||o===void 0&&r}).reduce((s,o)=>{var u;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),l=(u=t[o].data)==null?void 0:u.reduce((c,d,f)=>a&&!a(d,f)?c:Zt(c,[d.x,d.x]),[1/0,-1/0]);return Zt(s,l??[1/0,-1/0])},[1/0,-1/0])},Gd=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId;return o===n.id||o===void 0&&r}).reduce((s,o)=>{var u;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),l=(u=t[o].data)==null?void 0:u.reduce((c,d,f)=>a&&!a(d,f)?c:Zt(c,[d.y,d.y]),[1/0,-1/0]);return Zt(s,l??[1/0,-1/0])},[1/0,-1/0])},zd=({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([i,s])=>{const o=s==null?void 0:s.datasetKeys,a=["x","y","id"].filter(u=>typeof(o==null?void 0:o[u])!="string");if(s!=null&&s.datasetKeys&&a.length>0)throw new Error([`MUI X Charts: scatter series with id='${i}' has incomplete datasetKeys.`,`Properties ${a.map(u=>`"${u}"`).join(", ")} are missing.`].join(`
|
|
43
|
+
`));const l=o?(n==null?void 0:n.map(u=>({x:u[o.x]??null,y:u[o.y]??null,z:o.z&&u[o.z],id:o.id&&u[o.id]})))??[]:s.data??[];return[i,T({labelMarkType:"circle",markerSize:4},s,{preview:T({markerSize:1},s==null?void 0:s.preview),data:l,valueFormatter:s.valueFormatter??(u=>u&&`(${u.x}, ${u.y})`)})]})),seriesOrder:t}),Ud=(e,t,n,r)=>{const i=r==null?void 0:r.colorScale,s=n==null?void 0:n.colorScale,o=t==null?void 0:t.colorScale;return i?a=>{var c,d;if(a===void 0)return e.color;if(((c=r==null?void 0:r.data)==null?void 0:c[a])!==void 0){const f=i((d=r==null?void 0:r.data)==null?void 0:d[a]);if(f!==null)return f}const l=e.data[a],u=l===null?e.color:i(l.z);return u===null?e.color:u}:s?a=>{if(a===void 0)return e.color;const l=e.data[a],u=l===null?e.color:s(l.y);return u===null?e.color:u}:o?a=>{if(a===void 0)return e.color;const l=e.data[a],u=l===null?e.color:o(l.x);return u===null?e.color:u}:()=>e.color},Hd=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=we(n[i].label,"legend");return s===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:s}),r},[])},Yd=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=we(t.label,"tooltip"),s=t.data[r.dataIndex],o=t.valueFormatter(s,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:s,formattedValue:o,markType:t.labelMarkType}},Wd=(e,t,n)=>T({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),Bd={seriesProcessor:zd,colorProcessor:Ud,legendGetter:Hd,tooltipGetter:Yd,xExtremumGetter:Ld,yExtremumGetter:Gd,getSeriesWithDefaultValues:Wd},Vd=e=>{const{axis:t}=e,n=Math.min(...t.data??[]),r=Math.max(...t.data??[]);return[n,r]};function qd(e,t,n,r){return n.reduce((i,s,o)=>{if(t[o]===null)return i;const[a,l]=e(s);return r&&(!r({y:a,x:null},o)||!r({y:l,x:null},o))?i:[Math.min(a,l,i[0]),Math.max(a,l,i[1])]},[1/0,-1/0])}const Xd=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId;return o===n.id||r&&o===void 0}).reduce((s,o)=>{const{area:a,stackedData:l,data:u}=t[o],c=a!==void 0,d=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),f=c&&n.scaleType!=="log"&&typeof t[o].baseline!="string"?g=>g:g=>[g[1],g[1]],h=qd(f,u,l,d),[m,p]=h;return[Math.min(m,s[0]),Math.max(p,s[1])]},[1/0,-1/0])};function Kd(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=T({},e[r],{valueFormatter:e[r].valueFormatter??t})}),n}const Zd=(e,t)=>{const{seriesOrder:n,series:r}=e,i=co(T({},e,{defaultStrategy:{stackOffset:"none"}})),s=t??[];n.forEach(a=>{const l=r[a].data;if(l!==void 0)l.forEach((u,c)=>{s.length<=c?s.push({[a]:u}):s[c][a]=u});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${a}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
44
|
+
`))});const o={};return i.forEach(a=>{const{ids:l,stackingOrder:u,stackingOffset:c}=a,d=oo().keys(l.map(f=>{const h=r[f].dataKey;return r[f].data===void 0&&h!==void 0?h:f})).value((f,h)=>f[h]??0).order(u).offset(c)(s);l.forEach((f,h)=>{const m=r[f].dataKey;o[f]=T({labelMarkType:"line"},r[f],{data:m?t.map(p=>{const g=p[m];return typeof g!="number"?(process.env.NODE_ENV!=="production"&&g!==null&&mt([`MUI X Charts: Your dataset key "${m}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):g}):r[f].data,stackedData:d[h].map(([p,g])=>[p,g])})})}),{seriesOrder:n,stackingGroups:i,series:Kd(o,a=>a==null?"":a.toLocaleString())}},Qd=(e,t,n)=>{const r=n==null?void 0:n.colorScale,i=t==null?void 0:t.colorScale;return r?s=>{if(s===void 0)return e.color;const o=e.data[s],a=o===null?e.color:r(o);return a===null?e.color:a}:i?s=>{var l;if(s===void 0)return e.color;const o=(l=t.data)==null?void 0:l[s],a=o===null?e.color:i(o);return a===null?e.color:a}:()=>e.color},Jd=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=we(n[i].label,"legend");return s===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:s}),r},[])},ef=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=we(t.label,"tooltip"),s=t.data[r.dataIndex],o=t.valueFormatter(s,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:s,formattedValue:o,markType:t.labelMarkType}},tf=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),nf=(e,t,n)=>T({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),rf={colorProcessor:Qd,seriesProcessor:Zd,legendGetter:Jd,tooltipGetter:ef,axisTooltipGetter:tf,xExtremumGetter:Vd,yExtremumGetter:Xd,getSeriesWithDefaultValues:nf},sf=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,n)=>n-t;case"asc":return(t,n)=>t-n;default:return null}},of=e=>{const{seriesOrder:t,series:n}=e,r={};return t.forEach(i=>{const s=bd().startAngle(2*Math.PI*(n[i].startAngle??0)/360).endAngle(2*Math.PI*(n[i].endAngle??360)/360).padAngle(2*Math.PI*(n[i].paddingAngle??0)/360).sortValues(sf(n[i].sortingValues??"none"))(n[i].data.map(o=>o.value));r[i]=T({labelMarkType:"circle",valueFormatter:o=>o.value.toLocaleString()},n[i],{data:n[i].data.map((o,a)=>T({},o,{id:o.id??`auto-generated-pie-id-${i}-${a}`},s[a])).map((o,a)=>{var l,u;return T({labelMarkType:"circle"},o,{formattedValue:((u=(l=n[i]).valueFormatter)==null?void 0:u.call(l,T({},o,{label:we(o.label,"arc")}),{dataIndex:a}))??o.value.toLocaleString()})})})}),{seriesOrder:t,series:r}},af=e=>t=>e.data[t].color,uf=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>(n[i].data.forEach((s,o)=>{const a=we(s.label,"legend");a!==void 0&&r.push({markType:s.labelMarkType??n[i].labelMarkType,id:s.id??o,seriesId:i,color:s.color,label:a,itemId:s.id??o})}),r),[])},lf=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=t.data[r.dataIndex];if(i==null)return null;const s=we(i.label,"tooltip"),o=T({},i,{label:s}),a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:s,value:o,formattedValue:a,markType:i.labelMarkType??t.labelMarkType}},cf=(e,t,n)=>T({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((r,i)=>T({color:n[i%n.length]},r))}),df={colorProcessor:af,seriesProcessor:of,legendGetter:uf,tooltipGetter:lf,getSeriesWithDefaultValues:cf},ff={bar:Fd,scatter:Bd,line:rf,pie:df},hf=[Dr,yn,Ir,xn];function mf(e){const{children:t,plugins:n=hf,pluginParams:r={},seriesConfig:i=ff}=e,{contextValue:s}=Ba(n,r,i);return M.jsxRuntimeExports.jsx(lr.Provider,{value:s,children:t})}const fo=()=>{const e=j.useContext(lr);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
|
|
45
|
+
`));return e};function Fe(){const e=fo();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
46
|
+
`));return e.store}function ho(){const e=Fe();return ne(e,Et)}function mo(){const e=Fe();return ne(e,Aa)}const Kn=(e,t)=>e===void 0?t:Math.PI*e/180;function pf(){const e=Fe(),{axis:t,axisIds:n}=ne(e,$e);return{xAxis:t,xAxisIds:n}}function gf(){const e=Fe(),{axis:t,axisIds:n}=ne(e,Ne);return{yAxis:t,yAxisIds:n}}function yf(){const e=Fe(),{axis:t,axisIds:n}=ne(e,rd)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:n}}function xf(){const e=fo();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
47
|
+
`));return e.svgRef}function vf(){const e=mo();return j.useCallback(t=>`${e}-gradient-${t}`,[e])}function bf(){const e=mo();return j.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var $n,Vi;function Ef(){if(Vi)return $n;Vi=1;var e=4,t=.001,n=1e-7,r=10,i=11,s=1/(i-1),o=typeof Float32Array=="function";function a(p,g){return 1-3*g+3*p}function l(p,g){return 3*g-6*p}function u(p){return 3*p}function c(p,g,x){return((a(g,x)*p+l(g,x))*p+u(g))*p}function d(p,g,x){return 3*a(g,x)*p*p+2*l(g,x)*p+u(g)}function f(p,g,x,S,y){var E,b,v=0;do b=g+(x-g)/2,E=c(b,S,y)-p,E>0?x=b:g=b;while(Math.abs(E)>n&&++v<r);return b}function h(p,g,x,S){for(var y=0;y<e;++y){var E=d(g,x,S);if(E===0)return g;var b=c(g,x,S)-p;g-=b/E}return g}function m(p){return p}return $n=function(g,x,S,y){if(!(0<=g&&g<=1&&0<=S&&S<=1))throw new Error("bezier x values must be in [0, 1] range");if(g===x&&S===y)return m;for(var E=o?new Float32Array(i):new Array(i),b=0;b<i;++b)E[b]=c(b*s,g,S);function v(C){for(var D=0,P=1,_=i-1;P!==_&&E[P]<=C;++P)D+=s;--P;var k=(C-E[P])/(E[P+1]-E[P]),F=D+k*s,A=d(F,g,S);return A>=t?h(C,F,g,S):A===0?F:f(C,D,D+s,g,S)}return function(D){return D===0?0:D===1?1:c(v(D),x,y)}},$n}var wf=Ef();const Mf=Ro(wf),Sf=300,Tf=Mf(.66,0,.34,1);var Ze=0,dt=0,lt=0,po=1e3,Qt,ft,Jt=0,Oe=0,vn=0,bt=typeof performance=="object"&&performance.now?performance:Date,go=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Pr(){return Oe||(go(Cf),Oe=bt.now()+vn)}function Cf(){Oe=0}function en(){this._call=this._time=this._next=null}en.prototype=yo.prototype={constructor:en,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Pr():+n)+(t==null?0:+t),!this._next&&ft!==this&&(ft?ft._next=this:Qt=this,ft=this),this._call=e,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};function yo(e,t,n){var r=new en;return r.restart(e,t,n),r}function Zn(){Pr(),++Ze;for(var e=Qt,t;e;)(t=Oe-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ze}function qi(){Oe=(Jt=bt.now())+vn,Ze=dt=0;try{Zn()}finally{Ze=0,Af(),Oe=0}}function Rf(){var e=bt.now(),t=e-Jt;t>po&&(vn-=t,Jt=e)}function Af(){for(var e,t=Qt,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Qt=n);ft=e,Qn(r)}function Qn(e){if(!Ze){dt&&(dt=clearTimeout(dt));var t=e-Oe;t>24?(e<1/0&&(dt=setTimeout(qi,e-bt.now()-vn)),lt&&(lt=clearInterval(lt))):(lt||(Jt=bt.now(),lt=setInterval(Rf,po)),Ze=1,go(qi))}}function If(e,t,n){var r=new en;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}class kf{constructor(t,n,r){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=n,this.onTickCallback=r,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const n=this.duration===0?1:this.elapsed/this.duration,r=this.easingFn(n);this.onTickCallback(r),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=Pr()-this.elapsed;return this.timer=yo(n=>this.timerCallback(n),0,t),Zn(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),If(()=>this.timerCallback(this.duration)),Zn(),this}}function Df(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Pf(e,{createInterpolator:t,applyProps:n,skip:r,initialProps:i=e}){const s=j.useRef(i),o=j.useRef(null),a=j.useRef(null),l=j.useRef(e);U.useEnhancedEffect(()=>{l.current=e},[e]),U.useEnhancedEffect(()=>{var d;r&&((d=o.current)==null||d.finish(),o.current=null,a.current=null,s.current=e)},[e,r]);const u=j.useCallback(d=>{const f=s.current,h=t(f,e);o.current=new kf(Sf,Tf,m=>{const p=h(m);s.current=p,n(d,p)})},[n,t,e]);return j.useCallback(d=>{var h,m,p,g;if(d===null){(h=o.current)==null||h.stop();return}const f=a.current;if(f===d){if(Df(l.current,e)){(m=o.current)==null||m.resume();return}(p=o.current)==null||p.stop()}f&&((g=o.current)==null||g.stop()),a.current=d,(o.current||!r)&&u(d)},[u,e,r])}function Of(e,{createInterpolator:t,transformProps:n,applyProps:r,skip:i,initialProps:s=e,ref:o}){const a=n??(c=>c),l=Pf(e,{initialProps:s,createInterpolator:t,applyProps:(c,d)=>r(c,a(d)),skip:i});return T({},n(i?e:s),{ref:U.useForkRef(l,o)})}function Xi(e){const{isReversed:t,gradientId:n,size:r,direction:i,scale:s,colorMap:o}=e;return r<=0?null:M.jsxRuntimeExports.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${i}${t?1:2}`]:`${r}px`,gradientUnits:"userSpaceOnUse",children:o.thresholds.map((a,l)=>{const u=s(a);if(u===void 0)return null;const c=t?1-u/r:u/r;return Number.isNaN(c)?null:M.jsxRuntimeExports.jsxs(j.Fragment,{children:[M.jsxRuntimeExports.jsx("stop",{offset:c,stopColor:o.colors[l],stopOpacity:1}),M.jsxRuntimeExports.jsx("stop",{offset:c,stopColor:o.colors[l+1],stopOpacity:1})]},a.toString()+l)})})}const jf=10;function Ki(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:s,scale:o,colorScale:a,colorMap:l}=e,u=[l.min??0,l.max??100],c=u.map(o).filter(m=>m!==void 0);if(c.length!==2)return null;const d=typeof u[0]=="number"?fe(u[0],u[1]):pr(u[0],u[1]),f=Math.round((Math.max(...c)-Math.min(...c))/jf),h=`${u[0]}-${u[1]}-`;return M.jsxRuntimeExports.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${n?1:2}`]:t==="objectBoundingBox"?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:f+1},(m,p)=>{const g=d(p/f);if(g===void 0)return null;const x=o(g);if(x===void 0)return null;const S=n?1-x/i:x/i,y=a(g);return y===null?null:M.jsxRuntimeExports.jsx("stop",{offset:S,stopColor:y,stopOpacity:1},h+p)})})}const _f=10,$f=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Nn(e){const{isReversed:t,gradientId:n,colorScale:r,colorMap:i}=e,s=[i.min??0,i.max??100],o=typeof s[0]=="number"?fe(s[0],s[1]):pr(s[0],s[1]),a=_f,l=`${s[0]}-${s[1]}-`;return M.jsxRuntimeExports.jsx("linearGradient",T({id:n},$f(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:a+1},(u,c)=>{const d=c/a,f=o(d);if(f===void 0)return null;const h=r(f);return h===null?null:M.jsxRuntimeExports.jsx("stop",{offset:d,stopColor:h,stopOpacity:1},l+c)})}))}function Nf(){const{top:e,height:t,bottom:n,left:r,width:i,right:s}=ho(),o=e+t+n,a=r+i+s,l=vf(),u=bf(),{xAxis:c,xAxisIds:d}=pf(),{yAxis:f,yAxisIds:h}=gf(),{zAxis:m,zAxisIds:p}=yf(),g=h.filter(y=>f[y].colorMap!==void 0),x=d.filter(y=>c[y].colorMap!==void 0),S=p.filter(y=>m[y].colorMap!==void 0);return g.length===0&&x.length===0&&S.length===0?null:M.jsxRuntimeExports.jsxs("defs",{children:[g.map(y=>{const E=l(y),b=u(y),{colorMap:v,scale:C,colorScale:D,reverse:P}=f[y];return(v==null?void 0:v.type)==="piecewise"?M.jsxRuntimeExports.jsx(Xi,{isReversed:!P,scale:C,colorMap:v,size:o,gradientId:E,direction:"y"},E):(v==null?void 0:v.type)==="continuous"?M.jsxRuntimeExports.jsxs(j.Fragment,{children:[M.jsxRuntimeExports.jsx(Ki,{isReversed:!P,scale:C,colorScale:D,colorMap:v,size:o,gradientId:E,direction:"y"}),M.jsxRuntimeExports.jsx(Nn,{isReversed:P,colorScale:D,colorMap:v,gradientId:b})]},E):null}),x.map(y=>{const E=l(y),b=u(y),{colorMap:v,scale:C,reverse:D,colorScale:P}=c[y];return(v==null?void 0:v.type)==="piecewise"?M.jsxRuntimeExports.jsx(Xi,{isReversed:D,scale:C,colorMap:v,size:a,gradientId:E,direction:"x"},E):(v==null?void 0:v.type)==="continuous"?M.jsxRuntimeExports.jsxs(j.Fragment,{children:[M.jsxRuntimeExports.jsx(Ki,{isReversed:D,scale:C,colorScale:P,colorMap:v,size:a,gradientId:E,direction:"x"}),M.jsxRuntimeExports.jsx(Nn,{isReversed:D,colorScale:P,colorMap:v,gradientId:b})]},E):null}),S.map(y=>{const E=u(y),{colorMap:b,colorScale:v}=m[y];return(b==null?void 0:b.type)==="continuous"?M.jsxRuntimeExports.jsx(Nn,{colorScale:v,colorMap:b,gradientId:E},E):null})]})}const Ff=["children","className","title","desc"],Lf=U.styled("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),Or=j.forwardRef(function(t,n){const r=Fe(),{width:i,height:s}=ne(r,Ma),{width:o,height:a}=ne(r,wa),l=xf(),u=U.useForkRef(l,n),c=Ao({props:t,name:"MuiChartsSurface"}),{children:d,className:f,title:h,desc:m}=c,p=Te(c,Ff),g=s>0&&i>0;return M.jsxRuntimeExports.jsxs(Lf,T({ownerState:{width:o,height:a},viewBox:`0 0 ${i} ${s}`,className:f},p,{ref:u,children:[h&&M.jsxRuntimeExports.jsx("title",{children:h}),m&&M.jsxRuntimeExports.jsx("desc",{children:m}),M.jsxRuntimeExports.jsx(Nf,{}),g&&d]}))});process.env.NODE_ENV!=="production"&&(Or.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Or.propTypes={children:w.node,className:w.string,desc:w.string,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),title:w.string});function ct(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const n=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(n))return n}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function Fn(e){const t=Kn(e);return[Math.sin(t),-Math.cos(t)]}function Gf(e,t){const n=[[0,0],Fn(e),Fn(t)],r=Math.min(e,t),i=Math.max(e,t),s=Math.floor(r/90)*90;for(let c=1;c<=4;c+=1){const d=s+c*90;d<i&&n.push(Fn(d))}const o=Math.min(...n.map(([c])=>c)),a=Math.max(...n.map(([c])=>c)),l=Math.min(...n.map(([,c])=>c)),u=Math.max(...n.map(([,c])=>c));return{cx:-o/(a-o),cy:-l/(u-l),minX:o,maxX:a,minY:l,maxY:u}}function zf(e,t,n,r,{minX:i,maxX:s,minY:o,maxY:a}){return Math.min(...[{ratio:Math.abs(i),space:e},{ratio:Math.abs(s),space:n-e},{ratio:Math.abs(o),space:t},{ratio:Math.abs(a),space:r-t}].map(({ratio:l,space:u})=>l<1e-5?1/0:u/l))}const jr=j.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(jr.displayName="GaugeContext");function Uf(e){const{value:t=null,valueMin:n=0,valueMax:r=100,startAngle:i=0,endAngle:s=360,outerRadius:o,innerRadius:a,cornerRadius:l,cx:u,cy:c,children:d}=e,{left:f,top:h,width:m,height:p}=ho(),g=Gf(i,s),x=u?ct(u,m):g.cx*m,S=c?ct(c,p):g.cy*p;let y=f+x,E=h+S;const b=zf(x,S,m,p,g);if(u===void 0){const _=b*(g.maxX-g.minX);y=f+(m-_)/2+g.cx*_}if(c===void 0){const _=b*(g.maxY-g.minY);E=h+(p-_)/2+g.cy*_}const v=ct(o??b,b),C=ct(a??"80%",b),D=ct(l??0,v-C),P=j.useMemo(()=>{const _=Kn(i),k=Kn(s);return{value:t,valueMin:n,valueMax:r,startAngle:_,endAngle:k,outerRadius:v,innerRadius:C,cornerRadius:D,cx:y,cy:E,maxRadius:b,valueAngle:t===null?null:_+(k-_)*(t-n)/(r-n)}},[t,n,r,i,s,v,C,D,y,E,b]);return M.jsxRuntimeExports.jsx(jr.Provider,{value:P,children:d})}function _r(){return j.useContext(jr)}const Hf=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],Yf=U.styled("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),$r=j.forwardRef(function(t,n){const{width:r,height:i,margin:s,title:o,desc:a,value:l,valueMin:u=0,valueMax:c=100,startAngle:d,endAngle:f,outerRadius:h,innerRadius:m,cornerRadius:p,cx:g,cy:x,children:S}=t,y=Te(t,Hf);return M.jsxRuntimeExports.jsx(mf,{pluginParams:{width:r,height:i,margin:ls(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:M.jsxRuntimeExports.jsx(Uf,{value:l,valueMin:u,valueMax:c,startAngle:d,endAngle:f,outerRadius:h,innerRadius:m,cornerRadius:p,cx:g,cy:x,children:M.jsxRuntimeExports.jsx(Or,T({title:o,desc:a,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":u,"aria-valuemax":c},y,{ref:n,children:M.jsxRuntimeExports.jsx(Yf,{"aria-hidden":"true",children:S})}))})})});process.env.NODE_ENV!=="production"&&($r.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&($r.propTypes={children:w.node,className:w.string,cornerRadius:w.oneOfType([w.number,w.string]),cx:w.oneOfType([w.number,w.string]),cy:w.oneOfType([w.number,w.string]),desc:w.string,endAngle:w.number,height:w.number,id:w.string,innerRadius:w.oneOfType([w.number,w.string]),margin:w.oneOfType([w.number,w.shape({bottom:w.number,left:w.number,right:w.number,top:w.number})]),outerRadius:w.oneOfType([w.number,w.string]),skipAnimation:w.bool,startAngle:w.number,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),title:w.string,value:w.number,valueMax:w.number,valueMin:w.number,width:w.number});function Wf(e){const t=Fe(),n=ne(t,Jo);return e||n}function Bf(e,t){const n=fe(e.startAngle,t.startAngle),r=fe(e.endAngle,t.endAngle),i=fe(e.innerRadius,t.innerRadius),s=fe(e.outerRadius,t.outerRadius),o=fe(e.cornerRadius,t.cornerRadius);return a=>({startAngle:n(a),endAngle:r(a),innerRadius:i(a),outerRadius:s(a),cornerRadius:o(a)})}function Vf(e){return Of({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Bf,transformProps:t=>({d:io().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,n){t.setAttribute("d",n.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const qf=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],Xf=U.styled("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function xo(e){const{value:t,valueMin:n,valueMax:r,startAngle:i,endAngle:s,outerRadius:o,innerRadius:a,cornerRadius:l,cx:u,cy:c}=_r();if(t===null)return null;const d=i+(t-n)/(r-n)*(s-i);return M.jsxRuntimeExports.jsx(vo,T({},e,{cx:u,cy:c,startAngle:i,endAngle:d,cornerRadius:l,innerRadius:a,outerRadius:o}))}process.env.NODE_ENV!=="production"&&(xo.propTypes={skipAnimation:w.bool});function vo(e){let{cx:t,cy:n,startAngle:r,endAngle:i,cornerRadius:s,innerRadius:o,outerRadius:a,skipAnimation:l}=e,u=Te(e,qf);const c=Wf(l),d=Vf({startAngle:r,endAngle:i,cornerRadius:s,innerRadius:o,outerRadius:a,skipAnimation:c});return M.jsxRuntimeExports.jsx(Xf,T({},d,{transform:`translate(${t}, ${n})`},u))}process.env.NODE_ENV!=="production"&&(vo.propTypes={cornerRadius:w.number.isRequired,cx:w.number.isRequired,cy:w.number.isRequired,endAngle:w.number.isRequired,innerRadius:w.number.isRequired,outerRadius:w.number.isRequired,skipAnimation:w.bool,startAngle:w.number.isRequired});const Kf=U.styled("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Zf(e){const{startAngle:t,endAngle:n,outerRadius:r,innerRadius:i,cornerRadius:s,cx:o,cy:a}=_r();return M.jsxRuntimeExports.jsx(Kf,T({transform:`translate(${o}, ${a})`,d:io().cornerRadius(s)({startAngle:t,endAngle:n,innerRadius:i,outerRadius:r})},e))}function Qf(e){return U.generateUtilityClass("MuiGauge",e)}U.generateUtilityClasses("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Jf(){return typeof window>"u"}const $t=new Map,eh=2e3,th={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nh=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Zi="mui_measurement_span";function bo(e,t){return nh.indexOf(e)>=0&&t===+t?`${t}px`:t}function Eo(e){return e.split("").reduce((r,i)=>i===i.toUpperCase()?[...r,"-",i.toLowerCase()]:[...r,i],[]).join("")}const rh=e=>Object.keys(e).sort().reduce((t,n)=>`${t}${Eo(n)}:${bo(n,e[n])};`,"");let Ln;const ih=(e,t={})=>{if(e==null||Jf())return{width:0,height:0};const n=`${e}`,r=rh(t),i=`${n}-${r}`,s=$t.get(i);if(s)return s;try{let o=document.getElementById(Zi);o===null&&(o=document.createElement("span"),o.setAttribute("id",Zi),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));const a=T({},th,t);Object.keys(a).map(c=>(o.style[Eo(c)]=bo(c,a[c]),c)),o.textContent=n;const l=o.getBoundingClientRect(),u={width:l.width,height:l.height};return $t.set(i,u),$t.size+1>eh&&$t.clear(),process.env.NODE_ENV==="test"?o.textContent="":(Ln&&clearTimeout(Ln),Ln=setTimeout(()=>{o.textContent=""},0)),u}catch{return{width:0,height:0}}};function sh({style:e,needsComputation:t,text:n}){return n.split(`
|
|
48
|
+
`).map(r=>T({text:r},t?ih(r,e):{width:0,height:0}))}function oh(){const[e,t]=j.useState(typeof window<"u"||process.env.NODE_ENV==="test");return j.useEffect(()=>{t(!0)},[]),e}const ah=["x","y","style","text","ownerState"],uh=["angle","textAnchor","dominantBaseline"];function wo(e){const{x:t,y:n,style:r,text:i}=e,s=Te(e,ah),o=r??{},{angle:a,textAnchor:l,dominantBaseline:u}=o,c=Te(o,uh),d=oh(),f=j.useMemo(()=>sh({style:c,needsComputation:d&&i.includes(`
|
|
49
|
+
`),text:i}),[c,i,d]);let h;switch(u){case"hanging":case"text-before-edge":h=0;break;case"central":h=(f.length-1)/2*-f[0].height;break;default:h=(f.length-1)*-f[0].height;break}return M.jsxRuntimeExports.jsx("text",T({},s,{transform:a?`rotate(${a}, ${t}, ${n})`:void 0,x:t,y:n,textAnchor:l,dominantBaseline:u,style:c,children:f.map((m,p)=>M.jsxRuntimeExports.jsx("tspan",{x:t,dy:`${p===0?h:f[0].height}px`,dominantBaseline:u,children:m.text},p))}))}process.env.NODE_ENV!=="production"&&(wo.propTypes={lineHeight:w.number,needsComputation:w.bool,ownerState:w.any,style:w.object,text:w.string.isRequired});const lh=["text","className"];function ch({value:e}){return e===null?null:e.toLocaleString()}function Mo(e){const{text:t=ch,className:n}=e,r=Te(e,lh),{value:i,valueMin:s,valueMax:o,cx:a,cy:l}=_r(),u=typeof t=="function"?t({value:i,valueMin:s,valueMax:o}):t;return u===null?null:M.jsxRuntimeExports.jsx("g",{className:n,children:M.jsxRuntimeExports.jsx(wo,T({x:a,y:l,text:u,style:{textAnchor:"middle",dominantBaseline:"central"}},r))})}process.env.NODE_ENV!=="production"&&(Mo.propTypes={lineHeight:w.number,needsComputation:w.bool,ownerState:w.any,style:w.object,text:w.oneOfType([w.func,w.string])});const dh=["text","children","classes","className","skipAnimation"],fh=e=>{const{classes:t}=e,n={root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]};return U.composeClasses(n,Qf,t)},Nr=j.forwardRef(function(t,n){const{text:r,children:i,className:s,skipAnimation:o}=t,a=Te(t,dh),l=fh(t);return M.jsxRuntimeExports.jsxs($r,T({},a,{className:U.clsx(l.root,s),ref:n,children:[M.jsxRuntimeExports.jsx(Zf,{className:l.referenceArc}),M.jsxRuntimeExports.jsx(xo,{className:l.valueArc,skipAnimation:o}),M.jsxRuntimeExports.jsx(Mo,{className:l.valueText,text:r}),i]}))});process.env.NODE_ENV!=="production"&&(Nr.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Nr.propTypes={children:w.node,classes:w.object,className:w.string,cornerRadius:w.oneOfType([w.number,w.string]),cx:w.oneOfType([w.number,w.string]),cy:w.oneOfType([w.number,w.string]),desc:w.string,endAngle:w.number,height:w.number,id:w.string,innerRadius:w.oneOfType([w.number,w.string]),margin:w.oneOfType([w.number,w.shape({bottom:w.number,left:w.number,right:w.number,top:w.number})]),outerRadius:w.oneOfType([w.number,w.string]),skipAnimation:w.bool,startAngle:w.number,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),text:w.oneOfType([w.func,w.string]),title:w.string,value:w.number,valueMax:w.number,valueMin:w.number,width:w.number});const hh=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,s=[];return t>0?(s.push(t.toString()),s.push(n.toString().padStart(2,"0")),s.push(r.toString().padStart(2,"0")),s.push(i.toString().padStart(2,"0"))):n>0?(s.push(n.toString()),s.push(r.toString().padStart(2,"0")),s.push(i.toString().padStart(2,"0"))):(s.push(r.toString()),s.push(i.toString().padStart(2,"0"))),s.join(":")},me=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(s>0||Object.keys(a).length===0)&&(a.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const o=[];return n>0&&o.push(`${n}d`),r>0&&o.push(`${r}h`),i>0&&o.push(`${i}m`),(s>0||o.length===0)&&o.push(`${s}s`),o.join(" ")},mh=(e,t,n)=>e==="countdown"&&n!==null?Math.min(100,t/n*100):e==="measuring"?t/60%1*100:0,ph=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i,i18n:s}=tn.useTranslation(),o=N.useTheme(),{currentState:a,remainingTime:l,maxTime:u,currentProgress:c}=e,{showErrorAnimation:d,showPauseAnimation:f,showPulsatingText:h,pulsatingFinished:m,showLabels:p,showMainText:g,showIdlePulsating:x,idleDotsCount:S}=t;return M.jsxRuntimeExports.jsxs(N.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[M.jsxRuntimeExports.jsx(Nr,{width:264,height:264,value:a==="idle"?0:c,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:f||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?o.palette.error.light:o.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),M.jsxRuntimeExports.jsxs(N.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[M.jsxRuntimeExports.jsx(N.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:M.jsxRuntimeExports.jsx(N.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(h||m)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:M.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"||a==="measured"?i("CycleTimer.CycleTime.lb","Cycle Time"):a==="countdown"?i("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),M.jsxRuntimeExports.jsxs(N.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[M.jsxRuntimeExports.jsx(N.Fade,{in:g&&a==="idle"&&!n,timeout:200,children:M.jsxRuntimeExports.jsxs(N.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[M.jsxRuntimeExports.jsx("span",{style:{opacity:x?1:.6,transition:"opacity 2s ease-in-out"},children:i("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),M.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:x?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(S)})]})}),M.jsxRuntimeExports.jsx(N.Fade,{in:g&&n,timeout:200,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:i("CycleTimer.Error.lb","Error")})}),M.jsxRuntimeExports.jsx(N.Fade,{in:g&&!n&&a!=="idle"&&a!=="success",timeout:300,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:M.jsxRuntimeExports.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:hh(l)})})})]}),M.jsxRuntimeExports.jsx(N.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:M.jsxRuntimeExports.jsx(N.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(h||m)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:M.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"?i("CycleTimer.Measuring.lb","measuring..."):a==="measured"?i("CycleTimer.Determined.lb","determined"):a==="countdown"&&u!==null?i("CycleTimer.OfTime.lb",{time:me(u,s.language)}):""})})})})]})]})},gh=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:s,i18n:o}=tn.useTranslation(),a=N.useTheme(),{currentState:l,remainingTime:u,maxTime:c}=e,{showErrorAnimation:d,showPauseAnimation:f,showPulsatingText:h,pulsatingFinished:m,showIdlePulsating:p,idleDotsCount:g}=t;return r&&l==="idle"?M.jsxRuntimeExports.jsx(N.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?s("CycleTimer.Error.lb","Error"):l==="idle"?"0s":me(u,o.language)})}):M.jsxRuntimeExports.jsxs(N.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&r)&&M.jsxRuntimeExports.jsx(N.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f||d?.6:1,transition:"opacity 0.5s ease-out"},children:M.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[M.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:l==="measured"?h||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&m?h?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),M.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:l==="measured"?h||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&m?h?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?h||m?a.palette.success.main:a.palette.text.secondary:a.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?p?1:.6:l==="measured"&&m?h?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?s("CycleTimer.Error.lb","Error"):l==="idle"?M.jsxRuntimeExports.jsxs(M.jsxRuntimeExports.Fragment,{children:[M.jsxRuntimeExports.jsx("span",{children:s("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),M.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(g)})]}):l==="measuring"?r?me(u,o.language):`${me(u,o.language)} / ${s("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?r?me(u,o.language):`${me(u,o.language)} / ${s("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&c!==null?r?me(u,o.language):`${me(u,o.language)} / ${s("CycleTimer.Time.lb",{time:me(c,o.language)})}`:me(u,o.language)})]})},yh=()=>{const[e,t]=I.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(null),s=I.useRef(null),o=I.useRef(0),a=I.useRef(null),l=I.useRef(null),u=I.useCallback(()=>{t(y=>({...y,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(y=>({...y,showPauseAnimation:!1}))},800)},[]),c=I.useCallback(()=>{t(y=>({...y,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(y=>({...y,showErrorAnimation:!1}))},600)},[]),d=I.useCallback(()=>{t(y=>({...y,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),f=I.useCallback(y=>{o.current=0,t(E=>({...E,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(E=>({...E,pulsatingFinished:!0})),i.current=setInterval(()=>{t(E=>({...E,showPulsatingText:!E.showPulsatingText}))},2e3),y&&y()},800)},[]),h=I.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),t(y=>({...y,showPulsatingText:!1,pulsatingFinished:!1})),o.current=0},[]),m=I.useCallback(()=>{t(y=>({...y,showIdlePulsating:!0})),a.current=setInterval(()=>{t(y=>({...y,showIdlePulsating:!y.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(y=>({...y,idleDotsCount:(y.idleDotsCount+1)%4}))},800)},[]),p=I.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),l.current&&(clearInterval(l.current),l.current=null),t(y=>({...y,showIdlePulsating:!1,idleDotsCount:0}))},[]),g=I.useCallback(()=>{t(y=>({...y,showLabels:!1,showMainText:!1})),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(y=>({...y,showLabels:!0,showMainText:!0}))},200)},[]),x=I.useCallback(()=>{t(y=>({...y,showLabels:!0,showMainText:!0}))},[]),S=I.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),s.current&&clearTimeout(s.current),i.current&&clearInterval(i.current),a.current&&clearInterval(a.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:u,triggerErrorAnimation:c,clearErrorAnimation:d,startPulsatingAnimation:f,stopPulsatingAnimation:h,startIdleAnimations:m,stopIdleAnimations:p,triggerFadeTransition:g,setInitialAnimationState:x,cleanup:S}},xh=({autoStart:e,onCycleEnd:t,onMeasuringComplete:n,hasError:r,onPauseAnimation:i,onErrorAnimation:s,onClearErrorAnimation:o,onStartPulsating:a})=>{const[l,u]=I.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),c=I.useRef(null),d=I.useRef(null),f=I.useRef(0),[h]=ts.useInterpolation([0],{tension:80,friction:18,onChange:([b])=>{u(v=>({...v,currentProgress:b}))}}),m=I.useCallback(()=>{u(b=>({...b,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),f.current=0,d.current=null,h.setImmediate([0])},[h]),p=I.useCallback((b=0)=>{const v=b/60%1*100;u(C=>({...C,currentState:"measuring",maxTime:null,remainingTime:b,isPausedState:!1,currentProgress:v})),f.current=0,h.setImmediate([v]),e?(d.current=Date.now()-b*1e3,u(C=>({...C,isRunning:!0}))):d.current=null},[e,h]),g=I.useCallback((b,v=0)=>{u(P=>({...P,isRunning:!1})),d.current=null,u(P=>({...P,currentState:"countdown",maxTime:b,isPausedState:!1})),f.current=0;const C=Math.max(0,b-v),D=v>0?v/b*100:0;u(P=>({...P,remainingTime:C,currentProgress:D})),h.setImmediate([D]),C===0?(u(P=>({...P,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-v*1e3,u(P=>({...P,isRunning:!0}))},0):d.current=null},[e,t,h]),x=I.useCallback(()=>{u(b=>({...b,isRunning:!1,currentState:"measured"})),d.current=null,a(()=>{n&&n()})},[a,n]),S=I.useCallback(()=>{if(d.current&&l.isRunning){const v=Date.now()-d.current;f.current+=v;const C=f.current/1e3,D=mh(l.currentState,C,l.maxTime);h.setTarget([D])}u(b=>({...b,isRunning:!1,isPausedState:!0})),i()},[l.isRunning,l.currentState,l.maxTime,h,i]),y=I.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),u(b=>({...b,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),E=I.useCallback(()=>l.isPausedState,[l.isPausedState]);return I.useEffect(()=>{r?(l.isRunning&&!l.isPausedState&&(u(b=>({...b,wasRunningBeforeError:!0})),S()),s()):(l.wasRunningBeforeError&&l.isPausedState&&(u(b=>({...b,wasRunningBeforeError:!1})),y()),o())},[r,l.isRunning,l.isPausedState,l.wasRunningBeforeError,S,y,s,o]),I.useEffect(()=>{if(l.isRunning){const b=()=>{if(d.current){const C=(Date.now()-d.current+f.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const D=Math.max(0,l.maxTime-C);u(_=>({..._,remainingTime:Math.ceil(D)}));const P=Math.min(100,C/l.maxTime*100);if(h.setTarget([P]),D<=0){u(_=>({..._,isRunning:!1,remainingTime:0})),d.current=null,h.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){u(P=>({...P,remainingTime:Math.floor(C)}));const D=C/60%1*100;h.setTarget([D])}l.isRunning&&(c.current=requestAnimationFrame(b))}};c.current=requestAnimationFrame(b)}else c.current&&(cancelAnimationFrame(c.current),c.current=null);return()=>{c.current&&cancelAnimationFrame(c.current)}},[l.isRunning,t,l.currentState,l.maxTime,h]),I.useEffect(()=>{let b=null;const v=()=>{h.update(1/60),b=requestAnimationFrame(v)};return b=requestAnimationFrame(v),()=>{b&&cancelAnimationFrame(b)}},[h]),{timerState:l,controls:{startNewCycle:g,startMeasuring:p,setIdle:m,completeMeasuring:x,pause:S,resume:y,isPaused:E}}},vh=M.externalizeComponent(Jn.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:n,autoStart:r=!0,variant:i="default",compact:s=!1,className:o,hasError:a=!1})=>{const l=I.useRef(void 0),{animationState:u,triggerPauseAnimation:c,triggerErrorAnimation:d,clearErrorAnimation:f,startPulsatingAnimation:h,stopPulsatingAnimation:m,startIdleAnimations:p,stopIdleAnimations:g,triggerFadeTransition:x,setInitialAnimationState:S,cleanup:y}=yh(),{timerState:E,controls:b}=xh({autoStart:r,onCycleEnd:t,onMeasuringComplete:n,hasError:a,onPauseAnimation:c,onErrorAnimation:d,onClearErrorAnimation:f,onStartPulsating:h});return I.useEffect(()=>{const v=l.current;l.current!==void 0&&v!==E.currentState?(v==="measured"&&m(),v==="idle"&&g(),x()):S(),E.currentState==="idle"&&p(),l.current=E.currentState},[E.currentState,m,g,p,x,S]),I.useEffect(()=>{let v=!0;const C=setTimeout(()=>{v&&e(b)},0);return()=>{v=!1,clearTimeout(C)}},[e,b]),I.useEffect(()=>y,[y]),i==="small"?M.jsxRuntimeExports.jsx(gh,{timerState:E,animationState:u,hasError:a,compact:s,className:o}):M.jsxRuntimeExports.jsx(ph,{timerState:E,animationState:u,hasError:a,className:o})})),bh=U.createSvgIcon(M.jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Eh=U.createSvgIcon(M.jsxRuntimeExports.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Qi=U.createSvgIcon(M.jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),So=M.externalizeComponent(Jn.observer(({data:e,columns:t,getRowData:n,onRowClick:r,selectedItem:i,getItemId:s,title:o,showCount:a=!0,searchPlaceholder:l="Search programs",dataGridProps:u,CustomToolbar:c,selectFirstByDefault:d=!1,sx:f})=>{var D;const h=N.useTheme(),m=ce.useGridApiRef(),p=I.useRef(null),[g,x]=I.useState(null),S=I.useMemo(()=>e.map(n),[e,n]);I.useEffect(()=>{m.current&&S.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(P=>P.field)})},[S,t,m]),I.useEffect(()=>{if(!p.current||!m.current)return;const P=new ResizeObserver(()=>{setTimeout(()=>{m.current&&S.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(_=>_.field)})},100)});return P.observe(p.current),()=>{P.disconnect()}},[m,S.length,t]);const y=I.useMemo(()=>{if(i!==void 0)return i;if(g!==null)return g;if(d&&e.length>0){const P=e[0];return x(P),P}return null},[d,e,i,g]),E=P=>{const _=e.find(k=>n(k).id===P.id);_&&(i===void 0&&x(_),r&&r(_,P))},b=I.useMemo(()=>!y||!s?null:s(y),[y,s]);function v(){return M.jsxRuntimeExports.jsx(ce.Toolbar,{children:M.jsxRuntimeExports.jsxs(N.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[o&&M.jsxRuntimeExports.jsxs(N.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[o,a&&` (${e.length})`]}),M.jsxRuntimeExports.jsxs(N.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[M.jsxRuntimeExports.jsx(ce.FilterPanelTrigger,{render:M.jsxRuntimeExports.jsx(ce.ToolbarButton,{"aria-label":"Show filters",children:M.jsxRuntimeExports.jsx(Eh,{fontSize:"small"})})}),M.jsxRuntimeExports.jsx(N.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),M.jsxRuntimeExports.jsx(ce.QuickFilter,{render:(P,_)=>M.jsxRuntimeExports.jsxs(N.Box,{...P,sx:{display:"flex",overflow:"hidden"},children:[!_.expanded&&M.jsxRuntimeExports.jsx(ce.QuickFilterTrigger,{render:M.jsxRuntimeExports.jsx(ce.ToolbarButton,{"aria-label":"Search",children:M.jsxRuntimeExports.jsx(Qi,{fontSize:"small"})})}),M.jsxRuntimeExports.jsxs(N.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:_.expanded?"200px":"0px",position:"relative"},children:[M.jsxRuntimeExports.jsxs(N.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:_.expanded&&_.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[_.expanded&&M.jsxRuntimeExports.jsx(Qi,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),M.jsxRuntimeExports.jsx(ce.QuickFilterControl,{placeholder:l})]}),_.expanded&&_.value!==""&&M.jsxRuntimeExports.jsx(ce.QuickFilterClear,{render:M.jsxRuntimeExports.jsx(N.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:M.jsxRuntimeExports.jsx(N.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:M.jsxRuntimeExports.jsx(ce.ToolbarButton,{"aria-label":"Clear",children:M.jsxRuntimeExports.jsx(bh,{fontSize:"small"})})})})})]})]})})]})]})})}const C=c||v;return M.jsxRuntimeExports.jsx(N.Box,{ref:p,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${h.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:h.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:h.palette.action.hover}},...f},children:M.jsxRuntimeExports.jsx(ce.DataGrid,{apiRef:m,rows:S,columns:t,onRowClick:E,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:C},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...u==null?void 0:u.initialState},...u,autosizeOnMount:!0,autosizeOptions:{...(u==null?void 0:u.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((D=u==null?void 0:u.autosizeOptions)==null?void 0:D.columns)||t.map(P=>P.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:r?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...b!==null&&{[`&[data-id="${b}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...u==null?void 0:u.sx}})})}));So.displayName="WandelbotsDataGrid";const wh=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,s=[];return t>0?(s.push(t.toString()),s.push(n.toString().padStart(2,"0")),s.push(r.toString().padStart(2,"0")),s.push(i.toString().padStart(2,"0"))):n>0?(s.push(n.toString()),s.push(r.toString().padStart(2,"0")),s.push(i.toString().padStart(2,"0"))):(s.push(r.toString()),s.push(i.toString().padStart(2,"0"))),s.join(":")},Ji=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(s>0||Object.keys(a).length===0)&&(a.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const o=[];return n>0&&o.push(`${n}d`),r>0&&o.push(`${r}h`),i>0&&o.push(`${i}m`),(s>0||o.length===0)&&o.push(`${s}s`),o.join(" ")},Mh=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i}=tn.useTranslation(),s=ns(),{elapsedTime:o,currentProgress:a}=e,{showErrorAnimation:l,showPauseAnimation:u,showMainText:c}=t;return M.jsxRuntimeExports.jsxs(N.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[M.jsxRuntimeExports.jsx(To.Gauge,{width:264,height:264,value:a,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:u||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),M.jsxRuntimeExports.jsx(N.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:M.jsxRuntimeExports.jsxs(N.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[M.jsxRuntimeExports.jsx(N.Fade,{in:c&&n,timeout:200,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:s.palette.error.light},children:i("timer.error")})}),M.jsxRuntimeExports.jsx(N.Fade,{in:c&&!n,timeout:300,children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:wh(o)})})]})})]})},Sh=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:s,i18n:o}=tn.useTranslation(),a=ns(),{elapsedTime:l,currentProgress:u}=e,{showErrorAnimation:c,showPauseAnimation:d}=t;return r?M.jsxRuntimeExports.jsx(N.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?s("timer.error"):Ji(l,o.language)})}):M.jsxRuntimeExports.jsxs(N.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[M.jsxRuntimeExports.jsx(N.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||c?.6:1,transition:"opacity 0.5s ease-out"},children:M.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[M.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),M.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-u/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),M.jsxRuntimeExports.jsx(N.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?s("timer.error"):Ji(l,o.language)})]})},Th=()=>{const[e,t]=I.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(null),s=I.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),o=I.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),a=I.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),l=I.useCallback(()=>{t(d=>({...d,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),u=I.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),c=I.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current)},[]);return{animationState:e,triggerPauseAnimation:s,triggerErrorAnimation:o,clearErrorAnimation:a,triggerFadeTransition:l,setInitialAnimationState:u,cleanup:c}},Ch=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:i})=>{const[s,o]=I.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),a=I.useRef(null),l=I.useRef(null),u=I.useRef(0),c=I.useRef(0),[d]=ts.useInterpolation([0],{tension:80,friction:18,onChange:([x])=>{o(S=>({...S,currentProgress:x}))}}),f=I.useCallback((x=0)=>{const S=x/60%1*100;o(y=>({...y,elapsedTime:x,isPausedState:!1,currentProgress:S})),u.current=0,c.current=S,d.setImmediate([S]),e?(l.current=Date.now()-x*1e3,o(y=>({...y,isRunning:!0}))):l.current=null},[e,d]),h=I.useCallback(()=>{if(l.current&&s.isRunning){const S=(Date.now()-l.current)/1e3+u.current,y=S/60%1*100;d.setTarget([y]),o(E=>({...E,elapsedTime:Math.floor(S)}))}o(x=>({...x,isRunning:!1,isPausedState:!0})),n()},[s.isRunning,d,n]),m=I.useCallback(()=>{s.isPausedState&&(u.current=s.elapsedTime,l.current=Date.now(),o(x=>({...x,isRunning:!0,isPausedState:!1})))},[s.isPausedState,s.elapsedTime]),p=I.useCallback(()=>{o(x=>({...x,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),u.current=0,l.current=null,c.current=0,d.setImmediate([0])},[d]),g=I.useCallback(()=>s.isPausedState,[s.isPausedState]);return I.useEffect(()=>{t?(s.isRunning&&(o(x=>({...x,wasRunningBeforeError:!0})),h()),r()):(s.wasRunningBeforeError&&!s.isRunning&&(o(x=>({...x,wasRunningBeforeError:!1})),m()),i())},[t,s.isRunning,s.wasRunningBeforeError,h,m,r,i]),I.useEffect(()=>{if(s.isRunning){const x=()=>{if(l.current){const y=(Date.now()-l.current)/1e3+u.current,E=y/60%1*100;o(v=>({...v,elapsedTime:Math.floor(y)})),Math.abs(E-c.current)>.1&&(d.setTarget([E]),c.current=E)}a.current=requestAnimationFrame(x)};a.current=requestAnimationFrame(x)}else a.current&&(cancelAnimationFrame(a.current),a.current=null);return()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)}},[s.isRunning,d]),I.useEffect(()=>{let x=null;const S=()=>{d.update(),x=requestAnimationFrame(S)};return x=requestAnimationFrame(S),()=>{x&&cancelAnimationFrame(x)}},[d]),{timerState:s,controls:{start:f,pause:h,resume:m,reset:p,isPaused:g}}},Rh=M.externalizeComponent(Jn.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:i,hasError:s=!1})=>{const{animationState:o,triggerPauseAnimation:a,triggerErrorAnimation:l,clearErrorAnimation:u,setInitialAnimationState:c,cleanup:d}=Th(),{timerState:f,controls:h}=Ch({autoStart:t,hasError:s,onPauseAnimation:a,onErrorAnimation:l,onClearErrorAnimation:u});return I.useEffect(()=>{c()},[c]),I.useEffect(()=>{let m=!0;const p=setTimeout(()=>{m&&e(h)},0);return()=>{m=!1,clearTimeout(p)}},[e,h]),I.useEffect(()=>d,[d]),n==="small"?M.jsxRuntimeExports.jsx(Sh,{timerState:f,animationState:o,hasError:s,compact:r,className:i}):M.jsxRuntimeExports.jsx(Mh,{timerState:f,animationState:o,hasError:s,className:i})}));exports.CycleTimer=vh;exports.Timer=Rh;exports.WandelbotsDataGrid=So;
|
|
50
|
+
//# sourceMappingURL=index-MyU3fVEK.cjs.map
|