apexcharts 8.5.0 → 8.7.0
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/LICENSE.md +2 -1
- package/README.md +7 -7
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +730 -239
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.css +4 -3
- package/dist/apexcharts.esm.js +203 -242
- package/dist/apexcharts.full.js +1058 -723
- package/dist/apexcharts.full.min.js +2 -2
- package/dist/apexcharts.js +926 -479
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +926 -479
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +32 -36
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +3 -2
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +3 -2
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +32 -36
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +3 -2
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +3 -2
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +730 -239
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +3 -2
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +202 -206
- package/dist/features/annotations.common.js +2 -2
- package/dist/features/annotations.esm.js +6 -2
- package/dist/features/annotations.js +2 -2
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +37 -7
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/highlight-filter.common.js +2 -2
- package/dist/features/highlight-filter.esm.js +32 -36
- package/dist/features/highlight-filter.js +2 -2
- package/dist/features/history.common.js +2 -2
- package/dist/features/history.esm.js +13 -2
- package/dist/features/history.js +2 -2
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +13 -8
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +2 -2
- package/dist/features/morph.esm.js +130 -155
- package/dist/features/morph.js +2 -2
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +13 -2
- package/dist/features/perspectives.js +2 -2
- package/dist/features/radial-targets.common.js +1 -1
- package/dist/features/radial-targets.esm.js +1 -1
- package/dist/features/radial-targets.js +1 -1
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +2 -2
- package/dist/features/storyboard.esm.js +13 -2
- package/dist/features/storyboard.js +2 -2
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +57 -44
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +10 -4
- package/dist/features/trellis.js +2 -2
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +1 -1
- package/dist/features/weave.esm.js +1 -1
- package/dist/features/weave.js +1 -1
- package/dist/full.common.js +2 -2
- package/dist/full.esm.js +181 -278
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +3 -2
- package/dist/icicle.common.js +1 -1
- package/dist/icicle.esm.js +1 -1
- package/dist/icicle.js +1 -1
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +32 -36
- package/dist/line.js +2 -2
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +1 -1
- package/dist/raincloud.esm.js +1 -1
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +32 -36
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +3 -2
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +32 -36
- package/dist/streamgraph.common.js +2 -2
- package/dist/streamgraph.esm.js +32 -36
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +2 -2
- package/dist/unit.esm.js +136 -240
- package/dist/unit.js +2 -2
- package/dist/violin.common.js +1 -1
- package/dist/violin.esm.js +1 -1
- package/dist/violin.js +1 -1
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +3 -2
- package/package.json +1 -1
- package/src/apexcharts.js +79 -22
- package/src/assets/apexcharts.css +4 -3
- package/src/charts/Unit.js +169 -292
- package/src/charts/common/bar/Helpers.js +2 -1
- package/src/modules/Base.js +3 -0
- package/src/modules/CoincidentMarkers.js +289 -0
- package/src/modules/Core.js +47 -21
- package/src/modules/Data.js +19 -4
- package/src/modules/Events.js +6 -0
- package/src/modules/Exports.js +60 -6
- package/src/modules/Graphics.js +14 -16
- package/src/modules/MorphPieces.js +11 -52
- package/src/modules/MorphTypeChange.js +91 -142
- package/src/modules/Range.js +24 -12
- package/src/modules/Series.js +20 -9
- package/src/modules/Theme.js +40 -12
- package/src/modules/ZoomPanSelection.js +27 -61
- package/src/modules/accessibility/KeyboardNavigation.js +13 -12
- package/src/modules/animations/StreamScroll.js +6 -43
- package/src/modules/annotations/Helpers.js +15 -1
- package/src/modules/helpers/Destroy.js +5 -10
- package/src/modules/helpers/UpdateHelpers.js +24 -0
- package/src/modules/history/History.js +8 -1
- package/src/modules/settings/Config.js +42 -4
- package/src/modules/settings/Defaults.js +32 -1
- package/src/modules/settings/Globals.js +3 -0
- package/src/modules/settings/Options.js +5 -1
- package/src/modules/state/ViewState.js +35 -2
- package/src/modules/tooltip/Intersect.js +63 -11
- package/src/modules/tooltip/Labels.js +193 -18
- package/src/modules/tooltip/README.md +2 -0
- package/src/modules/tooltip/Tooltip.js +106 -87
- package/src/modules/trellis/Trellis.js +2 -2
- package/src/modules/trellis/TrellisVirtual.js +3 -3
- package/src/pictograms/registry.js +4 -0
- package/src/ssr/BrowserAPIs.js +3 -3
- package/src/svg/PathAffine.js +63 -0
- package/src/svg/SVGAnimation.js +6 -35
- package/src/types/internal.d.ts +7 -0
- package/src/utils/Color.js +48 -0
- package/src/utils/Resize.js +12 -21
- package/types/apexcharts.d.ts +48 -1
package/dist/full.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.7.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=Math.pow,o=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,l=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&o(t,i,e[i]);if(n)for(var i of n(e))r.call(e,i)&&o(t,i,e[i]);return t},c=(t,n)=>e(t,i(n)),h=(t,e)=>{var i={};for(var a in t)s.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(null!=t&&n)for(var a of n(t))e.indexOf(a)<0&&r.call(t,a)&&(i[a]=t[a]);return i},d=(t,e,i)=>new Promise((n,s)=>{var r=t=>{try{o(i.next(t))}catch(t){s(t)}},a=t=>{try{o(i.throw(t))}catch(t){s(t)}},o=t=>t.done?n(t.value):Promise.resolve(t.value).then(r,a);o((i=i.apply(t,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("apexcharts"),p=require("apexcharts/core");function f(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const g=(t=>t&&t.__esModule?t:{default:t})(u),m=f(p),y=m.__apex_CoreUtils,x=m.__apex_ChartFactory_getChartClass,_=m.__apex_Fill,b=m.__apex_Graphics,v=m.__apex_Series,w=m.__apex_Animations,A=m.__apex_Animations_prefersReducedMotion,M=m.__apex_BrowserAPIs_BrowserAPIs,k=m.__apex_Environment_Environment,L=m.__apex_Easing_resolveEasing,S=m.__apex_PathMorphing_parsePath,C=m.__apex_PathMorphing_arrayToPath;function E(t,e,i){if(!t||"string"!=typeof t)return null;const n=S(t);if(!n.length||"M"!==n[0][0])return null;for(let t=1;t<n.length;t++)if("M"===n[t][0])return null;let s=n,r=null;if(i){if(n.length<5)return null;if(r=n.slice(-3),s=n.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===n[n.length-1][0])return null;if(s.length!==e||s.length<2)return null;const a=s[1][0];if("L"!==a&&"C"!==a)return null;for(let t=2;t<s.length;t++)if(s[t][0]!==a)return null;const o=s.map(t=>"C"===t[0]?[Number(t[5]),Number(t[6])]:[Number(t[1]),Number(t[2])]);for(const t of o)if(!isFinite(t[0])||!isFinite(t[1]))return null;return{body:s,closing:r,segType:a,anchors:o}}function F(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]}function P(t,e,i){const n=t,s=[e[1],e[2]],r=[e[3],e[4]],a=[e[5],e[6]],o=F(n,s,i),l=F(s,r,i),c=F(r,a,i),h=F(o,l,i),d=F(l,c,i),u=F(h,d,i);return{first:["C",o[0],o[1],h[0],h[1],u[0],u[1]],second:["C",d[0],d[1],c[0],c[1],a[0],a[1]],mid:u}}function D(t,e,i){const n=[e[1],e[2]],s=F(t,n,i);return{first:["L",s[0],s[1]],second:["L",n[0],n[1]],mid:s}}function R(t,e){const{body:i,closing:n,segType:s,anchors:r}=t,a=r.length,o=e.length,l=t=>"C"===s?["C",t[0],t[1],t[0],t[1],t[0],t[1]]:["L",t[0],t[1]],c=[["M",r[0][0],r[0][1]]];let h=0;for(;h<o&&0!==e[h];)h++;for(let t=1;t<=h;t++)c.push(l(r[0]));let d=h+1;for(let t=0;t<a-1;t++){let n=0;for(;d+n<o&&-1===e[d+n];)n++;const a=i[t+1];if(n){const e=n+1;let i=r[t],o=a;for(let t=0;t<n;t++){const n=1/(e-t),r="C"===s?P(i,o,n):D(i,o,n);c.push(r.first),i=r.mid,o=r.second}c.push(o)}else c.push(a.slice());d+=n+1}for(;d<o;)c.push(l(r[a-1])),d++;return n&&n.forEach(t=>c.push(t.slice())),c}function T(t,e,i,n,s,r){const a=E(t,n,r);if(!a)return null;const o=E(e,s,r);if(!o)return null;if(a.segType!==o.segType)return null;if((a.closing||o.closing)&&(!a.closing||!o.closing||a.closing[0][0]!==o.closing[0][0]))return null;const l=i.map(t=>t.oldJ),c=i.map(t=>t.newJ);return{from:C(R(a,l)),toInterp:C(R(o,c))}}function N(t,e,i){var n,s;return O(null==(n=t.axisFlags)?void 0:n.isXNumeric,null==(s=t.seriesData)?void 0:s.seriesX,t.globals.labels,e,i)}function O(t,e,i,n,s){if(t){const t=null==e?void 0:e[n];if(t&&t.length&&null!=t[s])return"x:"+t[s]}const r=null==i?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}function $(t,e){const i=new Map;t.forEach((t,e)=>{i.has(t)||i.set(t,e)});const n=new Array(e.length),s=new Set;let r=-1,a=!0,o=t.length===e.length;e.forEach((t,e)=>{const l=i.has(t)&&!s.has(i.get(t))?i.get(t):-1;n[e]=l,-1!==l&&(s.add(l),l<r&&(a=!1),r=l),l!==e&&(o=!1)});const l=[];for(let e=0;e<t.length;e++)s.has(e)||l.push(e);return{toOld:n,exits:l,ordered:a,changed:!o}}function I(t){const e=new Map;return t.map(t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`})}function z(t,e,i=!1,n=!1,s=function(t,e){var i,n;if(!function(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const n=null!=(e=i.largeDatasetThreshold)?e:0;return!(n>0&&t.globals.dataPoints>n||!(k.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate))}(t))return null;const s=t.globals.prevStreamFrame;if(!s)return null;const r=null==(i=s.seriesY)?void 0:i[e],a=null==(n=t.seriesData.series)?void 0:n[e];if(!Array.isArray(r)||!Array.isArray(a))return null;if(!r.length||!a.length)return null;const o=I(r.map((t,i)=>function(t,e,i){return O(t.isXNumeric,t.seriesX,t.labels,e,i)}(s,e,i))),l=function(t,e,i=0|(i=>null==(i=t.seriesData.series[e])?void 0:i.length)()){return I(Array.from({length:i},(i,n)=>N(t,e,n)))}(t,e);return{join:$(o,l),oldKeys:o,newKeys:l}}(t,e)){return s&&(s.join.ordered||n)&&(s.join.changed||i)?s:null}function W(t,{type:e,realIndex:i,pathFromLine:n,pathFromArea:s,linePaths:r,areaPaths:a,join:o}){var l,c;const h=z(t,i,!1,!1,null==o?void 0:o());if(!h)return null;const{join:d,oldKeys:u,newKeys:p}=h,f=null==(l=t.globals.prevStreamFrame.seriesY)?void 0:l[i],g=null==(c=t.seriesData.series)?void 0:c[i];if(f.length<2||g.length<2)return null;if(f.some(t=>null===t)||g.some(t=>null===t))return null;const m=function(t,e){const i=new Set(t.exits),n=[];let s=0;for(let e=0;e<t.toOld.length;e++){const r=t.toOld[e];if(-1!==r){for(;s<r;)i.has(s)&&n.push({oldJ:s,newJ:-1}),s++;n.push({oldJ:r,newJ:e}),s=r+1}else n.push({oldJ:-1,newJ:e})}for(;s<e;)i.has(s)&&n.push({oldJ:s,newJ:-1}),s++;return n}(d,u.length),y={};return Array.isArray(r)&&1===r.length&&n&&(y.line=T(n,r[0],m,u.length,p.length,!1)),"area"===e&&Array.isArray(a)&&1===a.length&&s&&(y.area=T(s,a[0],m,u.length,p.length,!0)),y.line||y.area?y:null}const B=m.__apex_Utils,j=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=Y(i,n),r=1;for(let a=t.length-1;r<a;r++)i=n,n=t[r+1],e[r]=.5*(s+(s=Y(i,n)));return e[r]=s,e}(t),i=t.length-1,n=[];let s,r,a,o;for(let n=0;n<i;n++)a=Y(t[n],t[n+1]),Math.abs(a)<1e-6?e[n]=e[n+1]=0:(s=e[n]/a,r=e[n+1]/a,o=s*s+r*r,o>9&&(o=3*a/Math.sqrt(o),e[n]=o*s,e[n+1]=o*r));for(let s=0;s<=i;s++)o=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([o||0,e[s]*o||0]);return n},H={points(t){const e=j(t),i=t[1],n=t[0],s=[],r=e[1],a=e[0];s.push(n,[n[0]+a[0],n[1]+a[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],r=e[i];s.push([n[0]-r[0],n[1]-r[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function Y(t,e){return(e[1]-t[1])/(e[0]-t[0])}function q({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:r,realIndex:a,wrapClass:o,pointClass:l}){if(!s||!1===s.show||!n.length)return;const c=null!=s.opacity?s.opacity:.9,h=null!=s.strokeColor?s.strokeColor:"#fff",d=null!=s.strokeWidth?s.strokeWidth:1,u=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:u?`${o} apexcharts-element-hidden`:o});u&&e.globals.delayedElements.push({el:p.node}),n.forEach(({groups:i,j:n})=>{const o=r?e.globals.colors[n]:e.globals.colors[a],u=s.fillColor,f="series"===u?o:"series-dark"===u?X(o,.45):u||X(o,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:f,stroke:d>0?h:"none",strokeWidth:d,fillOpacity:c,classes:l});s.attr("data:realIndex",a),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",p.add(s)})}),i.add(p)}function X(t,e){const i=B.parseColor(t)||B.parseColor(B.resolveColor(t));if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function G(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,r=B.parseHex(t[n])||[0,0,0],a=B.parseHex(t[Math.min(n+1,t.length-1)])||r,o=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${o(r[0],a[0])},${o(r[1],a[1])},${o(r[2],a[2])})`}function U(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function K(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function V(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const Z=class{};class J extends Z{constructor(t,e,i){!function(){const t=x("bar");if(Object.getPrototypeOf(J)===t)return;Object.setPrototypeOf(J,t),Object.setPrototypeOf(J.prototype,t.prototype)}(),super(t,e,i)}draw(t,e,i){var n,s,r;const a=this.w,o=new b(this.w),l=new _(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.jx=function(t,e){let i=1/0,n=-1/0;return t.slice(0,e.seriesData.series.length).flat(2).forEach(t=>{t===+t&&(t<i&&(i=t),t>n&&(n=t))}),[i,n]}(a.violinData.seriesViolinPoints,a),this.boxOptions=this.violinOptions.box||{},this.cloudSign=tt(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:tt(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?et(this.boxOptions.width,.15):0,this.rainFrac=et(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new y(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,i);const c=o.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let h,d;const u=[],p=[],f=a.globals.comboCharts?i[e]:e,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(f),m=o.group({class:"apexcharts-series",seriesName:B.escapeString(a.seriesData.seriesNames[f]),rel:e+1,"data:realIndex":f});v.addCollapsedClassToSeries(this.w,m,f),t[e].length>0&&(this.visibleI=this.visibleI+1);const y=this.setSeriesAxis(f),x=this.barHelpers.initialPositions(f),{y:_,barHeight:b,yDivision:w,zeroW:A,x:M,barWidth:k,xDivision:L,zeroH:S}=x;d=_,h=M,p.push(h+(null!=k?k:0)/2);const C=o.group({class:"apexcharts-datalabels","data:realIndex":f});if(this.seriesMaxWeight=0,"group"===this.normalize){(a.violinData.seriesViolinDensity[f]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const E=[];for(let i=0;i<a.globals.dataPoints;i++){const o=this.barHelpers.getStrokeWidth(e,i,f),c=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:f,translationsIndex:y},y:d,yDivision:w,barHeight:b,zeroW:A}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:f,translationsIndex:y},x:h,xDivision:L,barWidth:k,zeroH:S});h=c.x,d=c.y,i>0&&p.push(c.center),u.push(c.alongRepresentative);const x=this.buildPointsSubPath({realIndex:f,j:i,center:c.center,halfExtent:c.halfExtent,alongFn:c.alongFn,density:c.density,maxWeight:c.maxWeight,cloudBase:c.cloudBase,cloudMaxPx:c.cloudMaxPx,rainCenter:c.rainCenter,rainHalfPx:c.rainHalfPx});x.length&&E.push({groups:x,j:i});const _=l.fillPath({seriesNumber:this.distributed?i:f,dataPointIndex:i,color:this.distributed?a.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:f,pathFill:_,lineFill:a.globals.stroke.colors[f],j:i,i:e,pathFrom:c.pathFrom,pathTo:c.pathTo,strokeWidth:o,elSeries:m,x:h,y:d,series:t,columnGroupIndex:g,barHeight:b,barWidth:k,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin"});const v=m.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(v&&isFinite(c.alongRepresentative)&&v.setAttribute(this.isHorizontal?"cx":"cy",`${c.alongRepresentative}`),v&&v.setAttribute("data:center",`${c.center}`),c.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;c.boxPaths.forEach(n=>{this.renderSeries({realIndex:f,pathFill:n.filled?this.boxOptions.fillColor||_:"none",lineFill:a.globals.stroke.colors[f],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:m,x:h,y:d,series:t,columnGroupIndex:g,barHeight:b,barWidth:k,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box",noLabel:!0})})}const M=!v&&(null==(r=null==(s=a.globals.barCanvasCoords)?void 0:s[f])?void 0:r[i]);M&&isFinite(c.alongRepresentative)&&(this.isHorizontal?M.cx=c.alongRepresentative:(M.bodyCx=M.cx,M.cx=c.center,M.cy=c.alongRepresentative))}q({graphics:o,w:a,elSeries:m,pointsByCat:E,options:this.pointsOptions,distributed:this.distributed,realIndex:f,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[f]=p,a.globals.seriesYvalues[f]=u,c.add(m)}return c}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){const{realIndex:r,j:a,translationsIndex:o}=t,h=this.yRatio[o]*(this.isReversed?-1:1);let d=e+n*this.visibleI;return this.w.axisFlags.isXNumeric?({x:e,barXPosition:d}=this.getBarXForNumericXAxis({x:e,barWidth:n,realIndex:r,j:a})):e+=i,c(l({},this.buildViolin({realIndex:r,j:a,center:d+n/2,halfExtent:n/2,alongFn:t=>s-this.logVal(t,r)/h,vertical:!0})),{x:e,y:s})}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){const{realIndex:r,j:a}=t,o=this.invertedYRatio*(this.isReversed?-1:1),h=e+n*this.visibleI;return c(l({},this.buildViolin({realIndex:r,j:a,center:h+n/2,halfExtent:n/2,alongFn:t=>s+this.logVal(t,r)/o,vertical:!1})),{x:s,y:e+i})}buildViolin({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,vertical:r}){var a,o,l,c,h,d,u;const p=this.w,f=this.getDensity(t,e),g=this.effectiveMaxWeight(f),m=function({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const r=n*t,a=0===i?t:s*t,o=0===i?0:i*(t-a);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:o,rainHalfPx:a};const l=0===i?0:s,c=2*Math.max(0,1-l-n)*t,h=e*(t-c);return{cloudBaseOff:h,cloudMaxPx:c,boxCenterOff:h-e*r,boxHalfPx:r,rainCenterOff:o,rainHalfPx:a}}({halfExtent:n,cloudSign:null!=(a=this.cloudSign)?a:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(c=this.rainFrac)?c:0}),y=i+m.cloudBaseOff,x=t=>this.buildBodyPath({nodes:f.nodes,center:y,halfExtent:m.cloudMaxPx,maxWeight:g,vertical:r,alongFn:s,collapsed:t,sideSign:this.cloudSign}),_=x(!1);let b=null;const v=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(t,e);return v?b=v:p.globals.previousPaths.length>0&&(b=this._prevBody(t,e,_)),null==b&&(b=x(!0)),{pathTo:_,pathFrom:b,center:i,halfExtent:n,alongFn:s,density:f,maxWeight:g,cloudBase:y,cloudMaxPx:m.cloudMaxPx,rainCenter:i+m.rainCenterOff,rainHalfPx:m.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:t,j:e,boxCenter:i+m.boxCenterOff,boxHalfPx:m.boxHalfPx,alongFn:s,vertical:r}),alongRepresentative:s(null!=(u=p.seriesData.series[t][e])?u:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const r=[];let a=null;for(const t of s){const e=n.values[t];null!==a&&e===a||(r.push({v:e,w:n.weights[t]}),a=e)}return{nodes:r,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:r,collapsed:a,sideSign:o=0}){const l=new b(this.w);if(0===t.length){const t=r(0);return s?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const c=t=>{if(a||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},h=[],d=[];for(let i=0;i<t.length;i++){const n=r(t[i].v),a=c(t[i].w),l=0===o?e+a:e+o*a,u=0===o?e-a:e;s?(h.push([l,n]),d.push([u,n])):(h.push([n,l]),d.push([n,u]))}return d.reverse(),this.smoothSegment(h,s,!1)+this.smoothSegment(d,s,!0)+"z"}_prevBody(t,e,i){var n,s;const r=null==(s=null==(n=this._prevKeyedPaths(t))?void 0:n.get(N(this.w,t,e)))?void 0:s.d;return r&&J.pathCommandCount(r)===J.pathCommandCount(i)?r:null}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:r}){var a,o,l;const c=this.w;if(!this.boxShown||n<=0)return null;const h=null==(a=c.violinData.seriesViolinSummary[t])?void 0:a[e];if(!h)return null;const d=n*Math.min(1,Math.max(0,null!=(o=this.boxOptions.capWidth)?o:.5)),[u,p,f,g,m]=h.map(t=>s(t)),y=(t,e)=>{const n=new b(this.w),s=(t,e)=>r?[t,e]:[e,t],a=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),o=i;return{whiskers:a([s(o,u),s(o,p)])+a([s(o,g),s(o,m)])+a([s(o-t,u),s(o+t,u)])+a([s(o-t,m),s(o+t,m)]),box:a([s(o-e,p),s(o+e,p),s(o+e,g),s(o-e,g)])+"z"+a([s(o-e,f),s(o+e,f)])}},x=y(d,n),_=y(0,0),v=c.globals.previousPaths.length?this._prevKeyedPaths(t):null,w=(null==(l=null==v?void 0:v.get(N(c,t,e)))?void 0:l.box)||[];return[{pathTo:x.whiskers,pathFrom:w[0]||_.whiskers,filled:!1},{pathTo:x.box,pathFrom:w[1]||_.box,filled:!0}]}smoothSegment(t,e,i){const n=new b(this.w),s=t[0];let r=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=n.line(t[e][0],t[e][1]);return r}const a=t.map(([t,i])=>e?[i,t]:[t,i]),o=H.points(a);return r+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?o.map(Q):o),r}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:r,maxWeight:a,cloudBase:o,cloudMaxPx:l,rainCenter:c,rainHalfPx:h}){var d;const u=0!==this.rainSign,p=u?c:0!==this.cloudSign?o:i,f=u?h:0!==this.cloudSign?l:n;return function({points:t,extent:e,seedA:i,seedB:n,center:s,halfExtent:r,alongFn:a,isHorizontal:o,options:l,clampAt:c,sideSign:h}){var d,u;const p=l;if(!p||!1===p.show)return[];if(!t||!t.length)return[];const f=p.maxPoints||3e3,g=t.length>f?Math.ceil(t.length/f):1,m=null!=p.size?p.size:2.5,y=r*(null!=p.jitter?p.jitter:.5),x=!1!==p.constrainToViolin&&"function"==typeof c,_="square"===p.shape,b=p.colorScale,v=b&&Array.isArray(b.colors)&&b.colors.length>0,w=v?Math.max(2,b.steps||24):1,A=null!=(d=null==b?void 0:b.min)?d:e[0],M=(null!=(u=null==b?void 0:b.max)?u:e[1])-A||1,k=v?new Array(w).fill(""):[""];for(let e=0;e<t.length;e+=g){const r=t[e],l=a(r);let d=2*(U(7919*i+100003*n+e)-.5)*y;if(x){const t=c(r);d>t&&(d=t),d<-t&&(d=-t)}h&&(d=Math.abs(d)*h);const u=o?l:s+d,p=o?s+d:l,f=_?V(u,p,m):K(u,p,m);if(v){let t=(r-A)/M;t<0&&(t=0),t>1&&(t=1),k[Math.round(t*(w-1))]+=f}else k[0]+=f}if(!v)return k[0]?[{fill:null,d:k[0]}]:[];const L=[];for(let t=0;t<w;t++)k[t]&&L.push({fill:G(b.colors,t/(w-1)),d:k[t]});return L}({points:null==(d=this.w.violinData.seriesViolinPoints[t])?void 0:d[e],extent:this.jx,seedA:t,seedB:e,center:p,halfExtent:f,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:t=>this.halfWidthAtValue(t,r,f,a),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,r=null!=n?n:e.maxWeight;if(!s.length||r<=0)return 0;const a=t=>Math.min(i,t/r*i*this.bandwidthScale);if(t<=s[0].v)return a(s[0].w);if(t>=s[s.length-1].v)return a(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],r=n.v===i.v?0:(t-i.v)/(n.v-i.v);return a(i.w+(n.w-i.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function Q(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function tt(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function et(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}m.default.use({violin:J});const it=globalThis.console;function nt(t,...e){it.error(t,...e)}function st(t){it.warn(t)}const rt="APEX-",at=new Date("2027-07-31T00:00:00Z"),ot="__apex_license_v1__";function lt(){const t=globalThis;let e=t[ot];return e||(e={key:null,listeners:new Set,result:null},t[ot]=e),e}const ct=class{static get licenseKey(){return lt().key}static set licenseKey(t){lt().key=t}static get listeners(){return lt().listeners}static get validationResult(){return lt().result}static set validationResult(t){lt().result=t}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(t){return!!t&&this.validateKey(t).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}static setLicense(t){var e,i;if(!t)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const n=this.validateKey(t);n.valid||t===this.licenseKey||!(null==(i=this.validationResult)?void 0:i.valid)?(this.licenseKey=t,this.publish(n),n.valid||nt(`[Apex] ${n.message}`)):st(`[Apex] Ignoring license key: ${null!=(e=n.message)?e:"it is not valid"} A valid license is already active on this page.`)}static validateKey(t){const e=this.parseKey(t),i=this.validateStructure(t,e);if(!i.valid||!(null==e?void 0:e.signature))return i;const n=this.verdicts.get(t);return!1===n?{data:e.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===n&&this.verifySignature(t,e,i),c(l({},i),{signatureVerified:!0===n}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),i=e.padEnd(4*Math.ceil(e.length/4),"="),n=globalThis.atob;if("function"!=typeof n)throw new Error("no base64 decoder available");const s=n(i),r=new Uint8Array(s.length);for(let t=0;t<s.length;t++)r[t]=s.charCodeAt(t);return r}static canonicalPayload(t){const e=t.domains&&t.domains.length>0?t.domains.join(","):"";return`v1|${t.issueDate}|${t.expiryDate}|${t.plan}|${e}`}static notify(t){for(const e of this.listeners)try{e(t)}catch(t){}}static parseKey(t){if("string"!=typeof t||!t.startsWith(rt))return null;const e=t.slice(5);if(!e)return null;try{const t=(new TextDecoder).decode(this.base64ToBytes(e)),i=JSON.parse(t);return i.issueDate&&i.expiryDate&&i.plan?{data:{domains:Array.isArray(i.domains)?i.domains:void 0,expiryDate:i.expiryDate,issueDate:i.issueDate,plan:i.plan,valid:!0},signature:"string"==typeof i.sig&&i.sig?i.sig:null}:null}catch(t){return null}}static publish(t){this.validationResult=t,this.notify(t)}static validateStructure(t,e){const i=t=>({expired:!1,message:t,signatureVerified:!1,valid:!1});if("string"!=typeof t||!t.startsWith(rt))return i('Invalid license key format. License key must start with "APEX-".');if(!e)return i("Invalid license key. Unable to decode license data.");const{data:n,signature:s}=e;if(!s&&new Date>=at)return i("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(n.expiryDate)<new Date)return{data:n,expired:!0,message:`License expired on ${n.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(n.domains&&n.domains.length>0){const t="undefined"==typeof location?"":location.hostname;if(!n.domains.some(e=>t===e||t.endsWith(`.${e}`)))return{data:n,expired:!1,message:`License is not valid for this domain (${t}). Allowed domains: ${n.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:n,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(t,e,i){return d(this,null,function*(){var n;if(this.verifying.has(t)||this.verdicts.has(t))return;this.verifying.add(t);const s=this.epoch,r=null==(n=globalThis.crypto)?void 0:n.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(t),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,st(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(e.data));let o=!1;for(const t of this.publicKeysSpki){try{const i=yield r.importKey("spki",this.base64ToBytes(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},i,this.base64ToBytes(e.signature),a)}catch(t){o=!1}if(o)break}if(this.verifying.delete(t),this.epoch!==s)return;if(this.verdicts.set(t,o),o){const e=c(l({},i),{signatureVerified:!0});return void(this.licenseKey===t?this.publish(e):this.notify(e))}const h="Invalid license key. The license signature does not verify.",d={data:e.data,expired:!1,message:h,signatureVerified:!0,valid:!1};this.licenseKey===t?this.publish(d):this.notify(d),nt(`[Apex] ${h}`)})}};ct.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],ct.verdicts=new Map,ct.verifying=new Set,ct.warnedUnverifiable=!1,ct.epoch=0;let ht=ct;function dt(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const n=(i-1)*e,s=Math.floor(n),r=Math.ceil(n);return s===r?t[s]:t[s]+(t[r]-t[s])*(n-s)}function ut(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e);let n=i[0],s=i[i.length-1];const r=e.range;if(Array.isArray(r)&&2===r.length){const t=Number(r[0]),e=Number(r[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(n=t,s=e)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const a=s-n;let o,l;if("number"==typeof e.binWidth&&e.binWidth>0)o=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)o=a/Math.floor(e.bins),l="count";else{const t=function(t,e,i){const n=t.length,s=t=>e/Math.max(1,Math.ceil(t)),r=()=>s(Math.log2(n)+1);switch(i){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(t);return e>0?{width:3.49*e*Math.pow(n,-1/3),rule:"scott"}:{width:r(),rule:"sturges"}}case"fd":{const e=dt(t,.75)-dt(t,.25);return e>0?{width:2*e*Math.pow(n,-1/3),rule:"fd"}:{width:r(),rule:"sturges"}}case"auto":{const e=r(),i=dt(t,.75)-dt(t,.25);if(i<=0)return{width:e,rule:"sturges"};const s=2*i*Math.pow(n,-1/3);return s<e?{width:s,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:r(),rule:"sturges"}}}(i,a,"string"==typeof e.bins?e.bins:"auto");o=t.width,l=t.rule}(!Number.isFinite(o)||o<=0)&&(o=a);let c=Math.ceil(a/o);(!Number.isFinite(c)||c<1)&&(c=1);let h=!1;c>1e3&&(c=1e3,h=!0),o=a/c;const d=new Array(c+1);for(let t=0;t<=c;t++)d[t]=n+t*o;return d[c]=Math.max(d[c],s),{edges:d,binWidth:o,rule:l,capped:h}}function pt(t,e){const i=e.length-1;if(!(t>=e[0])||t>e[i])return-1;if(t===e[i])return i-1;const n=(e[i]-e[0])/i;if(n>0){let s=Math.floor((t-e[0])/n);return s<0&&(s=0),s>i-1&&(s=i-1),t<e[s]?s--:t>=e[s+1]&&s++,s<0||s>i-1?-1:s}let s=0,r=i-1;for(;s<=r;){const i=s+r>>1;if(t<e[i])r=i-1;else{if(!(t>=e[i+1]))return i;s=i+1}}return-1}const ft=class{static applyStyles(t){Object.assign(t.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(t){return t?t.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(t,e){return t&&"undefined"!=typeof document?(this.setManaged(t,e),this.paint(t)):null}static exists(t){return!!this.node(t)}static remove(t,e){t&&(this.setManaged(t,e),this.erase(t))}static untrack(t){this.managed.delete(t)}static createWatermarkPattern(){const t=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${t}</text>\n </svg>\n `.trim())}")`}static erase(t){var e;null==(e=this.node(t))||e.remove()}static paint(t){let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(this.WATERMARK_ATTR,""),t.appendChild(e)),this.applyStyles(e),"function"==typeof getComputedStyle&&"static"===getComputedStyle(t).position&&(t.style.position="relative"),e}static reconcile(){const t=ht.isLicenseValid();for(const e of this.managed)e.isConnected?t?this.erase(e):this.paint(e):this.managed.delete(e)}static setManaged(t,e){!1!==(null==e?void 0:e.manage)?this.track(t):this.managed.delete(t)}static track(t){this.managed.add(t),this.subscribed||(this.subscribed=!0,ht.onChange(()=>{this.reconcile()}))}};ft.WATERMARK_ATTR="data-apexcharts-watermark",ft.WATERMARK_TEXT="APEXCHARTS",ft.ATTR="data-apexcharts-watermark",ft.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},ft.managed=new Set,ft.subscribed=!1;let gt=ft;const mt=1/45;function yt(t,e,i,n){return{value:t,velocity:0,target:t,stiffness:e,damping:i}}function xt(t,e){if(e<=0)return bt(t);let i=e;for(;i>0;){const e=Math.min(i,mt),n=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=n*e,t.value+=t.velocity*e,i-=e}return!!bt(t)&&(t.value=t.target,t.velocity=0,!0)}function _t(t,e){t.target=e}function bt(t){var e,i;const n=null!=(e=t.restVelocity)?e:.05,s=null!=(i=t.restDisplacement)?i:.05;return Math.abs(t.velocity)<n&&Math.abs(t.value-t.target)<s}const vt={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function wt(t){const e=t.getRootNode?t.getRootNode():null;return e&&(9===e.nodeType||11===e.nodeType&&"host"in e)?e:t.ownerDocument||document}function At(t){const e="function"==typeof t.composedPath?t.composedPath():null;return(null==e?void 0:e.length)?e[0]:t.target}function Mt(t,e){const i=wt(t),n=i.querySelector(e);if(n)return n;const s=t.ownerDocument;return s&&s!==i?s.querySelector(e):null}const kt="__apexcharts_crossfilters__";function Lt(t){if(!Number.isFinite(t))return t;const e=Number(t.toPrecision(12));return Object.is(e,-0)?0:e}function St(t){return"number"==typeof t&&Number.isFinite(t)}function Ct(t){if("function"==typeof t)return t;if(t&&"object"==typeof t){if("string"==typeof t.sum){const e=t.sum;return t=>t.reduce((t,i)=>t+(Number(i[e])||0),0)}if("string"==typeof t.avg){const e=t.avg;return t=>t.length?t.reduce((t,i)=>t+(Number(i[e])||0),0)/t.length:0}if("string"==typeof t.min){const e=t.min;return t=>t.length?Math.min(...t.map(t=>Number(t[e])||0)):0}if("string"==typeof t.max){const e=t.max;return t=>t.length?Math.max(...t.map(t=>Number(t[e])||0)):0}}return t=>t.length}function Et(t,e){return"function"==typeof e?t.slice().sort(e):"asc"===e?t.slice().sort((t,e)=>t>e?1:t<e?-1:0):"desc"===e?t.slice().sort((t,e)=>t<e?1:t>e?-1:0):t}function Ft(t,e){if(!St(t))return-1;const i=e.length-1;if(t<e[0]||t>e[i])return-1;if(t===e[i])return i-1;for(let n=0;n<i;n++)if(t>=e[n]&&t<e[n+1])return n;return-1}function Pt(t){const e=[];for(let i=0;i<t.length-1;i++)e.push(Lt((t[i]+t[i+1])/2));return e}class Dt{constructor(t,e){this.dims=new Map,this.listeners=new Map,this.id=t,this.records=Array.isArray(e)?e:[]}static store(){const t=globalThis;return t[kt]||(t[kt]=new Map),t[kt]}static getOrCreate(t){if(!t||"string"!=typeof t.id)throw new Error("Crossfilter.getOrCreate requires an { id } string.");const e=Dt.store(),i=e.get(t.id);if(i)return t.records&&i.setRecords(t.records),i;const n=new Dt(t.id,t.records);return e.set(t.id,n),n}static get(t){return Dt.store().get(t)||null}setRecords(t){return this.records=Array.isArray(t)?t:[],this.dims.forEach(t=>this.recomputeDomain(t)),this.emit("records",this.state()),this.emit("change",this.state()),this}registerDimension(t,e){if(!e||"function"!=typeof e.dimension)throw new Error(`crossfilter.registerDimension("${t}") needs a dimension function.`);const i=e.type||(e.bins?"range":"category"),n={accessor:e.dimension,reducer:Ct(e.reduce),type:i,bins:e.bins,order:e.order,filter:null,labels:[],edges:null,xLabels:[],yLabels:[]};return this.dims.set(t,n),this.recomputeDomain(n),null!=e.filter&&this.setFilterOn(n,e.filter),this}hasDimension(t){return this.dims.has(t)}removeDimension(t){const e=this.dims.get(t),i=!!e&&this.hasFilter(e);return this.dims.delete(t),i&&this.emit("change",this.state()),this}recomputeDomain(t){if("matrix"===t.type){const e=function(t,e,i){const n=new Set,s=new Set,r=[],a=[];for(let i=0;i<t.length;i++){const o=e(t[i]);if(!o)continue;const l=o[0],c=o[1];null==l||n.has(l)||(n.add(l),r.push(l)),null==c||s.has(c)||(s.add(c),a.push(c))}return{xLabels:Et(r,i),yLabels:Et(a,i)}}(this.records,t.accessor,t.order);return t.xLabels=e.xLabels,t.yLabels=e.yLabels,void(t.edges=null)}if("range"===t.type)return t.edges=function(t,e,i){if(i&&Array.isArray(i.thresholds)&&i.thresholds.length>=2){const t=Array.from(new Set(i.thresholds.filter(St))).sort((t,e)=>t-e);return t.length>=2?t.map(Lt):[0,1]}let n=1/0,s=-1/0;for(let i=0;i<t.length;i++){const r=e(t[i]);St(r)&&(r<n&&(n=r),r>s&&(s=r))}if(n===1/0)return[0,1];if(n===s){const t=Math.abs(n)>0?Math.abs(n):1;return[Lt(n),Lt(n+t)]}if(i&&St(i.width)&&i.width>0){const t=i.width,e=Math.floor(n/t)*t;let r=Math.ceil(s/t)*t;r<=e&&(r=e+t);const a=Math.max(1,Math.round((r-e)/t)),o=new Array(a+1);for(let i=0;i<=a;i++)o[i]=Lt(e+i*t);return o}const r=i&&St(i.count)&&i.count>=1?Math.floor(i.count):30,a=(s-n)/r,o=new Array(r+1);for(let t=0;t<=r;t++)o[t]=Lt(n+t*a);return o[r]=Lt(s),o}(this.records,t.accessor,t.bins),void(t.labels=Pt(t.edges));if(t.labels=function(t,e,i){const n=new Set,s=[];for(let i=0;i<t.length;i++){const r=e(t[i]);null!=r&&(n.has(r)||(n.add(r),s.push(r)))}return Et(s,i)}(this.records,t.accessor,t.order),t.edges=null,t.filter instanceof Set){const e=new Set(t.labels);Array.from(t.filter).forEach(i=>{e.has(i)||t.filter.delete(i)})}}filter(t,e){const i=this.dims.get(t);return i?(this.setFilterOn(i,e),this.emit("change",this.state()),this):this}toggleKey(t,e){const i=this.dims.get(t);if(!i||"category"!==i.type)return this;i.filter instanceof Set||(i.filter=new Set);const n=i.filter;return n.has(e)?n.delete(e):n.add(e),0===n.size&&(i.filter=null),this.emit("change",this.state()),this}setFilterOn(t,e){if(null==e)return void(t.filter=null);if("range"===t.type){if(Array.isArray(e)&&2===e.length&&e.every(St)){const[i,n]=e;t.filter=[Math.min(i,n),Math.max(i,n)]}else t.filter=null;return}const i=new Set(e);t.filter=i.size?i:null}clear(t){const e=this.dims.get(t);return e&&(e.filter=null),this.emit("change",this.state()),this}reset(){return this.dims.forEach(t=>{t.filter=null}),this.emit("change",this.state()),this}hasFilter(t){return null!=t.filter&&(!(t.filter instanceof Set)||t.filter.size>0)}passes(t,e){if(!this.hasFilter(t))return!0;const i=t.accessor(e);if(t.filter instanceof Set)return t.filter.has(i);if(!St(i))return!1;const[n,s]=t.filter;return i>=n&&i<=s}filteredRecords(t){const e=[];return this.dims.forEach((i,n)=>{n!==t&&this.hasFilter(i)&&e.push(i)}),0===e.length?this.records:this.records.filter(t=>e.every(e=>this.passes(e,t)))}filteredRows(){return this.filteredRecords(null)}aggregateFor(t){const e=this.dims.get(t);if(!e)return{type:"category",labels:[],values:[],keys:[]};const i=this.filteredRecords(t);if("matrix"===e.type){const t=new Map(e.xLabels.map((t,e)=>[t,e])),n=new Map(e.yLabels.map((t,e)=>[t,e])),s=e.yLabels.map(()=>e.xLabels.map(()=>[]));for(let r=0;r<i.length;r++){const a=e.accessor(i[r]);if(!a)continue;const o=t.get(a[0]),l=n.get(a[1]);null!=o&&null!=l&&s[l][o].push(i[r])}return{type:"matrix",xLabels:e.xLabels.slice(),yLabels:e.yLabels.slice(),matrix:s.map(t=>t.map(t=>e.reducer(t)))}}if("range"===e.type){const t=e.edges||[0,1],n=t.length-1,s=Array.from({length:n},()=>[]);for(let n=0;n<i.length;n++){const r=Ft(e.accessor(i[n]),t);r>=0&&s[r].push(i[n])}return{type:"range",labels:Pt(t),values:s.map(t=>e.reducer(t)),keys:s.map((e,i)=>[t[i],t[i+1]]),edges:t}}const n=new Map;e.labels.forEach(t=>n.set(t,[]));for(let t=0;t<i.length;t++){const s=n.get(e.accessor(i[t]));s&&s.push(i[t])}return{type:"category",labels:e.labels.slice(),values:e.labels.map(t=>e.reducer(n.get(t)||[])),keys:e.labels.slice()}}aggregateAll(){const t={};return this.dims.forEach((e,i)=>{t[i]=this.aggregateFor(i)}),t}state(){const t={};return this.dims.forEach((e,i)=>{this.hasFilter(e)&&(t[i]=e.filter instanceof Set?Array.from(e.filter):e.filter.slice())}),{filters:t,filteredCount:this.filteredRows().length,total:this.records.length}}filterOf(t){const e=this.dims.get(t);return e&&this.hasFilter(e)?e.filter instanceof Set?new Set(e.filter):e.filter.slice():null}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>this.off(t,e)}off(t,e){var i;return null==(i=this.listeners.get(t))||i.delete(e),this}emit(t,e){var i;null==(i=this.listeners.get(t))||i.forEach(i=>{try{i(e)}catch(e){nt(`[Apex] a crossfilter ${t} listener threw`,e)}})}static esc(t){return String(null==t?"":t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}resolveColumns(t){if(Array.isArray(t)&&t.length)return t.map(t=>"string"==typeof t?{field:t,label:t}:{field:t.field,label:t.label||t.field,format:t.format});const e=this.records[0];return(e?Object.keys(e):[]).map(t=>({field:t,label:t}))}tableHTML(t,e,i){const n="<thead><tr>"+t.map(t=>`<th>${Dt.esc(t.label)}</th>`).join("")+"</tr></thead>",s="<tbody>"+e.map(e=>"<tr>"+t.map(t=>{const i=e[t.field],n=t.format?t.format(i,e):i;return`<td>${Dt.esc(n)}</td>`}).join("")+"</tr>").join("")+"</tbody>";return`<table class="apexcharts-cf-table"><caption>${e.length} of ${i} rows</caption>${n}${s}</table>`}dataTable(t,e){if(!t)return{refresh(){},destroy(){}};const i=e||{},n=this.resolveColumns(i.columns),s=i.pageSize||0,r=i.page||0,a=()=>{const e=this.filteredRows(),i=s?e.slice(r*s,r*s+s):e;t.innerHTML=this.tableHTML(n,i,e.length)};a();const o=this.on("change",a);return{refresh:a,destroy:()=>{o(),t.innerHTML=""}}}destroy(){Dt.store().delete(this.id),this.dims.clear(),this.listeners.clear(),this.records=[]}}const Rt="__apexcharts_unit_layouts__",Tt=globalThis;function Nt(t){const e=globalThis[Rt];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}Tt[Rt]||(Tt[Rt]=Object.create(null));const Ot="__apexcharts_unit_marks__",$t=globalThis;function It(t,e){if("string"==typeof t){const e=t.trim();return e?Object.freeze({name:"anonymous",path:e,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(c(l({},t),{name:t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function zt(t){const e=globalThis[Ot];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}function Wt(t,e,i={}){const n=new b(t),s=i.fontSize||"12px",r=parseFloat(s)||12;let a=0;return e.forEach(t=>{if(null==t||""===t)return;const e=`${t}`,o=n.getTextRects(e,s,i.fontFamily,"",!0,i.fontWeight).width;a=Math.max(a,o>0?o:e.length*r*.58)}),a}$t[Ot]||($t[Ot]=Object.create(null));const Bt=Math.PI*(3-Math.sqrt(5)),jt=(t,e)=>{const i=(t.get(e)||0)+1;return t.set(e,i),i>1?e+"#"+i:e},Ht=t=>("string"==typeof t&&(t=parseFloat(t)),"number"==typeof t&&isFinite(t)?t:null);function Yt(t){return 1-Math.pow(1-t,3)}function qt(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function Xt(t,e){const[i,n]=null!=(r=vt[null!=(s=t)?s:"crisp"])?r:vt.crisp;var s,r;const a=800/Math.max(1,e);return[i*a*a,n*a]}m.default.use({unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,i=new b(e,this.ctx),n=i.group({class:"apexcharts-unit"});if(M.cancelAnimationFrame(e.globals.unitGatherRAF||0),M.cancelAnimationFrame(e.globals.unitExitRAF||0),e.globals.unitGatherRAF=e.globals.unitExitRAF=null,e.globals.noData||!Array.isArray(t)||0===t.length)return n;const s=e.config.plotOptions.unit,r="packed"===s.layout?"packed":"columns"===s.layout?"columns":"grid"===s.layout?"grid":"scatter"===s.layout?"scatter":"arc"===s.layout?"arc":"custom"===s.layout?"custom":"grouped",a=s.transition,o="flow"===a,h="identity"===a,d=s.unitValue>0?s.unitValue:1,u="grid"===r&&!(!s.grid||!s.grid.split);let p=t.map(t=>{const e=Math.abs(B.parseNumber(t))/d;return u?e:e>0?Math.max(1,Math.round(e)):0});u||"scatter"===r||(p=this._applyMaxUnits(p,s.maxUnits));const f=p.reduce((t,e)=>t+e,0),g="packed"===r?this._layoutPacked(p,s):"columns"===r?this._layoutColumns(p,s):"grid"===r?this._layoutGrid(p,s):"scatter"===r?this._layoutScatter(s):"arc"===r?this._layoutArc(p,s):"custom"===r?this._layoutCustom(p,s):this._layoutGrouped(p,s);"scatter"===r&&this._drawScatterAxes(n,i);const m=this._lastDotR,y=this._shouldAnimate(),x=this.ctx&&this.ctx.morphTypeChange,_=y&&!!x&&"function"==typeof x.isActive&&x.isActive()&&"function"==typeof x.getInitialSlotFor,v=_&&"function"==typeof x.usesPieceTakeover&&x.usesPieceTakeover(),w=y&&!_&&this.ctx?this.ctx._unitPrevDots:null,A=this.ctx&&this.ctx._unitPieces;A&&(this.ctx._unitPieces=null,w&&A.querySelectorAll("rect").forEach(t=>{const e=t.getAttribute("data-key"),i=w.get(e),n=e=>+t.getAttribute(e);i&&w.set(e,c(l({},i),{x:n("x")+n("width")/2,y:n("y")+n("height")/2,r:Math.min(n("width"),n("height"))/2,fill:t.getAttribute("fill")}))}));const k=new Map,L=[],S=e.seriesData.unitData||[],C=this._bubbleStats(S,s,m);let E=0;const F=new Map,P=u&&this._gridTrack&&this._gridTrack.cells||[],D=i.group({class:"apexcharts-unit-track"});P.length&&n.add(D);const R=s.grid&&s.grid.trackColor||"rgba(128,128,128,0.14)",T=this._baseSpec({shape:"square"===s.shape&&"square"},m),N=P.length/Math.max(1,g.length),O=this.ctx&&this.ctx._unitSprings,$=(t,e,i,n,s,r,a,o)=>{const l=w&&w.get(s),c=O&&O.get(s),h=l&&l.x===i&&l.y===n&&l.r===r&&(!c||c.x.value===i&&c.y.value===n);if(k.set(s,{x:i,y:n,fill:R,r:r,spec:e}),w&&y&&!v&&!h){const c=l?l.x:i,h=l?l.y:n;t.style.opacity=l?"1":"0",this._place(t,e,c,h),L.splice(a,0,{node:t,spec:e,x:i,y:n,cx0:c,cy0:h,key:s,r0:l&&null!=l.r?l.r:r,r1:r,delay:0,isEnter:!l,pair:o})}else this._place(t,e,i,n)},I=(t,e)=>{const n=this._drawDot(i,s,m,R,-1,0,T);n.node.classList.add("apexcharts-unit-track-cell"),D.add(n),$(n.node,T,P[t].x,P[t].y,"trk:"+t,m,L.length,e)};if(g.forEach((t,a)=>{const l=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",c=i.group({class:"apexcharts-series",seriesName:B.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),d=t.dots.length,g=S[t.i],b=L.length;t.dots.forEach((e,n)=>{P.length&&I(a*N+n,!0);const r=null!=e.j?e.j:n,p=g?g[r]:void 0,f=p&&"object"==typeof p&&p.fillColor?p.fillColor:l,b=null!=e.r?e.r:C?this._radiusForValue(this._unitValueOf(p),C):m,A=this._markSpecFor(s,p,t.i,b),M=this._drawDot(i,s,b,f,t.i,r,A);let S;if(c.add(M),h){const t=p&&"object"==typeof p?null!=p.id?p.id:p.name:void 0;S=null!=t?`id:${jt(F,String(t))}`:`g:${E}`}else S=o?String(E):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(E++,k.set(S,{x:e.x,y:e.y,fill:f,r:b,spec:A}),v)this._place(M.node,A,e.x,e.y),M.node.setAttribute("opacity","0"),M.node.setAttribute("data-piece-hidden","1"),M.node.setAttribute("data-key",S);else if(y){const i=w&&w.get(S),n=i||(_?x.getInitialSlotFor(t.i,r,d):null),a=s.gather&&s.gather.enter||"burst",o=u||"fade"===a||"rise"===a,l=n||u&&w&&w.get("trk:"+e.slot),c=l?l.x:o?e.x:t.cx,h=l?l.y:"rise"!==a||u?o?e.y:t.cy:e.y+14;M.node.style.opacity=n?"1":"0",this._place(M.node,A,c,h),L.push({node:M.node,spec:A,x:e.x,y:e.y,cx0:c,cy0:h,key:S,r0:i&&null!=i.r?i.r:b,r1:b,fill0:i?i.fill:f,fill1:f,delay:0,isEnter:!n})}else this._place(M.node,A,e.x,e.y)});for(let e=t.dots.length;e<N;e++)I(a*N+e,!1);if(("grouped"===r||"columns"===r||u)&&s.clusterLabels&&s.clusterLabels.show&&p[t.i]>0){const e=u?this._gridDenom:f,i=this._drawClusterLabel(c,t,p[t.i],e,s,l);if(i&&u){const e={pk:1,hx:0,hy:0,r:0},n=+(i.getAttribute("x")||0),s=+(i.getAttribute("y")||0);$(i,e,n,s,"lbl:"+t.i,0,b,L.length>b)}}n.add(c)}),this._outerLabelsOn(s)&&this._drawOuterLabels(n,g,p,f,s,y&&!w),w){const t=this._collectExits(w,k,s);if(t.length){const e=i.group({class:"apexcharts-unit-exits"});n.add(e),this._runExits(e,t,s)}}return this.ctx&&(this.ctx._unitPrevDots=k),!this.ctx||y&&!_||(this.ctx._unitSprings=null),y&&L.length?this._runGather(L):e.globals.animationEnded=!0,n}_applyMaxUnits(t,e){const i=t.reduce((t,e)=>t+e,0);if(!e||e<=0||i<=e)return t;const n=e/i,s=this.ctx||{};return s._unitCapWarned||(s._unitCapWarned=!0,console.warn(`[ApexCharts] unit chart: ${i} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`)),t.map(t=>t>0?Math.max(1,Math.round(t*n)):0)}_layoutCustom(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=t.reduce((t,e)=>t+e,0),a=this._resolveLayoutProvider(e);if(!a)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,n-2*o),height:s},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,r);this._lastDotR=this._dotRadiusFromStep(h,e);const d=this._lastDotR,u=this._layoutObjects(t,d);let p;try{p=a(u,l)}catch(i){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",i),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const f=new Map;p.forEach(t=>{t&&isFinite(t.x)&&isFinite(t.y)&&f.set(String(t.id),{x:t.x,y:t.y,r:"number"==typeof t.r&&t.r>0?t.r:void 0})});const g=t.map((t,e)=>({i:e,cx:n/2,cy:s/2,outerR:d,dots:[]}));return u.forEach(t=>{const e=f.get(t.id);e&&g[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})}),g.forEach(t=>{if(!t.dots.length)return;let e=0,i=0;t.dots.forEach(t=>{e+=t.x,i+=t.y}),t.cx=e/t.dots.length,t.cy=i/t.dots.length;let n=0;t.dots.forEach(e=>{n=Math.max(n,Math.hypot(e.x-t.cx,e.y-t.cy))}),t.outerR=n+d}),g}_layoutObjects(t,e){const i=this.w,n=i.seriesData.unitData||[],s=i.seriesData.seriesNames||[],r=[],a=new Map;let o=0;return t.forEach((t,i)=>{var l;const c=n[i];for(let n=0;n<t;n++){const t=c?c[n]:void 0,h=jt(a,!t||"object"!=typeof t||null==t.id&&null==t.name?`${i}:${n}`:String(null!=t.id?t.id:t.name));r.push({id:h,index:o,seriesIndex:i,dataPointIndex:n,label:s[i],value:null!=(l=this._unitValueOf(t))?l:void 0,datum:t,r:e}),o++}}),r}_resolveLayoutProvider(t){const e=t.positions;if("function"==typeof e)return e;if("string"==typeof e&&e){const t=Nt(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,a=t.map((t,e)=>e).filter(e=>t[e]>0),o=Math.max(1,a.length),l=new Array(t.length).fill(-1);a.forEach((t,e)=>l[t]=e);const c=n/o,h=s-r,d=Math.max(1,...t),u=.08*Math.min(c,h),p=Math.max(4,Math.min(c,h)/2-u),f=this._resolveStep(e,p,d);this._lastDotR=this._dotRadiusFromStep(f,e);const g=this._lastDotR,m=r+h/2,y=t.map(t=>f*Math.sqrt(Math.max(1,t))+g);let x=t.map((t,e)=>(t=>l[t]>=0?c*(l[t]+.5):n/2)(e));const _=a.map(t=>y[t]);let b=!1;for(let t=1;t<o;t++)if(x[a[t]]-x[a[t-1]]<_[t]+_[t-1]){b=!0;break}if(b){const e=Math.max(2*g,8),i=_.reduce((t,e)=>t+2*e,0)+e*(o-1);let s;if(i<=n){let t=(n-i)/2;s=_.map(i=>{const n=t+i;return t+=2*i+e,n})}else if(1===o)s=[n/2];else{const t=_[0],e=n-_[o-1];s=_.map((i,n)=>t+(e-t)*n/(o-1))}x=t.map((t,e)=>l[e]>=0?s[l[e]]:n/2)}return t.map((t,e)=>({i:e,cx:x[e],cy:m,outerR:y[e],dots:this._spiral(x[e],m,t,f,0)}))}_layoutPacked(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),a=Math.max(4,Math.min(n,s-6)/2-.06*Math.min(n,s)),o=this._resolveStep(e,a,r);this._lastDotR=this._dotRadiusFromStep(o,e);const l=n/2,c=6+(s-6)/2,h=t.map((t,e)=>e);!1!==e.sortByGroup&&h.sort((e,i)=>t[e]-t[i]);const d=t.map((t,e)=>({i:e,cx:l,cy:c,outerR:o*Math.sqrt(r)+this._lastDotR,dots:[]}));let u=0;return h.forEach(e=>{for(let i=0;i<t[e];i++){const t=o*Math.sqrt(u+.5),i=u*Bt;d[e].dots.push({x:l+t*Math.cos(i),y:c+t*Math.sin(i),slot:u}),u++}}),d}_layoutArc(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),a=e.arc||{},o="number"==typeof a.startAngle?a.startAngle:-90,l="number"==typeof a.endAngle?a.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,d=h-c||Math.PI,u=Math.max(0,Math.min(.95,"number"==typeof a.innerRadiusRatio?a.innerRadiusRatio:.4)),p=t=>Math.sin(t),f=t=>-Math.cos(t),g=this._arcBounds(c,h),m=.04*Math.min(n,s),y=Math.max(1e-6,g.maxX-g.minX),x=Math.max(1e-6,g.maxY-g.minY),_=t=>Math.max(4,Math.min((n-2*m-t)/y,(s-2*m-t)/x)),b=t=>_(2*this._arcAllocate(r,t*u,t,d,e).dotR);let v=_(0),w=b(v);for(let t=0;t<6;t++){const t=(w+v)/2;t<=b(t)?w=t:v=t}const A=n/2-(g.minX+g.maxX)/2*w,M=s/2-(g.minY+g.maxY)/2*w,k=this._arcAllocate(r,w*u,w,d,e);this._lastDotR=k.dotR;const L=[];for(let t=0;t<k.R;t++){const e=k.radii[t],i=k.seatsPerRow[t];for(let t=0;t<i;t++){const n=1===i?(c+h)/2:c+d*(t+.5)/i;L.push({a:n,x:A+e*p(n),y:M+e*f(n)})}}L.sort((t,e)=>t.a-e.a);const S=t.map((t,e)=>({i:e,cx:A,cy:M,outerR:w,dots:[]}));let C=0,E=0;return L.forEach((e,i)=>{for(;C<t.length&&E>=t[C];)C++,E=0;C>=t.length||(S[C].dots.push({x:e.x,y:e.y,slot:i}),E++)}),S}_arcBounds(t,e){const i=t=>Math.sin(t),n=t=>-Math.cos(t),s=Math.min(t,e),r=Math.max(t,e),a=[0,i(t),i(e)],o=[0,n(t),n(e)],l=Math.PI/2;for(let t=Math.ceil(s/l);t*l<=r;t++)a.push(i(t*l)),o.push(n(t*l));return{minX:Math.min(...a),maxX:Math.max(...a),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,i,n,s){const r=s.spacing>0?s.spacing:1.05,a=Math.abs(n)||Math.PI,o=this._fixedRadius(s),l=n=>{n=Math.max(1,Math.round(n));const s=[];for(let t=0;t<n;t++)s.push(1===n?(e+i)/2:e+t/(n-1)*(i-e));const o=s.reduce((t,e)=>t+e,0)||1,l=s.map(e=>t*e/o),c=l.map(t=>Math.floor(t));let h=t-c.reduce((t,e)=>t+e,0);for(l.map((t,e)=>({idx:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac).forEach(t=>{h>0&&(c[t.idx]++,h--)});h>0;)c[n-1]++,h--;const d=1===n?i-e||i:(i-e)/(n-1);let u=1/0;for(let t=0;t<n;t++){const e=c[t];if(e<=0)continue;const i=s[t]*a/e;i<u&&(u=i)}const p=Math.min(d,u);return{R:n,radii:s,seatsPerRow:c,dotR:Math.max(1,p/(2*r))}},c=s.arc&&s.arc.rows;let h;if("number"==typeof c&&c>=1)h=l(c);else if(o){h=l((i-e)/(2*o*r)+1)}else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>h.dotR&&(h=e)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),a=r&&"bottom"===e.clusterLabels.position,o=r&&!a?30:6,l=t.map((t,e)=>e).filter(e=>t[e]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((t,e)=>h[t]=e);const d=n/c,u=.62*d,p=Math.max(8,.04*s)+(a?30:0),f=Math.max(4,s-o-p),g=Math.max(1,...t),m=e.spacing>0?e.spacing:1,y=e.columns?e.columns.size:void 0;let x;x="image"!==e.shape&&"auto"===y?null:"image"!==e.shape&&"number"==typeof y&&y>0?y:this._fixedRadius(e);let _=1,b=0;if(x){b=2*x*m,this._lastDotR=x;const t=Math.max(1,Math.floor(f/b)),e=Math.max(1,Math.floor(u/b));_=Math.max(1,Math.min(e,Math.ceil(g/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(u/4)));for(let i=1;i<=e;i++){const e=Math.ceil(g/i),n=Math.min(u/i,f/e);n>t&&(t=n,_=i)}b=t,this._lastDotR=Math.max(1,b/(2*m))}const v=this._lastDotR,w=Math.ceil(g/_),A=o+(f+Math.min(f,w*b))/2;return t.map((t,e)=>{const i=h[e]>=0?d*(h[e]+.5):n/2,s=Math.ceil(Math.max(1,t)/_)*b,r=i-_*b/2+b/2,a=[];for(let e=0;e<t;e++){const t=Math.floor(e/_),i=e%_;a.push({x:r+i*b,y:A-v-t*b})}return{i:e,cx:i,cy:A-s/2,outerR:s/2,flat:!0,dots:a}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},a=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),c=l.reduce((t,e)=>t+e,0),h=Math.max(1,Math.ceil(Math.max(1,c)/a)),d=e.spacing>0?e.spacing:1,u=Math.max(4,n),p=Math.max(4,s-6),f=this._fixedRadius(e);let g=0;f?(g=2*f*d,this._lastDotR=f):(g=Math.min(u/a,p/h),this._lastDotR=Math.max(1,g/(2*d)));const m=a*g,y=h*g,x=(n-m)/2+g/2,_=6+(p-y)/2,b=t=>"bottom"===o?_+y-g/2-t*g:_+g/2+t*g,v=t.map((t,e)=>({i:e,cx:n/2,cy:6+p/2,outerR:Math.max(m,y)/2,dots:[]}));let w=0;for(let t=0;t<l.length;t++)for(let e=0;e<l[t];e++){const e=w%a,i=Math.floor(w/a);v[t].dots.push({x:x+e*g,y:b(i),slot:w}),w++}return v}_layoutGridSplit(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},a=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),c=Math.max(1,Math.ceil(l/a)),h=t.map((t,e)=>e).filter(e=>t[e]>0),d=Math.max(1,h.length),u=r.max>0?r.max:Math.max(...t)||1,p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(d)))),f=Math.max(1,Math.ceil(d/p)),g=!(e.clusterLabels&&!1===e.clusterLabels.show),m=g&&e.clusterLabels&&"bottom"===e.clusterLabels.position,y=g&&!m?22:4,x=g&&m?22:4,_=n/p,b=s/f,v=Math.max(4,.86*_),w=Math.max(4,b-y-x),A=e.spacing>0?e.spacing:1,M=this._fixedRadius(e);let k=0;M?(k=2*M*A,this._lastDotR=M):(k=Math.min(v/a,w/c),this._lastDotR=Math.max(1,k/(2*A)));const L=a*k,S=c*k,C=(t,e)=>"bottom"===o?t+S-k/2-e*k:t+k/2+e*k,E=[],F=[];return h.forEach((e,i)=>{const n=i%p,s=Math.floor(i/p),r=n*_,o=r+(_-L)/2+k/2,c=s*b+y+(w-S)/2,h=t=>({x:o+t%a*k,y:C(c,Math.floor(t/a))});for(let t=0;t<l;t++)E.push(h(t));const d=Math.max(0,Math.min(l,Math.round(t[e]/u*l))),f=[];for(let t=0;t<d;t++){const e=h(t);f.push({x:e.x,y:e.y,slot:i*l+t})}F.push({i:e,cx:r+_/2,cy:c+S/2,outerR:S/2,flat:!0,split:!0,dots:f})}),this._gridDenom=u,this._gridTrack={cells:E},F}_layoutScatter(t){const e=this.w,i=t.scatter||{},n=e.seriesData.unitData||[],s=n.map(t=>t?t.length:0),r=this._applyMaxUnits(s,t.maxUnits),a=(t,e)=>Math.floor((e+1)*r[t]/s[t])>Math.floor(e*r[t]/s[t]);if("value"===i.y)return this._layoutScatter2D(t,a);if("vertical"===i.orientation)return this._layoutScatterVertical(t,a);const o=e.layout.gridWidth,l=e.layout.gridHeight,c=e.seriesData.seriesNames||[],h=t=>this._unitValueOf(t),d=this._scatterSizeStats(i,n),u=n.map(t=>Array.isArray(t)?t.map(h):[]),p=t=>null!=t&&isFinite(t),f=u.map((t,e)=>e).filter(t=>u[t].some(p)),g=Math.max(1,f.length);let m=1/0,y=-1/0;u.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<m&&(m=t),t>y&&(y=t))})),m===1/0&&(m=0,y=1);const x=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),_=this._scatterValueDomain(i.xMin,i.xMax,m,y,x),b=_.min,v=_.max,w=v-b||1,A={fontFamily:e.config.chart.fontFamily,fontWeight:600},M=t=>c[t]||`series-${t+1}`,k=null!=i.laneLabelWidth?Math.max(0,i.laneLabelWidth):g>1?Math.min(o/3,Wt(e,f.map(M),A)+14):8,L=30+(i.xTitle?20:0),S=k,C=o-8,E=l-L,F=Math.max(4,C-S),P=Math.max(4,E-10),D=t=>S+(t-b)/w*F,R=P/g;let T=0;const N=this._fixedRadius(t);if(N)T=N;else{const t=Math.max(1,...f.map(t=>u[t].filter(p).length));T=Math.max(2,Math.min(6,.12*R,F/(2.5*Math.sqrt(t))))}this._lastDotR=T;const O=t.spacing>0?t.spacing:1,$=Math.max(.5,T*O),I="jitter"===i.spread,z=[],W=[],B=d?d.rMax:T;f.forEach((t,i)=>{const s=(t=>10+R*(t+.5))(i);let r=M(t);const o=k>12?Wt(e,[r],A):0;o>k-14&&o&&(r=r.slice(0,Math.max(1,Math.floor(r.length*(k-14)/o)-1))+"\u2026"),W.push({i:t,cy:s,name:r});const l=[];if((n[t]||[]).forEach((e,i)=>{const n=h(e);if(!p(n)||!a(t,i))return;const r={j:i,px:D(n),y:s};d&&(r.r=this._scatterRadius(e,d,T)),l.push(r)}),I){const e=Math.max(B,R/2-B);l.forEach(i=>{i.y=s+(2*U(7919*t+i.j)-1)*e})}else this._beeswarm(l,s,T,$,B);z.push({i:t,cx:(S+C)/2,cy:s,outerR:R/2,dots:l.map(t=>({x:t.px,y:t.y,r:t.r,j:t.j}))})});const j=_.ticks;return this._scatterAxis={mode:"1d",plotL:S,plotR:C,plotT:10,plotB:E,xMin:b,xMax:v,plotX:D,ticks:j,lanes:W,xTitle:i.xTitle,formatter:"function"==typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},z}_layoutScatterVertical(t,e){const i=this.w,n=t.scatter||{},s=i.layout.gridWidth,r=i.layout.gridHeight,a=i.seriesData.unitData||[],o=i.seriesData.seriesNames||[],l=t=>this._unitValueOf(t),c=this._scatterSizeStats(n,a),h=a.map(t=>Array.isArray(t)?t.map(l):[]),d=t=>null!=t&&isFinite(t),u=h.map((t,e)=>e).filter(t=>h[t].some(d)),p=Math.max(1,u.length);let f=1/0,g=-1/0;h.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<f&&(f=t),t>g&&(g=t))})),f===1/0&&(f=0,g=1);const m=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),y=this._scatterValueDomain(n.xMin,n.xMax,f,g,m),x=y.min,_=y.max,b=_-x||1,v=46+(n.xTitle?18:0),w=s-10,A=r-(p>1?26:10),M=Math.max(4,w-v),k=Math.max(4,A-10),L=t=>A-(t-x)/b*k,S=M/p;let C=0;const E=this._fixedRadius(t);if(E)C=E;else{const t=Math.max(1,...u.map(t=>h[t].filter(d).length));C=Math.max(2,Math.min(6,.12*S,k/(2.5*Math.sqrt(t))))}this._lastDotR=C;const F=t.spacing>0?t.spacing:1,P=Math.max(.5,C*F),D="jitter"===n.spread,R=[],T=[],N=c?c.rMax:C;u.forEach((t,i)=>{const n=(t=>v+S*(t+.5))(i);T.push({i:t,cx:n,name:o[t]||`series-${t+1}`});const s=[];if((a[t]||[]).forEach((i,r)=>{const a=l(i);if(!d(a)||!e(t,r))return;const o={j:r,py:L(a),x:n};c&&(o.r=this._scatterRadius(i,c,C)),s.push(o)}),D){const e=Math.max(N,S/2-N);s.forEach(i=>{i.x=n+(2*U(7919*t+i.j)-1)*e})}else this._beeswarm(s,n,C,P,N,!0);R.push({i:t,cx:n,cy:(10+A)/2,outerR:S/2,dots:s.map(t=>({x:t.x,y:t.py,r:t.r,j:t.j}))})});const O=y.ticks;return this._scatterAxis={mode:"1d",orientation:"vertical",plotL:v,plotR:w,plotT:10,plotB:A,vMin:x,vMax:_,plotY:L,ticks:O,lanes:T,valueTitle:n.xTitle,formatter:"function"==typeof n.xFormatter?n.xFormatter:null,gridlines:!1!==n.gridlines},R}_layoutScatter2D(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=t.scatter||{},a=i.seriesData.unitData||[],o=t=>null!=t,l=t=>t&&"object"==typeof t?Ht(t.x):null,c=t=>t&&"object"==typeof t?Ht(null!=t.y?t.y:t.value):null,h=a.map((t,e)=>e).filter(t=>(a[t]||[]).some(t=>o(l(t))&&o(c(t))));let d=1/0,u=-1/0,p=1/0,f=-1/0;a.forEach(t=>(t||[]).forEach(t=>{const e=l(t),i=c(t);o(e)&&o(i)&&(e<d&&(d=e),e>u&&(u=e),i<p&&(p=i),i>f&&(f=i))})),d===1/0&&(d=0,u=1,p=0,f=1);const g=this._scatterValueDomain(r.xMin,r.xMax,d,u,Math.max(2,Math.round(r.tickAmount>0?r.tickAmount:5))),m=this._scatterValueDomain(r.yMin,r.yMax,p,f,Math.max(2,Math.round(r.yTickAmount>0?r.yTickAmount:5))),y=g.min,x=g.max,_=m.min,b=m.max,v=x-y||1,w=b-_||1,A=46+(r.yTitle?18:0),M=30+(r.xTitle?20:0),k=A,L=n-12,S=s-M,C=Math.max(4,L-k),E=Math.max(4,S-10),F=t=>k+(t-y)/v*C,P=t=>S-(t-_)/w*E,D=this._scatterSizeStats(r,a),R=this._fixedRadius(t)||5;this._lastDotR=R;const T=[];return h.forEach(t=>{const i=[];(a[t]||[]).forEach((n,s)=>{const r=l(n),a=c(n);null!=r&&null!=a&&e(t,s)&&i.push({x:F(r),y:P(a),r:D?this._scatterRadius(n,D,R):void 0,j:s})}),T.push({i:t,cx:(k+L)/2,cy:(10+S)/2,outerR:E/2,dots:i})}),this._scatterAxis={mode:"2d",plotL:k,plotR:L,plotT:10,plotB:S,plotX:F,plotY:P,xTicks:g.ticks,yTicks:m.ticks,xTitle:r.xTitle,yTitle:r.yTitle,xFormatter:"function"==typeof r.xFormatter?r.xFormatter:null,yFormatter:"function"==typeof r.yFormatter?r.yFormatter:null,gridlines:!1!==r.gridlines},T}_scatterSizeStats(t,e){const i=t&&t.sizeRange;if(!Array.isArray(i)||i.length<2)return null;const n=Math.max(.5,+i[0]),s=Math.max(n,+i[1]),r=t.sizeField||"z";let a=1/0,o=-1/0;return e.forEach(t=>(t||[]).forEach(t=>{const e=t&&"object"==typeof t?t[r]:null;"number"==typeof e&&isFinite(e)&&(e<a&&(a=e),e>o&&(o=e))})),a===1/0?null:{zmin:a,zmax:o,rMin:n,rMax:s,field:r}}_scatterRadius(t,e,i){if(!e)return i;const n=t&&"object"==typeof t?t[e.field]:null;if("number"!=typeof n||!isFinite(n))return e.rMin;const s=e.zmax>e.zmin?(n-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,s)),a=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(a+r*(o-a))}_beeswarm(t,e,i,n,s,r=!1){const a=r?"py":"px",o=r?"x":"y",l=t.slice().sort((t,e)=>t[a]-e[a]),c=[],h=null!=s?s:i;l.forEach(t=>{const s=null!=t.r?t.r:i;let r=0;for(let i=0;i<2e3;i++){const o=0===i?0:Math.ceil(i/2)*n*(i%2?1:-1),l=e+o;let d=!0;for(let e=c.length-1;e>=0;e--){const i=c[e],n=t[a]-i.f;if(n>s+h)break;const r=s+i.r,o=l-i.s;if(n*n+o*o<r*r){d=!1;break}}if(d){r=o;break}}t[o]=e+r,c.push({f:t[a],s:t[o],r:s})})}_scatterValueDomain(t,e,i,n,s){const r=(t,e,i)=>{const n=[];for(let s=0,r=t;r<=e+.5*i;r=t+ ++s*i)n.push(Math.abs(r)<1e-9*i?0:r);return n};if(null!=t||null!=e){let a=null!=t?t:e,o=null!=e?e:t;const l=o>a?(o-a)/Math.max(1,s-1):this._niceScale(Math.min(a,i),Math.max(o,n),s).spacing;if(i<a&&(a-=Math.ceil((a-i)/l)*l),n>o&&(o+=Math.ceil((n-o)/l)*l),o>a||(o=a+l),(o-a)/l<=2*s)return{min:a,max:o,ticks:r(a,o,l)};i=a,n=o}const a=this._niceScale(i,n,s),o=a.spacing||(a.max-a.min)/Math.max(1,s-1);return{min:a.min,max:a.max,ticks:r(a.min,a.max,o)}}_niceScale(t,e,i){const n=t;let s=e;s>n||(s=n+1);const r=this._niceNum(s-n,!1),a=this._niceNum(r/Math.max(1,i-1),!0);return{min:Math.floor(n/a)*a,max:Math.ceil(s/a)*a,spacing:a}}_niceNum(t,e){const i=t>0?t:1,n=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,n);let r;return r=e?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,r*Math.pow(10,n)}_drawScatterAxes(t,e){const i=this.w;if(!k.isBrowser())return;const n=this._scatterAxis;if(!n)return;const s="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}),a=i.config.grid&&i.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=i.config.xaxis&&i.config.xaxis.labels&&i.config.xaxis.labels.style&&i.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",d=(t,e,i,n,a)=>{const o=M.createElementNS(s,"line");o.setAttribute("x1",String(t)),o.setAttribute("y1",String(e)),o.setAttribute("x2",String(i)),o.setAttribute("y2",String(n)),o.setAttribute("stroke",a),o.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(o)},u=(t,e,n,a,o,l,c,h)=>{const d=M.createElementNS(s,"text");d.setAttribute("class",h),d.setAttribute("x",String(e)),d.setAttribute("y",String(n)),d.setAttribute("text-anchor",a),d.setAttribute("dominant-baseline","middle"),d.setAttribute("font-size",`${l}px`),d.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),d.setAttribute("font-weight",String(c)),d.setAttribute("fill",o),d.textContent=t,r.node.appendChild(d)};if("2d"!==n.mode){if("vertical"===n.orientation){if(n.ticks.forEach(t=>{const e=n.plotY(t);n.gridlines&&d(n.plotL,e,n.plotR,e,a);const i=n.formatter?String(n.formatter(t)):this._formatTick(t,n.ticks);u(i,n.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotT,n.plotL,n.plotB,o),n.valueTitle){const t=M.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,a=(n.plotT+n.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(a)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${a})`),t.textContent=String(n.valueTitle),r.node.appendChild(t)}return n.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,t.cx,n.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")}),void t.add(r)}n.ticks.forEach((t,e)=>{const i=n.plotX(t);n.gridlines&&d(i,n.plotT,i,n.plotB,a);const s=n.formatter?String(n.formatter(t)):this._formatTick(t,n.ticks),r=0===e?"start":e===n.ticks.length-1?"end":"middle";u(s,i,n.plotB+14,r,h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotB,n.plotR,n.plotB,o),n.xTitle&&u(String(n.xTitle),(n.plotL+n.plotR)/2,n.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),n.plotL>12&&n.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,n.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")}),t.add(r)}else{if(n.yTicks.forEach(t=>{const e=n.plotY(t);n.gridlines&&d(n.plotL,e,n.plotR,e,a);const i=n.yFormatter?String(n.yFormatter(t)):this._formatTick(t,n.yTicks);u(i,n.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),n.xTicks.forEach(t=>{const e=n.plotX(t);n.gridlines&&d(e,n.plotT,e,n.plotB,a);const i=n.xFormatter?String(n.xFormatter(t)):this._formatTick(t,n.xTicks);u(i,e,n.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotB,n.plotR,n.plotB,o),d(n.plotL,n.plotT,n.plotL,n.plotB,o),n.xTitle&&u(String(n.xTitle),(n.plotL+n.plotR)/2,n.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),n.yTitle){const t=M.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,a=(n.plotT+n.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(a)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${a})`),t.textContent=String(n.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t,e){if(!isFinite(t))return"";const i=Math.abs(t);if(i>=1e6)return+(t/1e6).toFixed(1)+"M";if(i>=1e4)return+(t/1e3).toFixed(1)+"k";if(Number.isInteger(t))return String(t);const n=Math.abs(e[1]-e[0])||1;return String(+t.toFixed(Math.min(20,Math.max(2,1-Math.floor(Math.log10(n))))))}_largestRemainder(t,e){const i=t.reduce((t,e)=>t+e,0);if(i<=0||e<=0)return t.map(()=>0);const n=t.map(t=>t/i*e),s=n.map(t=>Math.floor(t)),r=s.reduce((t,e)=>t+e,0),a=Math.max(0,e-r),o=n.map((t,e)=>({i:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac),l=s.slice();for(let t=0;t<a&&t<o.length;t++)l[o[t].i]++;return l}_spiral(t,e,i,n,s){const r=[];for(let a=0;a<i;a++){const i=s+a,o=n*Math.sqrt(i+.5),l=i*Bt;r.push({x:t+o*Math.cos(l),y:e+o*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"==typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"==typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){return Ht(t&&"object"==typeof t?null!=t.value?t.value:t.y:t)}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const i=e.max>e.min?(t-e.min)/(e.max-e.min):1,n=Math.max(0,Math.min(1,i));if("linear"===e.scale)return e.minR+n*(e.maxR-e.minR);const s=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(s+n*(r-s))}_bubbleStats(t,e,i){if(!this._bubbleActive(e))return null;let n=1/0,s=-1/0;if(t.forEach(t=>{t&&t.forEach(t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<n&&(n=e),e>s&&(s=e))})}),n===1/0||s<n)return null;const r=e.sizeByValue,a=i,o=Math.max(1,Math.min(a,"number"==typeof r.minRadius?r.minRadius:.35*a));return{min:n,max:s,minR:o,maxR:a,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,i){const n=t.spacing>0?t.spacing:1,s=this._fixedRadius(t);return s?2*s*n:e/(Math.sqrt(Math.max(1,i))+.5)}_dotRadiusFromStep(t,e){const i=e.spacing>0?e.spacing:1,n=this._fixedRadius(e);return n||Math.max(1,t/(2*i))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const i=null!=e?e:this._lastDotR;return{hx:i,hy:i}}_place(t,e,i,n,s=1){const r=e;2===r.pk?t.setAttribute("transform","translate("+(i-r.ox*s)+","+(n-r.oy*s)+(1===s?r.tail:") scale("+r.s*s+")")):1===r.pk?(t.setAttribute("x",String(i-r.hx*s)),t.setAttribute("y",String(n-r.hy*s))):(t.setAttribute("cx",String(i)),t.setAttribute("cy",String(n)))}_size(t,e,i){const n=e;0===n.pk?t.setAttribute("r",String(n.r*i)):1===n.pk&&(t.setAttribute("width",String(2*n.hx*i)),t.setAttribute("height",String(2*n.hy*i)))}_baseSpec(t,e){const i=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:i};const{hx:n,hy:s}=this._halfExtent(t,i);return{pk:1,hx:n,hy:s,r:i}}_resolveMark(t){if(null==t)return null;if("object"==typeof t)return It(t);if("string"!=typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return It(e);const i=zt(e);return i||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,i){const n=Math.round(10*e)/10,s=t.name+t.path+t.viewBox+t.fillRule+n,r=this._specCache.get(s);if(r)return r;const a=t.viewBox||[0,0,100,100],o=2*n*(1-Math.max(0,Math.min(.9,i.padding||0)))*("number"==typeof i.scale&&i.scale>0?i.scale:1),l="width"===i.fit?o/a[2]:"height"===i.fit?o/a[3]:o/Math.max(a[2],a[3]),c=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(a[0]+a[2]/2)*l,oy:(a[1]+a[3]/2)*l,tail:") scale("+l+")",r:n});return this._specCache.set(s,c),c}_markSpecFor(t,e,i,n){if("pictogram"!==t.shape)return this._baseSpec(t,n);const s=t.pictogram||{},r=e&&"object"==typeof e?e.mark:void 0,a=Array.isArray(s.mark)?s.mark[i%s.mark.length]:s.mark,o=this._resolveMark(null!=r?r:a);return o?this._glyphSpec(o,n,s):this._baseSpec(c(l({},t),{shape:"square"===s.fallback?"square":"circle"}),n)}_drawDot(t,e,i,n,s,r,a){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,c=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[s]||"none",h="number"==typeof o.config.fill.opacity?o.config.fill.opacity:1;let d;if(2===a.pk)d=o.dom.Paper.path(a.d),d.node.setAttribute("fill",n),"evenodd"===a.fillRule&&d.node.setAttribute("fill-rule","evenodd"),h<1&&d.node.setAttribute("fill-opacity",String(h)),d.node.setAttribute("data:r",String(a.r));else if(1===a.pk&&"image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,i=e.image.height||20;d=o.dom.Paper.image(e.image.src),d.node.setAttribute("width",String(t)),d.node.setAttribute("height",String(i)),d.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&d.node.setAttribute("filter",`url(#${this._tintFilter(n)})`)}else if(1===a.pk){const s=2*i;d=t.drawRect(0,0,s,s,e.borderRadius||0,n,1,l,c),d.node.setAttribute("fill",n),h<1&&d.node.setAttribute("fill-opacity",String(h))}else d=t.drawCircle(i,{fill:n,"stroke-width":l,stroke:c}),d.node.setAttribute("fill",n),h<1&&d.node.setAttribute("fill-opacity",String(h));return s>=0&&(d.node.classList.add("apexcharts-unit-area"),d.node.setAttribute("i",String(s)),d.node.setAttribute("j",String(r))),d}_tintFilter(t){const e=this.w,i="http://www.w3.org/2000/svg",n=this._tints||(this._tints=new Map);let s=n.get(t);if(s)return s;s=`apexcharts-unit-tint-${e.globals.chartID}-${n.size}`,n.set(t,s);const r=e.dom.Paper.node;let a=r.querySelector("defs");a||(a=M.createElementNS(i,"defs"),r.insertBefore(a,r.firstChild));const o=M.createElementNS(i,"filter");o.setAttribute("id",s),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=M.createElementNS(i,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=M.createElementNS(i,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),a.appendChild(o),s}_placeDot(t,e,i,n,s){this._place(t,s||this._baseSpec(e),i,n)}_rgb(t){if("string"!=typeof t)return null;let e=t.trim();if("#"===e[0]){4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e.slice(1,7),16);return isNaN(t)?null:[t>>16&255,t>>8&255,255&t]}const i=e.match(/rgba?\(([^)]+)\)/);if(i){const t=i[1].split(",").map(t=>parseFloat(t));if(t.length>=3&&t.every(t=>!isNaN(t)))return[t[0],t[1],t[2]]}return null}_shouldAnimate(){const t=this.w,e=t.config.chart.animations;return!!k.isBrowser()&&(!(!e||!1===e.enabled)&&(!1!==t.globals.shouldAnimate&&(!(t.globals.resized&&!t.globals.dataChanged)&&(!e.respectReducedMotion||!A()))))}_seedSprings(t,e,i){const[n,s]=Xt(e.spring,i),r=this.ctx?this.ctx._unitSprings:null,a=new Map;for(let e=0;e<t.length;e++){const i=t[e],o=r&&!i.isEnter&&null!=i.key?r.get(i.key):null,l=o?o.x:yt(i.cx0,n,s),c=o?o.y:yt(i.cy0,n,s);o&&(l.stiffness=n,c.stiffness=n,l.damping=s,c.damping=s,i.cx0=l.value,i.cy0=c.value,this._place(i.node,i.spec,i.cx0,i.cy0),0===l.velocity&&0===c.velocity||(i.delay=0)),i.sx=l,i.sy=c,null!=i.key&&a.set(i.key,{x:l,y:c})}this.ctx&&(this.ctx._unitSprings=a)}_stale(t){const e=this.w.dom.Paper;return!!this.w.globals.isDestroyed||!e||!e.node.contains(t)}_runGather(t){const e=this.w,i=e.config.plotOptions.unit,n=Math.max(1,e.config.chart.animations.speed||800),s=Math.min(.6*n,450),r=t.length;for(let e=r;e--;)t[e].delay=t[e].pair?t[e+1].delay:r>1?e/(r-1)*s:0;const a=i.gather||{},o=a.motion||"auto";"spring"===o||"auto"===o&&(!a.easing||"outCubic"===a.easing)?this._seedSprings(t,a,n):this.ctx&&(this.ctx._unitSprings=null);for(let e=0;e<r;e++){const i=t[e];i.r0!==i.r1&&(this._size(i.node,i.spec,i.r0/i.r1),this._place(i.node,i.spec,i.cx0,i.cy0,i.r0/i.r1))}for(let e=0;e<r;e++){const i=t[e];i.fill0&&i.fill1&&i.fill0!==i.fill1&&(i._c0=this._rgb(i.fill0),i._c1=this._rgb(i.fill1))}const l="outBack"===a.easing?(c="number"==typeof a.overshoot?a.overshoot:1.70158,t=>1+(c+1)*Math.pow(t-1,3)+c*Math.pow(t-1,2)):"inOutCubic"===a.easing?qt:Yt;var c;const h=performance.now();let d=h;const u=e=>{if(this._stale(t[0].node))return void(this.w.globals.unitGatherRAF=null);const i=Math.min(.25,Math.max(0,(e-d)/1e3));d=e;let s=!0;for(let a=0;a<r;a++){const r=t[a],o=e-h-r.delay,c=Math.max(0,Math.min(1,o/n)),d=Yt(c);let u,p;if(r.sx&&r.sy){o>=0&&!r.released&&(_t(r.sx,r.x),_t(r.sy,r.y),r.released=!0);const t=xt(r.sx,i),e=xt(r.sy,i);r.released&&t&&e||(s=!1),u=r.sx.value,p=r.sy.value}else{const t=l(c);u=r.cx0+(r.x-r.cx0)*t,p=r.cy0+(r.y-r.cy0)*t}let f=1;if(r.r0!==r.r1&&(f=(r.r0+(r.r1-r.r0)*d)/r.r1,this._size(r.node,r.spec,f)),this._place(r.node,r.spec,u,p,f),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*c))),r._c0&&r._c1){const t=Math.round(r._c0[0]+(r._c1[0]-r._c0[0])*d),e=Math.round(r._c0[1]+(r._c1[1]-r._c0[1])*d),i=Math.round(r._c0[2]+(r._c1[2]-r._c0[2])*d);r.node.setAttribute("fill",`rgb(${t},${e},${i})`)}c<1&&(s=!1)}if(s){for(let e=0;e<r;e++){const i=t[e];i.node.style.opacity="",i._c1&&i.fill1&&i.node.setAttribute("fill",i.fill1),i.r0!==i.r1&&(this._size(i.node,i.spec,1),this._place(i.node,i.spec,i.x,i.y))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=M.requestAnimationFrame(u)};this.w.globals.unitGatherRAF=M.requestAnimationFrame(u)}_collectExits(t,e,i){const n=Math.max(0,i.maxUnits||5e3),s=[];for(const[i,r]of t)if(!e.has(i)&&"l"!==i[0]&&(s.push(r),s.length>=n))break;return s}_runExits(t,e,i){const n=this.w,s=new b(n,this.ctx),r=this._lastDotR,a=n.layout.gridWidth/2,o=n.layout.gridHeight/2,l="grid"===i.layout||"scatter"===i.layout||"arc"===i.layout||"custom"===i.layout?0:.35,c=[];if(e.forEach(e=>{const n=null!=e.r?e.r:r,a=e.spec||this._baseSpec(i,n),o=this._drawDot(s,i,n,e.fill,-1,0,a);o.node.classList.add("apexcharts-unit-exit"),this._place(o.node,a,e.x,e.y),t.add(o),c.push({node:o.node,x0:e.x,y0:e.y,spec:a})}),!this._shouldAnimate())return void c.forEach(t=>t.node.remove());const h=Math.max(1,n.config.chart.animations.speed||800),d=performance.now(),u=e=>{if(this._stale(t.node))return void(this.w.globals.unitExitRAF=null);const i=Math.max(0,Math.min(1,(e-d)/h)),n=Yt(i);for(let t=0;t<c.length;t++){const e=c[t];if(l){const t=e.x0+(a-e.x0)*n*l,i=e.y0+(o-e.y0)*n*l;this._place(e.node,e.spec,t,i)}e.node.style.opacity=String(1-n)}i<1?this.w.globals.unitExitRAF=M.requestAnimationFrame(u):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=M.requestAnimationFrame(u)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,i,n){const s=this.w,r=s.seriesData.seriesNames[t]||`series-${t+1}`,a=i>0?e/i*100:0,o=n.clusterLabels,l="function"==typeof o.formatter?o.formatter(r,{seriesIndex:t,value:e,percent:a,w:s}):`${r}\n${a.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const i=this.w,n=e.clusterLabels,s=n.external.connector||{},r=t.reduce((t,e)=>t+e,0),a=[];if(t.forEach((t,i)=>{t>0&&a.push(...this._outerLabelLines(i,t,r,e))}),!a.length)return 0;const o=Wt(i,a,{fontSize:n.fontSize,fontFamily:n.fontFamily||i.config.chart.fontFamily,fontWeight:n.fontWeight})+(null!=s.gap?s.gap:8)+(null!=s.length?s.length:22)+8+Math.abs(parseFloat(n.external.offsetX)||0);return Math.min(o,.25*i.layout.gridWidth)}_drawOuterLabels(t,e,i,n,s,r){const a=this.w;if(!k.isBrowser())return;const o=s.clusterLabels,l=o.external,c=l.connector||{},h=null!=c.gap?c.gap:8,d=null!=c.length?c.length:22,u=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,f=a.layout.gridWidth,g=a.layout.gridHeight,m=this._lastDotR,y=e.filter(t=>t.dots.length>0);if(!y.length)return;let x=0,_=0;if(y.length>1){const t=y.map(t=>t.cx),e=y.map(t=>t.cy);x=Math.max(...t)-Math.min(...t),_=Math.max(...e)-Math.min(...e)}const v=x>_,w=parseFloat(o.fontSize)||13,A=Math.round(1.35*w),M=[];if(y.slice().sort((t,e)=>t.cy-e.cy).forEach((t,e)=>{const r=this._outerLabelLines(t.i,i[t.i],n,s);if(!r.some(t=>""!==t))return;const a=v?t.cx>=f/2?"right":"left":e%2==0?"right":"left",o="right"===a?1:-1;let l=t.dots[0],c=-1/0;t.dots.forEach(e=>{const i=o*e.x-.75*Math.abs(e.y-t.cy);i>c&&(c=i,l=e)});const g={x:l.x+o*(l.r||m),y:l.y},y={x:g.x+o*h,y:g.y};M.push({i:t.i,lines:r,anchor:g,elbow:y,labelX:y.x+o*d+u,idealY:g.y+p,labelY:g.y+p,side:a})}),!M.length)return;const L=M.reduce((t,e)=>Math.max(t,e.lines.length),1)*A,S=L/2;["left","right"].forEach(t=>{!function(t,e,i,n){const s=t.slice().sort((t,e)=>t.idealY-e.idealY);s.forEach(t=>{t.labelY=t.idealY});for(let t=1;t<s.length;t++)s[t].labelY-s[t-1].labelY<e&&(s[t].labelY=s[t-1].labelY+e);const r=s[s.length-1],a=r?r.labelY-i:0;if(a>0)for(let t=s.length-1;t>=0;t--)s[t].labelY-=a,t<s.length-1&&s[t+1].labelY-s[t].labelY<e&&(s[t].labelY=s[t+1].labelY-e);if(null!=n&&s.length&&s[0].labelY<n){const t=n-s[0].labelY;for(let e=0;e<s.length;e++)s[e].labelY+=t}}(M.filter(e=>e.side===t),L+2,g-S,S)});const C=new b(a,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,a.config.chart.animations.speed||800);C.node.classList.add("apexcharts-unit-label-delay"),C.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}M.forEach(t=>{const e=a.globals.colors[t.i]||a.globals.colors[0]||"#008FFB";C.add(function(t,e){const{lines:i,lineHeight:n,anchor:s,elbow:r,labelX:a,labelY:o,side:l,connector:c,style:h,foreColor:d}=e,u=new b(t),p=u.group({class:e.groupClass||"apexcharts-outer-label-group"});if(c.show){const t=`M ${s.x} ${s.y} L ${r.x} ${r.y} L ${a} ${o}`,i=u.drawPath({d:t,stroke:c.color,strokeWidth:c.width,fill:"none",strokeLinecap:"round"});i.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(i)}const f="right"===l?a+4:a-4,g=i.length,m=o-(g-1)*n/2,y=u.drawText({x:f,y:m,text:1===g?i[0]:i,textAnchor:"right"===l?"start":"end",fontSize:h.fontSize,fontFamily:h.fontFamily,fontWeight:h.fontWeight,foreColor:d,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(g>1){const t=y.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${f}`),t[e].setAttribute("dy",0===e?"0":`${n}`)}return p.add(y),p}(a,{lines:t.lines,lineHeight:A,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==c.show,width:null!=c.width?c.width:1.5,color:c.color||e},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||a.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||a.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(C)}_drawClusterLabel(t,e,i,n,s,r){const a=this.w;if(!k.isBrowser())return;const o="http://www.w3.org/2000/svg",l=a.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=n>0?i/n*100:0,h=s.clusterLabels,d=parseFloat(h.fontSize)||13;let u;u="function"==typeof h.formatter?h.formatter(l,{seriesIndex:e.i,value:i,percent:c,w:a}):`${l} (${c.toFixed(1)}%)`;const p="string"==typeof u?u:String(u),f=M.createElementNS(o,"text");f.setAttribute("class","apexcharts-unit-label"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size",`${d}px`),f.setAttribute("font-family",h.fontFamily||a.config.chart.fontFamily||"inherit"),f.setAttribute("font-weight",String(h.fontWeight||600)),f.setAttribute("fill",h.color||r);const g="bottom"===h.position,m=e.outerR+.6*d+3+(h.offsetY||0),y=p.length*d*.55;if(!g&&!e.flat&&!1!==h.curved&&y<=Math.PI*m*.95){const i=e.cy,n=`M ${e.cx-m} ${i} A ${m} ${m} 0 0 1 ${e.cx+m} ${i}`,s=`apexcharts-unit-label-${a.globals.chartID}-${e.i}`,r=M.createElementNS(o,"path");r.setAttribute("id",s),r.setAttribute("d",n),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=M.createElementNS(o,"textPath");l.setAttribute("href",`#${s}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${s}`),l.setAttribute("startOffset","50%"),l.textContent=p,f.appendChild(l),t.node.appendChild(r)}else{f.setAttribute("x",String(e.cx));const t=g?e.cy+e.outerR+d+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);f.setAttribute("y",String(t)),f.textContent=p}return t.node.appendChild(f),f}}});const Gt=Math.PI/180,Ut=180/Math.PI;function Kt(t,e,i,n){return{x:t+i*Math.cos((n-90)*Gt),y:e+i*Math.sin((n-90)*Gt)}}const Vt=t=>`${t.x} ${t.y}`;function Zt(t,e){const i=t.config.drilldown;return(i&&Array.isArray(i.series)?i.series:[]).find(t=>t&&t.id===e)}function Jt(t,e){var i;const n=String(t).replace(/\//g,"%2F"),s=(null!=(i=e.get(n))?i:-1)+1;return e.set(n,s),`${s}:${n}`}function Qt(t,e,i,n,s,r=null,a={},o=new Map){var l,c,h;const d=e&&"object"==typeof e,u=d&&null!=(c=null!=(l=e.x)?l:e.name)?c:"",p=d?null!=(h=e.y)?h:e.value:e,f=null==p||""===p?NaN:Number(p),g={name:String(u),value:isNaN(f)?null:f,color:d&&e.color?e.color:void 0,_key:`${s}/${Jt(u,o)}`};n&&!g.color&&(g.color=n[i%n.length]),a.keepDatum&&(g._datum=e);const m=new Map;if(d&&Array.isArray(e.children)&&e.children.length)g.children=e.children.map((e,i)=>Qt(t,e,i,null,g._key,r,a,m));else if(d&&null!=e.drilldown&&!1!==a.expandDrilldown){const i=r||new Set;if(!i.has(e.drilldown)){const n=Zt(t,e.drilldown);if(n&&Array.isArray(n.data)&&n.data.length){const s=new Set(i);s.add(e.drilldown);const r=Array.isArray(n.colors)?n.colors:null;g.children=n.data.map((e,i)=>Qt(t,e,i,r,g._key,s,a,m))}}}return g}function te(t,e={}){const i=t.config.series,n=i&&i[0],s=n&&Array.isArray(n.data)?n.data:i;if(!Array.isArray(s))return[];const r=new Map;return s.map((i,n)=>Qt(t,i,n,null,"",null,e,r))}function ee(t){t.children&&t.children.length&&(t.children.forEach(t=>ee(t)),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function ie(t){if("string"!=typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}const ne="http://www.w3.org/1999/xhtml";function se(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return Object.assign({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i,e)}function re(t,e){const i=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!i.length)return;const n=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<i.length+1;t++){const t=e.getBoundingClientRect(),s=i.find(e=>{const i=e.getBoundingClientRect();return t.left<i.right&&t.right>i.left&&t.top<i.bottom&&t.bottom>i.top});if(!s)break;e.style.top=s.getBoundingClientRect().bottom-n+4+"px"}}function ae(t,e,i,n){var s;const r=null==(s=null==e?void 0:e.dimensions)?void 0:s.dimHelpers,a=r?r.getTitleSubtitleCoords("title").height+r.getTitleSubtitleCoords("subtitle").height:0,o=i.getBoundingClientRect().height||18,l=n&&n.offsetY||0,c=function(t,e){const i=t.layout.translateY||0,n=t.dom.elWrap;if(!n)return i;const s=t.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!s.length)return i;const r=n.getBoundingClientRect().top,a=e.getBoundingClientRect();let o=i;for(let t=0;t<s.length;t++){const e=s[t].getBoundingClientRect();e.height&&(e.left>=a.right||e.right<=a.left||(o=Math.min(o,e.top-r)))}return o}(t,i);if(c-a>=o+1)return i.style.top=`${c-o-1+l}px`,!0;i.style.top=`${a+l}px`;const h="dark"===t.config.theme.mode;return i.style.background=h?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",i.style.borderRadius="4px",!1}function oe(t){const e=t.dom.elWrap;if(!e)return;const i=e.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i)}function le(t,e){if(!k.isBrowser())return null;const i=t.dom.elWrap;if(!i)return null;oe(t);const n=e.config||se(t);if(!1===n.show)return null;const s=e.crumbs||[];if(s.length<2)return null;const r=M.createElementNS(ne,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label",e.ariaLabel||"Breadcrumb"),he(r,n),e.compact&&(r.style.fontSize="11px",r.style.padding="0 2px");const a=null!=n.separator?n.separator:" / ";return s.forEach((t,i)=>{var o;if(i>0){const t=M.createElementNS(ne,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=a,r.appendChild(t)}let l=0===i?null!=(o=n.rootLabel)?o:"All":t.label;if("function"==typeof n.formatter&&(l=n.formatter(l,{index:i,depth:s.length-1,data:t.data})),i===s.length-1){const t=M.createElementNS(ne,"span");return t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=String(l),void r.appendChild(t)}const c=M.createElementNS(ne,"button");if(c.setAttribute("type","button"),c.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const t=M.createElementNS(ne,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.setAttribute("aria-hidden","true"),t.textContent="\u2190",c.appendChild(t)}const h=M.createElementNS(ne,"span");h.setAttribute("class","apexcharts-breadcrumb-label"),h.textContent=String(l),c.appendChild(h),c.addEventListener("click",n=>e.onNavigate(i,t,n)),r.appendChild(c)}),i.appendChild(r),r}function ce(t,e){var i,n,s;if(e.detail)return;const r=(null==(i=t.dom.elWrap)?void 0:i.querySelector(".apexcharts-breadcrumb-item"))||(null==(n=t.dom.Paper)?void 0:n.node);null==(s=null==r?void 0:r.focus)||s.call(r)}function he(t,e){const i=e.offsetX||0,n=e.offsetY||0;t.style.position="absolute",t.style.top=n+"px","top-right"===e.position?t.style.right=3-i+"px":t.style.left=i+"px"}function de(t,e,i,n,s,r){if(t._show=!0,t._vDepth=e,t._t0=i,t._t1=n,t._parent=s,t._leaf=!(t.children&&t.children.length),t._clipped=!t._leaf&&null!=r.cap&&e>=r.cap,e>r.maxDepth&&(r.maxDepth=e),t._leaf||t._clipped)return;const a=t.children.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let o=i;for(let s=0;s<t.children.length;s++){const l=t.children[s],c=(n-i)*Math.max(0,l.value)/a;de(l,e+1,o,o+c,t,r),o+=c}}function ue({roots:t,nodesAll:e,focus:i,t0:n,t1:s,cap:r}){for(let t=0;t<e.length;t++)e[t]._show=!1;const a={maxDepth:0,cap:r};if(i)return de(i,0,n,s,i._parent,a),a.maxDepth;const o=t.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let l=n;for(let e=0;e<t.length;e++){const i=(s-n)*Math.max(0,t[e].value)/o;de(t[e],0,l,l+i,null,a),l+=i}return a.maxDepth}function pe({maxDepth:t,near:e,far:i,gap:n=0}){const s=t+1,r=(i-e)/s,a=s>1?n:0;return{near:t=>e+t*r+(t>0?a/2:0),far:t=>e+(t+1)*r-a/2}}function fe(t,e,i,n,s){return t._leaf&&"extend"===n&&t._vDepth<i?s:e.far(t._vDepth)}const ge=new Set;function me(t,{type:e,remedy:i}){let n="";const s=t=>{var r;if(n||!(null==(r=t.children)?void 0:r.length))return;const a=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0),o=t.value;null!=o&&Math.abs(a-o)>1e-6*Math.max(Math.abs(o),a)&&(n=`ApexCharts ${e}: partition 'strict' but "${t.name}" (${o}) != sum of its children (${a}). ${i}`),t.children.forEach(s)};t.forEach(s),n&&!ge.has(n)&&(ge.size>99&&ge.clear(),ge.add(n),console.warn(n))}function ye(t){const e=[];let i=t;for(;i;)e.unshift(i),i=i._parent;return e}function xe(t,e){const i=1===t.length?t[0]:null,n=ye(e).map(t=>({label:t.name,data:t,focus:t===i?null:t}));return i?n:[{data:null,focus:null}].concat(n)}function _e(t,e,i){let n=t===e?t._parent||null:t;return!n||n.children&&n.children.length||(n=n._parent||null),i&&1===i.length&&n===i[0]&&(n=null),n===e?{changed:!1,focus:e}:{changed:!0,focus:n}}function be(t,e,i){var n;if(!t)return null;e.forEach(t=>{var e;return null==(e=t.children)?void 0:e.forEach(e=>e._parent=t)});const s=e.find(e=>e._key===t);return s&&(null==(n=s.children)?void 0:n.length)&&(1!==i.length||s!==i[0])?s:null}function ve(t,e){k.isBrowser()&&!1!==t.cfg.zoomOnClick&&(e._el.node.style.cursor=_e(e,t._focus,t._roots).changed?"pointer":"default")}function we(t,e,i=0){if("number"==typeof t)return t;const n=String(t).trim();if(n.endsWith("%"))return parseFloat(n)/100*e;const s=parseFloat(n);return isNaN(s)?i*e:s}function Ae(t,e){if("string"!=typeof t||"#"!==t[0])return t;let i=t.slice(1);if(3===i.length&&(i=i.split("").map(t=>t+t).join("")),6!==i.length)return t;const n=parseInt(i,16);if(isNaN(n))return t;e=e>0?Math.min(e,1):0;let s=n>>16&255,r=n>>8&255,a=255&n;return s=Math.round(s+(255-s)*e),r=Math.round(r+(255-r)*e),a=Math.round(a+(255-a)*e),"#"+((1<<24)+(s<<16)+(r<<8)+a).toString(16).slice(1)}function Me(t,e,i,n){if(t._color=t.color||e,n.push(t),t.children)for(let e=0;e<t.children.length;e++){const s=t.children[e];Me(s,s.color||Ae(t._color,i),i,n)}}class ke{constructor(t,e){this.w=t,this.ctx=e,this.total=1,this._el=null}_tip(){return this._el||(this._el=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._el}attach(t,e){this.w.config.tooltip.enabled&&k.isBrowser()&&(t.addEventListener("mouseenter",t=>this.show(t,e)),t.addEventListener("mousemove",t=>this.position(t)),t.addEventListener("mouseleave",()=>this.hide()))}show(t,e){var i;const n=this._tip();if(!n)return;const s=this.w,r=(e.value/this.total*100).toFixed(1),a=e._parent?e._parent.value:this.total,o=a>0?(e.value/a*100).toFixed(1):r;let l=s.config.tooltip.custom;Array.isArray(l)&&(l=l[0]);const c="function"==typeof l&&l({series:s.seriesData.series,seriesIndex:0,dataPointIndex:-1,w:s,ctx:this.ctx,node:e,percentOfParent:+o,percentOfTotal:+r});if(null==c?void 0:c.nodeName)n.replaceChildren(c.cloneNode(!0));else if("string"==typeof c||"number"==typeof c)n.innerHTML=c;else{const t=s.config.tooltip.y,a=null==(i=Array.isArray(t)?t[0]:t)?void 0:i.formatter,l=a?a(e.value,{seriesIndex:0,dataPointIndex:-1,w:s,node:e}):+e.value.toPrecision(12);n.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex"><span class="apexcharts-tooltip-marker"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${h=e.name,String(h).replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`)}: </span><span class="apexcharts-tooltip-text-y-value">${l} (${o}% of parent, ${r}% of total)</span></div></div></div>`;const c=n.firstChild;c.firstChild.style.backgroundColor=e._color,s.config.tooltip.fillSeriesColor&&(c.style.backgroundColor=e._color)}var h;n.classList.add("apexcharts-active"),n.style.opacity="1",this.position(t)}position(t){const e=this._tip();if(!e)return;const i=this.w.dom.elWrap.getBoundingClientRect(),n=e.offsetWidth,s=e.offsetHeight;let r=t.clientX-i.left+12;r+n>i.width&&(r=t.clientX-i.left-n-12),r=Math.max(0,Math.min(r,i.width-n));let a=t.clientY-i.top+12;a+s>i.height&&(a=t.clientY-i.top-s-12),a=Math.max(0,Math.min(a,i.height-s)),e.style.left=r+"px",e.style.top=a+"px"}hide(){const t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}}const Le=.58,Se=(t,e,i)=>t+(e-t)*i;function Ce(t){const e=t.config.chart.animations;return e.enabled?t.globals.dataChanged?e.dynamicAnimation.enabled&&!1!==t.globals.shouldAnimate?"update":"none":t.globals.resized?"none":"intro":"none"}function Ee(t,e){var i,n;const s=t.config.chart.animations;if(!s.enabled||"none"===e)return 0;if("intro"===e)return null!=(i=s.speed)?i:500;const r=s.dynamicAnimation;return r.enabled?null!=(n=r.speed)?n:350:0}function Fe(t,e,i){t.attr({opacity:e>0?0:1}),e>0&&t.animate(250,e).during(e=>{i()&&t.attr({opacity:e})})}function Pe(t,e,i,n){const s=new Map;i.forEach(t=>{const e=n(t);e&&s.set(t._key,e)}),t[e]=s}const De=Math.PI/180,Re=180/Math.PI,Te="http://www.w3.org/2000/svg";m.default.use({sunburst:class{constructor(t,e){this.ctx=e,this.w=t;const i=t.config;this.cfg=i.plotOptions.sunburst,this.strokeWidth=i.stroke.show?i.stroke.width:0,this.strokeColor=Array.isArray(i.stroke.colors)?i.stroke.colors[0]:i.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltip=new ke(t,this.ctx),this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,i=new b(this.w);this._graphics=i;const n=i.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return n;const s=e.layout.gridWidth,r=e.layout.gridHeight;if(this.centerX=s/2+(this.cfg.offsetX||0),this.centerY=r/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(s,r)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5)return n;if(this._roots=te(e),!this._roots.length)return n;this._roots.forEach(ee),this._validateStrict(),this._nodesAll=[];const a=e.globals.colors||[];return this._roots.forEach((t,e)=>{Me(t,t.color||a[e%a.length]||"#008FFB",this.cfg.tint,this._nodesAll)}),this.total=this._roots.reduce((t,e)=>t+Math.max(0,e.value),0)||1,this._tooltip.total=this.total,this._ringsG=i.group({class:"apexcharts-sunburst-rings"}),this._labelsG=i.group({class:"apexcharts-sunburst-labels"}),n.add(this._ringsG),n.add(this._labelsG),this._focus=be(e.globals.sunburstFocusKey,this._nodesAll,this._roots),this._relayout(this._focus),this._applyLayout(Ce(e)),this._renderBreadcrumb(),n}_validateStrict(){"strict"===this.cfg.partition&&me(this._roots,{type:"sunburst",remedy:"Angles are normalized to fill the wedge."})}_relayout(t){this.w.globals.sunburstFocusKey=t&&t._key,this._focusMaxDepth=ue({roots:this._roots,nodesAll:this._nodesAll,focus:t,t0:this.startAngle,t1:this.endAngle});const e=we(this.cfg.innerSize,this.maxRadius,.15),i=pe({maxDepth:this._focusMaxDepth,near:e,far:this.maxRadius,gap:1});this._innerR=i.near,this._outerR=i.far,this._nodesAll.forEach(t=>{t._show&&(t._iR=i.near(t._vDepth),t._oR=fe(t,i,this._focusMaxDepth,this.cfg.leaf,this.maxRadius))})}_applyLayout(t){var e;const i=this.w,n=Ee(i,t),s=++this._zoomGen,r=null==(e=this.ctx)?void 0:e.morphTypeChange,a="zoom"!==t&&!!r&&"function"==typeof r.isActive&&r.isActive()&&"function"==typeof r.getInitialPathAt,o=a?r.getSpeed():0;this._morphLeafIndex=0;const l="update"===t?this.ctx._sunburstPrevGeoms:null,c=t=>t._cur||{a0:t._t0,a1:t._t1,iR:t._iR,oR:t._oR},h=t=>{const e=(t.a0+t.a1)/2;return{a0:e,a1:e,iR:t.iR,oR:t.iR}};if(this._nodesAll.forEach(e=>{if(e._show){const i={a0:e._t0,a1:e._t1,iR:e._iR,oR:e._oR};e._el||(e._el=this._createArcEl(e)),ve(this,e);const r=a?this._morphSourceFor(e):null,d=l&&l.get(e._key);if(d&&this._midMorph(d)&&this._adopt(e,d),r&&o>0)this._morphArcFrom(e,r,i,o,s);else if(this._midMorph(e))this._continueMorph(e,i,n,s);else if(("intro"===t||a)&&n>0)this._sweepArc(e,i,a?o:n,s);else{const t=e._cur||(d?c(d):h(i));this._animateArc(e,t,i,n,!1,!e._cur&&!d,s)}}else e._el&&this._midMorph(e)?this._continueMorph(e,null,n,s):e._el&&e._cur&&this._animateArc(e,e._cur,h(e._cur),n,!0,!1,s)}),l&&n&&!a){const t=new Set(this._nodesAll.map(t=>t._show&&t._key));l.forEach((e,i)=>{if(t.has(i)||!e._show&&!e._cur)return;const r=this._graphics.drawPath({fill:e._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,classes:"apexcharts-sunburst-arc"});r.node.setAttribute("data:name",e.name),this._ringsG.add(r.attr({opacity:e._el.attr("opacity")}));const a=c(e),o={_el:r,_color:e._color,name:e.name,_key:i,_cur:a};this._nodesAll.push(o),this._midMorph(e)?(this._adopt(o,e),this._continueMorph(o,null,n,s)):this._animateArc(o,a,h(a),n,!0,!1,s)})}const d=Math.max(n,o);d?this._ringsG.animate(d).after(()=>{this._zoomGen===s&&this._ringsG.node.isConnected&&new w(i,this.ctx).animationCompleted(this._ringsG.node)}):i.globals.animationEnded=!0,Pe(this.ctx,"_sunburstPrevGeoms",this._nodesAll,t=>t._show||t._cur?t:null),this._renderLabels(n)}_morphSourceFor(t){const e=this.ctx,i=e&&e.morphTypeChange;return i?"function"==typeof i.hasKeyedMarks&&i.hasKeyedMarks()&&"function"==typeof i.getInitialPathForKey?i.getInitialPathForKey(ie(t._key)):t.children&&t.children.length?null:i.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,i,n,s){const r=t._el,a=this._arcPath(i.iR,i.oR,i.a0,i.a1,this.cfg.borderRadius);r.node.style.display="",r.attr({d:e,opacity:1}),t._cur=i,t._pathEnd=this.w.globals.shouldAnimate?performance.now()+n:0,new w(this.w,this.ctx).morphSVG(this._gated(r,s),0,null,t._color,e,a,n,0)}_gated(t,e){const i=Object.create(t);return i.attr=(...n)=>this._zoomGen===e||1===n.length&&"string"==typeof n[0]?t.attr(...n):i,i}_midMorph(t){return t._pathEnd>0&&t._pathEnd>performance.now()}_adopt(t,e){t._el.attr({d:e._el.attr("d"),opacity:e._el.attr("opacity")}),t._pathEnd=e._pathEnd}_continueMorph(t,e,i,n){const s=t._el,r=e&&this._arcPath(e.iR,e.oR,e.a0,e.a1,this.cfg.borderRadius);e&&(t._cur=e),t._pathEnd=i?performance.now()+i:0;const a=()=>{e||(s.node.style.display="none",t._cur=null)};if(!i)return e&&s.attr({d:r,opacity:1}),void a();s.node.style.display="";const o=this._gated(s,n).animate(i);e&&o.plot(r,"polygons"),o.attr({opacity:e?1:0}).after(()=>{this._zoomGen===n&&a()})}_sweepArc(t,e,i,n){const s=t._el,r=this.cfg.borderRadius,a=this.startAngle,o=this.endAngle;s.node.style.display="",s.attr({d:"",opacity:1}),s.animate(i).during(i=>{if(this._zoomGen!==n)return;const l=a+(o-a)*i;if(l<=e.a0+.01)return void s.attr({d:""});const c=Math.min(e.a1,l);s.attr({d:this._arcPath(e.iR,e.oR,e.a0,c,r)}),t._cur={a0:e.a0,a1:c,iR:e.iR,oR:e.oR}}).after(()=>{this._zoomGen===n&&(t._cur=e)})}_createArcEl(t){const e=this._graphics.drawPath({fill:t._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,classes:"apexcharts-sunburst-arc"}),i=e.node;return i.setAttribute("data:name",t.name),i.setAttribute("data:value",String(t.value)),i.setAttribute("data:key",ie(t._key)),i.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._tooltip.attach(i,t),k.isBrowser()&&!1!==this.cfg.zoomOnClick&&i.addEventListener("click",()=>this._zoomTo(t)),this._ringsG.add(e),e}_animateArc(t,e,i,n,s,r,a){const o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),0===n)return o.attr({d:this._arcPath(i.iR,i.oR,i.a0,i.a1,l),opacity:s?0:1}),o.node.style.display=s?"none":"",void(t._cur=s?null:i);o.node.style.display="";const c=s?Number(o.attr("opacity"))||1:r?0:1,h=s?0:1;o.attr({opacity:c}),o.animate(n).during(n=>{if(this._zoomGen!==a)return;const s=Se(e.a0,i.a0,n),r=Se(e.a1,i.a1,n),d=Se(e.iR,i.iR,n),u=Se(e.oR,i.oR,n);o.attr({d:this._arcPath(d,u,s,r,l),opacity:Se(c,h,n)}),t._cur={a0:s,a1:r,iR:d,oR:u}}).after(()=>{this._zoomGen===a&&(s?(o.node.style.display="none",t._cur=null):t._cur=i)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);if(!this.cfg.dataLabels.show||!1===this.w.config.dataLabels.enabled)return;this._nodesAll.forEach(t=>{t._show&&(t._t1-t._t0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(t))});const i=this._zoomGen;Fe(e,t,()=>this._zoomGen===i)}_renderCurvedLabel(t){const e=this.cfg.dataLabels.style,i=this.w,n=(t._iR+t._oR)/2,s=((t._t0+t._t1)/2%360+360)%360,r=s>90&&s<270,a=Math.min(n>0?4/n*Re:0,(t._t1-t._t0)/2),o=r?t._t1-a:t._t0+a,l=r?t._t0+a:t._t1-a,c=this._ptAt(n,o),h=this._ptAt(n,l),d=Math.abs(l-o)>180?1:0,u=r?0:1,p=`apx-sb-lbl-${i.globals.cuid}-${this._lblSeq++}`,f=M.createElementNS(Te,"path");f.setAttribute("id",p),f.setAttribute("d",`M ${c.x} ${c.y} A ${n} ${n} 0 ${d} ${u} ${h.x} ${h.y}`),f.setAttribute("fill","none"),f.setAttribute("stroke","none");const g=e.colors,m=(Array.isArray(g)?g[0]:g)||"#fff",y=M.createElementNS(Te,"text");y.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&y.setAttribute("font-family",e.fontFamily),y.setAttribute("font-weight",String(e.fontWeight||400)),y.setAttribute("fill",m),y.setAttribute("dominant-baseline","central"),y.style.pointerEvents="none";const x=M.createElementNS(Te,"textPath");x.setAttribute("href","#"+p),x.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+p),x.setAttribute("startOffset","50%"),x.setAttribute("text-anchor","middle"),x.textContent=this._truncate(t.name,n,t._t1-t._t0,e.fontSize),y.appendChild(x),this._labelsG.node.appendChild(f),this._labelsG.node.appendChild(y)}_truncate(t,e,i,n){const s=e*i*De-8,r=(parseFloat(n)||12)*Le,a=Math.floor(s/r);return a>=t.length?t:a<=1?"":t.slice(0,Math.max(1,a-1))+"\u2026"}_zoomTo(t){if(!1===this.cfg.zoomOnClick)return;const e=_e(t,this._focus,this._roots);e.changed&&this._focusOn(e.focus)}_focusOn(t){this._focus=t,this._relayout(t),this._applyLayout("zoom"),this._renderBreadcrumb()}_renderBreadcrumb(){if(!k.isBrowser())return;if(!this._focus)return void oe(this.w);const t=le(this.w,{crumbs:xe(this._roots,this._focus),ariaLabel:"Sunburst breadcrumb",onNavigate:(t,e,i)=>{this._focusOn(e.focus),ce(this.w,i)}});t&&re(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*De),y:this.centerY+t*Math.sin((e-90)*De)}}_arcPath(t,e,i,n,s){if(e<=t+.01)return"";let r=n-i;const a=this.cfg.spacing;if(a>0&&r>0&&e>0){const t=a/e*Re,s=Math.min(t/2,Math.max(0,r/2-.25));r=(n-=s)-(i+=s)}if(r<=0)return"";const o=r*De,l=this.centerX,c=this.centerY;let h=s;return h=Math.min(h,o*t/2,o*e/2,(e-t)/2),h>.5?function({cx:t,cy:e,rIn:i,rOut:n,a0:s,a1:r,r:a,spanDeg:o}){const l=(i,n)=>Kt(t,e,i,n),c=a/n*Ut,h=a/i*Ut,d=l(n,s+c),u=l(n,r-c),p=o-2*c>180?1:0,f=l(n,r),g=l(n-a,r),m=l(n,s),y=l(n-a,s),x=l(i,r-h),_=l(i,s+h),b=o-2*h>180?1:0,v=l(i,r),w=l(i+a,r),A=l(i,s),M=l(i+a,s);return["M",Vt(d),"A",n,n,0,p,1,Vt(u),"Q",Vt(f),Vt(g),"L",Vt(w),"Q",Vt(v),Vt(x),"A",i,i,0,b,0,Vt(_),"Q",Vt(A),Vt(M),"L",Vt(y),"Q",Vt(m),Vt(d),"Z"].join(" ")}({cx:l,cy:c,rIn:t,rOut:e,a0:i,a1:n,r:h,spanDeg:r}):function({cx:t,cy:e,rIn:i,rOut:n,a0:s,a1:r,spanDeg:a}){const o=(i,n)=>Kt(t,e,i,n),l=a>180?1:0,c=o(n,s),h=o(n,r),d=o(i,r),u=o(i,s);return["M",Vt(c),"A",n,n,0,l,1,Vt(h),"L",Vt(d),"A",i,i,0,l,0,Vt(u),"Z"].join(" ")}({cx:l,cy:c,rIn:t,rOut:e,a0:i,a1:n,spanDeg:r})}}});const Ne="http://www.w3.org/2000/svg";m.default.use({icicle:class{constructor(t,e){this.ctx=e,this.w=t;const i=t.config;this.cfg=i.plotOptions.icicle,this.strokeWidth=i.stroke.show?i.stroke.width:0,this.strokeColor=Array.isArray(i.stroke.colors)?i.stroke.colors[0]:i.stroke.colors||"#fff",this.width=0,this.height=0,this._vertical=!0,this._flip=!1,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._tooltip=new ke(t,this.ctx),this._graphics=null,this._cellsG=null,this._labelsG=null}draw(t){const e=this.w,i=new b(this.w);this._graphics=i;const n=i.group({class:"apexcharts-icicle"});if(e.globals.noData||!t||!t.length)return n;if(this.width=e.layout.gridWidth,this.height=e.layout.gridHeight,this.width<5||this.height<5)return n;const s=this.cfg.direction;return this._vertical="right"!==s&&"left"!==s,this._flip="up"===s||"left"===s,this._roots=te(this.w),this._roots.length?(this._roots.forEach(t=>ee(t)),this._nodesAll=[],this._colorNodes(),function(t,e){if("value"!==e&&"name"!==e)return;const i="value"===e?(t,e)=>(e.value||0)-(t.value||0):(t,e)=>String(t.name).localeCompare(String(e.name)),n=t=>{t.sort(i);for(let e=0;e<t.length;e++)t[e].children&&t[e].children.length&&n(t[e].children)};n(t)}(this._roots,this.cfg.sort),"strict"===this.cfg.partition&&me(this._roots,{type:"icicle",remedy:"Extents are normalized to fill the parent."}),this.total=this._roots.reduce((t,e)=>t+Math.max(0,e.value),0)||1,this._tooltip.total=this.total,this._cellsG=i.group({class:"apexcharts-icicle-cells"}),this._labelsG=i.group({class:"apexcharts-icicle-labels"}),n.add(this._cellsG),n.add(this._labelsG),this._focus=be(e.globals.icicleFocusKey,this._nodesAll,this._roots),this._relayout(this._focus),this._applyLayout(Ce(e)),this._renderBreadcrumb(),n):n}_colorNodes(){const t=this.w.globals.colors||[],e=t[0]||"#008FFB";let i=this._roots;const n=[];for(;1===i.length&&i[0].children&&i[0].children.length;)n.push(i[0]),i=i[0].children;const s=Ae(e,.62);n.forEach(t=>{t._color=t.color||s,this._nodesAll.push(t)}),i.forEach((i,n)=>{Me(i,i.color||t[n%t.length]||e,this.cfg.tint,this._nodesAll)})}_valueExtent(){return this._vertical?this.width:this.height}_depthExtent(){return this._vertical?this.height:this.width}_relayout(t){this.w.globals.icicleFocusKey=t&&t._key;const e=this._valueExtent(),i=this.cfg.maxDepth,n="number"==typeof i&&i>0?i:0;if(t&&"both"!==this.cfg.zoomType){const i=ye(t).length-1;this._focusMaxDepth=ue({roots:this._roots,nodesAll:this._nodesAll,focus:null,t0:0,t1:e,cap:n?n-1+i:void 0}),this._stretchTo(t,e)}else this._focusMaxDepth=ue({roots:this._roots,nodesAll:this._nodesAll,focus:t,t0:0,t1:e,cap:n?n-1:void 0});const s=this._depthExtent(),r=this._focusMaxDepth+1,a="equal"===this.cfg.levelSize?0:we(this.cfg.levelSize,s,0),o=a>0?Math.min(s,a*r):s,l=pe({maxDepth:this._focusMaxDepth,near:0,far:o,gap:1});this._nodesAll.forEach(t=>{t._sub=!1,t._show&&(t._d0=l.near(t._vDepth),t._d1=fe(t,l,this._focusMaxDepth,this.cfg.leaf,o),t._t1-t._t0<.5&&(t._show=!1,t._sub=!0))})}_stretchTo(t,e){const i=t._t1-t._t0;if(!(i>0))return;const n=e/i,s=t._t0;this._nodesAll.forEach(t=>{if(!t._show)return;const i=(t._t0-s)*n,r=(t._t1-s)*n;r<=.01||i>=e-.01?t._show=!1:(t._t0=Math.max(0,i),t._t1=Math.min(e,r))})}_box(t){const e=t._t0,i=Math.max(0,t._t1-t._t0),n=t._d0,s=Math.max(0,t._d1-t._d0);return this._vertical?{x:e,y:this._flip?this.height-n-s:n,w:i,h:s}:{x:this._flip?this.width-n-s:n,y:e,w:s,h:i}}_applyLayout(t){const e=Ee(this.w,t),i=++this._zoomGen,n=e>0&&"intro"!==t?this.ctx._iciclePrevGeoms:null;this._nodesAll.forEach(s=>{const r=s._cur||n&&n.get(s._key)&&n.get(s._key)();if(s._show){const n=this._box(s);if(s._el||(s._el=this._createCellEl(s)),s._el.node.setAttribute("data:clipped",String(!!s._clipped)),ve(this,s),"intro"===t&&e>0)return void this._wipeCell(s,n,e,i);let a=r,o=!1;a||(a={x:n.x+n.w/2,y:n.y+n.h/2,w:0,h:0},o=!0),this._animateCell(s,a,n,e,!1,o,i)}else if(s._sub&&r&&!r.s)s._el||(s._el=this._createCellEl(s)),this._animateCell(s,r,this._box(s),e,!0,!1,i);else if(s._el&&s._cur){const t=s._cur,n={x:t.x+t.w/2,y:t.y+t.h/2,w:0,h:0};this._animateCell(s,t,n,e,!0,!1,i)}}),Pe(this.ctx,"_iciclePrevGeoms",this._nodesAll,t=>{if(!t._show&&!t._sub)return null;const e=this._box(t);return t._sub&&(e.s=1),()=>t._cur||e}),this._renderLabels(e)}_createCellEl(t){const e=this._box(t),i=this._graphics.drawRect(e.x,e.y,0,0,this.cfg.borderRadius,t._color,1,this.strokeWidth,this.strokeColor);i.node.setAttribute("class","apexcharts-icicle-cell");const n=i.node;return n.setAttribute("data:name",t.name),n.setAttribute("data:value",String(t.value)),n.setAttribute("data:key",ie(t._key)),n.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._tooltip.attach(n,t),k.isBrowser()&&!1!==this.cfg.zoomOnClick&&n.addEventListener("click",()=>this._zoomTo(t)),this._cellsG.add(i),i}_wipeCell(t,e,i,n){const s=t._el,r=this._focusMaxDepth+1,a=r>1?t._vDepth/r*i*.6:0,o=i-a,l=this._vertical?{x:e.x,y:e.y,w:0,h:e.h}:{x:e.x,y:e.y,w:e.w,h:0};this._setBox(s,l),s.attr({opacity:1}),s.node.style.display="",t._cur=l,s.animate(o,a).during(i=>{if(this._zoomGen!==n)return;const r={x:e.x,y:e.y,w:this._vertical?e.w*i:e.w,h:this._vertical?e.h:e.h*i};this._setBox(s,r),t._cur=r}).after(()=>{this._zoomGen===n&&(this._setBox(s,e),t._cur=e)})}_animateCell(t,e,i,n,s,r,a){const o=t._el;if(o.attr({fill:t._color}),0===n)return this._setBox(o,i),o.attr({opacity:s?0:1}),o.node.style.display=s?"none":"",void(t._cur=s?null:i);o.node.style.display="";const l=s?Number(o.attr("opacity"))||1:r?0:1,c=s&&!t._sub?0:1;o.attr({opacity:l}),o.animate(n).during(n=>{if(this._zoomGen!==a)return;const s={x:Se(e.x,i.x,n),y:Se(e.y,i.y,n),w:Se(e.w,i.w,n),h:Se(e.h,i.h,n)};this._setBox(o,s),o.attr({opacity:Se(l,c,n)}),t._cur=s}).after(()=>{this._zoomGen===a&&(s?(o.node.style.display="none",t._cur=null):(this._setBox(o,i),t._cur=i))})}_setBox(t,e){const i=this.cfg.spacing||0,n=Math.min(i,Math.max(0,e.w-.5))/2,s=Math.min(i,Math.max(0,e.h-.5))/2;t.attr({x:e.x+n,y:e.y+s,width:Math.max(0,e.w-2*n),height:Math.max(0,e.h-2*s)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);if(!this.cfg.dataLabels.show||!1===this.w.config.dataLabels.enabled)return;this._nodesAll.forEach(t=>{t._show&&(this._renderLabel(t),t._clipped&&this._renderMoreMark(t))});const i=this._zoomGen;Fe(e,t,()=>this._zoomGen===i)}_renderLabel(t){const e=this.cfg.dataLabels,i=e.style,n=this._box(t),s="always"===e.rotate||"never"!==e.rotate&&n.h>n.w,r=s?n.h:n.w,a=s?n.w:n.h,o=parseFloat(i.fontSize)||12;if(r<e.minSizeToShow)return;if(a<o+2)return;const l=r-8;let c=t.name;if(e.showValue){const e=`${t.name}: ${+t.value.toPrecision(12)}`;this._fits(e,l,o)&&(c=e)}const h=this._truncate(c,l,o);if(!h)return;const d=i.colors,u=(Array.isArray(d)?d[0]:d)||"#fff",p=M.createElementNS(Ne,"text");p.setAttribute("font-size",i.fontSize||"12px"),i.fontFamily&&p.setAttribute("font-family",i.fontFamily),p.setAttribute("font-weight",String(i.fontWeight||400)),p.setAttribute("fill",u),p.setAttribute("dominant-baseline","central"),p.style.pointerEvents="none",p.textContent=h;const f="center"===e.align?"middle":"right"===e.align?"end":"start",g=n.x+4,m=n.x+n.w-4,y=n.x+n.w/2;if(s){const t=n.x+n.w/2,e=n.y+n.h-4,i=n.y+4,s=n.y+n.h/2,r="middle"===f?s:"end"===f?i:e;p.setAttribute("text-anchor",f),p.setAttribute("x",String(t)),p.setAttribute("y",String(r)),p.setAttribute("transform",`rotate(-90 ${t} ${r})`)}else{const t="middle"===f?y:"end"===f?m:g;p.setAttribute("text-anchor",f),p.setAttribute("x",String(t)),p.setAttribute("y",String(n.y+n.h/2))}this._labelsG.node.appendChild(p)}_renderMoreMark(t){const e=this._box(t);if((this._vertical?e.w:e.h)<18)return;const i=this._vertical?e.x+e.w/2:e.y+e.h/2,n=this._vertical?this._flip?e.y+2.5:e.y+e.h-2.5:this._flip?e.x+2.5:e.x+e.w-2.5,s=M.createElementNS(Ne,"g");s.setAttribute("class","apexcharts-icicle-more"),s.style.pointerEvents="none";for(let t=-1;t<=1;t++){const e=M.createElementNS(Ne,"circle");e.setAttribute("cx",String(this._vertical?i+5*t:n)),e.setAttribute("cy",String(this._vertical?n:i+5*t)),e.setAttribute("r","1.1"),e.setAttribute("fill","#fff"),e.setAttribute("fill-opacity","0.85"),s.appendChild(e)}this._labelsG.node.appendChild(s)}_fits(t,e,i){return t.length*i*Le<=e}_truncate(t,e,i){const n=i*Le,s=Math.floor(e/n);return s>=t.length?t:s<4?"":t.slice(0,s-1)+"\u2026"}_zoomTo(t){if(!1===this.cfg.zoomOnClick)return;const e=_e(t,this._focus,this._roots);e.changed&&(this._focus=e.focus,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb())}_renderBreadcrumb(){if(!k.isBrowser())return;if(!this._focus)return void oe(this.w);const t=se(this.w),e=le(this.w,{crumbs:xe(this._roots,this._focus),ariaLabel:"Icicle breadcrumb",config:t,compact:!0,onNavigate:(t,e,i)=>{this._focus=e.focus,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb(),ce(this.w,i)}});e&&ae(this.w,this.ctx,e,t)}}});const Oe="__apexcharts_series_transforms__";function $e(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[Oe][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}function Ie(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=dt(i,.25),s=dt(i,.5),r=dt(i,.75),a=r-n;let o=i[0],l=i[i.length-1],c=[];if("tukey"===e.whiskers&&a>0){const t=n-1.5*a,e=r+1.5*a;let s=0;for(;s<i.length&&i[s]<t;)s++;let h=i.length-1;for(;h>=0&&i[h]>e;)h--;s<=h&&(o=i[s],l=i[h],c=i.slice(0,s).concat(i.slice(h+1)))}return{summary:[o,n,s,r,l],outliers:c,iqr:a}}function ze(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=i.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(i),e=dt(i,.75)-dt(i,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),a=i[0]-2*s,o=(i[n-1]+2*s-a)/(r-1),l=1/(n*s*Math.sqrt(2*Math.PI)),c=[];for(let t=0;t<r;t++){const e=a+t*o;let r=0;for(let t=0;t<n;t++){const n=(e-i[t])/s;r+=Math.exp(-.5*n*n)}c.push([e,r*l])}return{density:c,bandwidth:s}}function We(t,e){const i=t.statsDerived||(t.statsDerived={});return i[e]||(i[e]=new Map)}function Be(t,e,i,n,s){const r=JSON.stringify(n)+i;let a=t.get(e);return a&&a.s===r||t.set(e,a={s:r,e:s(i,n)}),a.e}function je(t,e,i){const n=(t.get(e)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(i)}globalThis[Oe]||(globalThis[Oe]={}),$e("raincloud",function(t,e){var i,n;if(!Array.isArray(t))return t;const s=(null==(i=e.config.plotOptions)?void 0:i.violin)||{},r=s.kde||{},a=(null==(n=s.box)?void 0:n.whiskers)||"minmax",o=We(e,"raincloudDensity"),h=We(e,"raincloudSummary");return t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"raincloud"!==t.type&&"violin"!==t.type)return t;let i=!1;const n=t.data.map((t,n)=>{const s=e+":"+n,d=(null==t?void 0:t.y)&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{},u=!Array.isArray(d.density)||!d.density.length||je(o,s,d.density),p=!Array.isArray(d.summary)||5!==d.summary.length||je(h,s,d.summary);if(!u&&!p)return t;const f=function(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let i=null;if(Array.isArray(t.points)?i=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?i=t.y.points:Array.isArray(t.y)&&"number"==typeof t.y[0]&&(i=t.y),!i)return null;const n=[];for(let t=0;t<i.length;t++){const e=B.parseNumber(i[t]);null!==e&&isFinite(e)&&n.push(e)}return n.length?n:null}(t);if(!f)return t;const g=l({},d);if(u){const e=Be(o,s,f,{bandwidth:r.bandwidth,resolution:r.resolution},ze);if(!e)return t;g.density=e.density,g.points=f}if(p){const t=Be(h,s,f,{whiskers:a},Ie);t&&(g.summary=t.summary)}return i=!0,c(l({},t),{y:g})});return i?c(l({},t),{data:n}):t})});const He="http://www.w3.org/1999/xhtml";class Ye{constructor(t,e,i){this.w=t,this.ctx=e,this.drilldown=i}render(t){if(!k.isBrowser())return;const e=this.w,i=e.dom.elWrap;if(!i)return;const n=i.querySelector(".apexcharts-breadcrumb[aria-label^=Drill]");n&&n.parentNode&&n.parentNode.removeChild(n);const s=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!s||!1===s.show)return;if(0===this.drilldown.depth)return;const r=M.createElementNS(He,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label","Drilldown breadcrumb"),he(r,s);const a=null!=s.separator?s.separator:" / ";t.forEach((e,i)=>{if(i>0){const t=M.createElementNS(He,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=a,r.appendChild(t)}const n=this._label(e,i);if(i===t.length-1){const t=M.createElementNS(He,"span");t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=n,r.appendChild(t)}else{const t=M.createElementNS(He,"button");if(t.setAttribute("type","button"),t.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const e=M.createElementNS(He,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",t.appendChild(e)}const e=M.createElementNS(He,"span");e.setAttribute("class","apexcharts-breadcrumb-label"),e.textContent=n,t.appendChild(e),t.addEventListener("click",()=>this.drilldown.drillToLevel(i)),r.appendChild(t)}}),i.appendChild(r),this.w.globals.axisCharts&&ae(this.w,this.ctx,r,s),re(e,r)}_label(t,e){const i=this.w.config.drilldown.breadcrumb;let n;if(0===e)n=null!=i.rootLabel?i.rootLabel:"All";else{const i=(this.w.config.drilldown.series||[]).find(e=>e&&e.id===t),s=this.drilldown.stack[e-1];n=i&&i.name||s&&s.name||String(t)}return"function"==typeof i.formatter?i.formatter(n,{index:e,depth:this.drilldown.depth}):n}}const qe="http://www.w3.org/1999/xhtml",Xe="apexcharts-drilldown-loading";class Ge{constructor(t){this.w=t,this.el=null}_cfg(){const t=this.w.config.drilldown,e=t&&t.loading;return!1===e?{show:!1}:e||{}}show(){if(!k.isBrowser())return;const t=this._cfg();if(!1===t.show)return;const e=this.w.dom.elWrap;if(!e)return;this.hide();const i=M.createElementNS(qe,"div");i.setAttribute("class",Xe),i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-label",t.text||"Loading");const n=M.createElementNS(qe,"div");if(n.setAttribute("class",`${Xe}-spinner`),n.setAttribute("aria-hidden","true"),i.appendChild(n),t.text){const e=M.createElementNS(qe,"span");e.setAttribute("class",`${Xe}-text`),e.textContent=t.text,i.appendChild(e)}e.appendChild(i),this.el=i}hide(){const t=this.w.dom.elWrap;if(t){const e=t.querySelectorAll(`.${Xe}`);for(let t=0;t<e.length;t++){const i=e[t];i.parentNode&&i.parentNode.removeChild(i)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}}const Ue="__apexDrilldownMarker",Ke=["xaxis","yaxis","colors","plotOptions","fill","legend"];m.default.registerFeatures({drilldown:class{constructor(t,e){var i,n;this.w=t,this.ctx=e,this.stack=[],this._nav=0,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new Ye(t,e,this),this.loading=new Ge(t),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this._wasOn=!!(null==(i=t.config.drilldown)?void 0:i.enabled),this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),(null==(n=t.config.drilldown)?void 0:n.enabled)&&t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series))}get path(){return["root",...this.stack.map(t=>t.id)]}get depth(){return this.stack.length}drillDown(t,e,i){const n=this._resolveChild(t);return n?this._drillInto(n,e,i):"function"==typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(t,e,i):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){const e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);const i=this.path[this.path.length-1],n=this.stack.slice(t),s=new Set(n.flatMap(t=>t.keys));this.stack=this.stack.slice(0,t);const r=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(n[0].restore,s),"up",{from:i,to:r})}_resolveChild(t){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(e=>e&&e.id===t)||null}_drillInto(t,e,i){var n;if(this.stack.length>=32)return console.warn("ApexCharts: drilldown max depth (32) reached."),Promise.resolve(this.ctx);const s=this.path[this.path.length-1],r={id:t.id,name:null!=(n=t.name)?n:null==t.id?this._pointLabel(e,i):void 0,keys:Ke.filter(e=>t[e]),restore:this._snapshot()};return this.stack.push(r),this._apply(this._viewFromChild(t),"down",{from:s,to:t.id,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex}).catch(e=>{throw this.stack[this.stack.length-1]===r&&this.stack.pop(),this._fire("drillDownError",{id:t.id,error:e}),e})}_drillDownAsync(t,e,i){const n=this.w.config.drilldown.onDrillDown,s=this._cacheGet(t);if(s)return this._drillInto(s,e,i);if(this._pending)return this._pending;const r=this._nav;let a;this.loading.show();try{a=n({id:t,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex})}catch(e){return this.loading.hide(),this._fire("drillDownError",{id:t,error:e}),Promise.resolve(this.ctx)}const o=()=>{this._pending=null,this.loading.hide()},h=Promise.resolve(a).then(n=>{if(o(),this._stale())return this.ctx;if(!n||!n.data&&!Array.isArray(n.series))return this._fire("drillDownError",{id:t,error:new Error(`drilldown: onDrillDown resolved without a drillable level for id "${t}" (expected an object with a \`data\` or \`series\` array).`)}),this.ctx;const s=null!=n.id?n:c(l({},n),{id:t});return this._cacheSet(t,s),r!==this._nav?this.ctx:this._drillInto(s,e,i)},e=>(o(),this._stale()||this._fire("drillDownError",{id:t,error:e}),this.ctx));return this._pending=h,h}_stale(){const t=this.w;return!t||!t.globals||!0===t.globals.isDestroyed||this._retired()}_cacheEnabled(){const t=this.w.config.drilldown;return!(!t||!1===t.cache)}_cacheGet(t){return this._cacheEnabled()&&null!=t&&this._asyncCache.get(t)||null}_cacheSet(t,e){this._cacheEnabled()&&null!=t&&this._asyncCache.set(t,e)}clearCache(t){return null==t?this._asyncCache.clear():this._asyncCache.delete(t),this.ctx}_snapshot(){const t=this.ctx.responsive,e=t?t.withoutBreakpoints(this.w.config):this.w.config,i={series:this._uncollapseSeries(B.clone(e.series))};Array.isArray(e.labels)&&e.labels.length&&(i.labels=B.clone(e.labels)),i.chart={type:e.chart.type,stacked:e.chart.stacked};for(const t of Ke)i[t]=B.clone(e[t]);const n=this.w.globals.lastXAxis;return i.xaxis&&n&&(i.xaxis.min=n.min,i.xaxis.max=n.max),i}_uncollapseSeries(t){const e=this.w,i=e.globals,n=[...i.collapsedSeries||[],...i.ancillaryCollapsedSeries||[]];if(!n.length)return t;const s=e.config.chart.type,r=("pie"===s||"donut"===s||"polarArea"===s)&&1===t.length&&t[0]&&"object"==typeof t[0]&&Array.isArray(t[0].data)?t[0].data:t;for(const e of n){const n=e.index;i.axisCharts?t[n]&&(t[n].data=Array.isArray(e.data)?e.data.slice():e.data):r[n]&&"object"==typeof r[n]?r[n].y=e.data:void 0!==r[n]&&(r[n]=e.data)}return t}_copyOptionalViewFields(t,e,i){for(const n of Ke)(i?i.has(n):e[n])&&(t[n]=e[n])}_viewFromChild(t){const e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];const i={};return t.chart&&t.chart.type&&(i.type=t.chart.type),t.chart&&null!=t.chart.stacked&&(i.stacked=t.chart.stacked),Object.keys(i).length&&(e.chart=i),this._copyOptionalViewFields(e,t),e}_viewFromSnapshot(t,e){const i={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(i.labels=t.labels),this._copyOptionalViewFields(i,t,e),i}_apply(t,e,i){var n;const s=this.w;this._nav++,s.interact.selectedDataPoints=[],s.globals.collapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeries=[],s.globals.ancillaryCollapsedSeriesIndices=[],s.globals.allSeriesCollapsed=!1,s.globals.risingSeries=[],t.markers=c(l({},t.markers||{}),{discrete:this._drillMarkers(t.series)});const r=(!s.config.drilldown.animation||!1!==s.config.drilldown.animation.enabled)&&!1!==s.config.chart.animations.enabled;"down"===e&&this._fire("drillDownStart",i),null==(n=this.ctx.highlightFilter)||n.drillView(t);const a=e=>this.ctx.updateOptions(t,!1,e,!1,!1),o=()=>(this._fire("down"===e?"drillDownEnd":"drillUp",i),this.ctx);if(r&&this._zoomEnabled()){const t=this._triggerOrigin(i);if(t)return this._zoomDrill(t,e,()=>a(!1)).then(o)}return a(r).then(o)}_zoomEnabled(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!(!t||!t.zoomFromPoint)}_svgNode(){const t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){const t=this._svgNode();return t&&"function"==typeof t.querySelector?t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap"):null}_triggerOrigin(t){if(!k.isBrowser())return null;const e=this._svgNode(),i=this._markGroup();if(!e||!i||"function"!=typeof i.animate||"function"!=typeof e.getBoundingClientRect)return null;const n=e.getBoundingClientRect();let s=null;if(t&&null!=t.seriesIndex&&null!=t.dataPointIndex&&this.w.dom.baseEl&&(s=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),s&&"function"==typeof s.getBoundingClientRect){const t=s.getBoundingClientRect();return{x:t.left+t.width/2-n.left,y:t.top+t.height/2-n.top}}const r=i.getBoundingClientRect();return{x:r.left+r.width/2-n.left,y:r.top+r.height/2-n.top}}_zoomDrill(t,e,i){return d(this,null,function*(){const n=this._zoomDuration(),s="down"===e,r=Math.round(.55*n),a=s?"scale(1.03)":"scale(0.97)",o=s?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=e=>{e.style.transformBox="view-box",e.style.transformOrigin=`${t.x}px ${t.y}px`},c=t=>{t.style.transform="",t.style.opacity="",t.style.transformOrigin="",t.style.transformBox=""},h=this._markGroup();let d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:a,opacity:0}],{duration:r,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch(t){}}try{yield i()}catch(t){throw d&&(d.cancel(),c(h)),t}const u=this._markGroup();if(u){l(u),u.style.opacity="0",u.style.transform=o,d&&h===u&&d.cancel();const t=u.animate([{transform:o,opacity:0},{transform:"scale(1)",opacity:1}],{duration:n,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield t.finished}catch(t){}c(u),t.cancel()}})}_zoomDuration(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&"number"==typeof t.speed?t.speed:260;return Math.max(80,e)}_fire(t,e){const i=this.w.config.chart.events&&this.w.config.chart.events[t];"function"==typeof i&&i(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,i){var n;if(!i||!(null==(n=this.w.config.drilldown)?void 0:n.enabled)||this._retired())return;const s=this._pointAt(i.seriesIndex,i.dataPointIndex);return s&&"object"==typeof s&&null!=s.drilldown?this.drillDown(s.drilldown,s,i):"function"==typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(null,s,i):void 0}_pointAt(t,e){const i=this.w.config.series;if(!Array.isArray(i)||null==t||null==e)return null;const n=i[t];return n&&Array.isArray(n.data)&&null!=n.data[e]?n.data[e]:null}_pointLabel(t,e){const i=t&&null!=t.x?t.x:e&&this.w.globals.labels[e.dataPointIndex];return null!=i?String(i):void 0}_retired(){return this.ctx.drilldown!==this&&(Promise.resolve().then(()=>{const t=this.ctx.events;t&&(t.removeEventListener("dataPointSelection",this._onPointSelect),t.removeEventListener("mounted",this._afterRender),t.removeEventListener("updated",this._afterRender))}),!0)}_afterRender(){var t;const e=this.w;if(this._retired())return;const i=null==(t=e.config.drilldown)?void 0:t.enabled;(i||this.stack.length||this._wasOn)&&(this._wasOn=i,i&&(this._markDrillableTargets(),this._wirePlotClick()),this.breadcrumb.render(this.path),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(i&&e.config.series)))}_markDrillableTargets(){if(!k.isBrowser())return;const t=this.w,e=t.dom.baseEl,i=t.config.series;if(!e||!Array.isArray(i))return;const n=new Set;if(i.forEach((t,e)=>{t&&Array.isArray(t.data)&&t.data.forEach((t,i)=>{t&&"object"==typeof t&&null!=t.drilldown&&n.add(e+":"+i)})}),!n.size)return;const s=new Set;e.querySelectorAll("[index][j]").forEach(t=>{const e=t.getAttribute("index")+":"+t.getAttribute("j");n.has(e)&&(s.add(e),this._isClickThroughMark(t)&&t.classList.remove("no-pointer-events"),t.classList.add("apexcharts-drilldown-target"))});const r=n.size-s.size;r&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${r} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!k.isBrowser())return;const t=this.w.dom.baseEl;t&&this._plotClickWired!==t&&(this._plotClickWired&&(this._plotClickWired.removeEventListener("mousedown",this._onPlotDown),this._plotClickWired.removeEventListener("click",this._onPlotClick)),t.addEventListener("mousedown",this._onPlotDown),t.addEventListener("click",this._onPlotClick),this._plotClickWired=t)}_onPlotDown(t){this._downAt={x:t.clientX,y:t.clientY}}_onPlotClick(t){const e=this.w;if(!e.config.drilldown||!e.config.drilldown.enabled)return;const i=this._downAt;if(this._downAt=null,i&&Math.hypot(t.clientX-i.x,t.clientY-i.y)>4)return;const n=t.target;if(!n||"function"!=typeof n.closest)return;if(n.closest(".apexcharts-drilldown-target"))return;if(n.closest(".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip"))return;const s=e.interact.capturedSeriesIndex,r=e.interact.capturedDataPointIndex;if(null==s||null==r||s<0||r<0)return;if(!this._isPointBasedSeries(e.config.series[s]))return;const a=this._pointAt(s,r);return a&&"object"==typeof a&&null!=a.drilldown?this.drillDown(a.drilldown,a,{seriesIndex:s,dataPointIndex:r}):void 0}_isClickThroughMark(t){return!(!t.classList||!t.classList.contains("no-pointer-events"))&&(!!t.classList.contains("apexcharts-marker")&&!("function"==typeof t.closest&&t.closest(".apexcharts-tooltip")))}_drillMarkers(t){const e=this.w,i=e.config.drilldown,n=Array.isArray(e.config.markers&&e.config.markers.discrete)?e.config.markers.discrete.filter(t=>!t||!t[Ue]):[],s=i&&i.marker||{};if(!1===s.show||!Array.isArray(t))return n;const r=[];return t.forEach((t,e)=>{if(!this._seriesNeedsDrillMarker(e,t))return;const i=t&&Array.isArray(t.data)?t.data:null;i&&i.forEach((t,i)=>{if(!t||"object"!=typeof t||null==t.drilldown)return;const n={seriesIndex:e,dataPointIndex:i,[Ue]:!0};void 0!==s.size&&(n.size=s.size),void 0!==s.shape&&(n.shape=s.shape),void 0!==s.fillColor&&(n.fillColor=s.fillColor),void 0!==s.strokeColor&&(n.strokeColor=s.strokeColor),r.push(n)})}),n.concat(r)}_seriesNeedsDrillMarker(t,e){if(!this._isPointBasedSeries(e))return!1;const i=this.w.config.markers&&this.w.config.markers.size,n=Array.isArray(i)?i[t]:i;return!(Number(n)>0)}_isPointBasedSeries(t){const e=t&&t.type||this.w.config.chart.type;return"line"===e||"area"===e}}});function Ve(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function Ze(t,e){const i=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const n=t||{},{hidden:s}=n,r=h(n,["hidden"]);let a=r.data;if(Array.isArray(a)&&!a.length){const t=i.find(t=>t.index===e);t&&Array.isArray(t.data)&&(a=t.data)}return c(l({},r),{data:Array.isArray(a)?a.slice():a})})}const Je=m.__apex_DateTime;function Qe(t,e){if(t instanceof Date)return t.getTime();if(e&&"string"==typeof t){const e=Je.prototype.parseDate(t);if(!isNaN(e))return e}return t}function ti(t,e){return t.map((t,i)=>null!==t&&"object"==typeof t?t:{x:e&&void 0!==e[i]?e[i]:i+1,y:t})}function ei(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],isSubtotal:!1,isTotal:!1,rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,isSubtotal:!0===t.isSubtotal,isTotal:!0===t.isTotal,rest:t}:{x:n,y:t,isSubtotal:!1,isTotal:!1,rest:{}}}function ii(t,e,i){if(t&&t.fillColor)return t.fillColor;const n=i[e];return"string"==typeof n&&n?n:void 0}function ni(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}$e("waterfall",function(t,e){var i,n,s;const r=e.config,a=e.globals;if(!Array.isArray(t))return t;a.waterfallRawSeries||(a.waterfallRawSeries=Ze(t,a));const o=a.waterfallRawSeries,h=(null==(n=null==(i=r.plotOptions)?void 0:i.waterfall)?void 0:n.colors)||{},d=null==(s=r.xaxis)?void 0:s.categories,u=Ve(a),p=[],f=o.map((t,e)=>{const i=Array.isArray(null==t?void 0:t.data)?t.data:[];if(p[e]=[],-1!==u.indexOf(e))return c(l({},t),{data:[]});if((null==t?void 0:t.type)&&"waterfall"!==t.type&&"rangeBar"!==t.type)return Array.isArray(t.data)?c(l({},t),{data:ti(t.data,d)}):t;if(function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(i))return p[e]=i.map(t=>{const e=Array.isArray(t)?t[1]:t&&"object"==typeof t?t.y:t;if(!Array.isArray(e))return null;const i=B.parseNumber(e[0]),n=B.parseNumber(e[1]);return null===i||null===n?null:n-i}),t;const n=function(t,e,i){const n=[],s=[];let r=0,a=0;for(let o=0;o<t.length;o++){const{x:h,y:d,isSubtotal:u,isTotal:p,rest:f}=ei(t[o],o,e);let g,m,y;if(p||u)g=p?0:a,m=r,y=p?"total":"subtotal",a=r;else{const t=B.parseNumber(d);if(null===t||!isFinite(t)){n.push(c(l({},f),{x:h,y:null})),s.push(null);continue}g=r,m=r+t,r=m,y=t<0?"negative":"positive"}const x=ii(f,y,i);n.push(l(c(l({},f),{x:h,y:[g,m]}),x?{fillColor:x}:{})),s.push(m-g)}return{data:n,values:s}}(i,d,h);return p[e]=n.values,c(l({},t),{data:n.data})});return e.waterfallData={values:p,geometry:[]},f}),m.default.registerFeatures({waterfall:class{constructor(t,e){this.w=t,this.ctx=e}isActive(){return"waterfall"===this.w.config.chart.requestedType}drawConnectors(){var t,e;const i=this.w;if(!this.isActive())return;const n=null==(e=null==(t=i.config.plotOptions)?void 0:t.waterfall)?void 0:e.connectors;if(!n||!1===n.show)return;const s=i.dom.elGraphical,r=i.waterfallData&&i.waterfallData.geometry;if(!s||!r)return;this.removeConnectors();const a=new b(i,this.ctx),o=a.group({class:"apexcharts-waterfall-connectors"}),l=n.color||i.config.grid.borderColor,c=null==n.strokeWidth?1:n.strokeWidth,h=null==n.strokeDashArray?3:n.strokeDashArray;let d=0;for(let t=0;t<r.length;t++){const e=r[t];if(Array.isArray(e))for(let t=0;t<e.length-1;t++){const i=e[t],n=e[t+1];if(!i||!n)continue;if(!(n.slotStart-i.slotEnd>.5))continue;const s=i.horizontal?a.drawLine(i.levelEnd,i.slotEnd,i.levelEnd,n.slotStart,l,h,c):a.drawLine(i.slotEnd,i.levelEnd,n.slotStart,i.levelEnd,l,h,c);s.node.classList.add("apexcharts-waterfall-connector"),o.add(s),d++}}if(!d)return;o.attr("clip-path",`url(#gridRectBarMask${i.globals.cuid})`);const u=s.node.querySelector(".apexcharts-xaxis");u?s.node.insertBefore(o.node,u):s.add(o),this.holdUntilBarsLand(o)}removeConnectors(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-waterfall-connectors");e&&e.parentNode&&e.parentNode.removeChild(e)}holdUntilBarsLand(t){const e=this.w;k.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}}),$e("dumbbell",function(t,e){var i;const n=e.config,s=e.globals;if(!Array.isArray(t))return t;s.dumbbellRawSeries||(s.dumbbellRawSeries=Ze(t,s));const r=s.dumbbellRawSeries;if(r.some(t=>function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},t;const a=null==(i=n.xaxis)?void 0:i.categories,o=Ve(s),{xs:h,rows:d,byX:u}=function(t,e){var i;const n=[],s=[],r=new Map,a=[];for(let o=0;o<t.length;o++){const c=Array.isArray(null==(i=t[o])?void 0:i.data)?t[o].data:[],h=new Map;for(let t=0;t<c.length;t++){const{x:i,y:a,rest:o}=ni(c[t],t,e),d=i instanceof Date?i.getTime():i;r.has(d)||(r.set(d,n.length),n.push(i),s.push(l({},o)));const u=r.get(d);h.set(u,B.parseNumber(a))}a.push(h)}return{xs:n,rows:s,byX:a}}(r,a),p=[],f=[],g=[];for(let t=0;t<r.length;t++)-1===o.indexOf(t)&&g.push(t);const m=[];for(let t=0;t<h.length;t++){const e=[];for(let i=0;i<r.length;i++){const n=u[i].has(t)?u[i].get(t):null;e.push(null!=n&&isFinite(n)?n:null)}p.push(e);let i=null,n=null,s=-1,a=-1;for(let t=0;t<g.length;t++){const r=g[t],o=e[r];null!==o&&((null===i||o<i)&&(i=o,s=r),(null===n||o>n)&&(n=o,a=r))}null!==i&&null!==n?(f.push([s,a]),m.push(c(l({},d[t]),{x:h[t],y:[i,n]}))):(f.push(null),m.push(c(l({},d[t]),{x:h[t],y:null})))}e.dumbbellData={form:"series",names:r.map((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`}),values:p,order:f,carrier:g.length?g[0]:0,hidden:r.map((t,e)=>e).filter(t=>-1!==o.indexOf(t))};const y=e.dumbbellData.carrier;return r.map((t,e)=>c(l({},t),{data:e===y&&g.length?m:[]}))});class si{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/si.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*si.xRatio(t)}static plotRect(t){var e,i,n;const s=(null==(e=t.dom.Paper)?void 0:e.node)||(null==(i=t.dom.baseEl)?void 0:i.querySelector(".apexcharts-svg")),r=(null==(n=s||t.dom.elWrap)?void 0:n.getBoundingClientRect())||{left:0,top:0,width:0},a=(s&&t.globals.svgWidth?r.width/t.globals.svgWidth:1)||1;return{left:r.left+t.layout.translateX*a,top:r.top+t.layout.translateY*a,width:t.layout.gridWidth*a,height:t.layout.gridHeight*a,zoom:a}}static screenXToPlotPx(t,e,i=si.plotRect(t)){return(e-i.left)/i.zoom}}const ri=["wiggle","silhouette","zero","expand"],ai=["inside-out","inverse","none"];function oi(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}$e("streamgraph",function(t,e){var i,n,s,r;const a=e.config,o=e.globals;if(!Array.isArray(t))return t;o.streamgraphRawSeries||(o.streamgraphRawSeries=Ze(t,o));const h=o.streamgraphRawSeries,d=h.map(t=>!(null==t?void 0:t.type)||"streamgraph"===t.type||"rangeArea"===t.type);if(h.some((t,e)=>d[e]&&function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.streamgraphData=null,t;const u=(null==(i=a.plotOptions)?void 0:i.streamgraph)||{},p=-1!==ri.indexOf(u.offset)?u.offset:"wiggle",f=-1!==ai.indexOf(u.order)?u.order:"inside-out",g=null==(n=a.xaxis)?void 0:n.categories,m=Ve(o),y="datetime"===(null==(s=a.xaxis)?void 0:s.type),{xs:x,keys:_,rows:b,grids:v}=function(t,e,i,n){var s;const r=[],a=[],o=[],c=new Map,h=[];for(let d=0;d<t.length;d++){const u=n[d]&&Array.isArray(null==(s=t[d])?void 0:s.data)?t[d].data:[],p=new Map;for(let t=0;t<u.length;t++){const{x:n,y:s,rest:h}=oi(u[t],t,e),d=Qe(n,i);c.has(d)||(c.set(d,r.length),r.push(n),a.push(d),o.push(l({},h))),p.set(c.get(d),B.parseNumber(s))}h.push(p)}return{xs:r,keys:a,rows:o,grids:h}}(h,g,y,d),w=function(t){const e=[];for(let i=0;i<t.length;i++){if("number"!=typeof t[i]||!isFinite(t[i]))return null;e.push(i)}e.sort((e,i)=>t[e]-t[i]);for(let t=0;t<e.length;t++)if(e[t]!==t)return e;return null}(_),A=w?w.map(t=>x[t]):x,M=w?w.map(t=>b[t]):b,k=A.length,L=[];let S,C=!1;const E=[];for(let t=0;t<h.length;t++){const e=new Array(k);if(!d[t]){if(e.fill(null),-1===m.indexOf(t)&&L.push(t),!S){S=new Map;for(let t=0;t<k;t++)S.set(_[w?w[t]:t],t)}const i=Array.isArray(null==(r=h[t])?void 0:r.data)?h[t].data:[];for(let t=0;t<i.length;t++){const{x:n,y:s}=oi(i[t],t,g),r=S.get(Qe(n,y));void 0!==r&&(e[r]=B.parseNumber(s))}E.push(e);continue}for(let i=0;i<k;i++){const n=v[t].get(w?w[i]:i);let s=null==n?0:Number(n);isFinite(s)||(s=0),s<0&&(C=!0,s=0),e[i]=s}E.push(e)}C&&!o.streamgraphWarnedNegative&&(o.streamgraphWarnedNegative=!0,console.warn('ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.'));const F=[];for(let t=0;t<h.length;t++)d[t]&&-1===m.indexOf(t)&&F.push(t);let P=E;if("expand"===p){P=P.map(t=>t.slice());for(let t=0;t<k;t++){let e=0;for(let i=0;i<F.length;i++)e+=P[F[i]][t];if(e)for(let i=0;i<F.length;i++)P[F[i]][t]/=e}}const D=function(t,e,i){if("none"===t)return e.slice();if("inverse"===t)return e.slice().reverse();const n={},s={};for(let t=0;t<e.length;t++){const r=e[t],a=i[r];let o=0,l=-1/0,c=0;for(let t=0;t<a.length;t++)o+=a[t],a[t]>l&&(l=a[t],c=t);n[r]=o,s[r]=c}const r=e.slice().sort((t,e)=>s[t]-s[e]||t-e);let a=0,o=0;const l=[],c=[];for(let t=0;t<r.length;t++){const e=r[t];a<o?(a+=n[e],l.push(e)):(o+=n[e],c.push(e))}return c.reverse().concat(l)}(f,F,P),R=function(t,e,i,n){const s=new Array(n).fill(0);if(0===n||0===e.length)return s;if("zero"===t||"expand"===t)return s;if("silhouette"===t){for(let t=0;t<n;t++){let n=0;for(let s=0;s<e.length;s++)n+=i[e[s]][t];s[t]=-n/2}return s}let r=0;for(let t=1;t<n;t++){let n=0,a=0,o=0;for(let s=0;s<e.length;s++){const r=i[e[s]],l=r[t],c=l-r[t-1];n+=l,a+=(c/2+o)*l,o+=c}n&&(r-=a/n),s[t]=r}return s}(p,D,P,k),T=h.map(()=>null),N=h.map(()=>null);for(let t=0;t<D.length;t++)T[D[t]]=new Array(k),N[D[t]]=new Array(k);for(let t=0;t<k;t++){let e=R[t];for(let i=0;i<D.length;i++){const n=D[i],s=T[n],r=N[n];s[t]=e,e+=P[n][t],r[t]=e}}return e.streamgraphData={names:h.map((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`}),xs:A,values:E,lows:T,highs:N,order:D,lines:L,offset:p,hidden:h.map((t,e)=>e).filter(t=>-1!==m.indexOf(t))},h.map((t,e)=>{if(!d[e])return-1!==m.indexOf(e)?c(l({},t),{data:[]}):Array.isArray(null==t?void 0:t.data)?c(l({},t),{data:ti(t.data,g)}):t;const i=T[e],n=N[e];if(!i||!n)return c(l({},t),{data:[]});const s=new Array(k);for(let t=0;t<k;t++)s[t]=c(l({},M[t]),{x:A[t],y:[i[t],n[t]]});return c(l({},t),{data:s})})}),m.default.registerFeatures({streamgraph:class{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(t){var e;const i=this.w,n=i.globals,s=i.layout.gridHeight,r=n.maxY-n.minY;if(!r||!isFinite(r))return s/2;const a=(t-n.minY)/r;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?a*s:s-a*s}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,i,n,s,r,a;const o=this.w;if(!this.isActive())return;const l=null==(e=null==(t=o.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels;if(!l||!1===l.show)return;const c=o.dom.elGraphical,h=o.streamgraphData;if(!c||!h)return;this.removeLabels();const d=new b(o,this.ctx),u=d.group({class:"apexcharts-streamgraph-labels"}),p=(null==(i=l.style)?void 0:i.fontSize)||"auto",f=(null==(n=l.style)?void 0:n.fontFamily)||o.config.chart.fontFamily,g=(null==(s=l.style)?void 0:s.fontWeight)||600,m=null==l.minWidth?24:l.minWidth,y=[];for(let t=0;t<h.order.length;t++){const e=h.order[t],i=this._placeLabel(e,{fontSize:p,fontFamily:f,fontWeight:g,minWidth:m,graphics:d});i&&y.push(i)}let x=0;for(const t of this._deconflict(y)){const e=t.k,i=d.drawText({x:t.x,y:t.y,text:t.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:t.fontSize,fontFamily:f,fontWeight:g,foreColor:(null==(a=null==(r=l.style)?void 0:r.colors)?void 0:a[e])||t.color,cssClass:"apexcharts-streamgraph-label"});i.node.setAttribute("data:realIndex",String(e)),u.add(i),x++}if(!x)return;const _=c.node.querySelector(".apexcharts-xaxis");_?c.node.insertBefore(u.node,_):c.add(u),this.holdUntilBandsLand(u)}_placeLabel(t,{fontSize:e,fontFamily:i,fontWeight:n,minWidth:s,graphics:r}){const a=this.w,o=a.streamgraphData,l=o.lows[t],c=o.highs[t];if(!l||!c)return null;const h=a.globals.seriesXvalues[t],d=l.length;if(!Array.isArray(h)||h.length<d||0===d)return null;const u=new Array(d);let p=0;for(let t=0;t<d;t++){const e=Math.abs(this._yPx(c[t])-this._yPx(l[t]));u[t]=e,e>p&&(p=e)}if(p<=0)return null;const f=this._resolveFontSize(e,p),g=String(o.names[t]);let m=f,y=r.getTextRects(g,`${m}px`,i,"",!0,n);if(p<y.height+6)return null;const x=this._widestRun(u,h,y.height+6,d);if(!x)return null;if(y.width>x.width&&"auto"===e){const t=Math.floor(m*(x.width/y.width));if(t<this._autoBounds().min)return null;if(m=t,y=r.getTextRects(g,`${m}px`,i,"",!0,n),p<y.height+6)return null}const _=y.height+6,b=[];for(const e of this._runs(u,_,d)){const a=Number(h[e.l]),o=Number(h[e.r]);if(!isFinite(a)||!isFinite(o))continue;let u=o-a;if(u<=0&&d>1){const t=Math.abs(Number(h[Math.min(e.r+1,d-1)])-Number(h[Math.max(e.l-1,0)]));u=isFinite(t)?t:0}if(u<s||u<.35*y.width)continue;const p=y.width<=u?g:r.getTextBasedOnMaxWidth({text:g,maxWidth:u,fontSize:`${m}px`,fontFamily:i,fontWeight:n});if(!p||"..."===p)continue;const f=p===g?y.width:y.width*(p.length/g.length),x=[a+u/2];u>2.2*f&&x.push(a+f/2+2,o-f/2-2);for(const i of x){let n=e.l,s=1/0;for(let t=e.l;t<=e.r;t++){const e=Math.abs(Number(h[t])-i);e<s&&(s=e,n=t)}b.push({x:i,y:(this._yPx(l[n])+this._yPx(c[n]))/2,text:p,color:this._contrastOn(t),fontSize:`${m}px`,width:f,height:y.height})}if(b.length>=6)break}return b.length?{k:t,weight:p,candidates:b}:null}_runs(t,e,i){const n=[];let s=0;for(;s<i;){if(t[s]<e){s++;continue}let r=s,a=t[s];for(;r+1<i&&t[r+1]>=e;)r++,t[r]>a&&(a=t[r]);n.push({l:s,r:r,maxT:a}),s=r+1}return n.sort((t,e)=>e.maxT-t.maxT)}_widestRun(t,e,i,n){let s=-1;for(const r of this._runs(t,i,n)){const t=Number(e[r.r])-Number(e[r.l]);isFinite(t)&&t>s&&(s=t)}return s>=0?{width:s}:null}_deconflict(t){const e=t.slice().sort((t,e)=>e.weight-t.weight),i=[],n=t=>!i.some(e=>t.left<e.box.right&&t.right>e.box.left&&t.top<e.box.bottom&&t.bottom>e.box.top);for(const t of e)for(const e of t.candidates){const s={left:e.x-e.width/2,right:e.x+e.width/2,top:e.y-e.height/2,bottom:e.y+e.height/2};if(n(s)){i.push(c(l({k:t.k},e),{box:s}));break}}return i}_autoBounds(){var t,e;const i=(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels)||{};return{min:null==i.minFontSize?9:i.minFontSize,max:null==i.maxFontSize?30:i.maxFontSize}}_resolveFontSize(t,e){if("auto"!==t){const e=parseFloat(t);return isFinite(e)&&e>0?e:12}const{min:i,max:n}=this._autoBounds();return Math.max(i,Math.min(n,Math.round(.36*e)))}_contrastOn(t){var e;const i=this.w,n=null==(e=i.globals.colors)?void 0:e[t],s="string"==typeof n?B.parseHex(n):null;return s?B.relativeLuminance(s)>.45?"#000000":"#ffffff":i.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!k.isBrowser())return;if(!1===this._hoverCfg().show)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");e&&!e.__apexStreamHover&&(e.__apexStreamHover=!0,e.addEventListener("mousemove",t=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(t))}),e.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var t,e;return(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.hover)||{}}_bandAt(t){const e=this.w,i=e.streamgraphData;if(!i||!i.order.length)return-1;const n=si.plotRect(e),s=si.screenXToPlotPx(e,t.clientX,n),r=(t.clientY-n.top)/n.zoom;if(s<0||s>e.layout.gridWidth)return-1;if(r<0||r>e.layout.gridHeight)return-1;const a=e.globals.seriesXvalues[i.order[0]];if(!Array.isArray(a)||!a.length)return-1;const o=e.interact?e.interact.capturedDataPointIndex:-1;let l=-1;if(o>=0&&o<a.length)l=o;else{let t=1/0;for(let e=0;e<a.length;e++){const i=Math.abs(Number(a[e])-s);i<t&&(t=i,l=e)}}return l<0?-1:this.bandAt(r,l)}bandAtClientY(t,e){const i=si.plotRect(this.w);return this.bandAt((t-i.top)/i.zoom,e)}bandAt(t,e){const i=this.w.globals,n=this.w.streamgraphData,s=i.maxY-i.minY;if(!(n&&Array.isArray(n.order)&&s&&isFinite(s)))return-1;let r=-1,a=1/0;for(let i=0;i<n.order.length;i++){const s=n.order[i],o=n.highs[s]&&n.highs[s][e],l=n.lows[s]&&n.lows[s][e];if(null==l||null==o)continue;const c=this._yPx(o),h=this._yPx(l),d=Math.min(c,h),u=Math.max(c,h);if(t>=d&&t<=u)return s;const p=t<d?d-t:t-u;p<a&&(a=p,r=s)}return r}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const i=this._hoverCfg(),n=null==i.opacity?.35:i.opacity,s=e.dom.baseEl.querySelectorAll(".apexcharts-series"),r=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),a=(e,i)=>t<0||i===t;for(let t=0;t<s.length;t++){const e=s[t];e.style.transition="opacity .15s ease",e.style.opacity=a(0,Number(e.getAttribute("data:realIndex")))?"":String(n)}for(let t=0;t<r.length;t++){const i=r[t];i.style.transition="opacity .15s ease, fill .15s ease",a(0,Number(i.getAttribute("data:realIndex")))?this._restoreLabel(i):(i.getAttribute("data:fill")||i.setAttribute("data:fill",i.getAttribute("fill")||""),i.setAttribute("fill",e.config.chart.foreColor),i.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let t=0;t<e.length;t++){e[t].style.opacity=""}const i=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let t=0;t<i.length;t++)this._restoreLabel(i[t])}holdUntilBandsLand(t){const e=this.w;k.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}});const li=m.__apex_Resize_addResizeListener,ci=m.__apex_Resize_removeResizeListener;class hi{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,i={}){return this.ctx.graphics.drawMarker(t,e,i)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const di=["none","lighten","darken"];function ui(t){const e=t.config.series||[],i=t.config.chart.type,n="scatter"===i||"bubble"===i,s=t.config.markers&&t.config.markers.size,r=Array.isArray(s)?s.some(t=>t>0):(s||0)>0,a=!(!t.config.dataLabels||!t.config.dataLabels.enabled),o="heatmap"===i;let l=0,c=0;e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(n||r||o)&&(l+=e),a&&(l+=e)});return c>=5e4&&(l=Math.max(l,c)),l}function pi(t){const e=t.config,i=e.plotOptions||{},n=e.stroke&&e.stroke.fill,s=e.forecastDataPoints,r=i.line&&i.line.colors,a=e.states||{},o=t=>[].concat(t).some(t=>"pattern"===t||"image"===t||"gradient"===t),l=t=>{const e=t&&t.filter&&t.filter.type;return e&&!di.includes(e)},c=t=>(e.series||[]).some(i=>t.test(i&&i.type||e.chart.type));return!!(o(e.fill&&e.fill.type)||n&&o(n.type)&&c(/line|area/i)||s&&s.count>0&&c(/^(line|area)$/)||r&&r.colorAboveThreshold&&r.colorBelowThreshold||"heatmap"===e.chart.type&&"rect"!==(i.heatmap&&i.heatmap.shape||"rect")||l(a.hover)||l(a.active))}const fi="__apexcharts_renderers__";function gi(){const t=globalThis;return t[fi]||(t[fi]=new Map),t[fi]}class mi{static get _rendererRegistry(){return gi()}static registerRenderer(t,e){gi().set(t,e)}static unregisterRenderer(t){gi().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new hi(t,e),this.active=this.svg,this._activeKind="svg",this._instances={},this.w.globals.activeRenderer=this.active}_activate(t,e){this.active=e,this._activeKind=t,this.ctx.renderer=e,this.w.globals.activeRenderer=e}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!k.isBrowser())return"svg";if("svg"===e)return"svg";if(pi(this.w))return"svg";if("canvas"===e)return"canvas";return ui(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const i=gi().get(e);if(i)return this._instances[e]||(this._instances[e]=i(this.w,this.ctx)),this._activate(e,this._instances[e]),this._activeKind;t!==e||this._warned||(this._warned=1,function(t,e,i={}){const{module:n=`features/${e}`,entry:s,scripts:r=[`features/${e}.js`],tail:a}=i,o=r.map(t=>`<script src='.../dist/${t}'>`).join(" and ");globalThis.console.warn(`ApexCharts: ${t} requires the ${e} feature, which is not in this bundle. Bundler: import 'apexcharts/${n}'`+(s?` (or from 'apexcharts/${s}')`:"")+`. Script tag: add ${o} after the ApexCharts script, or load apexcharts.full.min.js instead.`+(a?` ${a}`:""))}(`\`chart.renderer: '${e}'\``,`renderer-${e}`,{tail:"Falling back to SVG."}))}else"canvas"===t&&!this._warned&&pi(this.w)&&(this._warned=1,console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill, a line forecast or a state color-matrix filter); falling back to SVG.'));const i=this._instances[this._activeKind];return i&&(i.destroy(),delete this._instances[this._activeKind]),this._activate("svg",this.svg),this._activeKind}pendingKind(){const t=this._desiredKind();return"svg"===t||gi().has(t)?t:"svg"}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg",this.w.globals.activeRenderer=null}}const yi=m.__apex_helpers_InitCtxVariables,xi=Symbol("facet"),_i=["name","data","type","group","color","hidden"];function bi(t){if(!Array.isArray(t)||0===t.length)return"empty";for(let e=0;e<t.length;e++){const i=t[e];if(null!=i)return Array.isArray(i)?"paired":"object"==typeof i?"object":"plain"}return"empty"}function vi(t,e,i){if(null!=t)return"paired"===e?Qe(t[0],!!i):"object"===e?Qe(t.x,!!i):void 0}function wi(t,e){return"paired"===e?[t,null]:"object"===e?{x:t,y:null}:null}function Ai(t,e,i){const n="function"==typeof i?i(t,e):t?t[i]:void 0;return null==n||""===n?null:String(n)}function Mi(t,e){if(!e||"first-seen"===e)return t.slice();if("asc"===e||"desc"===e){const i=t.slice().sort((t,e)=>{const i=Number(t),n=Number(e);return isFinite(i)&&isFinite(n)?i-n:t<e?-1:t>e?1:0});return"desc"===e?i.reverse():i}if(Array.isArray(e)){const i=e.map(String).filter(e=>-1!==t.indexOf(e)),n=t.filter(t=>-1===i.indexOf(t));return i.concat(n)}return"function"==typeof e?t.slice().sort(e):t.slice()}function ki(t,e,i){const n=[],s=new Set;let r=!1,a=!1,o=0,l="plain";t.forEach(t=>{const e=bi(t&&t.data);if("empty"!==e){if("plain"===e)return a=!0,void(o=Math.max(o,t.data.length));r=!0,l=e,t.data.forEach(t=>{const r=vi(t,e,i);if(void 0===r)return;const a=typeof r+":"+String(r);s.has(a)||(s.add(a),n.push(r))})}}),r&&a&&e.push("trellis: mixing x-keyed data ([x,y] / {x,y}) with plain value arrays; plain series are padded by position, not by x");const c=r&&n.every(t=>"number"==typeof t&&isFinite(t));return c&&n.sort((t,e)=>Number(t)-Number(e)),{unionX:n,sawKeyed:r,plainMaxLen:o,xForm:l,xIsNumeric:c,datetime:i}}const Li=["scatter","bubble"];function Si(t,e,i,n){const s=[],r=new Set,a=new Map,o=new Set;return{align:e=>{const h=bi(e&&e.data),d=e&&null!=e.name?String(e.name):`series-${n.indexOf(e)+1}`;r.has(d)||(r.add(d),s.push(d));const u=c(l({},e),{name:d});if(!i)return u.data=Array.isArray(e.data)?e.data.slice():[],u;if("plain"===h||"empty"===h){const i=t.sawKeyed?t.unionX.length:t.plainMaxLen,n=Array.isArray(e.data)?e.data.slice(0,i):[];for(;n.length<i;)n.push(null);if(u.data=n,Array.isArray(e.highlightData)){const t=e.highlightData.slice(0,i);for(;t.length<i;)t.push(null);u.highlightData=t}return u}const p=new Map,f=new Map,g=Array.isArray(e.highlightData)?e.highlightData:null;let m=0;return e.data.forEach((e,i)=>{const n=vi(e,h,t.datetime);void 0!==n&&(p.has(n)?m++:(p.set(n,e),g&&f.set(n,g[i])))}),m&&!o.has(e)&&(o.add(e),a.set(d,(a.get(d)||0)+m)),u.data=t.unionX.map(t=>p.has(t)?p.get(t):wi(t,h)),g&&(u.highlightData=t.unionX.map(t=>f.has(t)?f.get(t):null)),u},seriesNames:s,flush:()=>a.forEach((t,i)=>e.push(`trellis: ${t} duplicate x value(s) in series "${i}"; keeping the first of each`))}}function Ci(t,e={}){const i=t.xForm,n={bar:0,column:0,rangeBar:[0,0],candlestick:[0,0,0,0],boxPlot:[0,0,0,0,0]},s=e.chartType&&e.chartType in n?n[e.chartType]:null,r="plain"===i?t.unionX.map(()=>s):t.unionX.map(t=>{if(null===s)return wi(t,i);const e=Array.isArray(s)?s.slice():s;return"object"===i?{x:t,y:e}:[t,e]});return{name:e.name||t.seriesNames[0]||"series-1",data:r}}function Ei(t,e={},i={}){const n=[],s=Array.isArray(t)?t:[],r=(a=i.chartType,!Li.includes(a||""));var a;if(e.row||e.column)return e.by&&n.push("trellis: `by` is ignored when `row`/`column` are set (they are mutually exclusive)"),function(t,e,i,n=!0,s){const r=e.row,a=e.column,o=new Map,l=new Map,c=new Map,h=[],d=[],u=[],p=(t,e)=>{-1===t.indexOf(e)&&t.push(e)};if(t.forEach((t,e)=>{var i,n;const s=r?Ai(t,e,r):"",f=a?Ai(t,e,a):"";if(null===s&&null===f)return void h.push(t);if(null===s)return p(u,f),c.has(f)||c.set(f,[]),void(null==(i=c.get(f))||i.push(t));if(null===f)return p(d,s),l.has(s)||l.set(s,[]),void(null==(n=l.get(s))||n.push(t));p(d,s),p(u,f);let g=o.get(s);g||(g=new Map,o.set(s,g));let m=g.get(f);m||(m=[],g.set(f,m)),m.push(t)}),!d.length&&!u.length)return Fi(["trellis: no series carries the row/column facet keys; nothing to split"]);"number"==typeof e.limit&&e.limit>0&&i.push("trellis: `limit` is not applied to a 2-D grid; ignoring it");const f=Mi(d.length?d:[""],e.order),g=Mi(u.length?u:[""],e.order),m=ki(t,i,s),{align:y,seriesNames:x,flush:_}=Si(m,i,n,t),b=[];return f.forEach(t=>{g.forEach(e=>{var i;const n=((null==(i=o.get(t))?void 0:i.get(e))||[]).concat(l.get(t)||[]).concat(c.get(e)||[]).concat(h).map(y);b.push({key:[t,e].filter(t=>""!==t).join(" / ")||"all",rowKey:t,colKey:e,series:n,seriesNames:n.map(t=>t.name),empty:0===n.length})})}),_(),{mode:"2d",panels:b,rowKeys:f,colKeys:g,seriesNames:x,xForm:m.sawKeyed?m.xForm:"plain",unionX:m.sawKeyed?m.unionX:Array.from({length:m.plainMaxLen},(t,e)=>e),xIsNumeric:m.xIsNumeric,dropped:0,warnings:i}}(s,e,n,r,i.datetime);const o=e.by||"facet",l=new Map,c=[];if(s.forEach((t,e)=>{const i=Ai(t,e,t&&void 0!==t[xi]?xi:o);if(null===i)c.push(t);else{l.has(i)||l.set(i,[]);const e=l.get(i);e&&e.push(t)}}),0===l.size)return Fi(["trellis: no series carries the facet key; nothing to split"]);let h=Mi(Array.from(l.keys()),e.order),d=0;"number"==typeof e.limit&&e.limit>0&&h.length>e.limit&&(d=h.length-e.limit,h=h.slice(0,e.limit));const u=ki(h.reduce((t,e)=>t.concat(l.get(e)||[]),[]).concat(c),n,i.datetime),{align:p,seriesNames:f,flush:g}=Si(u,n,r,s),m=h.map(t=>{const e=(l.get(t)||[]).map(p),i=c.map(p),n=e.concat(i);return{key:t,rowKey:null,colKey:null,series:n,seriesNames:n.map(t=>t.name),empty:0===n.length}});return g(),{mode:"1d",panels:m,rowKeys:null,colKeys:null,seriesNames:f,xForm:u.sawKeyed?u.xForm:"plain",unionX:u.sawKeyed?u.unionX:Array.from({length:u.plainMaxLen},(t,e)=>e),xIsNumeric:u.xIsNumeric,dropped:d,warnings:n}}function Fi(t){return{mode:"1d",panels:[],rowKeys:null,colKeys:null,seriesNames:[],xForm:"plain",unionX:[],xIsNumeric:!1,dropped:0,warnings:t}}const Pi=["heatmap","pie","donut","polarArea","radialBar"],Di=["pie","donut","polarArea"];function Ri(t){const e=[];if(!Array.isArray(t))return e;for(let i=0;i<t.length;i++){const n=t[i];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const r=Number(s);null!=s&&isFinite(r)&&e.push(r)}return e}function Ti(t,e,i,n){var s,r,a,o,l,c;const h={plotOptions:null,yExtentOverride:null,skipYaxisPush:Pi.includes(n),forceSharedY:!1,pieScaleOf:null,warnings:[]},d=t.panels,u=(null==i?void 0:i.plotOptions)||{};if("histogram"===n){const t=u.histogram||{},i=d.map(t=>t.series.map(t=>Ri(t.data))),n=ut(i.flat(2),{bins:t.bins,binWidth:t.binWidth,range:t.range});if(n&&n.edges.length>1){const r=n.edges;h.plotOptions={histogram:{range:[r[0],r[r.length-1]],binWidth:n.binWidth}};let a=0;i.forEach(e=>e.forEach(e=>{if(!e.length)return;(function(t,e={}){let i=t.slice();if(e.cumulative){let t=0;i=i.map(e=>t+=e)}const n=t.reduce((t,e)=>t+e,0);if(n<=0)return i;if("relative"===e.normalize)return i.map(t=>t/n*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return i.map(e=>e/(n*t))}return i})(function(t,e){const i=new Array(Math.max(0,e.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=pt(t[n],e);s>=0&&i[s]++}return i}(e,r),{normalize:t.normalize,cumulative:t.cumulative,binWidth:n.binWidth}).forEach(t=>{isFinite(t)&&t>a&&(a=t)})})),a>0&&(h.yExtentOverride={min:0,max:a});const o=(null==(s=e.scales)?void 0:s.y)||"shared";"independent-row"!==o&&"independent-column"!==o||(h.forceSharedY=!0,h.warnings.push("histogram trellis: group y scales would re-derive counts per group; using scales.y 'shared' (use 'independent' for per-panel count scales)."))}}if("violin"===n){const t=(null==(r=u.violin)?void 0:r.kde)||{};if(!("number"==typeof t.bandwidth&&t.bandwidth>0)){const t=[];d.forEach(e=>e.series.forEach(e=>{return i=e.data,n=t,Array.isArray(i)?(i.forEach(t=>{const e=t&&"object"==typeof t?t.y:null;Array.isArray(e)&&e.forEach(t=>{const e=Number(t);null!=t&&isFinite(e)&&n.push(e)})}),n):n;var i,n}));const e=t.length?ze(t,{resolution:8}):null;e&&isFinite(e.bandwidth)&&e.bandwidth>0&&(h.plotOptions={violin:{kde:{bandwidth:e.bandwidth}}})}}if("heatmap"===n){"independent"===(null==(a=e.scales)?void 0:a.color)&&h.warnings.push("a heatmap trellis must share its color scale (the same color meaning different values per panel is a silent lie); ignoring scales.color 'independent'.");const t=null==(l=null==(o=u.heatmap)?void 0:o.colorScale)?void 0:l.ranges;if(!(Array.isArray(t)&&t.length>0)){let t=1/0,e=-1/0;d.forEach(i=>i.series.forEach(i=>{Ri(i.data).forEach(i=>{i<t&&(t=i),i>e&&(e=i)})})),isFinite(t)&&isFinite(e)&&(h.plotOptions={heatmap:{colorScale:{min:t,max:e}}})}}if("bubble"===n){"independent"===(null==(c=e.scales)?void 0:c.size)&&h.warnings.push("a bubble trellis must share its size scale; ignoring scales.size 'independent'.");let t=1/0,i=-1/0;d.forEach(e=>e.series.forEach(e=>{(function(t){const e=[];return Array.isArray(t)?(t.forEach(t=>{let i=null;Array.isArray(t)&&t.length>2?i=t[2]:t&&"object"==typeof t&&(i=t.z);const n=Number(i);null!=i&&isFinite(n)&&e.push(n)}),e):e})(e.data).forEach(e=>{e<t&&(t=e),e>i&&(i=e)})})),isFinite(t)&&isFinite(i)&&(h.plotOptions={bubble:{minZ:t,maxZ:i}})}if(Di.includes(n)&&e.radiusByTotal){const t=new Map;let e=0;d.forEach(i=>{let n=0;i.series.forEach(t=>{Ri(t.data).forEach(t=>{n+=Math.abs(t)})}),t.set(i.key,n),n>e&&(e=n)}),e>0&&(h.pieScaleOf=i=>{const n=t.get(i);return"number"!=typeof n||n<=0?null:Math.sqrt(n/e)})}return h}const Ni=m.__apex_ThemePalettes_getThemePalettes;function Oi(t,e,i=3){if(!isFinite(t)||!isFinite(e))return{min:0,max:1,tickAmount:1,decimals:0};if(t===e){const i=0===t?1:.1*Math.abs(t);t-=i,e+=i}const n=Math.max(1,i),s=(e-t)/n,r=Math.floor(Math.log10(s)),a=Math.pow(10,r);let o=1/0,l={min:0,max:1,tickAmount:0,decimals:0};return(a>=10?[1,2,2.5,5,10]:[1,2,5,10]).forEach(i=>{const s=i*a,c=Math.min(20,Math.max(0,(10===i?-1:0)-r)),h=+(Math.floor(t/s)*s).toFixed(c),d=+(Math.ceil(e/s)*s).toFixed(c),u=Math.max(1,Math.round((d-h)/s)),p=Math.abs(u-n);(p<o||p===o&&u<l.tickAmount)&&(o=p,l={min:h,max:d,tickAmount:u,decimals:c})}),l}const $i=t=>null==t?t:Array.isArray(t)?t[1]:"object"==typeof t?t.y:t;function Ii(t,e,i){const n=$i(t);null!=n&&(Array.isArray(n)?n:[n]).forEach(t=>{const n=Number(t);!isFinite(n)||i&&n<=0||(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})}function zi(t,e,i){const n=e&&"object"==typeof e&&!Array.isArray(e)&&"highlight"in e?e.highlight:Array.isArray(t.highlightData)?t.highlightData[i]:null;return"number"==typeof n&&isFinite(n)?n:null}function Wi(t){if("number"!=typeof t||!isFinite(t)||t%1==0)return 0;const e=String(t);return-1!==e.indexOf("e")||-1!==e.indexOf("E")?4:Math.min(4,(e.split(".")[1]||"").length)}function Bi(t,e=!1,i=!1){const n={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach((s,r)=>{Ii(s,n,i);const a=e?zi(t,s,r):null;null!==a&&Ii(a,n,i)})})),isFinite(n.min)&&isFinite(n.max)?n:null}function ji(t,e={}){const i={min:1/0,max:-1/0},n=t=>{isFinite(t)&&(t<i.min&&(i.min=t),t>i.max&&(i.max=t))};return t.forEach(t=>{const s=new Map;t.series.forEach(t=>{var n;if(!Array.isArray(t.data))return;if(!function(t,e){if(!e.stackOnlyBar)return!0;const i=t&&t.type;return null==i||"bar"===i||"column"===i}(t,e))return void t.data.forEach(t=>Ii(t,i));const r=String(null!=(n=t.group)?n:""),a=t=>{const e=s.get(t)||{pos:[],neg:[]};return s.set(t,e),e},o=a(r),l=e.parts?a("~"+r):null;t.data.forEach((e,i)=>{[o,l].forEach((n,s)=>{if(!n)return;void 0===n.pos[i]&&(n.pos[i]=0,n.neg[i]=0);const r=s?zi(t,e,i):(t=>{const e=$i(t);if(null==e||Array.isArray(e))return null;const i=Number(e);return isFinite(i)?i:null})(e);null!==r&&(r>0?n.pos[i]+=r:n.neg[i]+=r)})})}),s.forEach(t=>{t.pos.forEach(n),t.neg.forEach(n)})}),isFinite(i.min)&&isFinite(i.max)?i:null}function Hi(t,e={},i={}){const n=e.scales||{},s=n.x||"shared",r=n.y||"shared";let o=null;if("shared"===s&&t.xIsNumeric&&t.unionX.length){const e=t.unionX;o={min:e[0],max:e[e.length-1]}}const h=["bar","column","histogram"].includes(i.chartType||""),d=i.yaxis||[],u=i.axisNames,p=u?u.map((t,e)=>e):[0],f=(t,e)=>u?t.map(t=>c(l({},t),{series:t.series.filter(t=>u[e].includes(t.name))})):t,g=p.map(e=>i.yExtentOverride?0:function(t){let e=0;const i=t=>{const i=Wi(t);i>e&&(e=i)};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach(t=>{const e=$i(t);Array.isArray(e)?e.forEach(i):i(e)})})),e}(f(t.panels,e))),m=!!i.stacked&&"100%"===i.stackType,y=!!i.stacked&&!m,x=(t,n)=>{const s=p.map(s=>((t,i)=>{if(!t)return null;const n=d[i]||{};if(n.logarithmic&&t.min>0){const e=n.logBase||10,s=t=>+(Math.log(t)/Math.log(e)).toFixed(9),r=Math.floor(s(t.min)),o=Math.max(r+1,Math.ceil(s(t.max)));return{min:a(e,r),max:a(e,o),tickAmount:o-r,decimals:Math.max(g[i],Wi(a(e,r)))}}h&&t.min>0&&(t.min=0);const s=Oi(t.min,t.max,e.targetTicks||3);return s.decimals=Math.max(s.decimals,g[i]),s})(n||((t,e)=>{var n;const s=f(t,e);return(null==(n=d[e])?void 0:n.logarithmic)?Bi(s,i.parts,!0):m?{min:0,max:100}:y?ji(s,{stackOnlyBar:i.stackOnlyBar,parts:i.parts}):Bi(s,i.parts)})(t,s),s));return u?s:s[0]};let _=null;"shared"===r&&(_=x(t.panels,u?null:i.yExtentOverride));const b=e=>{const i=new Map;t.panels.forEach(t=>{var n;const s=null!=(n=t[e])?n:"";i.set(s,(i.get(s)||[]).concat(t))});const n=new Map;return i.forEach((t,e)=>{const i=x(t);i&&n.set(e,i)}),n},v="independent-row"===r?b("rowKey"):null,w="independent-column"===r?b("colKey"):null,A=Ni(),M=Array.isArray(i.userColors)&&i.userColors.length?i.userColors:A[i.palette||""]||A.palette1,k=t.seriesNames;return{x:o,y:_,rowY:v,colY:w,colorOf:t=>M[Math.max(0,k.indexOf(t))%M.length],palette:M}}function Yi({panelCount:t,containerWidth:e,cfg:i,hostHeight:n,chromeHeight:s}){var r,a;const o=null!=(r=i.gap)?r:12,l=function(t,e,i={}){var n,s;const r=null!=(n=i.gap)?n:12;if("number"==typeof i.columns&&i.columns>0)return Math.max(1,Math.min(Math.floor(i.columns),e));const a=null!=(s=i.minPanelWidth)?s:220,o=Math.floor((t+r)/(a+r));return Math.max(1,Math.min(o,e))}(e,t,i),c=Math.max(1,Math.ceil(t/l)),h=!i.header||!1!==i.header.show?22:0,d=Math.max(0,s||0),u=c*h+o*(c-1)+d,p="number"==typeof n&&n>0?n:0,f=Math.max(0,(e-o*(l-1))/l);let g;g="number"==typeof i.panelHeight&&i.panelHeight>0?i.panelHeight:p>0?(p-u)/c:f/(null!=(a=i.aspectRatio)?a:1.6);const m="number"==typeof i.minPanelHeight&&i.minPanelHeight>0?i.minPanelHeight:80;g=Math.max(m,Math.round(g));const y=c*(g+h)+o*(c-1),x=p>0?Math.max(0,y+d-p):0,_=i.axes&&i.axes.labels||"edges",b=i.scales||{},v=1===l,w=Array.from({length:t},(e,i)=>{const n=Math.floor(i/l),s=i%l;let r,a;return"none"===_?(r=!1,a=!1):"all"===_||v?(r=!0,a=!0):(r="independent"===b.x||n===function(t,e,i,n){return t<e-(n-1)*i?n-1:n-2}(s,t,l,c),a="independent"===b.y||"independent-column"===b.y||0===s),{i:i,r:n,c:s,showXLabels:r,showYLabels:a}});return{cols:l,rows:c,panelW:f,panelH:g,headerH:h,gap:o,cells:w,gridH:y,overflowH:x}}const qi=["#cf4d3f","#8f9499","#26a75b"],Xi=(t,e,i)=>t+(e-t)*i;function Gi(t){return Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")}function Ui(t,e,i){const n=B.parseColor(Vi(t)),s=B.parseColor(Vi(e));return n&&s?Ki(n.map((t,e)=>Xi(t,s[e],i))):t}function Ki(t){return"#"+t.slice(0,3).map(Gi).join("")+(t[3]<1?Gi(255*t[3]):"")}function Vi(t){const e="string"==typeof t?B.parseColor(t.trim()):null;return e?Ki(e):"#000000"}function Zi(t,e,i,n){var s,r,a;if(!e||"object"!=typeof e)return null;const o=null==(a=null==(r=null==(s=t.config.plotOptions)?void 0:s.treemap)?void 0:r.colorScale)?void 0:a.colorValue;let l;if(l="function"==typeof o?o(e,{seriesIndex:i,dataPointIndex:n,w:t}):"string"==typeof o?e[o]:e.colorValue,null==l)return null;const c=Number(l);return Number.isFinite(c)?c:null}function Ji(t){var e,i,n,s;const r=null==(n=null==(i=null==(e=t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:n.colorScale,a=r&&r.gradient;if(!a)return null;if(!1===a.enabled)return null;const o=t.config.series||[];let l=1/0,c=-1/0,h=!1;for(let e=0;e<o.length;e++){const i=o[e]&&o[e].data;if(Array.isArray(i))for(let n=0;n<i.length;n++){const s=Zi(t,i[n],e,n);null!=s&&(h=!0,s<l&&(l=s),s>c&&(c=s))}}if(!h&&!0!==a.enabled)return null;Number.isFinite(l)||(l=0,c=0);const d=t=>Number.isFinite(Number(t))?Number(t):null,u=d(a.min),p=d(a.max);let f=null!=u?u:l,g=null!=p?p:c,m=null;if(null===a.midpoint?m=null:Number.isFinite(Number(a.midpoint))?m=Number(a.midpoint):f<0&&g>0&&(m=0),null!=m&&!1!==a.symmetric&&null==u&&null==p){const t=Math.max(Math.abs(f-m),Math.abs(g-m));f=m-t,g=m+t}g===f&&(f-=.5,g+=.5);const y=Array.isArray(a.stops)&&a.stops.length>=2,x=function(t,e,i,n,s,r){const a=t=>Vi(B.getThemeColor(t,r));if(s)return t.stops.filter(t=>t&&Number.isFinite(Number(t.value))).map(t=>({value:Number(t.value),color:a(t.color)})).sort((t,e)=>t.value-e.value);const o=(Array.isArray(t.colors)&&t.colors.length>=2?t.colors:qi).map(a),l=o.length;if(null!=n&&l>=3){const t=Math.floor((l-1)/2),s=[];for(let i=0;i<=t;i++)s.push({value:Xi(e,n,i/t),color:o[i]});for(let e=t+1;e<l;e++)s.push({value:Xi(n,i,(e-t)/(l-1-t)),color:o[e]});return s}return o.map((t,n)=>({value:Xi(e,i,n/(l-1)),color:t}))}(a,f,g,m,y,null==(s=t.dom)?void 0:s.elWrap);if(x.length<2)return null;y&&(null==u&&(f=Math.min(f,x[0].value)),null==p&&(g=Math.max(g,x[x.length-1].value)));const _=t=>{if(!Number.isFinite(t))return x[Math.floor(x.length/2)].color;if(t<=x[0].value)return x[0].color;const e=x[x.length-1];if(t>=e.value)return e.color;for(let e=1;e<x.length;e++){const i=x[e];if(t<=i.value){const n=x[e-1],s=i.value-n.value,r=0===s?0:(t-n.value)/s;return Ui(n.color,i.color,r)}}return e.color},b=g-f,v=x.map(t=>{const e=Math.min(g,Math.max(f,t.value));return{percent:b&&(e-f)/b,color:e===t.value?t.color:_(e)}});return{min:f,max:g,midpoint:m,stops:x,at:_,legendStops:v}}function Qi(t,e,i,n){const s=t.config.plotOptions[e],r=s.shadeIntensity,a=1.25*r;return t.globals.hasNegs||n?s.reverseNegativeShade?(i<0?i:1-i)*a:i<=0?1-(1+i)*r:(1-i)*r:"treemap"===e?(1-i)*a:1-i}const tn=m.__apex_tooltip_Utils,en="http://www.w3.org/2000/svg";class nn{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._grad=null,this._bandHitEls=[],this._activeBandIndex=-1,this._targetEl=null,this.panelsW=null,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this._cfg();return"function"==typeof t.formatter?t.formatter:t=>{if(!Number.isFinite(t))return String(t);const e=Math.abs(t);return e>=1e3?t.toFixed(0):e>=10?t.toFixed(1):t.toFixed(2)}}static colorScaleOf(t){var e,i,n,s,r;const a=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return a&&(null==(r=null==(s=null==(n=null==t?void 0:t.config)?void 0:n.plotOptions)?void 0:s[a])?void 0:r.colorScale)||null}static configFor(t){const e=nn.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return nn.configFor(this.w)||{}}static isEnabled(t){if(!nn.supports(t))return!1;const e=nn.configFor(t);return!(!e||!e.enabled)}static supports(t){var e,i;const n=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return"heatmap"===n||"treemap"===n}draw(t=null){var e,i,n,s,r,a,o,l;const c=this.w;this._targetEl=t;const h=t||c.dom.elLegendWrap;if(!h)return;const d=this._cfg(),u=c.config.legend.position,p="left"===u||"right"===u,f=null!=(i=null==(e=d.arrow)?void 0:e.size)?i:8,g=f+4,m=d.showLabels?28:4,y=d.showLabels?20:4,x=d.showLabels?44:0,_=this._resolveStripLength(p?d.height:d.width,p),b=d.thickness,v=p?Math.max(b+g+4,x):_+2*m,w=p?_+2*y:b+g+4,A=(v-(b+g))/2,k=p?"left"===u?A:A+g:m,L=p?y:"top"===u?g:4,S=M.createElementNS(en,"svg");S.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),S.setAttribute("width",String(v)),S.setAttribute("height",String(w)),S.setAttribute("overflow","visible");const C=M.createElementNS(en,"defs"),E=`apexcharts-heatmap-gradient-${c.globals.cuid}`,F=M.createElementNS(en,"linearGradient");F.setAttribute("id",E),p?(F.setAttribute("x1","0"),F.setAttribute("y1","1"),F.setAttribute("x2","0"),F.setAttribute("y2","0")):(F.setAttribute("x1","0"),F.setAttribute("y1","0"),F.setAttribute("x2","1"),F.setAttribute("y2","0")),this._grad=F;const{min:P,max:D,bands:R}=this._paintStops();C.appendChild(F),S.appendChild(C);const T=M.createElementNS(en,"rect");if(T.setAttribute("x",String(k)),T.setAttribute("y",String(L)),T.setAttribute("width",String(p?b:_)),T.setAttribute("height",String(p?_:b)),T.setAttribute("rx","2"),T.setAttribute("fill",`url(#${E})`),S.appendChild(T),d.showLabels){const t=(null==(n=d.labelStyle)?void 0:n.colors)||(Array.isArray(c.config.legend.labels.colors)?c.config.legend.labels.colors[0]:c.config.legend.labels.colors)||c.config.chart.foreColor,e=(null==(s=d.labelStyle)?void 0:s.fontSize)||"11px",i=(null==(r=d.labelStyle)?void 0:r.fontFamily)||c.config.chart.fontFamily,a=this._getFormatter(),o=(n,s,r,a)=>{const o=M.createElementNS(en,"text");return o.setAttribute("x",String(s)),o.setAttribute("y",String(r)),o.setAttribute("text-anchor",a),o.setAttribute("dominant-baseline","middle"),o.setAttribute("fill",t),o.setAttribute("font-size",e),i&&o.setAttribute("font-family",i),o.textContent=String(n),o};if(p){const t=k+b/2;S.appendChild(o(a(P),t,L+_+10,"middle")),S.appendChild(o(a(D),t,L-10,"middle"))}else{const t=L+b/2;S.appendChild(o(a(P),k-6,t,"end")),S.appendChild(o(a(D),k+_+6,t,"start"))}}const N=(null==(a=d.arrow)?void 0:a.color)||c.config.chart.foreColor,O=this._buildArrow(N);if(S.appendChild(O),this.arrowEl=O,this._bandHitEls=[],c.config.legend.onItemHover.highlightDataSeries&&R.length>0&&R.forEach(t=>{const e=M.createElementNS(en,"rect");if(p){const i=L+_-t.p2*_,n=L+_-t.p1*_;e.setAttribute("x",String(k)),e.setAttribute("y",String(i)),e.setAttribute("width",String(b)),e.setAttribute("height",String(Math.max(0,n-i)))}else e.setAttribute("x",String(k+t.p1*_)),e.setAttribute("y",String(L)),e.setAttribute("width",String(Math.max(0,(t.p2-t.p1)*_))),e.setAttribute("height",String(b));e.setAttribute("fill","transparent"),e.setAttribute("class","apexcharts-heatmap-gradient-band"),e.setAttribute("data:range-index",String(t.index)),e.style.cursor="pointer",S.appendChild(e),this._bandHitEls.push(e)}),this._geom={isVertical:p,position:u,stripX:k,stripY:L,stripLength:_,stripThickness:b,arrowSize:f,svgWidth:v,svgHeight:w},d.showHoverValue){const t=M.createElement("div");t.classList.add("apexcharts-heatmap-gradient-legend-value"),t.style.position="absolute",t.style.fontSize=(null==(o=d.labelStyle)?void 0:o.fontSize)||"11px",t.style.fontFamily=(null==(l=d.labelStyle)?void 0:l.fontFamily)||c.config.chart.fontFamily||"",t.style.background="rgba(0,0,0,0.65)",t.style.color="#fff",t.style.padding="2px 6px",t.style.borderRadius="3px",t.style.pointerEvents="none",t.style.whiteSpace="nowrap",t.style.opacity="0",t.style.transition="opacity 120ms ease",this.hoverValueEl=t}h.classList.add("apexcharts-heatmap-gradient-legend-wrap"),h.classList.add("apx-legend-position-"+u),h.appendChild(S),this.hoverValueEl&&h.appendChild(this.hoverValueEl),this.svgEl=S,t?(h.style.width=v+"px",h.style.height=w+"px",h.style.position="relative",h.style.overflow="visible"):this._applyWrapAlignment(h,u,p,v,w),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const i=this.w,n=e?i.globals.svgHeight||i.config.chart.height||300:i.globals.svgWidth||i.config.chart.width||600;if("string"==typeof t){const e=t.trim();if(e.endsWith("%")){const t=parseFloat(e)||0;return Math.max(20,n*t/100)}const i=parseFloat(e);return Number.isFinite(i)?i:200}return"number"==typeof t&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,i,n,s){const r=this.w,a=this._cfg().align||"center",o=12,l=r.globals.svgWidth||r.config.chart.width||600,c=r.globals.svgHeight||r.config.chart.height||300,h=r.config.legend.offsetX||0,d=r.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=n+"px",t.style.height=s+"px",t.style.right="auto",t.style.bottom="auto",i){const i=c-s-24;let r;r="start"===a?o:"end"===a?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.top=r+d+"px",t.style.left="left"===e?o+h+"px":l-n-o+h+"px"}else{const i=l-n-24;let r;r="start"===a?o:"end"===a?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.left=r+h+"px",t.style.top="top"===e?o+d+"px":c-s-o+d+"px"}}repositionToPlot(){var t,e;if(this._grad&&this._paintStops(),!k.isBrowser())return;if(this._targetEl)return;const i=this.w,n=i.globals,s=i.dom.elLegendWrap;if(!s||!this._geom)return;if(!Number.isFinite(n.gridWidth)||!Number.isFinite(n.gridHeight))return;const{isVertical:r,position:a,svgWidth:o,svgHeight:l,stripX:c,stripY:h,stripThickness:d}=this._geom,u=this._cfg().align||"center",p=i.config.legend.offsetX||0,f=i.config.legend.offsetY||0,g=null==(e=null==(t=this.ctx)?void 0:t.dimensions)?void 0:e.dimHelpers,m=g?g.getTitleSubtitleCoords("title").height+g.getTitleSubtitleCoords("subtitle").height:0,y=i.layout.xAxisHeight||0,x=(t,e)=>{const i=Math.max(0,t-e);return"start"===u?0:"end"===u?i:i/2};if(r){s.style.top=n.translateY+x(n.gridHeight,l)+f+"px";const t=(("left"===a?0:n.translateX+n.gridWidth)+("left"===a?n.translateX:n.svgWidth))/2;s.style.left=t-c-d/2+p+"px"}else{s.style.left=n.translateX+x(n.gridWidth,o)+p+"px";const t=(("top"===a?m:n.translateY+n.gridHeight+y)+("top"===a?n.translateY:n.svgHeight))/2;s.style.top=t-h-d/2+f+"px"}M.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,i=this.svgEl&&this.svgEl.querySelector("rect");if(!e||!i||!this._geom)return;if(!t.dom.baseEl||!t.dom.baseEl.querySelector(".apexcharts-svg"))return;const n=i.getBoundingClientRect(),s=tn.plotRect(t);if(!(n.width&&n.height&&s.width&&s.height))return;const r=s.left,a=s.left+s.width,o=s.top,l=s.top+s.height,c=s.zoom,{isVertical:h,position:d}=this._geom;if(h){const t=("left"===d?r-n.right:n.left-a)/c;if(t<16){const i=parseFloat(e.style.left)||0,n=16-t;e.style.left=i+("left"===d?-n:n)+"px"}}else{const t=("top"===d?o-n.bottom:n.top-l)/c;if(t<16){const i=parseFloat(e.style.top)||0,n=16-t;e.style.top=i+("top"===d?-n:n)+"px"}}}destroy(){var t,e,i,n,s,r,a;for(let i=0;i<this._bandHitEls.length;i++){const n=this._bandHitEls[i];null==(t=n.removeEventListener)||t.call(n,"mousemove",this._onBandEnter),null==(e=n.removeEventListener)||e.call(n,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,null==(i=this.ctx)?void 0:i.events)try{null==(s=(n=this.ctx.events).removeEventListener)||s.call(n,"dataPointMouseEnter",this._onCellEnter),null==(a=(r=this.ctx.events).removeEventListener)||a.call(r,"dataPointMouseLeave",this._onCellLeave)}catch(t){}}_attachBandHoverListeners(){if(k.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,i,n,s;const r=this.w,a=t.currentTarget,o=parseInt(null!=(e=a.getAttribute("data:range-index"))?e:"-1",10);o<0||o===this._activeBandIndex||(this._activeBandIndex=o,null==(s=null==(n=null==(i=this.ctx)?void 0:i.events)?void 0:n.fireEvent)||s.call(n,"legendHover",[this.ctx,o,r]),this._highlightRange(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,this._highlightRange(t,"reset")}_highlightRange(t,e){var i;((null==(i=this.panelsW)?void 0:i.call(this))||[this.w]).forEach(i=>new v(i).highlightRangeInSeries(t,e))}_attachHoverListeners(){var t,e;k.isBrowser()&&(null==(e=null==(t=this.ctx)?void 0:t.events)?void 0:e.addEventListener)&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,i,n;if(!this.arrowEl)return;const s=t[t.length-1];if(!s||"object"!=typeof s)return;const r=s.w||this.w,a=s.seriesIndex,o=s.dataPointIndex;if("number"!=typeof a||"number"!=typeof o)return;if(!nn.supports(r))return;let l;l=this._continuous?function(t,e,i){const n=t.config.series[e];return Zi(t,n&&Array.isArray(n.data)?n.data[i]:null,e,i)}(r,a,o):null==(n=null==(i=null==(e=r.seriesData)?void 0:e.series)?void 0:i[a])?void 0:n[o],null==l||Number.isNaN(l)||this._positionArrow(l)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:i,stripX:n,stripY:s,stripLength:r,stripThickness:a,arrowSize:o}=this._geom,l=this._min,c=this._max-l;let h;if(h=0===c?.5:(t-l)/c,h<0&&(h=0),h>1&&(h=1),e){const t=s+r-h*r;let e,l;"left"===i?(e=n+a,l=e+o):(e=n,l=e-o);const c=[`${e},${t}`,`${l},${t-o/2}`,`${l},${t+o/2}`].join(" ");this.arrowEl.setAttribute("points",c)}else{const t=n+h*r;let e,l;"top"===i?(e=s+a,l=e+o):(e=s,l=e-o);const c=[`${t},${e}`,`${t-o/2},${l}`,`${t+o/2},${l}`].join(" ");this.arrowEl.setAttribute("points",c)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const l=this._getFormatter();if(this.hoverValueEl.textContent=l(t),e){const t=s+r-h*r;"left"===i?this.hoverValueEl.style.left=`${n+a+o+8}px`:(this.hoverValueEl.style.left=n-o-8+"px",this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=t-9+"px"}else{const t=n+h*r;this.hoverValueEl.style.left=`${t}px`,this.hoverValueEl.style.transform="translateX(-50%)",this.hoverValueEl.style.top="top"===i?`${s+a+o+8}px`:s-o-18+"px"}this.hoverValueEl.style.opacity="1"}}_buildArrow(t){const e=M.createElementNS(en,"polygon");return e.setAttribute("fill",t),e.setAttribute("opacity","0"),e.setAttribute("class","apexcharts-heatmap-gradient-arrow"),e.setAttribute("points","0,0 0,0 0,0"),e.setAttribute("pointer-events","none"),e}_paintStops(){const t=this._computeStops(),e=this._grad;return this._min=t.min,this._max=t.max,e.innerHTML="",t.stops.forEach(t=>{const i=M.createElementNS(en,"stop");i.setAttribute("offset",`${(100*t.percent).toFixed(2)}%`),i.setAttribute("stop-color",t.color),e.appendChild(i)}),t}_computeStops(){var t;const e=this.w,i=nn.colorScaleOf(e)||{},n=this._cfg(),s=Ji(e);if(s)return this._continuous=!0,{min:s.min,max:s.max,stops:s.legendStops,bands:[]};this._continuous=!1;let r=1/0,a=-1/0;const o=(null==(t=e.seriesData)?void 0:t.series)||[];for(let t=0;t<o.length;t++){const e=o[t];if(e)for(let t=0;t<e.length;t++){const i=e[t];null==i||Number.isNaN(i)||(i<r&&(r=i),i>a&&(a=i))}}Number.isFinite(r)||(r=0),Number.isFinite(a)||(a=0);let h=r,d=a;const u=void 0!==i.min&&void 0!==i.max&&i.max>i.min;u?(h=i.min,d=i.max):(void 0!==i.min&&(h=i.min<r?i.min:r),void 0!==i.max&&(d=i.max>a?i.max:a));const p=[],f=[];if(i.ranges&&i.ranges.length>0){const t=i.ranges.map((t,e)=>c(l({},t),{_originalIndex:e})).sort((t,e)=>t.from-e.from),e=t[0].from,n=t[t.length-1].to;h=e,d=n;const s=n-e||1;t.forEach(t=>{const i=(t.from-e)/s,n=(t.to-e)/s;p.push({percent:(i+n)/2,color:t.color}),f.push({index:t._originalIndex,p1:i,p2:n})})}else{const t=e.globals.colors[0]||"#008FFB",s=new B,r=e.config.chart.type,a=e.config.plotOptions[r]||{},o=e.globals,l="heatmap"===r&&!a.distributed&&!u&&o.maxY>=o.minY,c=l?o.maxY:d,f=Math.abs(c)+Math.abs(l?i.min<o.minY?i.min:o.minY:h),g=Math.max(2,n.stops||16);for(let i=0;i<g;i++){const n=i/(g-1),o=0===f?0:Math.min(h+n*(d-h),c)/f,l=Math.max(-1,Math.min(1,Qi(e,r,o,!1))),u=a.enableShades?s.shadeColor("dark"===e.config.theme.mode?-l:l,t):t;p.push({percent:n,color:u})}}return{min:h,max:d,stops:p,bands:f}}}const sn={zoom:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="10.5" cy="10.5" r="6"/><path d="M15 15l5 5"/><path d="M8 10.5h5M10.5 8v5"/></svg>',pan:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 3v18M3 12h18"/><path d="M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3"/></svg>',reset:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M4 10a8 8 0 1 1 2 6"/><path d="M4 4v6h6"/></svg>',download:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 4v11"/><path d="M7 11l5 5 5-5"/><path d="M4 20h16"/></svg>'};function rn(t,e,i,n){var s;const r=t.sync.isHidden(i),a=t.scales?t.scales.colorOf(i):"#008FFB";e.firstChild.style.background=a;const o=e.querySelector(".apexcharts-legend-text");if(o){const e=(null==(s=t.w.config.legend)?void 0:s.labels)||{},i=e.useSeriesColors?a:Array.isArray(e.colors)?e.colors[n]:e.colors;o.style.color=i||""}e.classList.toggle("apexcharts-inactive-legend",r),e.setAttribute("data:collapsed",String(r))}class an{constructor(t){this.trellis=t,this.elLegend=null,this.elToolbar=null,this.elTitle=null,this.elSubtitle=null,this.elBreadcrumb=null,this.gradientLegend=null,this._gradPending=null,this._gradWire=null}buildHeader(t,e,i){const n=this.trellis,s=n.cfg.header||{};if(!1===s.show)return;const r=M.createElement("div");r.className="apexcharts-trellis-header";let a=e;"function"==typeof s.formatter&&(a=s.formatter(e,{dimension:"string"==typeof n.cfg.by?n.cfg.by:void 0,index:i.index,count:i.count})),r.textContent=null==a?"":String(a);const o=s.style||{};if(o.fontSize&&(r.style.fontSize=o.fontSize),o.fontWeight&&(r.style.fontWeight=String(o.fontWeight)),o.color&&(r.style.color=o.color),!1!==n.cfg.promote){r.classList.add("apexcharts-trellis-header-clickable"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("title","Expand this panel");const t=()=>{n._promotedKey===e?n.restorePromotion():n.promote(e)};r.addEventListener("click",t),r.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())})}t.appendChild(r)}stripEl(t,e,i){const n=this.trellis.cfg.header||{},s=M.createElement("div");s.className=`apexcharts-trellis-strip apexcharts-trellis-strip-${t}`;let r=e;"function"==typeof n.formatter&&(r=n.formatter(e,{dimension:t,index:i.index,count:i.count})),s.textContent=null==r?"":String(r);const a=n.style||{};return a.fontSize&&(s.style.fontSize=a.fontSize),a.fontWeight&&(s.style.fontWeight=String(a.fontWeight)),a.color&&(s.style.color=a.color),s}buildBreadcrumb(t,e,i){this.removeBreadcrumb();const n=M.createElement("div");n.className="apexcharts-trellis-breadcrumb";const s=M.createElement("button");s.setAttribute("type","button"),s.className="apexcharts-trellis-breadcrumb-back",s.textContent="All panels",s.addEventListener("click",i);const r=M.createElement("span");r.className="apexcharts-trellis-breadcrumb-sep",r.textContent="/";const a=M.createElement("span");a.className="apexcharts-trellis-breadcrumb-current",a.textContent=e,n.appendChild(s),n.appendChild(r),n.appendChild(a),t.appendChild(n),this.elBreadcrumb=n}removeBreadcrumb(){this.elBreadcrumb&&this.elBreadcrumb.parentNode&&this.elBreadcrumb.parentNode.removeChild(this.elBreadcrumb),this.elBreadcrumb=null}buildTitle(t){const e=this.trellis.w.config,i=i=>{var n,s,r;const a=e[i];if(!a||!a.text)return null;const o=M.createElement("div");o.className="apexcharts-trellis-"+i,o.textContent=a.text;const{fontSize:l,fontWeight:c,fontFamily:h,color:d}=a.style||{},u=o.style;l&&(u.fontSize=l);const p="title"===i?null==(r=null==(s=null==(n=this.trellis.ctx.opts)?void 0:n.title)?void 0:s.style)?void 0:r.fontWeight:c;return p&&(u.fontWeight=String(p)),h&&(u.fontFamily=h),(d||"title"!==i)&&(u.color=d||"var(--apx-fore, var(--apx-trellis-fore, #373d3f))"),"title"!==i&&(u.padding="0 0 6px"),a.align&&"left"!==a.align&&(u.textAlign=a.align),t.appendChild(o),o};this.elTitle=i("title"),this.elSubtitle=i("subtitle")}buildLegend(t){const e=this.trellis;if(this._names=null,"shared"!==(e.cfg.legend||"shared"))return;if("heatmap"===e.w.config.chart.type)return void this.buildGradientLegend(t);const i=e.split?e.split.seriesNames:[];if(i.length<2)return;const n=M.createElement("div");n.className="apexcharts-trellis-legend apexcharts-legend",n.setAttribute("role","list");const s=e.w.config.legend.fontFamily;s&&(n.style.fontFamily=s),i.forEach((t,i)=>{const s=M.createElement("div");s.className="apexcharts-legend-series apexcharts-trellis-legend-item",s.setAttribute("role","listitem"),s.setAttribute("tabindex","0");const r=M.createElement("span");r.className="apexcharts-legend-marker";const a=M.createElement("span");a.className="apexcharts-legend-text",a.textContent=t,s.appendChild(r),s.appendChild(a),rn(e,s,t,i);const o=()=>{e.sync.toggleSeries(t),rn(e,s,t,i)};s.addEventListener("click",o),s.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),o())}),n.appendChild(s)}),t.appendChild(n),this.elLegend=n,this._names=JSON.stringify(i)}rebuildLegend(){const t=this.trellis,e=this.elLegend,i=t.split?t.split.seriesNames:[];if(e&&this._names===JSON.stringify(i))return void i.forEach((i,n)=>rn(t,e.children[n],i,n));this.destroyGradientLegend(),this.elLegend=null,t.elWrap&&this.buildLegend(t.elWrap);const n=this.elLegend;e&&(n?e.replaceWith(n):e.remove())}buildGradientLegend(t){const e=this.trellis,i=e.panels.find(t=>t.chart);if(!i){if(this._gradPending)return;const i=()=>{var n,s;this._gradPending=null,null==(s=(n=e.ctx.events).removeEventListener)||s.call(n,"panelMounted",i),this.buildGradientLegend(t)};return this._gradPending=i,void e.ctx.events.addEventListener("panelMounted",i)}const n=M.createElement("div");n.className="apexcharts-trellis-legend apexcharts-trellis-gradient-legend",t.appendChild(n),this.elLegend=n;const s=i.chart,r=new nn(s.w,s.ctx);r.draw(n),this.gradientLegend=r,r.panelsW=()=>e.panels.filter(t=>t.chart).map(t=>t.chart.w);const a=(t,e)=>{var i;const n=e.chart!==s&&(null==(i=e.chart)?void 0:i.ctx.events);n&&(n.addEventListener("dataPointMouseEnter",r._onCellEnter),n.addEventListener("dataPointMouseLeave",r._onCellLeave))};e.panels.forEach(t=>a(0,t)),e.ctx.events.addEventListener("panelMounted",a),this._gradWire=a}destroyGradientLegend(){var t,e;const i=this.trellis;this._gradPending&&(null==(e=(t=i.ctx.events).removeEventListener)||e.call(t,"panelMounted",this._gradPending),this._gradPending=null),i.ctx.events.removeEventListener("panelMounted",this._gradWire),this._gradWire=null;const n=this.gradientLegend;if(n){i.panels.forEach(t=>{var e;const i=null==(e=t.chart)?void 0:e.ctx.events;null==i||i.removeEventListener("dataPointMouseEnter",n._onCellEnter),null==i||i.removeEventListener("dataPointMouseLeave",n._onCellLeave)});try{n.destroy()}catch(t){}this.gradientLegend=null}}buildToolbar(t){var e,i,n;const s=this.trellis;if("shared"!==(s.cfg.toolbar||"shared"))return;const r=M.createElement("div");r.className="apexcharts-trellis-toolbar";const a={},o=t=>{s._tool=t,s.panels.forEach(e=>{if(!e.chart)return;const i=e.chart.w.interact;i.zoomEnabled="zoom"===t&&e.chart.w.config.chart.zoom.enabled,i.panEnabled="pan"===t,i.selectionEnabled=!1}),a.zoom.classList.toggle("apexcharts-selected","zoom"===t),a.pan.classList.toggle("apexcharts-selected","pan"===t),a.zoom.setAttribute("aria-pressed",String("zoom"===t)),a.pan.setAttribute("aria-pressed",String("pan"===t))},l=(t,e,i)=>{const n=M.createElement("button");return n.className=`apexcharts-trellis-tool apexcharts-trellis-tool-${t}`,n.setAttribute("type","button"),n.setAttribute("aria-label",e),n.setAttribute("title",e),n.innerHTML=sn[t],n.addEventListener("click",i),a[t]=n,r.appendChild(n),n},c="none"!==s.cfg.zoom&&!1!==(null==(n=null==(i=null==(e=s.ctx.opts)?void 0:e.chart)?void 0:i.zoom)?void 0:n.enabled);if(c&&(l("zoom","Selection zoom",()=>o("zoom")),l("pan","Pan",()=>o("pan")),l("reset","Reset zoom",()=>{s.sync.resetAll()})),s.ctx.exports){const t=M.createElement("div");t.className="apexcharts-trellis-menu",[["png","Download PNG"],["svg","Download SVG"],["csv","Download CSV"]].forEach(([e,i])=>{const n=M.createElement("button");n.setAttribute("type","button"),n.className="apexcharts-trellis-menu-item",n.textContent=i,n.addEventListener("click",()=>{t.classList.remove("apexcharts-trellis-menu-open"),s.exports.download(e)}),t.appendChild(n)}),l("download","Download",()=>{t.classList.toggle("apexcharts-trellis-menu-open")}),r.appendChild(t)}r.firstChild&&(c&&(a.zoom.classList.add("apexcharts-selected"),a.zoom.setAttribute("aria-pressed","true"),a.pan.setAttribute("aria-pressed","false")),t.appendChild(r),this.elToolbar=r,t.classList.add("apexcharts-trellis-has-toolbar"))}}function on(t,e){const i=B.clone(t.w.config.yaxis);return(Array.isArray(i)?i:[i]).map(t=>B.extend(t,e))}class ln{constructor(t){this.trellis=t,this._syncing=!1,this._hidden=new Set,this.currentWindow=null}_noteWindow(t,e){const i=t&&t.xaxis;i&&null!=i.min&&null!=i.max?this.currentWindow={x:{min:i.min,max:i.max},y:this.currentWindow&&this.currentWindow.y||null,zoomed:e||!(!this.currentWindow||!this.currentWindow.zoomed)}:e&&(this.currentWindow=null)}makeZoomedHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!0),this.onZoomed(i)}}makeScrolledHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!1)}}onZoomed(t){const e=this.trellis;if(this._syncing)return;const i=e.cfg;if(!i||"shared"!==(i.scales.y||"shared"))return;if(!e.autoScaleYaxis)return;const n=t&&t.xaxis;if(!n||null==n.min||null==n.max)return;if(!e.split||!e.split.xIsNumeric)return;const s=function(t,e,i,n,s=!1){const r={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach((e,a)=>{if(null===e||"object"!=typeof e)return;const o=Number(Qe(Array.isArray(e)?e[0]:e.x,!0));if(!isFinite(o)||o<i||o>n)return;Ii(e,r);const l=s?zi(t,e,a):null;null!==l&&Ii(l,r)})})),isFinite(r.min)&&isFinite(r.max)?r:null}(e.split.panels,e.split.xForm,n.min,n.max,e._stackingHost().parts);if(!s)return;const r=Oi(s.min,s.max,i.targetTicks||3);this.currentWindow&&(this.currentWindow.y={min:r.min,max:r.max,tickAmount:r.tickAmount}),this._syncing=!0;const a=e.panels.map(t=>t.chart?t.chart.updateOptions({yaxis:on(t.chart,{min:r.min,max:r.max,tickAmount:r.tickAmount})},!1,!1,!1).catch(()=>{}):Promise.resolve());Promise.all(a).finally(()=>{this._syncing=!1})}resetAll(){const t=this.trellis;this.currentWindow=null;const e=t.scales&&t.scales.x?{min:t.scales.x.min,max:t.scales.x.max}:{min:void 0,max:void 0};this._syncing=!0;const i=t.panels.map(i=>{if(!i.chart)return Promise.resolve();i.chart.w.interact.zoomed=!1;const n={xaxis:e},s=t.split?t._yBoundsFor(t.split.panels[i.index]):null;return s&&(n.yaxis=on(i.chart,{min:s.min,max:s.max,tickAmount:s.tickAmount})),i.chart.updateOptions(n,!1,!1,!1).catch(()=>{})});return Promise.all(i).finally(()=>{this._syncing=!1})}toggleSeries(t){const e=!this._hidden.has(t);return e?this._hidden.add(t):this._hidden.delete(t),this.trellis.panels.forEach(i=>{const n=i.chart;if(!n)return;if(-1!==(n.w.seriesData.seriesNames||[]).indexOf(t))try{e?n.hideSeries(t):n.showSeries(t)}catch(t){}}),e}isHidden(t){return this._hidden.has(t)}prune(t){this._hidden.forEach(e=>{t.includes(e)||this._hidden.delete(e)})}applyHiddenTo(t){if(!this._hidden.size||!t)return;const e=t.w.seriesData&&t.w.seriesData.seriesNames||[];this._hidden.forEach(i=>{if(-1!==e.indexOf(i))try{t.hideSeries(i)}catch(t){}})}wireCrosshairs(t){let e=0,i=null;const n=new WeakMap,s=t=>{let e=n.get(t);return e&&t.contains(e)||n.set(t,e=t.querySelector(".apexcharts-xcrosshairs")),e},r=["x","x1","x2"],a=()=>{const t=i&&i.closest?i.closest(".apexcharts-trellis-cell"):null,e=t?s(t):null,n=e&&e.classList.contains("apexcharts-active")&&r.map(t=>e.getAttribute(t)||"0");this.trellis.panels.forEach(e=>{if(!e.cellEl||e.cellEl===t)return;const i=s(e.cellEl);i&&(n&&r.forEach((t,e)=>{i.getAttribute(t)!==n[e]&&i.setAttribute(t,n[e])}),i.classList.toggle("apexcharts-active",!!n))})},o=()=>{if(t!==this.trellis.elGrid)return e=0;a(),e=i?requestAnimationFrame(o):0};t.addEventListener("mousemove",t=>{i=t.target,e||(e=requestAnimationFrame(o))},{passive:!0}),t.addEventListener("mouseleave",()=>{i=null,e&&(cancelAnimationFrame(e),e=0),this.trellis.panels.forEach(t=>{const e=t.cellEl&&s(t.cellEl);e&&e.classList.remove("apexcharts-active")})},{passive:!0})}}function cn(t,e){const i=null!=t,n=null!=e;return i||n?{min:i?t:null,max:n?e:null}:null}function hn(t){return Array.isArray(t)?t.map(t=>Array.isArray(t)?t.slice():t):[]}function dn(t,e){return"function"==typeof t&&e?t===e.addXaxisAnnotation?"xaxis":t===e.addYaxisAnnotation?"yaxis":t===e.addPointAnnotation?"point":null:null}function un(t,e){const i=t.config.annotations?B.clone(t.config.annotations):null,n=[],s=t.globals.memory&&t.globals.memory.methodsToExec||[];for(const t of s){if(!t||"addAnnotation"!==t.label)continue;const i=dn(t.method,e);i&&n.push({kind:i,params:B.clone(t.params)})}return{static:i,dynamic:n}}function pn(t){const e=t&&t.measure;if(!e||"function"!=typeof e.getPins)return null;const i=e.getPins();return Array.isArray(i)&&i.length?{pins:i}:null}function fn(t,e){var i,n;const s=t.config.xaxis||{},r=(Array.isArray(t.config.yaxis)?t.config.yaxis:t.config.yaxis?[t.config.yaxis]:[]).map(t=>cn(t&&t.min,t&&t.max)),a=r.some(t=>null!==t),o=t.config.theme,l=e&&e.drilldown;return{v:1,window:{xaxis:cn(s.min,s.max),yaxis:a?r:null},zoomed:!!t.interact.zoomed,collapsed:(t.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(t.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:hn(t.interact.selectedDataPoints),theme:o?{mode:null!=(i=o.mode)?i:null,palette:null!=(n=o.palette)?n:null}:null,locale:t.config.chart&&t.config.chart.defaultLocale||null,annotations:un(t,e),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:pn(e)}}function gn(t,e){if(!t||!e)return;const i=t.w;i.interact.zoomed=!!e.zoomed,function(t,e,i){const n=t.w;if(null==e&&null==i)return;const s=n.globals.seriesNames||[],r=new Set([...e||[],...i||[]]),a=new Set([...n.globals.collapsedSeriesIndices||[],...n.globals.ancillaryCollapsedSeriesIndices||[]]);for(let e=0;e<s.length;e++){const i=s[e];if(null==i)continue;const n=r.has(e),o=a.has(e);n&&!o?t.hideSeries(i):!n&&o&&t.showSeries(i)}}(t,e.collapsed,e.ancillaryCollapsed),e.annotations&&Array.isArray(e.annotations.dynamic)&&e.annotations.dynamic.forEach(e=>{const i=function(t){switch(t){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(e.kind);i&&"function"==typeof t[i]&&t[i](e.params,!0)}),function(t,e){Array.isArray(e)&&(t.w.interact.selectedDataPoints=hn(e))}(t,e.selectedDataPoints),e.locale&&e.locale!==i.config.chart.defaultLocale&&t.setLocale(e.locale),t.measure&&"function"==typeof t.measure.setPins&&t.measure.setPins(e.measure&&e.measure.pins||[])}class mn{constructor(t){this.trellis=t,this.active=!1,this._io=null,this._byCell=new Map,this._dirty=new Set,this._raf=null,this._draining=!1,this._gutterFloor=0}static supported(){return"undefined"!=typeof IntersectionObserver}_rootMargin(){const t=this.trellis.layout,e=t?Math.max(0,Math.round(t.panelH+t.headerH+t.gap)):300;return`${e}px 0px ${e}px 0px`}start(){mn.supported()&&(this.active=!0,this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this.trellis.panels.forEach(t=>{var e;t.wantMounted=!1,t.cellEl&&(this._byCell.set(t.cellEl,t),null==(e=this._io)||e.observe(t.cellEl))}))}refresh(){this.active&&this._io&&(this._io.disconnect(),this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this._byCell.forEach((t,e)=>{var i;return null==(i=this._io)?void 0:i.observe(e)}))}_onEntries(t){if(this.active){for(const e of t){const t=this._byCell.get(e.target);t&&(t.wantMounted=e.isIntersecting,this._dirty.add(t))}this._schedule()}}_schedule(){var t;this._raf||this._draining||!this.active||(this._raf=(t=()=>{this._raf=null,this._drain()},"function"==typeof requestAnimationFrame?{kind:"raf",id:requestAnimationFrame(t)}:{kind:"timeout",id:setTimeout(()=>t(0),16)}))}_drain(){return d(this,null,function*(){if(!this._draining&&this.active){this._draining=!0;try{let t=0,e=0;for(;this.active&&this._dirty.size&&t<2&&e<6;){const i=this._dirty.values().next().value;this._dirty.delete(i);const n=!!i.wantMounted;n!==!!i.chart&&(e++,n?(t++,yield this._mount(i)):this._unmount(i))}}finally{this._draining=!1,this.active&&this._dirty.size?this._schedule():this.active&&(this.trellis.w.globals.animationEnded=!0)}}})}_liveWindow(t){const e=this.trellis.panels.find(e=>e!==t&&e.chart);if(!e||!e.chart)return null;const i=e.chart.w,n=i.config.xaxis||{},s=Array.isArray(i.config.yaxis)?i.config.yaxis[0]:i.config.yaxis;return{zoomed:!!i.interact.zoomed,x:null!=n.min||null!=n.max?{min:n.min,max:n.max}:null,y:!s||null==s.min&&null==s.max?null:{min:s.min,max:s.max,tickAmount:s.tickAmount}}}_patchYaxis(t,e){const i=Array.isArray(t.yaxis)?t.yaxis:t.yaxis?[t.yaxis]:[{}];i.forEach(t=>{Object.keys(e).forEach(i=>{"labels"===i?t.labels=l(l({},t.labels||{}),e.labels):t[i]=e[i]})}),t.yaxis=i}_mount(t){return d(this,null,function*(){var e,i,n,s,r,a,o,h;const d=this.trellis;if(!t.el||t.chart||t.noMount)return;const u=t.viewStash,p="shared"===d._yMode(),f=!p,g=d._assemblePanelOptions(t.index,{noAnimation:!!u}),m=u&&u.window;m&&m.xaxis&&(g.xaxis=c(l({},g.xaxis||{}),{min:null!=(e=m.xaxis.min)?e:void 0,max:null!=(i=m.xaxis.max)?i:void 0})),f&&m&&Array.isArray(m.yaxis)&&m.yaxis[0]&&this._patchYaxis(g,{min:null!=(n=m.yaxis[0].min)?n:void 0,max:null!=(s=m.yaxis[0].max)?s:void 0});const y=this._liveWindow(t);y&&y.x&&(g.xaxis=c(l({},g.xaxis||{}),{min:y.x.min,max:y.x.max})),y&&y.y&&p&&this._patchYaxis(g,l({min:y.y.min,max:y.y.max},null!=y.y.tickAmount?{tickAmount:y.y.tickAmount}:{}));const x=d.sync.currentWindow;x&&x.x&&(g.xaxis=c(l({},g.xaxis||{}),{min:x.x.min,max:x.x.max})),x&&x.y&&p&&this._patchYaxis(g,l({min:x.y.min,max:x.y.max},null!=x.y.tickAmount?{tickAmount:x.y.tickAmount}:{})),f&&this._gutterFloor>0&&this._patchYaxis(g,{labels:{minWidth:this._gutterFloor}}),t.el.classList.remove("apexcharts-trellis-skeleton");const _=d._createPanelChart(t.el,g);t.chart=_;try{yield _.render()}catch(e){return t.chart=null,void t.el.classList.add("apexcharts-trellis-skeleton")}if(this.active){if(_.w.interact.zoomed=x?!!x.zoomed:y?y.zoomed:!(!u||!u.zoomed),d.sync.applyHiddenTo(_),u&&u.annotations&&Array.isArray(u.annotations.dynamic)){const t={xaxis:"addXaxisAnnotation",yaxis:"addYaxisAnnotation",point:"addPointAnnotation"},e=_;u.annotations.dynamic.forEach(i=>{const n=t[i.kind];n&&"function"==typeof e[n]&&e[n](i.params,!0)})}if(t.viewStash=null,f){const t=null==(h=null==(o=null==(a=null==(r=_.w)?void 0:r.globals)?void 0:a.yLabelsCoords)?void 0:o[0])?void 0:h.width;if("number"==typeof t&&isFinite(t)){const e=_.w.globals.isBarHorizontal?0:d._yLabelPad(),i=Math.max(0,t-e);i>this._gutterFloor+.5&&(this._gutterFloor=i,yield d._pushGutterFloor(this._gutterFloor))}}d._fire("panelMounted",{key:t.key,index:t.index,chart:_,remounted:!!u})}})}_unmount(t){if(t.chart){try{t.viewStash=fn(t.chart.w,t.chart)}catch(e){t.viewStash=null}try{t.chart.destroy()}catch(t){}if(t.chart=null,t.el){t.el.classList.add("apexcharts-trellis-skeleton");const e=this.trellis.layout;e&&(t.el.style.minHeight=`${e.panelH}px`)}}}stop(){var t;this.active=!1,this._io&&(this._io.disconnect(),this._io=null),this._byCell.clear(),this._dirty.clear(),(t=this._raf)&&("raf"===t.kind?cancelAnimationFrame(t.id):clearTimeout(t.id)),this._raf=null,this._gutterFloor=0}}Object.setPrototypeOf({funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin",column:"bar"},null);const yn=["bar","rangeBar","candlestick","boxPlot","violin"];class xn{constructor(t){this.trellis=t,this.el=null,this._raf=0,this._lastEvent=null,this._key=null,this._split=null,this._scales=null}wire(t,e){const i=M.createElement("div");i.className="apexcharts-trellis-tooltip apexcharts-theme-light",i.setAttribute("role","status"),e.appendChild(i),this.el=i;const n=()=>{this._update(e),this._raf=this._lastEvent?requestAnimationFrame(n):0};t.addEventListener("mousemove",t=>{this._lastEvent=t,this._raf||(this._raf=requestAnimationFrame(n))},{passive:!0}),t.addEventListener("mouseleave",()=>{this._lastEvent=null,this._key=null,this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),i.classList.remove("apexcharts-trellis-tooltip-active")},{passive:!0})}_hoverIndex(t,e,i){const n=t.w,s=n.globals,r=s.dataPoints;if(!r||r<1)return-1;const a=n.layout.gridWidth;if(!a)return-1;const o=tn.plotRect(n);this._zoom=o.zoom;const l=si.screenXToPlotPx(n,e,o),c=s.barPadForNumericAxis||0;if(l<-c||l>a+c)return-1;const h=n.dom&&n.dom.baseEl;if(h&&h.querySelector(".apexcharts-svg")&&o.height&&(i<o.top||i>o.top+o.height))return-1;let d;if(s.isBarHorizontal)d=Math.floor((i-o.top)/o.zoom/(n.layout.gridHeight/r));else if(n.axisFlags&&n.axisFlags.isXNumeric){const t=s.seriesX.find(t=>t.length)||[],e=si.pxToDataX(n,l);d=0;for(let i=1;i<t.length;i++)Math.abs(t[i]-e)<Math.abs(t[d]-e)&&(d=i)}else d=!yn.includes(n.config.chart.type)&&"between"!==n.config.xaxis.tickPlacement||n.config.xaxis.convertedCatToNumeric?Math.round(l/(a/Math.max(1,r-1))):Math.ceil(l/(a/r))-1;return Math.max(0,Math.min(r-1,d))}_valueAt(t,e,i,n){var s,r;const a=t.series.find(t=>t.name===e);if(!a||!Array.isArray(a.data))return null;const o=a.data[n];if(null==o)return null;let l=o;if(Array.isArray(o)?l=o[1]:"object"==typeof o&&(l=o.y),null==l)return null;const c=this.trellis.w.config,h=Array.isArray(null==(s=c.tooltip)?void 0:s.y)?c.tooltip.y[i]:null==(r=c.tooltip)?void 0:r.y,d=Array.isArray(c.yaxis)?c.yaxis[0]:c.yaxis,u=h&&"function"==typeof h.formatter&&h.formatter||d&&d.labels&&"function"==typeof d.labels.formatter&&d.labels.formatter||null,p=t=>{if(u)try{return String(u(t,{seriesIndex:i,dataPointIndex:n,w:null}))}catch(e){return String(t)}return String(t)};return Array.isArray(l)?l.map(p).join(" / "):p(l)}_update(t){const e=this.trellis,i=this.el,n=this._lastEvent,s=e.split;if(!i||!n||!s)return;const r=n!==this._e;this._e=n;const a=n.target&&n.target.closest?n.target.closest(".apexcharts-trellis-cell"):null,o=a?e.panels.find(t=>t.cellEl===a):void 0,l=o&&o.chart?this._hoverIndex(o.chart,n.clientX,n.clientY):-1;if(!o||-1===l)return i.classList.remove("apexcharts-trellis-tooltip-active"),void(this._key=null);let c=this._titleEl;c&&a.contains(c)||(c=this._titleEl=a.querySelector(".apexcharts-tooltip-title"));const h=c&&c.textContent||"",d=o.key+"\n"+l+"\n"+h;if(d!==this._key||s!==this._split||e.scales!==this._scales){this._key=d,this._split=s,this._scales=e.scales;let t=h?`<div class="apexcharts-tooltip-title">${_n(h)}</div>`:"";s.panels.forEach(i=>{let n="";s.seriesNames.forEach((t,s)=>{const r=this._valueAt(i,t,s,l);if(null===r)return;const a=e.scales?e.scales.colorOf(t):"#008FFB";n+=`<span class="apexcharts-trellis-tooltip-val"><span class="apexcharts-trellis-tooltip-marker" style="background:${bn(a)}"></span>${_n(r)}</span>`}),t+=`<div class="apexcharts-trellis-tooltip-row${i.key===o.key?" apexcharts-trellis-tooltip-row-active":""}" data-key="${bn(i.key)}"><span class="apexcharts-trellis-tooltip-key">${_n(i.key)}</span><span class="apexcharts-trellis-tooltip-vals">${n}</span></div>`}),i.innerHTML=t,i.classList.add("apexcharts-trellis-tooltip-active")}else if(!r)return;const u=t.getBoundingClientRect(),p=this._zoom||1;let f=(n.clientX-u.left)/p+14,g=(n.clientY-u.top)/p+14;const m=i.offsetWidth,y=i.offsetHeight,x=u.width/p,_=u.height/p;f+m>x-4&&(f=Math.max(4,f-m-28)),g+y>_-4&&(g=Math.max(4,g-y-28)),i.style.left=`${Math.round(f)}px`,i.style.top=`${Math.round(g)}px`}destroy(){this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),this._lastEvent=null,this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=null}}function _n(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function bn(t){return String(t).replace(/"/g,""")}class vn{constructor(t){this.trellis=t}supported(){return!!this.trellis.ctx.exports}_rectIn(t){const e=this.trellis.elWrap.getBoundingClientRect(),i=t.getBoundingClientRect();return{x:i.left-e.left,y:i.top-e.top,w:i.width,h:i.height}}_shown(){return this.trellis.panels.filter(t=>{var e;return!(null==(e=t.cellEl)?void 0:e.classList.contains("apexcharts-trellis-cell-parked"))})}_size(){const t=this.trellis.elWrap.getBoundingClientRect();return{w:Math.ceil(t.width),h:Math.ceil(t.height)}}_background(){const t=this.trellis.panels.find(t=>t.chart),e=t&&t.chart.exports;if(e&&"function"==typeof e.resolveExportBackground){const t=e.resolveExportBackground();if(t&&"transparent"!==t)return t}return"#fff"}_chromeTexts(){const t=this.trellis,e=[],i=(t,i)=>{if(!t||!t.textContent)return;const n=this._rectIn(t),s=getComputedStyle(t),r=t.style.textAlign||i;e.push({text:t.textContent,x:n.x+("left"===r?0:"right"===r?n.w:n.w/2),y:n.y+n.h/2,font:`${s.fontWeight} ${s.fontSize} ${s.fontFamily}`,fontSize:parseFloat(s.fontSize)||12,color:s.color||"#373d3f",align:r})};return i(t.chrome.elTitle,"left"),i(t.chrome.elSubtitle,"left"),this._shown().forEach(t=>{t.cellEl&&i(t.cellEl.querySelector(".apexcharts-trellis-header"),"center")}),t.chrome.elLegend&&t.chrome.elLegend.querySelectorAll(".apexcharts-legend-text").forEach(t=>i(t,"left")),e}_legendMarkers(){const t=this.trellis.chrome.elLegend;return t?Array.from(t.querySelectorAll(".apexcharts-legend-marker"),t=>({rect:this._rectIn(t),color:t.style.background||t.style.backgroundColor||"#008FFB"})):[]}dataURI(){return d(this,arguments,function*(t={}){const e=t.scale||1,i=this._size(),n=document.createElement("canvas");n.width=i.w*e,n.height=i.h*e;const s=n.getContext("2d");if(!s)return{imgURI:""};const r=s;r.scale(e,e),r.fillStyle=this._background(),r.fillRect(0,0,i.w,i.h);for(const t of this._shown()){if(!t.el)continue;const i=this._rectIn(t.el);if(!t.chart){r.fillStyle="rgba(120, 120, 120, 0.06)",r.fillRect(i.x,i.y,i.w,i.h);continue}const{imgURI:n}=yield t.chart.dataURI({scale:e});if(!n)continue;const s=yield wn(n);r.drawImage(s,i.x,i.y,i.w,i.h)}for(const t of this._chromeTexts())r.font=t.font,r.fillStyle=t.color,r.textAlign=t.align,r.textBaseline="middle",r.fillText(t.text,t.x,t.y);for(const t of this._legendMarkers())r.fillStyle=t.color,r.beginPath(),r.arc(t.rect.x+t.rect.w/2,t.rect.y+t.rect.h/2,Math.max(2,t.rect.w/2),0,2*Math.PI),r.fill();return{imgURI:n.toDataURL("image/png")}})}svgString(t=1){return d(this,null,function*(){const e=this._size(),i=[];i.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${e.w*t}" height="${e.h*t}" viewBox="0 0 ${e.w} ${e.h}">`),i.push(`<rect width="${e.w}" height="${e.h}" fill="${this._background()}"/>`);for(const t of this._shown()){if(!t.el)continue;const e=this._rectIn(t.el);if(!t.chart){i.push(`<rect x="${e.x}" y="${e.y}" width="${e.w}" height="${e.h}" fill="rgba(120,120,120,0.06)" rx="4"/>`);continue}const n=yield t.chart.getSvgString();i.push(`<g transform="translate(${e.x}, ${e.y})">${n}</g>`)}for(const t of this._chromeTexts()){const e="left"===t.align?"start":"right"===t.align?"end":"middle";i.push(`<text x="${t.x}" y="${t.y}" text-anchor="${e}" dominant-baseline="central" style="font:${kn(t.font)};fill:${kn(t.color)}">${Mn(t.text)}</text>`)}for(const t of this._legendMarkers())i.push(`<circle cx="${t.rect.x+t.rect.w/2}" cy="${t.rect.y+t.rect.h/2}" r="${Math.max(2,t.rect.w/2)}" fill="${kn(t.color)}"/>`);return i.push("</svg>"),i.join("")})}csv(t={}){var e,i,n,s;const r=this.trellis,a=r.split;if(!a)return"";const o=r.w,l=t.columnDelimiter||(null==(n=null==(i=null==(e=o.config.chart.toolbar)?void 0:e.export)?void 0:i.csv)?void 0:n.columnDelimiter)||",",c=o.config.xaxis&&"datetime"===o.config.xaxis.type,h=t=>{if(null==t)return"";const e=String(t);return/[",\n]/.test(e)||-1!==e.indexOf(l)?`"${e.replace(/"/g,'""')}"`:e},d="plain"===a.xForm&&((null==(s=o.config.xaxis.categories)?void 0:s.length)?o.config.xaxis.categories:o.config.labels||[]),u=t=>{var e;return d&&(t=null!=(e=d[t])?e:t+1),Array.isArray(t)&&(t=t.join(" ")),c&&"number"==typeof t?new Date(t).toISOString():t},p=a.seriesNames,f=[["x","facet",...p].map(h).join(l)];return a.panels.forEach(t=>{a.unionX.forEach((e,i)=>{const n=[u(e),t.key];p.forEach(e=>{const s=t.series.find(t=>t.name===e);if(!s||!Array.isArray(s.data))return void n.push("");const r=s.data[i];let a=r;Array.isArray(r)?a=r[1]:r&&"object"==typeof r&&(a=r.y),n.push(Array.isArray(a)?a.join("|"):a)}),f.push(n.map(h).join(l))})}),f.join(t.lineDelimiter||"\n")}download(t){return d(this,arguments,function*(t,e={}){var i;const n=this.trellis,s=(null==(i=n.w.config.chart.toolbar)?void 0:i.export)||{},r=String(n.w.globals.chartID||"trellis");if("png"===t){const{imgURI:t}=yield this.dataURI();An(t,s.png&&s.png.filename||r,".png")}else if("svg"===t){const t=yield this.svgString();An("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(t),s.svg&&s.svg.filename||r,".svg")}else{An("data:text/csv;charset=utf-8,"+encodeURIComponent("\ufeff"+this.csv(e)),e.fileName||s.csv&&s.csv.filename||r,".csv")}})}}function wn(t){return new Promise((e,i)=>{const n=new Image;n.onload=()=>e(n),n.onerror=i,n.src=t})}function An(t,e,i){const n=document.createElement("a");n.href=t,n.download=e+i,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Mn(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function kn(t){return String(t).replace(/"/g,""")}function Ln(t){const e=t.w;if(!e.globals.axisCharts)return;const i=t.titleBlockPad||0;if("top"===e.config.xaxis.position)return void(t.gridPad.top-=i);const n=e.layout.gridHeight-t.gridPad.top-t.gridPad.bottom+i+10;t.gridPad.top+=function(t,e){const i=t.w,n=i.config,s=i.globals,r=new b(i),a=t=>{const e=r.getTextRects("0",t.fontSize,t.fontFamily,void 0,!0,t.fontWeight),i=e.height/2-(e.centerOffset||0);return{ascent:i>=0&&i<=e.height?i:e.height,height:e.height}},o=t=>"number"==typeof t&&isFinite(t)?t:0,l=t=>Math.max(0,...[].concat(t).map(o));let c=0;n.yaxis.forEach(t=>{if(!t.show||!t.labels.show)return;const n=parseFloat(t.labels.style.fontSize)||0,r=a(t.labels.style).ascent,l=o(t.labels.offsetY);if(!s.isBarHorizontal)return void(c=Math.max(c,r-n/3-l));const h=i.labelData.labels||[],d=Math.max(1,h.length),u=Math.max(0,...h.map(t=>Array.isArray(t)?t.length:0)),p=r+(u?u/2*n:0)-l,f=1-1/2.2;c=Math.max(c,(p-f*e/d)/(1-f/d))}),n.stroke.show&&(c=Math.max(c,l(n.stroke.width)/2));const h=[n.chart.type].concat(n.series.map(t=>t&&t.type).filter(Boolean)),d=["line","area","scatter","bubble","rangeArea"];if(h.some(t=>d.includes(t))){const t=n.markers,e=Math.max(l(t.size),...(t.discrete||[]).map(t=>o(t.size)));if(e>0&&(c=Math.max(c,e+l(t.strokeWidth)/2)),n.dataLabels.enabled){const t=o(n.dataLabels.offsetY),e=Math.max(0,t+2)+t;c=Math.max(c,a(n.dataLabels.style).ascent-e)}}const u=n.plotOptions.bar.dataLabels.total;if(n.chart.stacked&&u.enabled&&!s.isBarHorizontal&&h.some(t=>yn.includes(t))){const t=a(u.style);c=Math.max(c,t.ascent+.3*t.height-o(n.dataLabels.offsetY)-o(u.offsetY))}return Math.ceil(Math.max(0,c))}(t,n)-10-i}const Sn=["pie","donut","polarArea","radialBar","radar","treemap"],Cn=["annotations","colors","dataLabels","fill","forecastDataPoints","grid","markers","noData","states","stroke","tooltip"],En={treemap:"trellis does not support treemap: area encoding needs room a panel cannot give. Rendering a single chart.",sunburst:"trellis does not support sunburst: its labels are illegible at panel size. Rendering a single chart.",unit:"the unit type has its own small-multiples mode (plotOptions.unit.grid.split), which beats a trellis of unit charts. Rendering a single chart."};m.default.registerFeatures({trellis:class{constructor(t,e){this.w=t,this.ctx=e,this.panels=[],this._stripEls=[],this.split=null,this.scales=null,this.layout=null,this.cfg={},this.sync=new ln(this),this.chrome=new an(this),this.virtual=new mn(this),this.exports=new vn(this),this.gridTooltip=null,this._promotedKey=null,this._ApexCharts=m.default,this._virtualActive=!1,this._panelRenderer=null,this.elWrap=null,this.elGrid=null,this._mounted=!1,this._rendering=!1,this._renderPromise=null,this._raf=0,this._lastWidth=0,this._lastHeight=0,this._chromeH=0,this._overflowWarned=!1,this._resizeHandler=this._onContainerResize.bind(this),this.autoScaleYaxis=!1,this._elChromeTop=null,this._vetoWarned=!1,this._noKeyWarned=!1,this._frames=null,this._gen=0,this._tool=null}isActive(){var t;const e=this.w.config.trellis;if(!e||!(e.by||e.row||e.column))return!1;const i=null==(t=this.w.config.chart)?void 0:t.type;if(i&&En[i])return this._vetoWarned||(this._vetoWarned=!0,console.warn(`ApexCharts: ${En[i]}`)),!1;if(e.by&&!e.row&&!e.column&&!Array.isArray(e.data)){if(!(this.w.config.series||[]).some((t,i)=>null!==Ai(t,i,e.by))){if(!this._noKeyWarned){this._noKeyWarned=!0;const t="function"==typeof e.by?"the `trellis.by` function returned no key for any series":`no series carries the \`trellis.by\` key '${e.by}'`;console.warn(`ApexCharts: ${t}; there is nothing to split. Rendering as a single chart.`)}return!1}}return!0}_layoutCfg(){const t=this._effectiveCfg();return this.split&&"2d"===this.split.mode&&this.split.colKeys?c(l({},t),{columns:this.split.colKeys.length}):t}_effectiveCfg(){var t;const e=this._yMode();return e!==((null==(t=this.cfg.scales)?void 0:t.y)||"shared")?c(l({},this.cfg),{scales:c(l({},this.cfg.scales||{}),{y:e})}):this.cfg}_deriveShared(t,e=!0){var i,n;const s=this.w,r=s.config.chart;!e&&this._frames||(this._frames=Ti(t,this.cfg,s.config,"histogram"===r.requestedType?"histogram":r.type));const a=this._multiY();let o=null;if(a){const e=t.seriesNames,i=new y({config:{series:e.map(t=>({name:t})),yaxis:a},globals:{}});i.setSeriesYAxisMappings(),o=i.w.globals.seriesYAxisMap.map(t=>t.map(t=>e[t]).filter(t=>null!=t))}this._axisNames=o;const c=s.config.theme,h=this.scales=Hi(t,this._effectiveCfg(),l({chartType:r.type,userColors:this.ctx.opts&&this.ctx.opts.colors,palette:c.palette,yaxis:a||s.config.yaxis,axisNames:o,yExtentOverride:this._frames.yExtentOverride},this._stackingHost()));if((null==(i=c.monochrome)?void 0:i.enabled)||(null==(n=c.accessibility)?void 0:n.colorBlindMode)||h.palette.some(t=>"function"==typeof t)){const t=h.colorOf;h.colorOf=(e,i)=>{if(!i)for(const t of this.panels){const i=t.chart&&t.chart.w,n=i?i.seriesData.seriesNames.indexOf(e):-1,s=n>-1&&i.globals.colors[n];if("function"==typeof s)return s({value:i.seriesData.series[n][0]||0,seriesIndex:n,dataPointIndex:0,w:i});if(s)return s}return t(e)}}}_splitHost(){const t=this.w.config;return{chartType:t.chart.type,datetime:"datetime"===t.xaxis.type}}_multiY(){var t;const e=null==(t=this.ctx.opts)?void 0:t.yaxis;return Array.isArray(e)&&e.length>1&&!this._valueAxisIsX()?e:null}_stackingHost(){var t,e;const i=this.w.config,n=i.chart||{},s=i.highlightFilter||{};return{stacked:!!n.stacked,stackType:n.stackType,stackOnlyBar:!!n.stackOnlyBar,parts:!!yi._featureRegistry.get("highlightFilter")&&!1!==s.enabled&&"clamp"!==s.axis&&["bar","line","area"].includes(n.type)&&!(null==(e=null==(t=i.plotOptions)?void 0:t.bar)?void 0:e.isFunnel)}}_yMode(){var t;return this._frames&&this._frames.forceSharedY?"shared":(null==(t=this.cfg.scales)?void 0:t.y)||"shared"}_yBoundsFor(t,e){var i,n;const s=this.scales;if(!s)return null;if(this._frames&&this._frames.skipYaxisPush)return null;const r=this._yMode(),a="shared"===r?s.y:"independent-row"===r&&s.rowY?s.rowY.get(null!=(i=t.rowKey)?i:""):"independent-column"===r&&s.colY?s.colY.get(null!=(n=t.colKey)?n:""):null;return!a||!e&&Array.isArray(a)?null:a}_valueAxisIsX(){var t,e;const i=this.w.config;return["bar","boxPlot","violin"].includes(i.chart.type)&&!!(null==(e=null==(t=i.plotOptions)?void 0:t.bar)?void 0:e.horizontal)}_valueAxisXPatch(t){var e,i;const n={min:t.min,max:t.max};return"number"!=typeof(null==(i=null==(e=this.ctx.opts)?void 0:e.xaxis)?void 0:i.tickAmount)&&(n.tickAmount=t.tickAmount),n}_groupId(){return`${this.w.globals.chartID}-tg`}_fire(t,e){var i,n;const s=null==(n=null==(i=this.w.config.chart)?void 0:i.events)?void 0:n[t];"function"==typeof s&&s(this.ctx,e),this.ctx.events.fireEvent(t,[this.ctx,e])}render(){if(this._rendering&&this._renderPromise)return this._renderPromise;const t=this._render();return this._renderPromise=t,t}whenSettled(){return this._rendering&&this._renderPromise?this._renderPromise.catch(()=>{}):Promise.resolve()}_render(){return d(this,null,function*(){var t,e,i;const n=this.w;if(this._mounted||this._rendering)return;if(!k.isBrowser())return void console.warn("ApexCharts: trellis rendering is browser-only in this version; SSR hosts render nothing.");this._rendering=!0;const s=this._gen;try{this.cfg=n.config.trellis||{},this.autoScaleYaxis=!!(null==(e=null==(t=n.config.chart)?void 0:t.zoom)?void 0:e.autoScaleYaxis)&&!this._multiY();let r=n.config.series||[];if(Array.isArray(this.cfg.data)){const t=function(t,e={}){const i=[],n=e.by;if("string"!=typeof n||!n)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs a string `by` column name"]};const s=e.x,r=e.y;if(!s||!r)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs `x` and `y` column names"]};const a=Array.isArray(t)?t:[];if(!a.length)return{series:[],warnings:["trellis: trellis.data is empty"]};const o=e.seriesBy;let l=0,c=0;const h=new Map;a.forEach(t=>{if(!t||"object"!=typeof t)return void l++;const e=t[n],i=t[s];if(null==e||null==i)return void l++;const a=o&&void 0!==t[o]&&null!==t[o]?String(t[o]):String(r);let d=h.get(String(e));d||(d=new Map,h.set(String(e),d));let u=d.get(a);u||(u=new Map,d.set(a,u));const p=i instanceof Date?i.getTime():i;u.has(p)&&c++;const f=t[r];u.set(p,void 0===f?null:f)}),l&&i.push(`trellis: ${l} row(s) missing "${n}" or "${s}" were skipped`),c&&i.push(`trellis: ${c} duplicate (panel, series, x) row(s); kept the last. Aggregate the rows first if you want sums or means.`);const d=[];return h.forEach((t,e)=>{t.forEach((t,i)=>{const s={name:i,data:Array.from(t,([t,e])=>({x:t,y:e}))};-1===_i.indexOf(n)&&(s[n]=e),Object.defineProperty(s,xi,{value:e}),d.push(s)})}),{series:d,warnings:i}}(this.cfg.data,this.cfg);t.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),t.series.length&&(r.length&&console.warn("ApexCharts: trellis received both `series` and `trellis.data`; using trellis.data."),r=t.series)}const a=Ei(r,this.cfg,this._splitHost());if(this.split=a,a.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),!a.panels.length)return;a.dropped>0&&console.warn(`ApexCharts: trellis rendered ${a.panels.length} panels; ${a.dropped} more hidden by trellis.limit.`);const o=null!=(i=this.cfg.virtualize)?i:"auto";let l=!0===o||"auto"===o&&a.panels.length>64;l&&!mn.supported()&&(console.warn("ApexCharts: trellis virtualization needs IntersectionObserver; rendering eagerly."),l=!1),this._virtualActive=l,!l&&a.panels.length>64&&console.warn(`ApexCharts: trellis with ${a.panels.length} panels renders eagerly; set trellis.virtualize (or trellis.limit).`),a.panels.length>256&&console.warn(`ApexCharts: ${a.panels.length} trellis panels is a lot to read at once; consider trellis.limit.`),this._deriveShared(a);this._frames.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),this._seeded||(this._seeded=!0,a.panels.forEach(t=>t.series.forEach(t=>t.hidden&&this.sync._hidden.add(t.name)))),this.sync.prune(a.seriesNames),this._panelRenderer=function(t,e,i,n){if(i&&i.chart&&i.chart.renderer)return null;if(!n)return null;const s={config:{series:t.panels.reduce((t,e)=>t.concat(e.series),[]),chart:{type:e.chart.type},markers:e.markers,dataLabels:e.dataLabels,fill:e.fill,plotOptions:e.plotOptions,states:e.states}};if(pi(s))return null;const r=e.chart.rendererThreshold||8e3;return ui(s)>=r?"canvas":null}(a,n.config,this.ctx.opts,mi._rendererRegistry.has("canvas")),this._buildSkeleton();const c=this._containerWidth();this._lastWidth=c,this._lastHeight=this._hostHeight()||0,this._chromeH=0,this.layout=Yi({panelCount:a.panels.length,containerWidth:c,cfg:this._layoutCfg(),hostHeight:this._hostHeight(),chromeHeight:this._chromeH}),this._applyGridStyle(),this._buildCells();const h="shared"!==this._yMode(),d=this.elWrap;if(l)this.virtual.start();else{h&&(d.style.visibility="hidden");for(let t=0;t<this.panels.length;t++){const e=this.panels[t];if(e.noMount)continue;const i=this._assemblePanelOptions(e.index),n=this._createPanelChart(e.el,i);if(e.chart=n,yield n.render(),s!==this._gen)return;this._fire("panelMounted",{key:e.key,index:e.index,chart:n})}if(h){if(yield this._alignGutters(),s!==this._gen)return;d.style.visibility=""}}this.chrome.buildTitle(this._elChromeTop),this.chrome.buildToolbar(d),this.chrome.buildLegend(d),this.sync.wireCrosshairs(this.elGrid),"grid"===(this.cfg.tooltip||"panel")&&(this.gridTooltip=new xn(this),this.gridTooltip.wire(this.elGrid,d)),this._mounted=!0,this._refitForChrome(),li(this.ctx.el,this._resizeHandler),l||(n.globals.animationEnded=!0),this._fire("trellisMounted",{panels:this.getPanels()})}finally{s===this._gen&&(this._rendering=!1)}})}_containerWidth(){const t=this.ctx.el;return t.getBoundingClientRect().width||t.clientWidth||800}_hostHeight(){var t;const e=this.w.config.chart&&this.w.config.chart.height;if(null==e||""===e||"auto"===e)return;const i=String(e).trim();if(i.endsWith("%")){const e=parseFloat(i);if(!isFinite(e)||e<=0)return;const n=null==(t=this.ctx.el)?void 0:t.parentNode;if(!n||"function"!=typeof n.getBoundingClientRect)return;const s=(n.getBoundingClientRect().height||n.clientHeight||0)*e/100;return s>0?s:void 0}const n=parseFloat(i);return isFinite(n)&&n>0?n:void 0}_chromeHeight(){const t=this.elWrap,e=this.elGrid;if(!t||!e||"function"!=typeof t.getBoundingClientRect)return 0;const i=t.getBoundingClientRect().height-e.getBoundingClientRect().height;return isFinite(i)&&i>0?i:0}_buildSkeleton(){var t,e;const i=this.ctx.el,n=M.createElementNS("http://www.w3.org/1999/xhtml","div");n.className="apexcharts-trellis",this.split&&"2d"===this.split.mode&&n.classList.add("apexcharts-trellis-2d"),n.id=`apexcharts-trellis${this.w.globals.chartID}`,n.setAttribute("data-tooltip-mode",this.cfg.tooltip||"panel");const s=null==(t=this.w.config.chart)?void 0:t.foreColor;s&&n.style.setProperty("--apx-trellis-fore",s);const r=null==(e=this.w.config.chart)?void 0:e.fontFamily;r&&(n.style.fontFamily=r);const a=M.createElement("div");a.className="apexcharts-trellis-chrome",n.appendChild(a),this._elChromeTop=a;const o=M.createElement("div");o.className="apexcharts-trellis-grid",n.appendChild(o),i.appendChild(n),this.elWrap=n,this.elGrid=o,this.w.dom.baseEl=i,this.w.dom.elWrap=n}_applyGridStyle(){var t;const e=this.elGrid,i=this.layout;e.style.display="grid";const n=this.split&&"2d"===this.split.mode&&!1!==(null==(t=this.cfg.header)?void 0:t.show);e.style.gridTemplateColumns=n?`auto repeat(${i.cols}, minmax(0, 1fr))`:`repeat(${i.cols}, minmax(0, 1fr))`,e.style.gap=`${i.gap}px`}_buildCells(){var t;const e=this.elGrid,i=this.split,n=this.layout,s="2d"===i.mode,r=s&&!1!==(null==(t=this.cfg.header)?void 0:t.show);this._stripEls=[];const a=this.cfg.emptyPanels||"placeholder";if(r){const t=M.createElement("div");t.className="apexcharts-trellis-corner",e.appendChild(t),this._stripEls.push(t),(i.colKeys||[]).forEach((t,n)=>{const s=this.chrome.stripEl("column",t,{index:n,count:(i.colKeys||[]).length});e.appendChild(s),this._stripEls.push(s)})}this.panels=[],i.panels.forEach((t,o)=>{var l;if(r&&o%n.cols===0){const t=Math.floor(o/n.cols),s=this.chrome.stripEl("row",null!=(l=(i.rowKeys||[])[t])?l:"",{index:t,count:(i.rowKeys||[]).length});e.appendChild(s),this._stripEls.push(s)}const c=M.createElement("div");c.className="apexcharts-trellis-cell",c.setAttribute("data-key",t.key),this._applyCellMutes(c,n.cells[o]),s||this.chrome.buildHeader(c,t.key,{index:o,count:i.panels.length});const h=M.createElement("div");h.className="apexcharts-trellis-panel",this._virtualActive&&(h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${n.panelH}px`),c.appendChild(h);const d=t.empty&&"placeholder"!==a;if(t.empty)if(c.classList.add("apexcharts-trellis-cell-empty"),"hide"===a)c.classList.add("apexcharts-trellis-cell-hidden");else if("skip"===a)h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${n.panelH}px`;else{const t=M.createElement("div");t.className="apexcharts-trellis-empty-label",t.textContent=this.w.config.noData&&this.w.config.noData.text||"no data",c.appendChild(t)}e.appendChild(c),this.panels.push({key:t.key,index:o,el:h,cellEl:c,chart:null,empty:t.empty,noMount:d})})}_applyCellMutes(t,e){t.classList.toggle("apexcharts-trellis-mute-x",!e.showXLabels),t.classList.toggle("apexcharts-trellis-mute-y",!e.showYLabels)}_hasPlotChrome(t){var e;return!(null==(e=null==t?void 0:t.sparkline)?void 0:e.enabled)&&!Sn.includes(this.w.config.chart.type)}_createPanelChart(t,e){const i=new this._ApexCharts(t,e);return this._hasPlotChrome(e.chart)&&(i.panelTopBand=Ln),i}_assemblePanelOptions(t,{noAnimation:e=!1}={}){var i,n,s,r,a,o,d,u,p,f;const g=this.w,m=this.split,y=this.layout,x=m.panels[t],_=this.ctx.opts||{},{series:b,trellis:v,responsive:w}=_,A=h(_,["series","trellis","responsive"]),M=B.clone(A);M.annotations&&(M.annotations=function(t,e){if(!t||"object"!=typeof t)return t;const i=l({},t);for(const t of["yaxis","xaxis","points","texts","images"]){const n=i[t];Array.isArray(n)&&(i[t]=n.filter(t=>!t||void 0===t.scope||null===t.scope||"trellis"===t.scope||(Array.isArray(t.scope)?-1!==t.scope.map(String).indexOf(e):String(t.scope)===e)).map(t=>{if(!t||void 0===t.scope)return t;const e=l({},t);return delete e.scope,e}))}return i}(M.annotations,x.key));const k=M.chart||{},L=k.events||{},S=g.globals.chartID,C=null==(s=null==(n=null==(i=this.ctx.opts)?void 0:i.chart)?void 0:n.animations)?void 0:s.enabled,E=e||m.panels.length>16&&void 0===C,F=x.empty&&"placeholder"===(this.cfg.emptyPanels||"placeholder"),P=this._panelDataPatch(t),D=l(l(c(l({chart:c(l(l({id:`${S}-tp${t}`,group:this._groupId(),height:y.panelH,width:"100%",redrawOnParentResize:!1,redrawOnWindowResize:!1,print:{enabled:!1},parentHeightOffset:0,toolbar:this._tool?{show:!1,autoSelected:this._tool}:{show:!1},zoom:{enabled:"none"!==this.cfg.zoom&&!1!==(null==(o=null==(a=null==(r=this.ctx.opts)?void 0:r.chart)?void 0:a.zoom)?void 0:o.enabled),resetControl:"none"==this.cfg.toolbar&&!1!==g.config.chart.zoom.resetControl}},E?{animations:{enabled:!1}}:{}),this._panelRenderer?{renderer:this._panelRenderer}:{}),{events:c(l({},L),{zoomed:this.sync.makeZoomedHandler(L.zoomed),scrolled:this.sync.makeScrolledHandler(L.scrolled)})}),series:P.series},P.colors?{colors:P.colors}:{}),{title:{text:"",margin:0,floating:!0},subtitle:{text:"",margin:0,floating:!0},legend:{show:!1}}),F?{tooltip:{enabled:!1}}:{}),y.panelH<120&&"grid"!==this.cfg.tooltip&&"boolean"!=typeof(null==(u=null==(d=this.ctx.opts)?void 0:d.tooltip)?void 0:u.compact)?{tooltip:{compact:!0}}:{});if(this._hasPlotChrome(k)){const t=M.grid&&M.grid.padding||{},e="datetime"===(null==(f=null==(p=this.ctx.opts)?void 0:p.xaxis)?void 0:f.type)?2:7;D.grid={padding:{bottom:("number"==typeof t.bottom?t.bottom:0)-e}}}if(P.xaxis&&(D.xaxis=P.xaxis),P.yaxis){const t=[].concat(M.yaxis||{});D.yaxis=Array.isArray(P.yaxis)?P.yaxis.map((e,i)=>B.extend(t[i]||{},e)):B.extend(t[0]||{},P.yaxis),delete M.yaxis}P.plotOptions&&(D.plotOptions=P.plotOptions);let R=B.extend(M,D);if("function"==typeof this.cfg.panel){const e=this.cfg.panel(x.key,{index:t,seriesNames:x.seriesNames});e&&"object"==typeof e&&(R=B.extend(R,e))}return R}_panelDataPatch(t){var e,i,n,s;const r=this.w,a=this.split,o=this.scales,h=a.panels[t],d=r.config.chart.type,u=h.empty&&"placeholder"===(this.cfg.emptyPanels||"placeholder")?[Ci(a,{chartType:d})]:h.series,p={series:u};["pie","donut","polarArea","radialBar"].includes(d)?p.series=u.flatMap(t=>Array.isArray(t.data)?t.data:[]).map(t=>"number"==typeof t&&isFinite(t)?t:0):(p.colors=u.map(t=>o.colorOf(t.name,!0)),p.series=u.map(t=>c(l({},t),{hidden:this.sync.isHidden(t.name)})));const f=this._valueAxisIsX();o.x&&!f&&(p.xaxis={min:o.x.min,max:o.x.max});const g=this._yBoundsFor(h,!0);if(g){const t=null==(e=this.ctx.opts)?void 0:e.yaxis,i=this._axisNames;p.yaxis=[].concat(g).map((e,n)=>{var s;const r=e?{min:e.min,max:e.max,tickAmount:e.tickAmount}:{};i&&(r.seriesName=i[n]);const a=Array.isArray(t)?t[n]:t;return e&&"function"!=typeof(null==(s=null==a?void 0:a.labels)?void 0:s.formatter)&&(r.labels={formatter:t=>"number"==typeof t&&isFinite(t)?t.toFixed(e.decimals):t}),r}),Array.isArray(g)||(p.yaxis=p.yaxis[0]),f&&(p.xaxis=B.extend(p.xaxis||{},this._valueAxisXPatch(g)))}const m=this._frames;m&&m.plotOptions&&(p.plotOptions=B.clone(m.plotOptions));const y=m&&m.pieScaleOf?m.pieScaleOf(h.key):null;if(null!==y){const t=null==(s=null==(n=null==(i=this.ctx.opts)?void 0:i.plotOptions)?void 0:n.pie)?void 0:s.customScale;p.plotOptions=B.extend(p.plotOptions||{},{pie:{customScale:y*("number"==typeof t?t:1)}})}return p}_alignGutters(t=!1){return d(this,null,function*(){var e,i,n,s;const r=this.panels.map(t=>{var e,i,n,s,r;return null==(r=null==(s=null==(n=null==(i=null==(e=t.chart)?void 0:e.w)?void 0:i.globals)?void 0:n.yLabelsCoords)?void 0:s[0])?void 0:r.width}).filter(t=>"number"==typeof t&&isFinite(t));if(!r.length)return;const a=!!(null==(s=null==(n=null==(i=null==(e=this.panels[0])?void 0:e.chart)?void 0:i.w)?void 0:n.globals)?void 0:s.isBarHorizontal)?0:10,o=Math.max(0,Math.max(...r)-a);t&&o<=this.virtual._gutterFloor+.5||(this.virtual._gutterFloor=o,yield this._pushGutterFloor(o))})}_yLabelPad(){return 10}_pushGutterFloor(t){return d(this,null,function*(){for(const e of this.panels)e.chart&&(yield e.chart.updateOptions({yaxis:on(e.chart,{labels:{minWidth:t}})},!1,!1,!1).catch(()=>{}))})}_refitForChrome(){if(!this._hostHeight())return;const t=this._chromeHeight();t<=0||Math.round(t)===Math.round(this._chromeH)?this._warnIfOverflowing():(this._chromeH=t,this._relayout(this._containerWidth()))}_warnIfOverflowing(){const t=this.layout;t&&t.overflowH&&!this._overflowWarned&&(this._overflowWarned=!0,console.warn(`ApexCharts: trellis needs ${Math.round(t.gridH+this._chromeH)}px but its container gives ${Math.round(this._hostHeight()||0)}px; ${t.rows} rows cannot go below the ${t.panelH}px panel floor. Raise the container, use fewer panels (trellis.limit) or more columns (trellis.columns), or lower trellis.minPanelHeight.`))}_onContainerResize(){this._mounted&&(this._raf||(this._raf=requestAnimationFrame(()=>{this._raf=0;const t=this._containerWidth(),e=this._hostHeight()||0;if(Math.round(t)!==Math.round(this._lastWidth)||Math.round(e)!==Math.round(this._lastHeight)){if(this._lastWidth=t,this._lastHeight=e,this._promotedKey){const t=this.panels.find(t=>t.key===this._promotedKey);return void(t&&t.chart&&t.chart.updateOptions({},!1,!1,!1).catch(()=>{}))}this._relayout(t)}})))}promote(t){return d(this,null,function*(){var e;const i=this.panels.find(e=>e.key===String(t));if(!i||i.noMount||!this._mounted)return;if(this._promotedKey===i.key)return;this._promotedKey&&(yield this.restorePromotion()),this._promotedKey=i.key;const n=this.layout,s=this.elGrid?this.elGrid.getBoundingClientRect().height:0,r=Math.round(Math.max(280,Math.min(560,s||(n?2.4*n.panelH:420))));null==(e=this.elWrap)||e.classList.add("apexcharts-trellis-promoting"),this.panels.forEach(t=>{if(!t.cellEl)return;const e=t===i;t.cellEl.classList.toggle("apexcharts-trellis-cell-promoted",e),t.cellEl.classList.toggle("apexcharts-trellis-cell-parked",!e)}),this._stripEls.forEach(t=>t.classList.add("apexcharts-trellis-cell-parked")),this.chrome.buildBreadcrumb(this._elChromeTop,i.key,()=>this.restorePromotion()),!i.chart&&this._virtualActive&&(i.wantMounted=!0,this.virtual._dirty.add(i),this.virtual._schedule()),i.el&&(i.el.style.minHeight=`${r}px`),i.chart&&(yield i.chart.updateOptions({chart:{height:r}},!1,!1,!1).catch(()=>{})),this._fire("panelPromoted",{key:i.key,chart:i.chart})})}restorePromotion(){return d(this,null,function*(){var t;if(!this._promotedKey)return;const e=this.panels.find(t=>t.key===this._promotedKey);this._promotedKey=null,null==(t=this.elWrap)||t.classList.remove("apexcharts-trellis-promoting"),this.panels.forEach(t=>{t.cellEl&&(t.cellEl.classList.remove("apexcharts-trellis-cell-promoted"),t.cellEl.classList.remove("apexcharts-trellis-cell-parked"))}),this._stripEls.forEach(t=>t.classList.remove("apexcharts-trellis-cell-parked")),this.chrome.removeBreadcrumb();const i=this.layout;e&&e.el&&i&&(e.el.style.minHeight=`${i.panelH}px`),e&&e.chart&&i&&(yield e.chart.updateOptions({chart:{height:i.panelH}},!1,!1,!1).catch(()=>{})),this._lastWidth=0,this._relayout(this._containerWidth()),this._lastWidth=this._containerWidth(),this._fire("panelRestored",{key:e?e.key:null})})}_relayout(t){const e=this.split;if(!e)return;const i=this.layout?this.layout.panelH:0;this.layout=Yi({panelCount:e.panels.length,containerWidth:t,cfg:this._layoutCfg(),hostHeight:this._hostHeight(),chromeHeight:this._chromeH}),this._applyGridStyle(),this._warnIfOverflowing();const n=this.layout;this.panels.forEach((t,e)=>{if(t.cellEl&&this._applyCellMutes(t.cellEl,n.cells[e]),t.el&&this._virtualActive&&(t.el.style.minHeight=`${n.panelH}px`),!t.chart)return;const s=n.panelH!==i?{chart:{height:n.panelH}}:{};t.chart.updateOptions(s,!1,!1,!1).catch(()=>{})}),this._virtualActive&&this.virtual.refresh()}canApplyInPlace(t){if(!this._mounted||this._promotedKey)return!1;if(!t||"object"!=typeof t)return!1;const e=Object.keys(t);return!!e.length&&e.every(t=>Cn.includes(t))}applyPanelOptions(t=!0){return d(this,null,function*(){const e=this.split;e&&(this._deriveShared(e,!1),yield Promise.all(this.panels.map(e=>{if(!e.chart)return Promise.resolve();const i=this._assemblePanelOptions(e.index);return delete i.series,delete i.xaxis,delete i.yaxis,i.chart&&delete i.chart.height,e.chart.updateOptions(i,!1,t,!1,!1).catch(()=>{})})),this.chrome.rebuildLegend())})}updateSeries(t,e=!0){return d(this,null,function*(){const i=this.w;if(Array.isArray(this.cfg.data)&&this.cfg.data.length)return console.warn("ApexCharts: this trellis renders from trellis.data; update it via updateOptions({ trellis: { data } })."),Promise.resolve();if(i.config.series=t,this.ctx.opts&&(this.ctx.opts.series=t),!this._mounted)return this.ctx.render();const n=Ei(t||[],this.cfg,this._splitHost());if(!(n.panels.length===this.panels.length&&n.panels.every((t,e)=>t.key===this.panels[e].key&&!!t.empty==!!this.panels[e].empty)))return this.teardown(),this.ctx.render();this.split=n,this._deriveShared(n),this.sync.prune(n.seriesNames),this.sync.currentWindow=null,this.panels.forEach(t=>{t.viewStash&&(t.viewStash=c(l({},t.viewStash),{window:null,zoomed:!1})),t.chart&&(t.chart.w.interact.zoomed=!1)});const s=this._gen;yield Promise.all(this.panels.map(t=>{if(!t.chart)return Promise.resolve();const i=this._panelDataPatch(t.index),n=i.yaxis;return n&&(i.yaxis=on(t.chart,{}).map((t,e)=>B.extend(t,(Array.isArray(n)?n[e]:n)||{}))),t.chart.updateOptions(i,!1,e,!1).catch(()=>{})})),s===this._gen&&("shared"!==this._yMode()&&(yield this._alignGutters(!0)),s===this._gen&&(this.chrome.rebuildLegend(),this._refitForChrome()))})}getPanels(){return this.panels.map(t=>({key:t.key,index:t.index,chart:t.chart,el:t.cellEl}))}getPanel(t){const e=this.panels.find(e=>e.key===String(t));return e?e.chart:null}teardown(){this._gen++,this._rendering=!1,this.virtual.stop(),this._virtualActive=!1,this._panelRenderer=null,this._promotedKey=null,this._frames=null,this._tool=null,this.sync.currentWindow=null,this.chrome.destroyGradientLegend();const t=this.chrome;t.elLegend=t.elToolbar=t.elTitle=t.elSubtitle=t.elBreadcrumb=null,this._elChromeTop=null,this.gridTooltip&&(this.gridTooltip.destroy(),this.gridTooltip=null),this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),k.isBrowser()&&this.ctx.el&&ci(this.ctx.el,this._resizeHandler),this.panels.forEach(t=>{if(t.chart)try{t.chart.destroy()}catch(t){}t.chart=null}),this.panels=[],this._stripEls=[],this.elWrap&&this.elWrap.parentNode&&this.elWrap.parentNode.removeChild(this.elWrap),this.elWrap=null,this.elGrid=null,this._mounted=!1,this.ctx._renderPromise=null}}});m.default.registerFeatures({measure:class{constructor(t,e){this.w=t,this.ctx=e,this.graphics=new b(t),this.pins=[],this.drag=null,this.armed=!1,this.persistent=!1,this.pane=null,this._seedActive=!1,this._onKeyDown=this._onKeyDown.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onSeedDown=this._onSeedDown.bind(this),this._onSeedKey=this._onSeedKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.measure||{}}_enabled(){return this.w.globals.axisCharts&&!0===this._cfg().enabled}_mode(){return"free"===this._cfg().mode?"free":"span"}_snapToSeries(t){const e=(this.w.config.series||[])[0];if(!e)return null;const i=this._points(e.data||[]);if(!i.length)return null;let n=i[0],s=Math.abs(i[0].x-t);for(let e=1;e<i.length;e++){const r=Math.abs(i[e].x-t);r<s&&(s=r,n=i[e])}return n}_resolve(t){if("free"===this._mode())return t;const e=this._snapToSeries(t.x);if(!e)return t;const i=this._dataToGrid(e.x,e.y);return{x:e.x,y:e.y,gx:i.gx,gy:i.gy}}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_bindKeys(){if(this._keysBound)return;const t=this._doc();t&&(t.addEventListener("keydown",this._onKeyDown),t.addEventListener("keyup",this._onKeyUp),this._keysBound=!0)}_onKeyDown(t){if(!this._enabled())return;if("Escape"===t.key)return void this._cancelDrag();if(this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&this._arm()}_onKeyUp(t){if(this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&(this.drag||this._disarm())}startMeasure(){this._enabled()&&(this.persistent=!0,this._arm())}stopMeasure(){this.persistent=!1,this._cancelDrag(),this._disarm()}seedFromClient(t,e){if(!this._enabled())return;this._cancelDrag(),this._endSeed(!1);const i=this._project(t,e);this.drag={a:i,b:i},this._seedActive=!0;const n=this._doc();n&&(n.addEventListener("mousemove",this._onMove),n.addEventListener("touchmove",this._onMove,{passive:!1}),n.addEventListener("mousedown",this._onSeedDown,!0),n.addEventListener("touchstart",this._onSeedDown,!0),n.addEventListener("keydown",this._onSeedKey,!0)),this._renderLive()}_onSeedDown(t){if(!this._seedActive||!this.drag)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:i}=this._clientXY(t);this.drag.b=this._project(e,i),this._endSeed(!0)}_onSeedKey(t){"Escape"===t.key&&this._endSeed(!1)}_endSeed(t){var e,i;if(!this._seedActive)return;this._seedActive=!1;const n=this._doc();n&&(n.removeEventListener("mousemove",this._onMove),n.removeEventListener("touchmove",this._onMove),n.removeEventListener("mousedown",this._onSeedDown,!0),n.removeEventListener("touchstart",this._onSeedDown,!0),n.removeEventListener("keydown",this._onSeedKey,!0));const s=this.drag;if(this.drag=null,this._clearLive(),!t||!s)return;const r=this._resolve(s.a),a=this._resolve(s.b);if(Math.abs(r.gx-a.gx)<2&&Math.abs(r.gy-a.gy)<2)return;const o=this._mode();!1!==this._cfg().pinOnRelease&&(this.pins.push({xa:r.x,ya:r.y,xb:a.x,yb:a.y,mode:o}),this._renderPins(),null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,"measure")),this._fireMeasured(r,a)}clearMeasures(){var t,e;this.pins=[],this._renderPins(),null==(e=null==(t=this.ctx.history)?void 0:t.snapshot)||e.call(t,"clear measures")}getPins(){return this.pins.map(t=>({xa:t.xa,ya:t.ya,xb:t.xb,yb:t.yb,mode:"free"===t.mode?"free":"span"}))}setPins(t){this.pins=Array.isArray(t)?t.filter(t=>t&&isFinite(t.xa)&&isFinite(t.ya)&&isFinite(t.xb)&&isFinite(t.yb)).map(t=>({xa:+t.xa,ya:+t.ya,xb:+t.xb,yb:+t.yb,mode:"free"===t.mode?"free":"span"})):[],this._renderPins()}_points(t){const e=[];for(let i=0;i<t.length;i++){const n=t[i];let s,r;Array.isArray(n)?(s=+n[0],r=+n[1]):n&&"object"==typeof n?(s=+n.x,r=+n.y):(s=i,r=+n),isFinite(s)&&isFinite(r)&&e.push({x:s,y:r})}return e}_arm(){if(this.armed||!this._enabled())return;const t=this.w,e=t.dom.elGraphical;if(!e)return;this.armed=!0;const i=this.graphics.drawRect(0,0,t.layout.gridWidth,t.layout.gridHeight);i.node.setAttribute("class","apexcharts-measure-capture"),i.node.setAttribute("fill","transparent"),i.node.style.cursor="crosshair",i.node.style.pointerEvents="all",i.node.addEventListener("mousedown",this._onDown),i.node.addEventListener("touchstart",this._onDown,{passive:!1}),e.add(i),this.pane=i}_disarm(){if(this.armed=!1,this.pane){this.pane.node.removeEventListener("mousedown",this._onDown),this.pane.node.removeEventListener("touchstart",this._onDown);const t=this.pane.node;t.parentNode&&t.parentNode.removeChild(t),this.pane=null}}_clientXY(t){const e=t.touches&&t.touches[0]?t.touches[0]:t;return{cx:e.clientX,cy:e.clientY}}_plotRect(){const t=this.w;return t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg")?tn.plotRect(t):null}_yRange(){const t=this.w.globals,e=t.yAxisScale&&t.yAxisScale[0];return e&&isFinite(e.niceMin)&&isFinite(e.niceMax)&&e.niceMax!==e.niceMin?[e.niceMin,e.niceMax]:[t.minY,t.maxY]}_project(t,e){const i=this.w,n=this._plotRect(),s=i.layout.gridWidth,r=i.layout.gridHeight,a=t=>t<0?0:t>1?1:t,o=n&&n.width?a((t-n.left)/n.width):0,l=n&&n.height?a((e-n.top)/n.height):0,[c,h]=this._yRange();return{x:i.globals.minX+o*(i.globals.maxX-i.globals.minX),y:h-l*(h-c),gx:o*s,gy:l*r}}_dataToGrid(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=i.globals.maxX-i.globals.minX||1,[a,o]=this._yRange(),l=o-a||1;return{gx:(t-i.globals.minX)/r*n,gy:s-(e-a)/l*s}}_onDown(t){if(!this.armed)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:i}=this._clientXY(t),n=this._project(e,i);this.drag={a:n,b:n};const s=this._doc();s&&(s.addEventListener("mousemove",this._onMove),s.addEventListener("mouseup",this._onUp),s.addEventListener("touchmove",this._onMove,{passive:!1}),s.addEventListener("touchend",this._onUp)),this._renderLive()}_onMove(t){if(!this.drag)return;t.cancelable&&t.preventDefault();const{cx:e,cy:i}=this._clientXY(t);this.drag.b=this._project(e,i),this._renderLive()}_onUp(t){var e,i;const n=this._doc();if(n&&(n.removeEventListener("mousemove",this._onMove),n.removeEventListener("mouseup",this._onUp),n.removeEventListener("touchmove",this._onMove),n.removeEventListener("touchend",this._onUp)),!this.drag)return;const s=this.drag.a,r=this.drag.b;if(this.drag=null,this._clearLive(),Math.abs(s.gx-r.gx)<2&&Math.abs(s.gy-r.gy)<2)return void(this.persistent||this._disarm());const a=this._mode(),o=this._resolve(s),l=this._resolve(r);!1!==this._cfg().pinOnRelease&&(this.pins.push({xa:o.x,ya:o.y,xb:l.x,yb:l.y,mode:a}),this._renderPins(),null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,"measure")),this._fireMeasured(o,l),this.persistent||this._disarm()}_cancelDrag(){const t=this._doc();t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("touchend",this._onUp)),this.drag=null,this._clearLive()}_stats(t,e){const i=e.x-t.x,n=e.y-t.y;return{dx:i,dy:n,pct:0!==t.y?n/Math.abs(t.y)*100:NaN,slope:0!==i?n/i:NaN}}_fmt(t){if(!isFinite(t))return"n/a";const e=Math.abs(t);return 0!==e&&(e<.01||e>=1e6)?t.toExponential(2):String(Math.round(100*t)/100)}_computedStyle(){if(!k.isBrowser())return null;const t=this.w.dom.elGraphical&&this.w.dom.elGraphical.node;if(!t||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(t)}catch(t){return null}}_resolveColor(t,e,i,n){if(t)return t;const s=void 0!==n?n:this._computedStyle();return(s?s.getPropertyValue(e).trim():"")||i}_colors(){const t=this._cfg().colors||{},e=this._computedStyle();return{up:this._resolveColor(t.up,"--apx-measure-up","#16a34a",e),down:this._resolveColor(t.down,"--apx-measure-down","#dc2626",e),neutral:this._resolveColor(t.neutral,"--apx-measure-neutral","#64748b",e),guide:this._resolveColor(t.guide,"--apx-measure-guide","#94a3b8",e)}}_dirColor(t){const e=this._colors();return 0===t?e.neutral:t>0?e.up:e.down}_dirClass(t){return 0===t?"apexcharts-measure-flat":t>0?"apexcharts-measure-up":"apexcharts-measure-down"}_fmtPct(t){if(!isFinite(t))return"n/a";const e=this._cfg().format&&this._cfg().format.percent;if("function"==typeof e)try{const i=e(t);if(null!=i)return String(i)}catch(t){}return(t>=0?"+":"")+this._fmt(t)+"%"}_label(t,e,i,n){const s=this._cfg().label;if("function"==typeof s){const r=s({from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:i.dx,dy:i.dy,percentChange:i.pct,slope:i.slope,mode:n});return Array.isArray(r)?r.map(String):[String(r)]}if("span"===n){const n=0===i.dy?"":i.dy>0?" \u2191":" \u2193",s=isFinite(i.pct)?"("+this._fmtPct(i.pct)+")":"";return[this._fmtY(i.dy)+" "+s+n,this._fmtX(t.x)+" to "+this._fmtX(e.x)]}return["\u0394x "+this._fmtDx(i.dx),"\u0394y "+this._fmtY(i.dy),this._fmtPct(i.pct)]}_fmtDx(t){if("datetime"===this.w.config.xaxis.type){const e=t/864e5;return Math.round(10*e)/10+"d"}return this._fmt(t)}_fmtY(t){const e=this._cfg().format&&this._cfg().format.y;if("function"==typeof e)try{const i=e(t);if(null!=i)return String(i)}catch(t){}const i=this.w.globals.yLabelFormatters&&this.w.globals.yLabelFormatters[0];if("function"==typeof i)try{const e=i(t,{seriesIndex:0,dataPointIndex:-1,w:this.w});if(null!=e&&""!==e)return String(e)}catch(t){}return this._fmt(t)}_fmtX(t){const e=this.w,i=this._cfg().format&&this._cfg().format.x;if("function"==typeof i)try{const e=i(t);if(null!=e)return String(e)}catch(t){}if("datetime"===e.config.xaxis.type){return new Date(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}const n=e.globals.xLabelFormatter;if("function"==typeof n)try{const i=n(t,{w:e});if(null!=i&&""!==i)return String(i)}catch(t){}return this._fmt(t)}_liveGroup(){const t=this.w;if(this._live&&this._live.node&&this._live.node.parentNode)return this._live;const e=this.graphics.group({class:"apexcharts-measure-live"});return e.node.style.pointerEvents="none",t.dom.elGraphical&&t.dom.elGraphical.add(e),this._live=e,e}_clearLive(){if(this._live&&this._live.node){const t=this._live.node;t.parentNode&&t.parentNode.removeChild(t)}this._live=null}_renderLive(){if(!this.drag)return;const t=this._liveGroup();for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);const e=this._resolve(this.drag.a),i=this._resolve(this.drag.b);this._drawRuler(t,e,i,!1,this._mode())}_renderPins(){const t=this.w,e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-measure-pins");if(e&&e.parentNode&&e.parentNode.removeChild(e),!this.pins.length||!t.dom.elGraphical)return;const i=this.graphics.group({class:"apexcharts-measure-pins"});i.node.style.pointerEvents="none",t.dom.elGraphical.add(i),this.pins.forEach(t=>{const e=c(l({},this._dataToGrid(t.xa,t.ya)),{x:t.xa,y:t.ya}),n=c(l({},this._dataToGrid(t.xb,t.yb)),{x:t.xb,y:t.yb});this._drawRuler(i,e,n,!0,t.mode||"span")})}_drawRuler(t,e,i,n,s){const r=this._stats(e,i),a=this.graphics.group({class:"apexcharts-measure-ruler "+this._dirClass(r.dy)+(n?" apexcharts-measure-pinned":"")});"free"===(s||this._mode())?this._drawFree(a,e,i,r):this._drawSpan(a,e,i,r),t.add(a)}_dot(t,e,i){if(!1===this._cfg().markers)return;const n=this.graphics.drawMarker(e.gx,e.gy,{pSize:4,shape:"circle",pointFillColor:i,pointFillOpacity:1,pointStrokeColor:"#fff",pointStrokeWidth:2,pointStrokeOpacity:1});t.add(n)}_readout(t,e,i,n,s,r,a){const o=this.graphics.drawRect(i,n,s,r,4);o.node.setAttribute("class","apexcharts-measure-label-bg"),o.attr({fill:"#ffffff","fill-opacity":.95,stroke:a,"stroke-width":1}),t.add(o);const l=this.graphics.drawText({x:i+9,y:n+15,text:e,textAnchor:"start",fontSize:"11px",foreColor:"#1e293b",cssClass:"apexcharts-measure-label"});t.add(l)}_drawSpan(t,e,i,n){const s=this.w,r=this._cfg(),a=s.layout.gridHeight,o=this._dirColor(n.dy),l=Math.min(e.gx,i.gx),c=Math.max(e.gx,i.gx);if(!1!==r.band){const e=this.graphics.drawRect(l,0,Math.max(0,c-l),a,0);e.node.setAttribute("class","apexcharts-measure-band"),e.attr({fill:o,"fill-opacity":.09,stroke:"none"}),t.add(e)}!1!==r.guides&&[e,i].forEach(e=>{const i=this.graphics.drawLine(e.gx,0,e.gx,a,this._colors().guide,4,1);i.node.setAttribute("class","apexcharts-measure-vline"),t.add(i)}),[e,i].forEach(e=>this._dot(t,e,o));const h=this._label(e,i,n,"span"),d=h.reduce((t,e)=>Math.max(t,e.length),0),u=Math.max(148,6.4*d),p=20+15*h.length;let f=(l+c)/2-u/2;f=Math.max(2,Math.min(f,s.layout.gridWidth-u-2)),this._readout(t,h,f,4,u,p,o)}_drawFree(t,e,i,n){const s=this._dirColor(n.dy),r=this.graphics.drawLine(e.gx,e.gy,i.gx,i.gy,s,0,2);r.node.setAttribute("class","apexcharts-measure-line"),t.add(r),[e,i].forEach(e=>this._dot(t,e,s));const a=this._label(e,i,n,"free"),o=a.reduce((t,e)=>Math.max(t,e.length),0),l=Math.max(72,6.2*o),c=16+15*a.length;let h=(e.gx+i.gx)/2+8,d=(e.gy+i.gy)/2-c/2;h=Math.max(2,Math.min(h,this.w.layout.gridWidth-l-2)),d=Math.max(2,Math.min(d,this.w.layout.gridHeight-c-2)),this._readout(t,a,h,d,l,c,s)}_fireMeasured(t,e){const i=this._stats(t,e),n={from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:i.dx,dy:i.dy,percentChange:i.pct,slope:i.slope},s=this.w.config.chart.events.measured;"function"==typeof s&&s(this.ctx,n),this.ctx.events.fireEvent("measured",[this.ctx,n])}_afterRender(){this._enabled()&&(this._bindKeys(),this.w.interact.measureEnabled&&!this.persistent&&(this.persistent=!0),this.pins.length&&this._renderPins(),this.persistent&&!this.drag&&(this._disarm(),this._arm()))}teardown(){this._cancelDrag(),this._endSeed(!1),this._disarm();const t=this._doc();t&&this._keysBound&&(t.removeEventListener("keydown",this._onKeyDown),t.removeEventListener("keyup",this._onKeyUp)),this._keysBound=!1,this.pins=[]}}});const Fn=[".apexcharts-bar-area",".apexcharts-candlestick-area",".apexcharts-boxPlot-area",".apexcharts-rangebar-area",".apexcharts-marker"].join(", "),Pn=[".apexcharts-pie-area",".apexcharts-bar-area"].join(", "),Dn="apexcharts-crossfilter-dimmed",Rn=["pie","donut","polarArea","radialBar"];m.default.registerFeatures({linkedViews:class{constructor(t,e){this.w=t,this.ctx=e,this._dimmed=!1,this._wired=!1,this._pending=!1,this._lastValues=null,this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onChange=this._onChange.bind(this),"filter"===this._mode()&&this._initEngine()}_mode(){const t=this.w.config.chart.link;return t&&"function"==typeof t.dimension?"filter":t&&t.enabled?"highlight":"off"}_enabled(){const t=this.w.config.chart.link;return!(!t||!t.enabled)}onSourceSelection(t){var e;const i=this._mode();if("off"===i)return;if(!t||null==t.min||null==t.max)return;let n=Math.min(t.min,t.max),s=Math.max(t.min,t.max);const r=this.w.globals.minX,a=this.w.globals.maxX;if(isFinite(r)&&isFinite(a)&&a>r){const t=1e-6*(a-r);n-r<=t&&(n=r),a-s<=t&&(s=a)}if("filter"===i){const t=this._cf();if(!t)return;return t.filter(this._chartId(),[n,s]),void this._fireFilterChange(t,[n,s])}this._group().forEach(t=>{var e;null==(e=null==t?void 0:t.linkedViews)||e.applyDim(n,s)});const o={xaxis:{min:n,max:s},sourceChartID:this.w.globals.chartID};"function"==typeof this.w.config.chart.events.crossFilter&&this.w.config.chart.events.crossFilter(this.ctx,o),null==(e=this.ctx.events)||e.fireEvent("crossFilter",[this.ctx,o])}_group(){const t="function"==typeof this.ctx.getGroupedCharts?this.ctx.getGroupedCharts():[];return[this.ctx,...t]}applyDim(t,e){if(!this._enabled())return;const i=this.w,n=i.dom.baseEl;if(!n)return;const s=i.config.chart.link.dimOpacity;i.dom.elWrap&&"number"==typeof s&&i.dom.elWrap.style.setProperty("--apx-cf-dim",String(s));const r=i.globals.seriesX||[];n.querySelectorAll(Fn).forEach(i=>{const n=i.getAttribute("j");if(null===n)return;const s=parseInt(n,10),a=i.getAttribute("index"),o=null===a?0:parseInt(a,10),l=r[o]||r[0];if(!l)return;const c=l[s];null!=c&&i.classList.toggle(Dn,c<t||c>e)}),this._dimmed=!0}clear(){const t=this.w.dom.baseEl;t&&(t.querySelectorAll("."+Dn).forEach(t=>t.classList.remove(Dn)),this._dimmed=!1)}clearGroup(){if("filter"===this._mode()){const t=this._cf();return void(t&&t.reset())}this._group().forEach(t=>{var e;return null==(e=null==t?void 0:t.linkedViews)?void 0:e.clear()})}_chartId(){return this.w.globals.chartID}_cf(){const t=this.w.config.chart.link,e=t&&(t.id||this.w.config.chart.group);return e?Dt.get(e):null}_isPie(){return-1!==Rn.indexOf(this.w.config.chart.type)}_isHeatmap(){return"heatmap"===this.w.config.chart.type}_initEngine(){const t=this._cf(),e=this.w.config.chart.link;if(!t){const t=e&&e.id||this.w.config.chart.group;return void console.warn(`[apexcharts] chart.link.dimension is set but no crossfilter coordinator "${t}" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`)}const i=this._chartId();t.hasDimension(i)||t.registerDimension(i,{dimension:e.dimension,reduce:e.reduce,type:e.type||(this._isHeatmap()?"matrix":void 0),bins:e.bins,order:e.order}),this._injectSeries(t.aggregateFor(i)),this._wire(t)}_seriesFromAgg(t){if("matrix"===t.type)return t.yLabels.map((e,i)=>({name:String(e),data:t.xLabels.map((e,n)=>({x:String(e),y:t.matrix[i][n]}))}));if(this._isPie())return t.values.slice();const e=this.w.config.chart.link.seriesName||"Count";return"range"===t.type?[{name:e,data:t.labels.map((e,i)=>[e,t.values[i]])}]:[{name:e,data:t.values.slice()}]}_sigOf(t){return JSON.stringify(t.matrix||t.values)}_injectSeries(t){const e=this.w;this._lastValues=this._sigOf(t),e.config.series=this._seriesFromAgg(t),"matrix"!==t.type&&(this._isPie()?e.config.labels=t.labels.map(String):"category"===t.type?(e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.categories=t.labels.map(String)):"range"===t.type&&this._pinRangeDomain(t.edges))}_pinRangeDomain(t){if(!Array.isArray(t)||t.length<2)return;const e=this.w;e.config.xaxis||(e.config.xaxis={}),null==e.config.xaxis.min&&(e.config.xaxis.min=t[0]),null==e.config.xaxis.max&&(e.config.xaxis.max=t[t.length-1])}_wire(t){this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.on("change",this._onChange))}_onPointSelect(t,e,i){if("filter"!==this._mode()||!i||null==i.dataPointIndex)return;const n=this._cf();if(!n)return;const s=this._chartId(),r=n.aggregateFor(s);if("matrix"===r.type)return;const a=r.keys[i.dataPointIndex];null!=a&&(n.toggleKey(s,a),this._fireFilterChange(n,a))}_onChange(){"filter"!==this._mode()||this._pending||(this._pending=!0,Promise.resolve().then(()=>{this._pending=!1,this.w.globals.isDestroyed||this._applyAggregation()}))}_applyAggregation(){if("filter"!==this._mode())return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),i=this._sigOf(e);i!==this._lastValues?(this._lastValues=i,this.ctx._replaceSeries(this._seriesFromAgg(e),!0,!0,{keepView:!0})):this._applySelfDim()}_afterRender(){if("filter"!==this._mode())return;const t=this.w.config.series;t&&0!==t.length?this._applySelfDim():this._reassertSeries()}_reassertSeries(){this._pending||(this._pending=!0,Promise.resolve().then(()=>{if(this._pending=!1,this.w.globals.isDestroyed)return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),i=this._seriesFromAgg(e);i.length&&(this._lastValues=this._sigOf(e),this.ctx._replaceSeries(i,!0,!0,{keepView:!0}))}))}_applySelfDim(){const t=this._cf();if(!t)return;const e=this.w,i=e.dom.baseEl;if(!i)return;const n=this._chartId(),s=t.filterOf(n),r=e.config.chart.link.dimOpacity;e.dom.elWrap&&"number"==typeof r&&e.dom.elWrap.style.setProperty("--apx-cf-dim",String(r));const a=s instanceof Set,o=Array.isArray(s),l=t.aggregateFor(n);if("matrix"===l.type)return;const c=l.keys;i.querySelectorAll(Pn).forEach(t=>{const e=t.getAttribute("j");if(null===e)return;const i=c[parseInt(e,10)];let n=!1;a?n=!s.has(i):o&&Array.isArray(i)&&(n=i[1]<=s[0]||i[0]>=s[1]),t.classList.toggle(Dn,n)}),this._dimmed=!!s}_fireFilterChange(t,e){var i;const n=c(l({},t.state()),{sourceChartID:this._chartId(),key:e}),s=this.w.config.chart.events;"function"==typeof s.filterChange&&s.filterChange(this.ctx,n),null==(i=this.ctx.events)||i.fireEvent("filterChange",[this.ctx,n])}teardown(){var t,e,i,n,s,r;if(this.clear(),this._wired){null==(e=(t=this.ctx).removeEventListener)||e.call(t,"dataPointSelection",this._onPointSelect),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"mounted",this._afterRender),null==(r=(s=this.ctx).removeEventListener)||r.call(s,"updated",this._afterRender);const a=this._cf();a&&(a.off("change",this._onChange),a.removeDimension(this._chartId())),this._wired=!1}}},crossfilter:Dt});const Tn=m.__apex_Options,Nn=["point","xaxis","yaxis"],On=[10,11,12,14,17,20],$n=["circle","square","diamond","triangle"],In={circle:"\u25cf",square:"\u25a0",diamond:"\u25c6",triangle:"\u25b2"},zn=["#ffffff","#334155","#2563eb","#16a34a","#d97706","#dc2626"];class Wn{constructor(t,e){this.w=t,this.ctx=e,this._wired=!1,this._drag=null,this._editor=null,this._creating=!1,this._createSeq=0,this._attach=this._attach.bind(this),this._onRerender=this._onRerender.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onCreateClick=this._onCreateClick.bind(this),this._onDocDownEditor=this._onDocDownEditor.bind(this),(this._enabledGlobally()||this._hasDraggable()||this._paletteEnabled())&&this._wire()}_enabledGlobally(){const t=this.w.config.chart.ink;return!(!t||!t.enabled)}_paletteEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.palette)}_snapEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.snap)}_nearest(t,e){let i=t,n=1/0;for(let s=0;s<e.length;s++){const r=Math.abs(e[s]-t);r<n&&(n=r,i=e[s])}return i}_snapX(t){if(!this._snapEnabled()||"number"!=typeof t)return t;const e=this.w.globals.xAxisScale;return e&&Array.isArray(e.result)&&e.result.length?this._nearest(t,e.result):t}_snapY(t,e){if(!this._snapEnabled()||"number"!=typeof t)return t;const i=this.w.globals.yAxisScale,n=i&&i[e];return n&&Array.isArray(n.result)&&n.result.length?this._nearest(t,n.result):t}_annoList(t){const e=this.w.config.annotations;if(!e)return[];const i="point"===t?"points":t;return Array.isArray(e[i])?e[i]:[]}_isDraggable(t){return!!t&&(!0===t.draggable||!1!==t.draggable&&this._enabledGlobally())}_hasDraggable(){return Nn.some(t=>this._annoList(t).some(t=>this._isDraggable(t)))}_wire(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onRerender),this.ctx.addEventListener("updated",this._onRerender))}_onRerender(){if(this._closeEditor(!1),this._attach(),this._creating){const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0))}}_attach(){const t=this.w,e=t.dom.baseEl;e&&(Nn.forEach(i=>{this._annoList(i).forEach((n,s)=>{this._isDraggable(n)&&(n.id||(n.id="apexcharts-ink-"+i+"-"+s+"-"+t.globals.chartID),e.querySelectorAll("."+n.id).forEach(t=>{t.__inkBound||(t.__inkBound=!0,t.style.cursor="move",t.classList.add("apexcharts-ink-draggable"),t.addEventListener("mousedown",t=>this._onDown(t,i,s)),t.addEventListener("touchstart",t=>this._onDown(t,i,s)),t.addEventListener("dblclick",t=>{t.preventDefault(),t.stopPropagation(),this._startEdit(i,s,{select:!0})}))}))})}),this._paletteEnabled()&&this._renderPalette())}_onDown(t,e,i){if(t.button&&0!==t.button)return;const n=this.w,s=n.dom.baseEl&&n.dom.baseEl.ownerDocument;if(!s)return;t.stopPropagation(),t.cancelable&&t.preventDefault();const r="touchstart"===t.type?t.touches[0]:t,a=n.dom.Paper&&n.dom.Paper.node,o=a&&a.getScreenCTM?a.getScreenCTM():null,l=this._annoList(e)[i];let c="move",h=null,d=0,u=0;if("xaxis"===e&&null!=l.x2&&(h=n.dom.baseEl.querySelector(".apexcharts-annotation-rect."+l.id),h)){const t=h.getBoundingClientRect();Math.abs(r.clientX-t.left)<=8?c="resize-x1":Math.abs(r.clientX-t.right)<=8&&(c="resize-x2"),d=parseFloat(h.getAttribute("x"))||0,u=parseFloat(h.getAttribute("width"))||0}this._drag={type:e,index:i,anno:l,els:Array.from(n.dom.baseEl.querySelectorAll("."+l.id)),mode:c,rect:h,origX:d,origW:u,startX:r.clientX,startY:r.clientY,scaleX:o&&o.a?o.a:1,scaleY:o&&o.d?o.d:1,dxPixel:0,dyPixel:0,moved:!1},s.addEventListener("mousemove",this._onMove),s.addEventListener("touchmove",this._onMove,{passive:!1}),s.addEventListener("mouseup",this._onUp),s.addEventListener("touchend",this._onUp)}_onMove(t){const e=this._drag;if(!e)return;t.cancelable&&t.preventDefault();const i="touchmove"===t.type?t.touches[0]:t;if(e.dxPixel=(i.clientX-e.startX)/e.scaleX,e.dyPixel=(i.clientY-e.startY)/e.scaleY,(Math.abs(e.dxPixel)>2||Math.abs(e.dyPixel)>2)&&(e.moved=!0),"move"===e.mode){const t=`translate(${e.dxPixel} ${e.dyPixel})`;e.els.forEach(e=>e.setAttribute("transform",t))}else e.rect&&("resize-x1"===e.mode?(e.rect.setAttribute("x",e.origX+e.dxPixel),e.rect.setAttribute("width",Math.max(1,e.origW-e.dxPixel))):"resize-x2"===e.mode&&e.rect.setAttribute("width",Math.max(1,e.origW+e.dxPixel)))}_onUp(){const t=this._drag;if(this._drag=null,this._teardownDocListeners(),!t||!t.moved)return void(t&&(t.els.forEach(t=>t.removeAttribute("transform")),this._startEdit(t.type,t.index)));const e=this._annoList(t.type)[t.index];e&&(this._applyDelta(t,e),t.els.forEach(t=>t.removeAttribute("transform")),this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:drag"),this._fireDragged(t.type,e,t.index))}_checkpoint(t){var e,i;null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,t)}_applyDelta(t,e){const i=this.w,n=i.layout.gridWidth?t.dxPixel*(i.globals.xRange/i.layout.gridWidth):0;if("point"===t.type){const{newX:n,newY:s}=this._invertPoint(e,t.dxPixel,t.dyPixel);if(e.x=this._snapX(n),null!=s){const t=e.yAxisIndex||0,n=i.globals.seriesYAxisMap;e.y=this._snapY(s,n&&n[t]?n[t][0]:0)}return}if("xaxis"!==t.type){if("yaxis"===t.type){const n=e.yAxisIndex||0,s=i.globals.seriesYAxisMap,r=s&&s[n]?s[n][0]:0,a=i.globals.yRange?i.globals.yRange[r]:null;if(null==a||!i.layout.gridHeight)return;const o=-t.dyPixel*(a/i.layout.gridHeight);"number"==typeof e.y2?("number"==typeof e.y&&(e.y+=o),e.y2+=o):"number"==typeof e.y&&(e.y=this._snapY(e.y+o,r))}}else{if("number"!=typeof e.x)return;if("move"===t.mode)"number"==typeof e.x2?(e.x+=n,e.x2+=n):e.x=this._snapX(e.x+n);else if("resize-x1"===t.mode||"resize-x2"===t.mode){const i=null==e.x2||e.x<=e.x2;("resize-x2"===t.mode?!i:i)?e.x=this._snapX(e.x+n):"number"==typeof e.x2&&(e.x2=this._snapX(e.x2+n))}}}_invertPoint(t,e,i){const n=this.w,s=("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric)&&!n.axisFlags.dataFormatXNumeric;let r=t.x;!s&&"number"==typeof t.x&&n.layout.gridWidth&&(r=t.x+e*(n.globals.xRange/n.layout.gridWidth));let a=t.y;const o=t.yAxisIndex||0,l=n.globals.seriesYAxisMap,c=l&&l[o]?l[o][0]:0,h=n.globals.yRange?n.globals.yRange[c]:null,d=n.config.yaxis[o]&&n.config.yaxis[o].logarithmic;return"number"==typeof t.y&&null!=h&&!d&&n.layout.gridHeight&&(a=t.y-i*(h/n.layout.gridHeight)),{newX:r,newY:a}}_redrawAnno(t,e,i){const n=this.w.dom.baseEl,s=this.ctx.annotations;if(!n||!s)return;n.querySelectorAll("."+e.id).forEach(t=>t.remove());const r=n.querySelector(".apexcharts-"+t+"-annotations");if(!r)return;"point"===t&&s.pointsAnnotations?s.pointsAnnotations.addPointAnnotation(e,r,i):"xaxis"===t&&s.xAxisAnnotations?s.xAxisAnnotations.addXaxisAnnotation(e,r,i):"yaxis"===t&&s.yAxisAnnotations&&s.yAxisAnnotations.addYaxisAnnotation(e,r,i);const a=n.querySelector(".apexcharts-"+t+"-annotation-label."+e.id);if(a&&s.helpers&&e.label&&e.label.text){const t=s.helpers.addBackgroundToAnno(a,e);t&&a.parentNode&&a.parentNode.insertBefore(t.node,a)}this._attach()}_fireAnnotationEvent(t,e){var i;const n=this.w.config.chart.events;"function"==typeof n[t]&&n[t](this.ctx,e),null==(i=this.ctx.events)||i.fireEvent(t,[this.ctx,e])}_fireDragged(t,e,i){const n={type:t,id:e.id,index:i,x:e.x,y:e.y};null!=e.x2&&(n.x2=e.x2),null!=e.y2&&(n.y2=e.y2),this._fireAnnotationEvent("annotationDragged",n)}startCreate(){if(this._creating)return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(this._creating=!0,t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0),this._syncPalette())}stopCreate(){if(!this._creating)return;this._creating=!1;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="",t.removeEventListener("click",this._onCreateClick,!0)),this._syncPalette()}_onCreateClick(t){if(!this._creating)return;t.preventDefault(),t.stopPropagation();const e=this._pixelToData(t.clientX,t.clientY);this.stopCreate(),e&&this.createAt(e.x,e.y)}createAt(t,e,i={}){const n=this.w;this._wire(),this._createSeq+=1;const s="apexcharts-ink-new-"+this._createSeq+"-"+n.globals.chartID,r=B.extend((new Tn).pointAnnotation,{x:t,y:e,id:s,owner:"ink",draggable:!0,label:{text:i.text||"Note"}});n.config.annotations||(n.config.annotations={}),Array.isArray(n.config.annotations.points)||(n.config.annotations.points=[]),n.config.annotations.points.push(r);const a=n.config.annotations.points.length-1;return this._redrawAnno("point",r,a),this._checkpoint("ink:create"),this._fireCreated("point",r,a),this._startEdit("point",a,{select:!0}),r}createLineAt(t,e,i={}){const n=this.w;this._wire(),this._createSeq+=1;const s="apexcharts-ink-new-"+this._createSeq+"-"+n.globals.chartID,r="y"===t?"yaxis":"xaxis",a="yaxis"===r?(new Tn).yAxisAnnotation:(new Tn).xAxisAnnotation,o={id:s,owner:"ink",draggable:!0,strokeDashArray:null!=i.strokeDashArray?i.strokeDashArray:4,label:{text:i.text||""}};i.color&&(o.borderColor=i.color,o.label.borderColor=i.color),"yaxis"===r?o.y=e:o.x=e;const l=B.extend(a,o);n.config.annotations||(n.config.annotations={}),Array.isArray(n.config.annotations[r])||(n.config.annotations[r]=[]),n.config.annotations[r].push(l);const c=n.config.annotations[r].length-1;return this._redrawAnno(r,l,c),this._checkpoint("ink:create"),this._fireCreated(r,l,c),!1!==i.select&&this._startEdit(r,c,{select:!0}),l}_pixelToData(t,e){const i=this.w;if(!i.globals.axisCharts||!i.dom.baseEl||!i.dom.baseEl.querySelector(".apexcharts-svg"))return null;const n=tn.plotRect(i);if(!n.width||!n.height)return null;const s=(t-n.left)/n.width,r=(e-n.top)/n.height;let a=i.globals.minX+s*i.globals.xRange;const o=(i.globals.minYArr&&null!=i.globals.minYArr[0]?i.globals.minYArr[0]:i.globals.minY)+(1-r)*(i.globals.yRange&&null!=i.globals.yRange[0]?i.globals.yRange[0]:i.globals.maxY-i.globals.minY);return("category"===i.config.xaxis.type||i.config.xaxis.convertedCatToNumeric)&&!i.axisFlags.dataFormatXNumeric&&(a=Math.round(a)),{x:a,y:o}}_fireCreated(t,e,i){const n={type:t,id:e.id,index:i};void 0!==e.x&&(n.x=e.x),void 0!==e.y&&(n.y=e.y),this._fireAnnotationEvent("annotationCreated",n)}_renderPalette(){const t=this.w.dom.elWrap;if(!t||t.querySelector(".apexcharts-ink-palette"))return;const e=t.ownerDocument,i=e.createElement("div");i.className="apexcharts-ink-palette";const n=i.style;n.position="absolute",n.top="6px",n.left="6px",n.zIndex="15";const s=e.createElement("button");s.type="button",s.className="apexcharts-ink-add",s.textContent="+ Note";const r=s.style;r.cursor="pointer",r.font="12px sans-serif",r.padding="4px 9px",r.borderRadius="5px",r.border="1px solid #6366f1",r.color="#4338ca",r.background="#fff",s.addEventListener("click",t=>{t.stopPropagation(),this._creating?this.stopCreate():this.startCreate()}),i.appendChild(s),t.appendChild(i),this._syncPalette()}_syncPalette(){const t=this.w.dom.elWrap,e=t&&t.querySelector(".apexcharts-ink-add");e&&(this._creating?(e.style.background="#6366f1",e.style.color="#fff",e.textContent="Click chart..."):(e.style.background="#fff",e.style.color="#4338ca",e.textContent="+ Note"))}_noteColors(){const t=this.w.config.chart.ink;return t&&Array.isArray(t.noteColors)&&t.noteColors.length?t.noteColors:zn}static _isLight(t){const e=String(t||"").replace("#",""),i=3===e.length?e.split("").map(t=>t+t).join(""):e,n=parseInt(i,16);if(isNaN(n)||6!==i.length)return!1;return(.299*(n>>16&255)+.587*(n>>8&255)+.114*(255&n))/255>.72}static _isBold(t){const e=t&&t.fontWeight;return"bold"===e||parseInt(String(e),10)>=600}_cardBtn(t,e,i,n,s,r){const a=t.createElement("button");return a.type="button",a.className="apexcharts-ink-btn"+(s?" "+s:""),a.title=i,a.setAttribute("aria-label",i),r?a.innerHTML=e:a.textContent=e,a.addEventListener("mousedown",t=>t.preventDefault()),a.addEventListener("click",t=>{t.stopPropagation(),n()}),a}_cardLabel(t,e){const i=t.createElement("span");return i.className="apexcharts-ink-cardlabel",i.textContent=e,i}_mkSwatch(t,e,i,n){const s=t.createElement("button");return s.type="button",s.className="apexcharts-ink-swatch"+(n?" "+n:""),s.title=e,s.setAttribute("aria-label","Color "+e),s.dataset.color=e,s.style.background=e,s.addEventListener("mousedown",t=>t.preventDefault()),s.addEventListener("click",t=>{t.stopPropagation(),i(e)}),s}_startEdit(t,e,i={}){const n=this.w,s=this._annoList(t)[e],r=n.dom.baseEl,a=n.dom.elWrap;if(!(s&&s.id&&r&&a))return;this._closeEditor(!1);const o=r.ownerDocument,l=o.createElement("div");l.className="apexcharts-ink-card",l.setAttribute("role","dialog"),l.setAttribute("aria-label","Edit note"),l.style.visibility="hidden";const c=o.createElement("div");c.className="apexcharts-ink-card-row";const h=o.createElement("input");h.type="text",h.className="apexcharts-ink-editor",h.placeholder="Note text",h.value=s.label&&s.label.text||"",c.appendChild(h),c.appendChild(this._cardBtn(o,'<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/></svg>',"Delete note",()=>this._deleteAnno(),"apexcharts-ink-btn--delete",!0)),l.appendChild(c);const d=o.createElement("div");d.className="apexcharts-ink-card-row","point"!==t&&d.appendChild(this._cardLabel(o,"Label")),this._noteColors().forEach(t=>{d.appendChild(this._mkSwatch(o,t,t=>this._applyColor(t)))});const u=o.createElement("span");if(u.className="apexcharts-ink-sep",d.appendChild(u),d.appendChild(this._cardBtn(o,"B","Bold",()=>this._toggleBold(),"apexcharts-ink-btn--bold")),d.appendChild(this._cardBtn(o,"A-","Smaller text",()=>this._stepFont(-1))),d.appendChild(this._cardBtn(o,"A+","Larger text",()=>this._stepFont(1))),l.appendChild(d),"point"!==t){const t=o.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(o,"Line")),this._noteColors().forEach(e=>{t.appendChild(this._mkSwatch(o,e,t=>this._applyLineColor(t),"apexcharts-ink-swatch--line"))}),l.appendChild(t)}if("point"===t){const t=o.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(o,"Marker")),t.appendChild(this._cardBtn(o,"-","Smaller marker",()=>this._stepMarker(-1)));const e=o.createElement("span");e.className="apexcharts-ink-marker-size",t.appendChild(e),t.appendChild(this._cardBtn(o,"+","Larger marker",()=>this._stepMarker(1))),t.appendChild(this._cardBtn(o,In.circle,"Marker shape",()=>this._cycleShape(),"apexcharts-ink-btn--shape")),l.appendChild(t)}a.appendChild(l),this._editor={card:l,input:h,type:t,index:e},this._positionCard(),this._syncCard(),l.style.visibility="",h.focus(),i.select&&h.select(),l.addEventListener("keydown",t=>{"Escape"===t.key?(t.preventDefault(),t.stopPropagation(),this._closeEditor(!1)):"Enter"===t.key&&t.target===h&&(t.preventDefault(),this._closeEditor(!0))}),o.addEventListener("mousedown",this._onDocDownEditor,!0),o.addEventListener("touchstart",this._onDocDownEditor,!0)}_onDocDownEditor(t){const e=this._editor;e&&!e.card.contains(At(t))&&this._closeEditor(!0)}_positionCard(){const t=this._editor;if(!t)return;const e=this.w,i=e.dom.baseEl,n=e.dom.elWrap,s=this._annoList(t.type)[t.index];if(!i||!n||!s)return;const r=i.querySelector(".apexcharts-"+t.type+"-annotation-label."+s.id)||i.querySelector("."+s.id);if(!r)return;const a=n.getBoundingClientRect(),o=r.getBoundingClientRect(),l=t.card.offsetWidth,c=t.card.offsetHeight;let h=Math.round(o.left-a.left),d=Math.round(o.bottom-a.top)+8;d+c>n.clientHeight-4&&(d=Math.round(o.top-a.top)-c-8),h+l>n.clientWidth-4&&(h=n.clientWidth-l-4),t.card.style.left=Math.max(4,h)+"px",t.card.style.top=Math.max(4,d)+"px"}_syncCard(){const t=this._editor;if(!t)return;const e=this._annoList(t.type)[t.index];if(!e)return;const i=e.label&&e.label.style||{},n=String(i.background||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===n)});const s=String(e.borderColor||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch--line").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===s)});const r=t.card.querySelector(".apexcharts-ink-btn--bold");r&&r.classList.toggle("apexcharts-ink-btn--active",Wn._isBold(i));const a=e.marker||{},o=t.card.querySelector(".apexcharts-ink-marker-size");o&&(o.textContent=String("number"==typeof a.size?a.size:4));const l=t.card.querySelector(".apexcharts-ink-btn--shape");l&&(l.textContent=In[a.shape]||In.circle)}_commitTextOf(t){const e=this._annoList(t.type)[t.index];if(!e)return;const i=t.input.value;e.label||(e.label={}),e.label.text!==i&&(e.label.text=i,this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:edit"),this._fireEdited(t.type,e,t.index))}_closeEditor(t){const e=this._editor;if(!e)return;this._editor=null;const i=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;i&&(i.removeEventListener("mousedown",this._onDocDownEditor,!0),i.removeEventListener("touchstart",this._onDocDownEditor,!0)),e.card.parentNode&&e.card.parentNode.removeChild(e.card),t&&this._commitTextOf(e)}_applyStyle(t,e){const i=this._editor;if(!i)return;const n=this._annoList(i.type)[i.index];n&&(this._commitTextOf(i),n.label||(n.label={}),n.label.style||(n.label.style={}),e(n),this._redrawAnno(i.type,n,i.index),this._checkpoint(t),this._fireStyled(i.type,n,i.index),this._syncCard(),this._positionCard())}_applyColor(t){const e=this._editor;if(!e)return;const i=Wn._isLight(t);this._applyStyle("ink:style",n=>{n.label.style.background=t,n.label.style.color=i?"#334155":"#ffffff",n.label.borderColor=i?"#cbd5e1":t,"point"===e.type&&(n.marker||(n.marker={}),n.marker.strokeColor=i?"#334155":t,n.marker.fillColor=i?"#ffffff":t)})}_applyLineColor(t){const e=this._editor;e&&"point"!==e.type&&this._applyStyle("ink:style",e=>{e.borderColor=t,null==e.x2&&null==e.y2||(e.fillColor=t)})}_stepFont(t){this._applyStyle("ink:style",e=>{const i=parseFloat(e.label.style.fontSize)||11;let n=0;for(let t=1;t<On.length;t++)Math.abs(On[t]-i)<Math.abs(On[n]-i)&&(n=t);n=Math.min(On.length-1,Math.max(0,n+t)),e.label.style.fontSize=On[n]+"px"})}_toggleBold(){this._applyStyle("ink:style",t=>{t.label.style.fontWeight=Wn._isBold(t.label.style)?400:700})}_stepMarker(t){this._applyStyle("ink:style",e=>{e.marker||(e.marker={});const i="number"==typeof e.marker.size?e.marker.size:4;e.marker.size=Math.min(14,Math.max(2,i+t))})}_cycleShape(){this._applyStyle("ink:style",t=>{t.marker||(t.marker={});const e=$n.indexOf(t.marker.shape);t.marker.shape=$n[(e+1)%$n.length]})}_deleteAnno(){const t=this._editor;if(!t)return;const e=this._annoList(t.type),i=e[t.index];if(this._closeEditor(!1),!i)return;const n=this.w.dom.baseEl;n&&i.id&&n.querySelectorAll("."+i.id).forEach(t=>t.remove()),e.splice(t.index,1);for(let i=t.index;i<e.length;i++)this._redrawAnno(t.type,e[i],i);this._checkpoint("ink:delete"),this._fireDeleted(t.type,i,t.index)}_fireEdited(t,e,i){const n={type:t,id:e.id,index:i,text:e.label?e.label.text:""};this._fireAnnotationEvent("annotationEdited",n)}_fireStyled(t,e,i){const n={type:t,id:e.id,index:i,label:e.label,marker:e.marker};this._fireAnnotationEvent("annotationStyled",n)}_fireDeleted(t,e,i){const n={type:t,id:e.id,index:i};this._fireAnnotationEvent("annotationDeleted",n)}_teardownDocListeners(){const t=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchend",this._onUp))}teardown(){var t,e,i,n;this._teardownDocListeners(),this._closeEditor(!1),this.stopCreate(),this._drag=null,this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onRerender),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onRerender),this._wired=!1)}}m.default.registerFeatures({ink:Wn});const Bn="https://apexcharts.com/pricing",jn="__apexcharts_license_enforcer_v1__";globalThis[jn]||(globalThis[jn]={perspectivesTokenDecoded:!1,enforced:new Set});const Hn=globalThis[jn],Yn=Hn.enforced;function qn(){Hn.perspectivesTokenDecoded=!0,Vn()}const Xn=new Set(["premium","enterprise"]);function Gn(t,e){const i=gt.add(e,{manage:!1});if(t._wmPainted=!0,!i||"undefined"==typeof MutationObserver)return;if(t._wmNodeObserver&&t._wmObservedNode===i)return;t._wmNodeObserver&&t._wmNodeObserver.disconnect();const n=new MutationObserver(()=>{const t=gt.node(e);t&&(n.disconnect(),gt.applyStyles(t),n.takeRecords(),n.observe(t,{attributes:!0,attributeFilter:["style"]}))});n.observe(i,{attributes:!0,attributeFilter:["style"]}),t._wmNodeObserver=n,t._wmObservedNode=i}function Un(t,e){if(!t._wmPainted)return;t._wmPainted=!1,t._wmWrapObserver&&(t._wmWrapObserver.disconnect(),t._wmWrapObserver=null),t._wmNodeObserver&&(t._wmNodeObserver.disconnect(),t._wmNodeObserver=null),t._wmObservedNode=null,t._wmObservedWrap=null;const i=e||t.w&&t.w.dom&&t.w.dom.elWrap;i&>.remove(i,{manage:!1})}function Kn(t,e){try{if(!k.isBrowser())return;if(t&&t.globals&&t.globals.isDestroyed)return void Yn.delete(e);const i=t&&t.dom&&t.dom.elWrap;if(!i)return;const n=function(t,e){var i;const n=t&&t.config&&t.config.chart||{},s=[];"unit"===n.type&&s.push("unit"),"raincloud"===n.requestedType&&s.push("raincloud"),e.trellis&&"function"==typeof e.trellis.isActive&&e.trellis.isActive()&&s.push("trellis"),e.storyboard&&e.storyboard._used&&s.push("storyboard");const r=n.link;return e.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),e.ink&&n.ink&&!0===n.ink.enabled&&s.push("ink"),e.measure&&n.measure&&!0===n.measure.enabled&&s.push("measure"),e.contextMenu&&n.contextMenu&&!0===n.contextMenu.enabled&&s.push("context-menu"),e.perspectives&&(e.perspectives._used||Hn.perspectivesTokenDecoded)&&s.push("perspectives"),e.history&&n.history&&!0===n.history.enabled&&s.push("history"),(null==(i=e._highlightFilter)?void 0:i.isActive())&&s.push("highlight-filter"),s}(t,e);if(0===n.length)return Yn.delete(e),void Un(e,i);Yn.add(e);const s=function(t){const e=t&&t.config&&t.config.chart&&t.config.chart.license;if(e)return e;const i=ht.getKey();if(i)return i;const n=k.getApex();return n&&n.license?n.license:null}(t);if(function(t){if(!t)return!1;const e=ht.validateKey(t);if(!e.valid)return!1;const i=e.data&&e.data.plan;return"string"==typeof i&&Xn.has(i.toLowerCase())}(s))return void Un(e,i);!function(t,e){if(Gn(t,e),"undefined"==typeof MutationObserver)return;if(t._wmWrapObserver&&t._wmObservedWrap===e)return;t._wmWrapObserver&&t._wmWrapObserver.disconnect();const i=new MutationObserver(()=>{gt.node(e)||Gn(t,e)});i.observe(e,{childList:!0}),t._wmWrapObserver=i,t._wmObservedWrap=e}(e,i),function(t,e,i){if(t._premiumLicenseNotified)return;t._premiumLicenseNotified=!0;const n=i.length>1;if(!e)return void console.warn(`[ApexCharts] Premium feature${n?"s":""} in use (${i.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${Bn}`);const s=ht.validateKey(e);if(s.valid){const t=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${n?"s":""} in use (${i.join(", ")}) require a Premium or Enterprise license; the ${t} plan does not include ${n?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${Bn}`)}e!==ht.getKey()&&console.error(`[Apex] ${s.message}`)}(e,s,n)}catch(t){}}function Vn(){if(!k.isBrowser())return;const t=new Set,e=k.getApex(),i=e&&e._chartInstances;Array.isArray(i)&&i.forEach(e=>{const i=e&&e.chart;i&&i.w&&!i.w.globals.isDestroyed&&(t.add(i),Kn(i.w,i))}),Array.from(Yn).forEach(e=>{const i=e&&e.w,n=i&&i.dom&&i.dom.elWrap;i&&!i.globals.isDestroyed&&n&&!1!==n.isConnected?t.has(e)||Kn(i,e):Yn.delete(e)})}ht.onChange(Vn);const Zn="apex";function Jn(t){return function(t){if("undefined"!=typeof Buffer)return Buffer.from(t,"utf-8").toString("base64");const e=(new TextEncoder).encode(t);let i="";for(let t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return btoa(i)}(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Qn(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4;)e+="=";return function(t){if("undefined"!=typeof Buffer)return Buffer.from(t,"base64").toString("utf-8");const e=atob(t),i=new Uint8Array(e.length);for(let t=0;t<e.length;t++)i[t]=e.charCodeAt(t);return(new TextDecoder).decode(i)}(e)}class ts{constructor(t,e){this.w=t,this.ctx=e,this._saved=[],this._counter=0,this._used=!1}capture(){const t={v:1,view:fn(this.w,this.ctx)},e=this._serializableDelta();return e&&Object.keys(e).length&&(t.options=e),t}_serializableDelta(){const t=this.w.config,e=t.chart&&t.chart.perspectives&&t.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],i={};return e.forEach(e=>{if(void 0!==t[e]){const n=function(t){try{return JSON.parse(JSON.stringify(t))}catch(t){return}}(t[e]);void 0!==n&&(i[e]=n)}}),i}encode(t){const e=t||this.capture();return Jn(JSON.stringify(e))}decode(t){return ts.decode(t)}toURL(){if(!k.isBrowser())return"";const t=this.encode(this.capture()),e=new URL(window.location.href);return e.hash=`${Zn}=${t}`,e.toString()}apply(t,e={}){const i="string"==typeof t?ts.decode(t):t;if(!i||!i.view)return;this._used=!0,Kn(this.w,this.ctx);const n=void 0===e.animate||e.animate,s=B.extend(i.options?B.clone(i.options):{},e.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(t=>{!function(t,e,{animate:i=!0,mergeOptions:n}={}){var s,r;if(!t||!e)return;"number"==typeof e.v&&e.v>1&&console.warn(`[apexcharts] ViewState v${e.v} is newer than this build understands (v1); applying best-effort.`),t.clearAnnotations();const a=n?B.clone(n):{},o=e.window&&e.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=e.window&&e.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(t=>{var e,i;return t?{min:null!=(e=t.min)?e:void 0,max:null!=(i=t.max)?i:void 0}:{}})),e.theme){const t={};null!=e.theme.mode&&(t.mode=e.theme.mode),null!=e.theme.palette&&(t.palette=e.theme.palette),Object.keys(t).length&&(a.theme=Object.assign({},a.theme,t))}e.annotations&&e.annotations.static&&(a.annotations=B.clone(e.annotations.static)),t.updateOptions(a,!1,i,!1,!1),gn(t,e)}(t,i.view,{animate:n,mergeOptions:r})})}save(t){const e="perspective-"+ ++this._counter;return this._saved.push({id:e,name:t||e,token:this.capture()}),this._used=!0,Kn(this.w,this.ctx),e}list(){return this._saved.map(t=>({id:t.id,name:t.name,token:t.token}))}delete(t){const e=this._saved.findIndex(e=>e.id===t);e>-1&&this._saved.splice(e,1)}teardown(){this._saved=[],this._counter=0}static decode(t){if("string"!=typeof t||!t)return null;try{const e=JSON.parse(Qn(t));return e&&"object"==typeof e?1!==e.v?(console.warn(`apexcharts: unsupported perspective version ${e.v} (expected 1).`),null):e:null}catch(t){return console.warn("apexcharts: failed to decode perspective token.",t),null}}static fromURL(t){try{const e=t||(k.isBrowser()?window.location.href:"");if(!e)return null;const i=new URL(e).hash.replace(/^#/,"");if(!i)return null;const n=i.split("&").map(t=>t.split("=")).find(t=>t[0]===Zn);return n&&null!=n[1]?ts.decode(decodeURIComponent(n[1])):null}catch(t){return null}}}m.default.registerFeatures({perspectives:ts,perspectivesStatics:{decode:t=>(qn(),ts.decode(t)),fromURL:t=>(qn(),ts.fromURL(t))}}),m.default.registerFeatures({storyboard:class{constructor(t,e){this.w=t,this.ctx=e,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(t={}){var e;if(this.unbind(),!k.isBrowser())return 0;if(!(this.ctx.el&&this.ctx.el.ownerDocument)||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(t.scroller&&(i="string"==typeof t.scroller?Mt(this.ctx.el,t.scroller):t.scroller),this._beats=this._resolveBeats(this.ctx.el,i,t.beats),!this._beats.length)return 0;this._animate=!1!==t.animate;const n=Math.min(Math.max(null!=(e=t.offset)?e:.5,0),1),s=+(100*n).toFixed(3),r=+(100-100*n).toFixed(3);return this._observer=new IntersectionObserver(t=>this._onIntersect(t),{root:i,rootMargin:`-${s}% 0px -${r}%`,threshold:0}),this._beats.forEach(t=>{var e;return null==(e=this._observer)?void 0:e.observe(t.el)}),this._used=!0,Kn(this.w,this.ctx),this._beats.length}_resolveBeats(t,e,i){const n=[];if(Array.isArray(i))return i.forEach((e,i)=>{var s,r;if(!e)return;const a=e.el&&"object"==typeof e.el?e.el:e.selector?Mt(t,e.selector):null;a?n.push({el:a,key:null!=(r=null!=(s=e.key)?s:a.getAttribute("data-apex-beat"))?r:String(i),view:e.view,options:e.options,announce:e.announce,onEnter:"function"==typeof e.onEnter?e.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${i} has no resolvable element; skipped.`)}),n;return(e?Array.from(e.querySelectorAll("[data-apex-beat]")):function(t,e){const i=wt(t),n=Array.from(i.querySelectorAll(e));if(n.length)return n;const s=t.ownerDocument;return s&&s!==i?Array.from(s.querySelectorAll(e)):[]}(t,"[data-apex-beat]")).forEach((t,e)=>{n.push({el:t,key:t.getAttribute("data-apex-beat")||String(e),view:t.getAttribute("data-apex-view")||void 0,options:void 0,announce:t.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),n}_onIntersect(t){t.forEach(t=>{const e=this._beats.findIndex(e=>e.el===t.target);e<0||(t.isIntersecting?this._activate(e):e===this._activeIndex&&t.rootBounds&&t.boundingClientRect.top>=t.rootBounds.bottom&&e>0&&this._activate(e-1))})}_activate(t,e={}){var i,n;if(t===this._activeIndex)return;const s=this._beats[t];if(!s)return;const r=t>this._activeIndex?"down":"up";this._activeIndex=t;const a=(void 0!==e.animate?e.animate:this._animate)&&!A();if(null!=s.view||s.options)if(this.ctx.perspectives){const t=null!=(i=s.view)?i:{},e="string"==typeof t||t.view?t:{view:this._normalizeView(t)};this.ctx.perspectives.apply(e,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:t,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(n=this.ctx.events)||n.fireEvent("beatChange",[this.ctx,o])}_normalizeView(t){const e=t.annotations&&t.annotations.static||{};return c(l({},t),{annotations:{static:l({points:[],xaxis:[],yaxis:[],texts:[],images:[]},e),dynamic:t.annotations&&t.annotations.dynamic||[]}})}goTo(t,e={}){const i="number"==typeof t?t:this._beats.findIndex(e=>e.key===t);i>=0&&i<this._beats.length&&this._activate(i,e)}current(){if(this._activeIndex<0)return null;const t=this._beats[this._activeIndex];return{index:this._activeIndex,key:t?t.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,Kn(this.w,this.ctx)}teardown(){this.unbind()}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const i=e.dom.baseEl;if(!i)return;const n=i.querySelector(".apexcharts-sr-status");n&&(n.textContent="",setTimeout(()=>{n.textContent=t},0))}}});const es={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},is=Symbol("never");const ns={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},ss=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function rs(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let i=1/0,n=1/0,s=-1/0,r=-1/0,a=0,o=0,l=0,c=0,h="",d=0;const u=()=>Number(e[d++]),p=(t,e)=>{isFinite(t)&&isFinite(e)&&(i=Math.min(i,t),n=Math.min(n,e),s=Math.max(s,t),r=Math.max(r,e))},f=t=>{const e=h===h.toLowerCase();let i=a,n=o;for(let s=0;s<t;s++)i=u()+(e?a:0),n=u()+(e?o:0),p(i,n);a=i,o=n};for(;d<e.length;){if(/^[a-z]$/i.test(e[d])){h=e[d++],"Z"!==h&&"z"!==h||(a=l,o=c);continue}const t=h===h.toLowerCase();switch(h.toUpperCase()){case"M":f(1),l=a,c=o,h=t?"l":"L";break;case"L":case"T":f(1);break;case"H":a=u()+(t?a:0),p(a,o);break;case"V":o=u()+(t?o:0),p(a,o);break;case"S":case"Q":f(2);break;case"C":f(3);break;case"A":d+=5,f(1);break;default:d++}}return isFinite(i)?{x:i,y:n,width:s-i,height:r-n}:null}(t.d),t.boxOf=t.d),t.box}const as={attr:()=>as,plot:()=>as,during:()=>as,after:t=>("function"==typeof t&&t(),as),animate:()=>as,delay:()=>as,loop:()=>as,finish:()=>as,stop:()=>as},os={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},ls={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>ls,add:()=>ls,addTo:()=>ls,remove:()=>ls,clear:()=>ls,css:()=>ls,hide:()=>ls,show:()=>ls,removeClass:()=>ls,animate:()=>as};class cs{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return os}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return as}}const hs={__isCanvasMark:!0,node:os,attr:()=>hs,add:()=>hs,addTo:()=>hs,remove:()=>hs,css:()=>hs,animate:()=>as};class ds{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,i){e._applyAttr(t,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const i=this._cmd;if(!i)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(i.clip=t))}if("index"===t)return void(i.si=i.z=Number(e));const n=es[t];void 0!==n&&(i[n]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?rs(t):null;return e?l({},e):{x:0,y:0,width:0,height:0}}animate(){return as}}class us{constructor(t){this.w=t,this._g=new b(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=is,this._ls=is,this._lsw=is,this._ld=is,this._lfo=is,this._lso=is,this._lid=-1,this._lofFill=is,this._lofBase=-1,this._lofId=-1,this._rlf=is,this._rls=is,this._rlsw=is,this._rlfo=is,this._rlso=is,this._rlid=-1}_resetStyleCache(){this._lf=is,this._ls=is,this._lsw=is,this._ld=is,this._lfo=is,this._lso=is,this._lid=-1,this._lofFill=is,this._lofBase=-1,this._lofId=-1,this._rlf=is,this._rls=is,this._rlsw=is,this._rlfo=is,this._rlso=is,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config,e=t.series||[],i=t.markers&&t.markers.size;let n=16,s=16;for(let r=0;r<e.length;r++){const a=e[r],o=a&&Array.isArray(a.data)?a.data.length:0,l=a&&a.type||t.chart&&t.chart.type;"heatmap"===l?s+=o:("scatter"===l||"bubble"===l||(Array.isArray(i)?i[r]:i)>0)&&(n+=o)}n=Math.ceil(1.15*n)+16,n>this._mcap&&this._allocMarkers(n),this._crn=0,this._cellRadius=0,s=Math.ceil(1.15*s)+16,s>this._crcap&&this._allocRects(s)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const i=new Float64Array(t);i.set(this._cry),this._cry=i;const n=new Float64Array(t);n.set(this._crw),this._crw=n;const s=new Float64Array(t);s.set(this._crh),this._crh=s;const r=new Int32Array(t);r.set(this._crstyle),this._crstyle=r;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const o=new Int32Array(t);o.set(this._crdi),this._crdi=o,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const i=new Float64Array(t);i.set(this._my),this._my=i;const n=new Float64Array(t);n.set(this._msize),this._msize=n;const s=new Int16Array(t);s.set(this._mshape),this._mshape=s;const r=new Int32Array(t);r.set(this._mstyle),this._mstyle=r;const a=new Int32Array(t);a.set(this._msi),this._msi=a;const o=new Int32Array(t);o.set(this._mdi),this._mdi=o,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,i,n,s,r){const a=`${t}|${e}|${i}|${n}|${s}|${r}`,o=this._styleMap.get(a);if(void 0!==o)return o;const l=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:i,strokeDash:n,fillOpacity:s,strokeOpacity:r}),this._styleMap.set(a,l),l}_setMarkerFill(t,e){const i=this._mstyle[t];if(e===this._lofFill&&i===this._lofBase)return void(this._mstyle[t]=this._lofId);const n=this._styles[i];if(!n||n.fill===e)return this._lofFill=e,this._lofBase=i,void(this._lofId=i);const s=this._internStyle(e,n.stroke,n.strokeWidth,n.strokeDash,n.fillOpacity,n.strokeOpacity);this._mstyle[t]=s,this._lofFill=e,this._lofBase=i,this._lofId=s}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}drawRectCell(t,e,i,n,s={}){const r=this._rectStyleId(s);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=e||0,this._crw[a]=i>0?i:0,this._crh[a]=n>0?n:0,this._crstyle[a]=r,this._crsi[a]=null==s.seriesIndex?-1:s.seriesIndex,this._crdi[a]=null==s.dataPointIndex?-1:s.dataPointIndex,s.radius&&(this._cellRadius=s.radius),hs}_rectStyleId(t){const e=t.fill,i=t.stroke,n=t.strokeWidth,s=t.fillOpacity,r=t.strokeOpacity;if(e===this._rlf&&i===this._rls&&n===this._rlsw&&s===this._rlfo&&r===this._rlso)return this._rlid;const a=this._internStyle(e,i,n,0,s,r);return this._rlf=e,this._rls=i,this._rlsw=n,this._rlfo=s,this._rlso=r,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const i={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(i),i}group(t){return ls}drawMarker(t,e,i={}){var n;const s=this._markerStyleId(i);this._mn>=this._mcap&&this._growMarkers();const r=this._mn++;return this._mx[r]=t||0,this._my[r]="number"==typeof e?e:NaN,this._msize[r]=i.pSize||0,this._mshape[r]=null!=(n=ns[i.shape||"circle"])?n:0,this._mstyle[r]=s,this._msi[r]=null==i.seriesIndex?-1:i.seriesIndex,this._mdi[r]=-1,new cs(this,r)}_markerStyleId(t){const e=t.shape||"circle",i="line"===e||"plus"===e||"cross"===e,n=i?"none":t.pointFillColor,s=i?t.pointFillColor:t.pointStrokeColor,r=t.pointStrokeWidth,a=t.pointStrokeDashArray,o=t.pointFillOpacity,l=i?t.pointFillOpacity:t.pointStrokeOpacity;if(n===this._lf&&s===this._ls&&r===this._lsw&&a===this._ld&&o===this._lfo&&l===this._lso)return this._lid;const c=this._internStyle(n,s,r,a,o,l);return this._lf=n,this._ls=s,this._lsw=r,this._ld=a,this._lfo=o,this._lso=l,this._lid=c,c}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap||this.w.config.stroke.lineCap,e.strokeDash=this._g.seriesDash(t.realIndex),e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const i=this.w.globals;e.clip="bar"===t.chartType&&!i.isBarHorizontal||i.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new ds(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap||this.w.config.stroke.lineCap,e.strokeDash=t.strokeDashArray,new ds(e)}drawLine(t,e,i,n,s="#a8a8a8",r=0,a=1,o="butt"){const l=this._cmd("line",0);return l.lineCap=o,l.lx1=t,l.ly1=e,l.lx2=i,l.ly2=n,l.stroke=s,l.strokeDash=r,l.strokeWidth=a,new ds(l)}drawRect(t=0,e=0,i=0,n=0,s=0,r="#fefefe",a=1,o=null,l=null,c=0){const h=this._cmd("rect",0);return h.x1=t,h.y1=e,h.rw=i>0?i:0,h.rh=n>0?n:0,h.radius=s,h.fill=r,h.fillOpacity=a,null!=l&&(h.stroke=l,h.strokeWidth=null==o?1:o,h.strokeDash=c),new ds(h)}drawCircle(t,e=null){const i=this._cmd("circle",0);i.r=t<0?0:t;const n=new ds(i);return e&&(i.cx=e.cx,i.cy=e.cy,n.attr(e)),n}drawText(t){const e=this._cmd("text",0);e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start";const i=this.w.config.chart;return e.fontSize=t.fontSize,e.fontFamily=t.fontFamily||i.fontFamily,e.fontWeight=t.fontWeight,e.fill=t.foreColor||i.foreColor,new ds(e)}markerPath(t,e,i,n){return this._g.getMarkerPath(t,e,ss[i]||"circle",n)}}const ps=m.__apex_SVGElement,fs=m.__apex_math_SVGNS,gs=m.__apex_axes_Grid;const ms=2*Math.PI;class ys{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),i=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),n=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,s=Math.ceil(n+8),r=gs.maskRects(this.w),a={left:s,top:s,right:s,bottom:s},o=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(r).forEach(t=>{a.left=Math.max(a.left,o(-t.x)),a.top=Math.max(a.top,o(-t.y)),a.right=Math.max(a.right,o(t.x+t.width-e)),a.bottom=Math.max(a.bottom,o(t.y+t.height-i))}),{gw:e,gh:i,pad:a,clips:r}}createHost(){const t=M.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:i,pad:n,clips:s}=this._plotDims();this._pad=n,this._clips=s;const r=e+n.left+n.right,a=i+n.top+n.bottom,o=M.createElementNS(fs,"foreignObject");o.setAttribute("x",String(-n.left)),o.setAttribute("y",String(-n.top)),o.setAttribute("width",String(r)),o.setAttribute("height",String(a)),o.setAttribute("class","apexcharts-canvas-series"),o.style.overflow="visible";const l=M.createElement("canvas");return l.setAttribute("class","apexcharts-series-canvas"),l.width=Math.max(1,Math.round(r*this._dpr)),l.height=Math.max(1,Math.round(a*this._dpr)),l.style.width=r+"px",l.style.height=a+"px",l.style.pointerEvents="none",o.appendChild(l),this._canvas=l,this._c2d=l.getContext("2d"),this._host=new ps(o),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const i=this.clipRect(e);if(i!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=i,i)){const e=this._dpr,{left:n,top:s}=this._pad,r=Math.floor((n+i.x)*e),a=Math.floor((s+i.y)*e),o=Math.ceil((n+i.x+i.width)*e),l=Math.ceil((s+i.y+i.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(r,a,o-r,l-a),t.clip(),t.setTransform(e,0,0,e,n*e,s*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=M.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const i=parseFloat(this._canvas.style.width)||0,n=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(i*e)),this._canvas.height=Math.max(1,Math.round(n*e))}paint(t,e,i=null){const n=this._c2d;if(!n)return;this._dim=i||null,this._syncDpr(),this.clear();const s=this._dpr,{left:r,top:a}=this._pad;if(n.setTransform(s,0,0,s,r*s,a*s),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const i=e[t];this._alpha=this._dim?this._seriesAlpha(i.si):1,this._clipTo(n,i.clip),this._paintOne(n,i)}this._clipTo(n,null)}this._paintRects(n,e),this._clipTo(n,"marker"),this._paintMarkers(n,e),this._clipTo(n,null),this._alpha=1}_paintRects(t,e){const i=e.rectCount?e.rectCount():0;if(!i)return;const n=e._crx,s=e._cry,r=e._crw,a=e._crh,o=e._crstyle,l=e._cellRadius||0,c=t,h=l>0&&"function"==typeof c.roundRect,d=!!this._dim,u=Math.max(0,this.w.layout.gridWidth||0),p=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,u,p),t.clip();let f=0;for(;f<i;){const u=o[f],p=e.rectStyle(f);if(!p){f++;continue}const g=p.fill,m=g&&"none"!==g&&!("string"==typeof g&&0===g.indexOf("url(")),y=p.stroke,x=null==p.strokeWidth?0:Number(p.strokeWidth),_=y&&"none"!==y&&x>0&&!("string"==typeof y&&0===y.indexOf("url("));m&&(t.fillStyle=g),_&&(t.strokeStyle=y,t.lineWidth=x,t.setLineDash([]));const b=null==p.fillOpacity?1:Number(p.fillOpacity),v=null==p.strokeOpacity?1:Number(p.strokeOpacity);let w=f;for(;w<i&&o[w]===u;){const i=r[w],o=a[w];if(i>0&&o>0){const r=d?this._seriesAlpha(e.rectSeries(w)):1;h?(t.beginPath(),c.roundRect(n[w],s[w],i,o,l),m&&(t.globalAlpha=b*r,t.fill()),_&&(t.globalAlpha=v*r,t.stroke())):(m&&(t.globalAlpha=b*r,t.fillRect(n[w],s[w],i,o)),_&&(t.globalAlpha=v*r,t.strokeRect(n[w],s[w],i,o)))}w++}f=w}t.globalAlpha=1,t.restore()}_unitPath(t,e,i){const n=e+"|"+i;let s=this._unitPaths.get(n);if(void 0===s){try{s=new Path2D(t.markerPath(0,0,e,i))}catch(t){s=null}this._unitPaths.set(n,s)}return s}_paintMarkers(t,e){this._markerBatches=0;const i=e.markerCount();if(!i)return;const n=e._mx,s=e._my,r=e._msize,a=e._mshape,o=e._mstyle,l=!!this._dim;l||(this._alpha=1);let c=0;for(;c<i;){const h=o[c],d=a[c],u=e.markerStyle(c);if(!u){c++;continue}const p=this._applyFill(t,u),f=this._applyStroke(t,u);this._markerBatches++;const g=null==u.fillOpacity?1:Number(u.fillOpacity),m=null==u.strokeOpacity?1:Number(u.strokeOpacity);if(0===d){let d=c;for(;d<i&&0===a[d]&&o[d]===h;){const i=r[d]||0,a=s[d];if(i>0&&a==a)if(t.beginPath(),t.arc(n[d],a,i,0,ms),l){const i=this._seriesAlpha(e.markerSeries(d));p&&(t.globalAlpha=g*i,t.fill()),f&&(t.globalAlpha=m*i,t.stroke())}else p&&t.fill(),f&&t.stroke();d++}t.globalAlpha=1,c=d}else{const u=this._dpr,y=this._pad.left,x=this._pad.top;let _=c;for(;_<i&&a[_]===d&&o[_]===h;){const i=s[_],a=r[_];if(i==i&&a>0){const s=this._unitPath(e,d,a);if(s){t.setTransform(u,0,0,u,(y+n[_])*u,(x+i)*u);const r=l?this._seriesAlpha(e.markerSeries(_)):1;p&&(t.globalAlpha=g*r,t.fill(s)),f&&(t.globalAlpha=m*r,t.stroke(s))}}_++}t.setTransform(u,0,0,u,y*u,x*u),t.globalAlpha=1,c=_}}}_paintNumericPath(t,e){const i=e.nxs,n=e.nys,s=i.length;if(s){t.beginPath(),t.moveTo(i[0],n[0]);for(let e=1;e<s;e++)t.lineTo(i[e],n[e]);null!=e.ncloseY&&(t.lineTo(i[s-1],e.ncloseY),t.lineTo(i[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const i=new Path2D;e.radius&&"function"==typeof i.roundRect?i.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):i.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,i);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,ms),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const i=e.fontSize||"11px",n=e.fontWeight;t.font=`${n&&"regular"!==n?n+" ":""}${"number"==typeof i?i+"px":i} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,i){this._applyFill(t,e)&&t.fill(i,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(i),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const i=e.fill;return!(!i||"none"===i)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=i,!0))}_applyStroke(t,e){const i=e.stroke,n=null==e.strokeWidth?1:Number(e.strokeWidth);return!!(i&&"none"!==i&&n>0)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=i,t.lineWidth=n,t.lineCap=e.lineCap||"butt",t.setLineDash(function(t){if(null==t||""===t)return[];let e;if(Array.isArray(t))e=t;else if("number"==typeof t)e=[t];else{const i=String(t).trim();if(""===i||"none"===i)return[];e=i.split(/[\s,]+/)}const i=[];let n=!1;for(const t of e){const e="number"==typeof t?t:Number(String(t).replace(/px$/i,""));if(!isFinite(e)||e<0)return[];e>0&&(n=!0),i.push(e)}return n?i:[]}(e.strokeDash)),!0))}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class xs{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new us(t),this._compositor=new ys(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,i,n,s){return this._g.drawRectCell(t,e,i,n,s)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,i){return this._g.drawMarker(t,e,i)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const i=this._g,n=i.rectCount?i.rectCount():0,s=i._crx,r=i._cry,a=i._crw,o=i._crh;for(let l=n-1;l>=0;l--){const n=a[l],c=o[l];if(!(n<=0||c<=0)&&(t>=s[l]&&t<s[l]+n&&e>=r[l]&&e<r[l]+c))return{seriesIndex:i._crsi[l],dataPointIndex:i._crdi[l],x:s[l],y:r[l],width:n,height:c}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const i=this._g.displayList();for(let n=i.length-1;n>=0;n--){const s=i[n];if("path"!==s.tag||null==s.dj||!s.d)continue;const r=!!s.fill&&"none"!==s.fill,a=!!s.stroke&&"none"!==s.stroke&&s.strokeWidth>0;if(!r&&!a)continue;const o=this._compositor.clipRect(s.clip);if(o&&(t<o.x||t>o.x+o.width||e<o.y||e>o.y+o.height))continue;const c=rs(s);if(!c)continue;const h=a?5*s.strokeWidth:0;if(t<c.x-h||t>c.x+c.width+h||e<c.y-h||e>c.y+c.height+h)continue;const d=this._hitContext();if(!d)return null;if(!s.path2d)try{s.path2d=new Path2D(s.d)}catch(t){continue}const u="evenodd"===s.fillRule?"evenodd":"nonzero";let p=r&&d.isPointInPath(s.path2d,t,e,u);if(!p&&a&&(d.lineWidth=s.strokeWidth,d.lineCap=s.lineCap||"butt",p=d.isPointInStroke(s.path2d,t,e)),p)return l({seriesIndex:s.si,dataPointIndex:s.dj},c)}return null}hitTestMarker(t,e){const i=this._g,n=i.markerCount();if(!n)return null;const s=this._compositor.clipRect("marker");if(s&&(t<s.x||t>s.x+s.width||e<s.y||e>s.y+s.height))return null;for(let s=n-1;s>=0;s--){const n=i._msize[s],r=i._mx[s],a=i._my[s],o=i._mdi[s];if(!(n>0)||a!=a||o<0)continue;const l=i.markerStyle(s),c=!!(null==l?void 0:l.stroke)&&"none"!==l.stroke&&l.strokeWidth>0,h=c?l.strokeWidth/2:0,d=1.2*n+h,u=t-r,p=e-a;if(u<-d||u>d||p<-d||p>d)continue;let f;if(f=0===i._mshape[s]?u*u+p*p<=(n+h)*(n+h):this._hitsMarkerShape(s,u,p,n,l,c),f)return{seriesIndex:i._msi[s],dataPointIndex:o,x:r,y:a,size:n}}return null}_hitsMarkerShape(t,e,i,n,s,r){const a=this._hitContext();if(!a)return!1;let o;try{o=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],n))}catch(t){return!1}return!(!(null==s?void 0:s.fill)||"none"===s.fill||!a.isPointInPath(o,e,i))||!!r&&(a.lineWidth=s.strokeWidth,a.lineCap="butt",a.isPointInStroke(o,e,i))}findMark(t,e){const i=this._g.displayList();for(let n=0;n<i.length;n++){const s=i[n];if("path"!==s.tag||!s.d)continue;if(s.si!==t||s.dj!==e)continue;const r=rs(s);if(r)return c(l({seriesIndex:t,dataPointIndex:e},r),{d:s.d})}return null}findMarker(t,e){const i=this._g;for(let n=i.markerCount()-1;n>=0;n--){if(i._msi[n]!==t||i._mdi[n]!==e)continue;const s=i._msize[n],r=i._my[n];if(!(s>0)||r!=r)continue;const a=i._mx[n];return{seriesIndex:t,dataPointIndex:e,x:a,y:r,size:s,d:i.markerPath(a,r,i._mshape[n],s)}}return null}findCell(t,e){const i=this._g,n=i.rectCount?i.rectCount():0,s=i._crsi,r=i._crdi;for(let a=n-1;a>=0;a--)if(s[a]===t&&r[a]===e)return{seriesIndex:t,dataPointIndex:e,x:i._crx[a],y:i._cry[a],width:i._crw[a],height:i._crh[a],radius:i._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=M.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,i=this.w.config.chart,n=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(i.offsetX||0)-n.left,y:(e.translateY||0)+(i.offsetY||0)-n.top,w:(this.w.layout.gridWidth||0)+n.left+n.right,h:(this.w.layout.gridHeight||0)+n.top+n.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}m.default.registerRenderer("canvas",(t,e)=>new xs(t,e));m.default.registerFeatures({contextMenu:class{constructor(t,e){this.w=t,this.ctx=e,this.menu=null,this._items=[],this._focusIndex=-1,this._trigger=null,this._onContext=this._onContext.bind(this),this._onDocDown=this._onDocDown.bind(this),this._onKey=this._onKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.contextMenu||{}}_enabled(){return!0===this._cfg().enabled}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_afterRender(){if(this._detachTrigger(),this.close(),!this._enabled()||!k.isBrowser())return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.addEventListener("contextmenu",this._onContext),this._trigger=t)}_detachTrigger(){this._trigger&&(this._trigger.removeEventListener("contextmenu",this._onContext),this._trigger=null)}_onContext(t){this._enabled()&&(t.preventDefault(),this.open(t.clientX,t.clientY))}_clientToData(t,e){const i=this.w;if(!i.globals.axisCharts||!i.dom.baseEl||!i.dom.baseEl.querySelector(".apexcharts-svg"))return null;const n=tn.plotRect(i);if(!n.width||!n.height)return null;const s=t=>t<0?0:t>1?1:t,r=s((t-n.left)/n.width),a=s((e-n.top)/n.height),o=i.globals.minX+r*(i.globals.maxX-i.globals.minX),l=i.globals.yAxisScale&&i.globals.yAxisScale[0],c=l&&isFinite(l.niceMin)?l.niceMin:i.globals.minY,h=l&&isFinite(l.niceMax)?l.niceMax:i.globals.maxY;return{x:o,y:h-a*(h-c)}}_resolveItems(t){const e=this._cfg(),i=Array.isArray(e.items)&&e.items.length?e.items:["annotate","xline","yline","measure"],n=e.labels||{},s=[];return i.forEach(e=>{if("string"==typeof e){if("annotate"===e)s.push({id:"annotate",label:n.annotate||"Add note here",run:()=>this._annotate(t)});else if("xline"===e)s.push({id:"xline",label:n.xline||"Annotate here",run:()=>this._line(t,"x")});else if("yline"===e)s.push({id:"yline",label:n.yline||"Mark this level",run:()=>this._line(t,"y")});else if("measure"===e){const e=this.ctx.measure;e&&this.w.config.chart.measure&&this.w.config.chart.measure.enabled&&s.push({id:"measure",label:n.measure||"Measure from here",run:()=>e.seedFromClient(t.clientX,t.clientY)})}}else e&&"object"==typeof e&&"function"==typeof e.onClick&&s.push({id:e.id||"custom",label:e.label||"Action",run:()=>e.onClick(this.ctx,t)})}),s}_annotate(t){if(null==t.x||null==t.y)return;const e=this._cfg(),i=this.ctx.ink;i&&"function"==typeof i.createAt?i.createAt(t.x,t.y,{text:e.noteText||"Note"}):this.ctx.addPointAnnotation({x:t.x,y:t.y,marker:{size:5},label:{text:e.noteText||"Note",style:{background:"#fff",color:"#334155"}}},!0)}_line(t,e){const i=this._cfg().line||{},n="x"===e?t.x:t.y;if(null==n)return;const s=this.ctx.ink;if(s&&"function"==typeof s.createLineAt)return void s.createLineAt(e,n,{text:i.text,strokeDashArray:i.strokeDashArray,color:i.color});const r={strokeDashArray:null!=i.strokeDashArray?i.strokeDashArray:4};i.text&&(r.label={text:i.text}),i.color&&(r.borderColor=i.color,r.label=B.extend(r.label||{},{borderColor:i.color})),"x"===e?this.ctx.addXaxisAnnotation(B.extend(r,{x:n}),!0):this.ctx.addYaxisAnnotation(B.extend(r,{y:n}),!0)}open(t,e){this.close();const i=this.w,n=i.dom.elWrap,s=this._doc();if(!n||!s)return;const r=this._clientToData(t,e),a=i.globals,o={x:r?r.x:null,y:r?r.y:null,seriesIndex:a.capturedSeriesIndex>=0?a.capturedSeriesIndex:null,dataPointIndex:a.capturedDataPointIndex>=0?a.capturedDataPointIndex:null,clientX:t,clientY:e},l=this._resolveItems(o);if(!l.length)return;this._items=l;const c=s.createElement("div");c.className="apexcharts-context-menu",c.setAttribute("role","menu"),c.style.position="absolute",c.style.visibility="hidden",l.forEach((t,e)=>{const i=s.createElement("button");i.type="button",i.className="apexcharts-context-menu-item",i.setAttribute("role","menuitem"),i.tabIndex=-1,i.textContent=t.label,i.addEventListener("click",t=>{t.stopPropagation(),this._activate(e)}),i.addEventListener("mouseenter",()=>this._focus(e)),c.appendChild(i)}),n.appendChild(c),this.menu=c;const h=n.getBoundingClientRect(),d=tn.plotRect(i).zoom;let u=(t-h.left)/d,p=(e-h.top)/d;const f=c.offsetWidth,g=c.offsetHeight,m=Math.max(0,n.clientWidth-f),y=Math.max(0,n.clientHeight-g);u>m&&(u=m),p>y&&(p=y),c.style.left=Math.max(0,u)+"px",c.style.top=Math.max(0,p)+"px",c.style.visibility="visible",s.addEventListener("mousedown",this._onDocDown,!0),s.addEventListener("keydown",this._onKey,!0),this._focus(0)}_focus(t){if(!this.menu)return;const e=this.menu.querySelectorAll(".apexcharts-context-menu-item");this._focusIndex>=0&&e[this._focusIndex]&&e[this._focusIndex].classList.remove("apexcharts-context-menu-item--active"),this._focusIndex=t,e[t]&&(e[t].classList.add("apexcharts-context-menu-item--active"),"function"==typeof e[t].focus&&e[t].focus())}_activate(t){const e=this._items[t];this.close(),e&&e.run()}_onDocDown(t){this.menu&&this.menu.contains(At(t))||this.close()}_onKey(t){this.menu&&this._items.length&&("Escape"===t.key?(t.preventDefault(),this.close()):"ArrowDown"===t.key?(t.preventDefault(),this._focus((this._focusIndex+1)%this._items.length)):"ArrowUp"===t.key?(t.preventDefault(),this._focus((this._focusIndex-1+this._items.length)%this._items.length)):"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this._activate(this._focusIndex<0?0:this._focusIndex)))}close(){const t=this._doc();t&&(t.removeEventListener("mousedown",this._onDocDown,!0),t.removeEventListener("keydown",this._onKey,!0)),this.menu&&this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu),this.menu=null,this._items=[],this._focusIndex=-1}teardown(){this.close(),this._detachTrigger()}}});m.default.registerFeatures({history:class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){const t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=null!=e.coalesceMs?e.coalesceMs:250,this.keyboard=!1!==e.keyboard}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}_wireKeyboard(){if(this._keydownTarget)return;const t=this.ctx.el,e=t&&t.ownerDocument;k.isBrowser()&&e&&(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&0===this.stack.length&&this._commit("initial",!0)}_onUpdated(){this._syncConfig(),this.enabled&&(this.applying?this._refreshSettle():this._schedule("update"))}_onSelection(){this.enabled&&!this.applying&&this._schedule("selection")}_onPointerDown(t){const e=this.ctx.el,i=At(t);this._engaged=!!(e&&i&&e.contains(i))}_onKeyDown(t){if(!t.metaKey&&!t.ctrlKey)return;const e=(t.key||"").toLowerCase();if("z"!==e&&"y"!==e)return;const i=this.ctx.el;if(!i)return;const n=function(t){var e;const i=t.ownerDocument||t;let n=i&&"activeElement"in i?i.activeElement:null;for(;null==(e=null==n?void 0:n.shadowRoot)?void 0:e.activeElement;)n=n.shadowRoot.activeElement;return n}(i);if(function(t){if(!t)return!1;const e=t.tagName;return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e||!0===t.isContentEditable}(n))return;if(!i.contains(n)&&!this._engaged)return;const s="y"===e||t.shiftKey;t.preventDefault(),s?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&k.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;const i=this._capture(t),n=this.stack[this.pointer];if(!n||n.sig!==i.sig){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(i),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){const e=fn(this.w,this.ctx),{config:i,seriesSig:n}=this._cloneConfigCOW();return{id:"hist-"+ ++this._counter,view:e,config:i,seriesSig:n,label:t||"change",at:k.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,i)}}_cloneConfigCOW(){const t=this.w,e=this.stack[this.pointer];let i=null;try{i=JSON.stringify(t.config.series)}catch(t){i=null}const n=this.ctx.responsive?this.ctx.responsive.withoutBreakpoints(t.config):t.config;let s;if(e&&null!==i&&e.seriesSig===i){const t=n,{series:i}=t,r=h(t,["series"]);s=B.clone(r),s.series=e.config.series}else s=B.clone(n);return{config:s,seriesSig:i}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch(t){return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;let i;this.applying=!0;try{this.ctx.clearAnnotations(),i=this.ctx.updateOptions(B.clone(t.config),!1,e,!1,!1)}catch(t){throw this.applying=!1,t}Promise.resolve(i).then(()=>{this.w.globals.isDestroyed?this.applying=!1:(gn(this.ctx,t.view),this._refreshSettle(),this._emitChange())}).catch(()=>{this.applying=!1})}_refreshSettle(){k.isBrowser()?(clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)):this.applying=!1}snapshot(t){this.enabled&&!this.applying&&this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){const i=this.stack.findIndex(e=>e.id===t);-1!==i&&i!==this.pointer&&(this.pointer=i,this._restore(this.stack[i],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;const t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if("function"!=typeof t)return Promise.resolve();const i=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=i,i||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,i,n,s,r,a,o;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onMounted),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onUpdated),null==(r=(s=this.ctx).removeEventListener)||r.call(s,"scrolled",this._onUpdated),null==(o=(a=this.ctx).removeEventListener)||o.call(a,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}}});const _s=m.__apex_DataLabels;const bs=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function vs(t,e){const{ax:i,bx:n,ay:s,by:r}=e,a=[],o=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let l;for(;null!==(l=o.exec(t));){const t=l[1].toUpperCase(),e=(l[2].match(bs)||[]).map(parseFloat);if("Z"===t){a.push("z");continue}if("H"===t){for(const t of e)a.push(`H ${i*t+n}`);continue}if("V"===t){for(const t of e)a.push(`V ${s*t+r}`);continue}if("A"===t){for(let t=0;t+6<e.length;t+=7)a.push(`A ${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${i*e[t+5]+n} ${s*e[t+6]+r}`);continue}const o=[];for(let t=0;t+1<e.length;t+=2)o.push(`${i*e[t]+n} ${s*e[t+1]+r}`);o.length&&a.push(`${t} ${o.join(" ")}`)}return a.join(" ")}const ws="apexcharts-highlight-part",As={f:1,o:0},Ms={f:0,o:0},ks=t=>({f:t,o:t<1?1:0}),Ls=Number.isFinite,Ss=(t,e,i)=>i>=1?e:t+(e-t)*i,Cs=t=>t&&"object"==typeof t&&!Array.isArray(t),Es=(t,e="fill-opacity")=>{var i;const n=null==(i=t.instance)?void 0:i._cmd,s=parseFloat(n?n[e.replace("-o","O")]:t.getAttribute(e));return isFinite(s)?s:1};function Fs(t){const e="string"==typeof t?t.trim():"";let i,n=null;return(i=/^rgba\(([^,]+,[^,]+,[^,]+),([^)]+)\)$/i.exec(e))?n=[`rgb(${i[1]})`,parseFloat(i[2])]:(i=/^color-mix\(in srgb, (.+) ([\d.]+)%, transparent\)$/.exec(e))?n=[i[1],parseFloat(i[2])/100]:(i=/^(#[\da-f]{6})([\da-f]{2})$/i.exec(e))&&(n=[i[1],parseInt(i[2],16)/255]),n&&n[1]>0&&n[1]<1?n:[t,1]}function Ps(t,e){const i=null!=t&&e?t/e:null;return{value:null!=t?t:null,total:null!=e?e:null,share:i,overflow:null!=i&&(i<0?"sign":i>1)}}function Ds(t){let e=parseFloat(t.getAttribute("x")),i=parseFloat(t.getAttribute("y"));return String(t.getAttribute("transform")||"").replace(/translate\(\s*([^\s,)]+)[\s,]*([^\s,)]*)\s*\)/g,(t,n,s)=>(e+=parseFloat(n)||0,i+=parseFloat(s)||0,"")),[e,i]}const Rs=["mousemove","mousedown","mouseup","mouseover","mouseout","click","touchstart","touchmove","touchend"];function Ts(t,e){const i=t._apxHits||(t._apxHits=new Set);if(!t._apxHitStop){t._apxHitStop=!0;const e=t=>{i.has(t.relatedTarget)&&t.stopImmediatePropagation()};["mouseout","mouseleave","mouseover","mouseenter"].forEach(i=>t.addEventListener(i,e,!0))}i.add(e),Rs.forEach(i=>e.addEventListener(i,e=>{e.stopPropagation();const n="mouseover"===i,s="mouseout"===i;(n||s)&&e.relatedTarget===t||(Is(t,i,e),n&&Is(t,"mouseenter",e),s&&Is(t,"mouseleave",e))},{passive:!0}))}function Ns(t,e){let i;const n=()=>{var n;let s=t.getAttribute("filter");const r=null==(n=t.instance)?void 0:n._filter,a=null==r?void 0:r.node;if(null==i||i.remove(),!s||(null==r?void 0:r.shared))return e.removeAttribute("filter");(null==a?void 0:a.querySelector("feGaussianBlur"))&&(i=a.cloneNode(),i.append(a.firstElementChild.cloneNode()),i.id+="p",a.after(i),s=`url(#${i.id})`),e.setAttribute("filter",s)};n(),k.isBrowser()&&"undefined"!=typeof MutationObserver&&new MutationObserver(n).observe(t,{attributes:!0,attributeFilter:["filter"]})}function Os(t,e){const i=t.parentNode,n=Array.from(i.childNodes);i.insertBefore(e,n[n.indexOf(t)+1]||null)}const $s=(t,e)=>t.setAttribute("class",`${t.getAttribute("class")||""} ${e}`.trim());function Is(t,e,i){try{const n=i.touches?{bubbles:!0,cancelable:!0,touches:Array.from(i.touches),targetTouches:Array.from(i.targetTouches),changedTouches:Array.from(i.changedTouches)}:"mouseenter"===e||"mouseleave"===e?{clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,relatedTarget:i.relatedTarget,buttons:i.buttons}:i;t.dispatchEvent(new i.constructor(e,n))}catch(t){}}function zs(t){if(!Cs(t))return t;const e=t,{highlightData:i,highlight:n}=e,s=h(e,["highlightData","highlight"]);return["data","children"].forEach(t=>{Array.isArray(s[t])&&(s[t]=s[t].map(js))}),s}function Ws(t){const e=[];return(t||[]).forEach(t=>(Cs(t)&&Array.isArray(t.data)?t.data:[]).forEach(t=>{Cs(t)&&void 0!==t.x&&(void 0!==t.y||Array.isArray(t.children))&&e.push(t)})),e}const Bs=t=>Cs(t)&&("highlight"in t||"highlightData"in t||[t.data,t.children].some(t=>Array.isArray(t)&&t.some(Bs))),js=t=>Cs(t)&&("highlight"in t||Array.isArray(t.children))?zs(t):t;function Hs(t,e){if("number"==typeof e)return e;const i=t.config&&t.config.series||[];for(let t=0;t<i.length;t++)if(i[t]&&i[t].name===e)return t;return-1}function Ys(t){return!!(t&&t.weaveHighlights&&t.weaveHighlights.records.length)}function qs(t,e){if(!Ys(t))return null;let i=null;for(const n of t.weaveHighlights.records)for(const s of n.entries)Hs(t,s.series)===e&&(i=s.values);return i}const Xs="p:",Gs=["pie","donut","polarArea"];function Us(t,e){var i;const n=t.w.highlightData;if(!n)return;if(t._render!==e&&t._beginRender(e,"p:"),!n.active&&!(null==(i=t._prev())?void 0:i.size))return;n.active&&"polarArea"===e.chartType&&"clamp"!==t.cfg.axis&&n.parts.forEach(t=>{Ls(t[0])&&(e.maxY=Math.max(e.maxY,t[0]))});const s=e.animatePaths,r=e.drawArcs,a=e.getSliceMovers,o=e.getHoverOutlinePath,h={arcs:[],movers:[],reach:[],ap:s};e.animatePaths=(t,i)=>{const n=l({},i);s.call(e,t,i),n.run=i.dur,h.arcs[i.i]={a:n,el:t}},e.drawArcs=(...i)=>{const n=r.apply(e,i);return function(t,e,i,n){var s,r,a,o,h,d,u,p,f,g;const m=t.w,y=m.globals,x=t.cfg,_=m.highlightData,v=_.active,w=t._prev(),A=e.chartType,M="polarArea"===A,L=y.radialSize,S="donut"===A?e.donutSize:0,C=v?null!=(s=x.fadeOpacity)?s:.2:1,E=!0===(null==(r=t.ctx.morphTypeChange)?void 0:r.isActive()),F=!y.dataChanged||!y.shouldAnimate,P="area"===(null==(a=x.pie)?void 0:a.encoding),D=m.seriesData.series,R="part"===(null!=(h=null==(o=x.dataLabels)?void 0:o.value)?h:"part"),T=e.strokeWidth>0&&(null!=(u=null==(d=x.outline)?void 0:d.width)?u:1)>0?{opacity:null!=(f=null==(p=x.outline)?void 0:p.opacity)?f:1}:null,N=null==(g=y.prevHighlightLabels)?void 0:g.get(-1),O=[],$=(t,e)=>{var i,n;return(null==(i=t.classList)?void 0:i.contains(e))||` ${null==(n=t.getAttribute)?void 0:n.call(t,"class")} `.indexOf(` ${e} `)>-1};Array.from(i.node.childNodes).filter(t=>$(t,"apexcharts-pie-series")).forEach(i=>{var s,r,a,o,h,d;const u=Array.from(i.childNodes).find(t=>$(t,"apexcharts-pie-area"));if(!u)return;const p=Number(u.getAttribute("j")),f=Xs+p,g=F||null==w?void 0:w.get(f);if(!v&&!g)return;const A=n.arcs[p],I=D[p],z=v?null==(s=_.parts[p])?void 0:s[0]:null,W=e.sliceSizes[p],j=M?W:L,H=k.isBrowser()&&!!A&&A.a.run>0&&!E,Y=+(null==A?void 0:A.a.animBeginArr[p])||0,q=null!=z&&I>0?z/I:null;let X=null,G=!1;if(null!=q&&q>0)if(G=q>1,M)X=Math.min(L,W*q);else{const t=Math.min(q,1);X=P?Math.sqrt(S*S+t*(L*L-S*S)):S+(L-S)*t}const U=null!=(r=null==g?void 0:g.lr)?r:null==g?void 0:g.fr;let K=X;const V=null==X&&null!=U&&H;V&&(K=y.collapsedSeriesIndices.indexOf(p)>-1?U*L:v?S:j);const Z=V&&!v;let J=K,Q=!1;null!=K&&H&&!F&&(null!=U?J=U*L:g||"baseline"===x.enter?J=S:(Q=!0,J=M?null!=(a=A.a.prevSize)?a:W:L),V||Math.abs(A.a.prevEndAngle-A.a.prevStartAngle)>.01||(J=K,Q=!1));let tt=null,et=null;const it=t=>{const e=u.getAttribute("transform");e&&(t.setAttribute("transform",e),t.classList.add("apexcharts-slice-mover"),t.style.transition=u.style.transition),(n.movers[p]=n.movers[p]||[]).push(t)},nt=(t,e,i,s)=>{A&&!E?n.ap.call(t,e,c(l({},A.a),{size:i,prevSize:F?void 0:s,isTrack:!0})):e.attr({d:t.getPiePath({me:t,startAngle:Number(u.getAttribute("data:startAngle")),angle:Number(u.getAttribute("data:angle")),size:i}),"stroke-width":t.strokeWidth})},st=u.getAttribute("fill"),[rt,at]=Fs(st),ot=Es(u),lt=!!st&&"none"!==st&&!/^url\(/i.test(st),ct=lt?at*ot:ot,ht=lt?Q?ct:null!=U&&null!=(o=g.al)?o:1:ot,dt=lt?Z?ct:1:ot;if(null!=K){const s=Js(e,j);tt=new b(m).drawPath({d:"",fill:rt,stroke:u.getAttribute("stroke"),strokeWidth:0,fillOpacity:ht,classes:`${ws} apexcharts-pie-highlight-part`});const r=tt.node;if(r.setAttribute("pointer-events","none"),null!=q&&r.setAttribute("data:hl-share",String(q)),i.appendChild(r),it(r),H&&!F&&r.setAttribute("d",s.getChangedPath(A.a.prevStartAngle,A.a.prevEndAngle,J)),nt(s,tt,K,J),G&&!V&&$s(r,"apexcharts-highlight-overflow"),Ns(u,r),G&&!V||V&&(null==g?void 0:g.edge)){et=new b(m).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${ws} apexcharts-highlight-edge`}),et.node.setAttribute("pointer-events","none"),et.node.setAttribute("stroke-opacity","0"),i.appendChild(et.node),it(et.node);nt(Js(e,j,{strokeWidth:{value:1}}),et,M?W:L-2,M?null==A?void 0:A.a.prevSize:L-2)}if(M&&G&&!V&&(r.removeAttribute("pointer-events"),Ts(u,r),n.reach[p]=K),E){const e=[r,null==et?void 0:et.node].filter(Boolean),i=t=>e.forEach(e=>e.setAttribute("opacity",t));i(0),t._tween(t.ctx.morphTypeChange.getSpeed(),m.config.chart.animations.dynamicAnimation.speed,i,()=>e.forEach(t=>t.removeAttribute("opacity")))}}const ut={d:null,fr:null,f:C,edge:!1,c:!v,al:dt};t._targets.set(f,ut);const pt=G&&null!=X?.75:0,ft=F?pt:(null==g?void 0:g.edge)?.75:0,gt=null!=J?J:0,mt=null!=K?K:0;t._fade(u,F?ks(C):Q?Ms:g?{f:g.f,o:null!=(h=g.o)?h:ks(g.f).o}:As,Z?Ms:ks(C),{delayMs:Y,speed:null==A?void 0:A.a.run,el:null==A?void 0:A.el},{anim:H,force:!!tt&&(gt!==mt||ft!==pt||ht!==dt),outline:T&&c(l({},T),{color:y.colors[p]}),also:t=>{tt&&(ut.lr=Ss(gt,mt,t)/L,ut.la=Ss(ht,dt,t),tt.node.setAttribute("fill-opacity",String(ut.la))),null==et||et.node.setAttribute("stroke-opacity",String(Ss(ft,pt,t)))},land:Z?As:void 0,done:V?()=>{null==tt||tt.remove(),null==et||et.remove(),ut.lr=null}:void 0,rec:ut}),null!=X&&Object.assign(ut,{fr:X/L,edge:G,n:tt.node});const yt=e.sliceLabelGroups[p],xt=yt&&Array.from(yt.childNodes).find(t=>$(t,"apexcharts-pie-label"));if(xt&&v){if(null==z&&R)return e.sliceLabels=e.sliceLabels.filter(t=>t.node!==yt),null==(d=yt.parentNode)||d.removeChild(yt),void delete e.sliceLabelGroups[p];!function(t,e,i,n,s,r,a,o,l){var c,h;const d=t.config.dataLabels.formatter;if(null!=r){const e=null!=(h=null==(c=t.globals.seriesPercent[s])?void 0:c[0])?h:0,i=a?e*r/a:0;n.textContent=String(d?d(i,{seriesIndex:s,dataPointIndex:s,series:t.seriesData.series,w:t,highlight:Ps(r,a)}):i+"%")}const u=parseFloat(n.getAttribute("font-size"))||12,p=Number(i.getAttribute("data:startAngle")),f=Number(i.getAttribute("data:angle"));if(null!=r&&null!=o&&o-l>=1.2*u){const i=t.config.plotOptions.pie.dataLabels.offset,s=B.polarToCartesian(e.centerX,e.centerY,"donut"===e.chartType?(l+o)/2+i:o/1.25+i,(p+f/2)%e.fullAngle);n.setAttribute("x",s.x),n.setAttribute("y",s.y)}const g=new b(t).getTextRects(n.textContent,n.getAttribute("font-size"),n.getAttribute("font-family"),void 0,!0,n.getAttribute("font-weight")),m=parseFloat(n.getAttribute("x")),y=parseFloat(n.getAttribute("y")),x=null!=o&&[[m-g.width/2,y-.75*g.height],[m+g.width/2,y-.75*g.height],[m-g.width/2,y+.25*g.height],[m+g.width/2,y+.25*g.height]].every(([t,i])=>{const n=t-e.centerX,s=i-e.centerY,r=Math.hypot(n,s),a=((180*Math.atan2(s,n)/Math.PI+90-p)%360+360)%360;return r>=l&&r<=o&&a<=f});x||(n.setAttribute("fill",t.config.chart.foreColor),n.removeAttribute("filter"))}(m,e,u,xt,p,R?z:null,I,X,S)}xt&&H&&!F&&N&&O.push({t:xt,src:N.get(p),el:A.el,delayMs:Y,arc:A})}),O.length&&(t._ride=()=>function(t,e){e.forEach(({t:e,src:i,el:n,delayMs:s,arc:r})=>{if(!e.isConnected)return;const[a,o]=Ds(e),l=i?i.x-a:0,c=i?i.y-o:0;i&&Math.abs(l)<.5&&Math.abs(c)<.5||t._tween(s,r.a.run,t=>{const n=1-t;n>0&&i?e.setAttribute("transform",`translate(${l*n} ${c*n})`):e.removeAttribute("transform"),i||(t<1?e.setAttribute("opacity",String(t)):e.removeAttribute("opacity"))},void 0,void 0,n)})}(t,O))}(t,e,n,h),n},e.getSliceMovers=t=>a.call(e,t).concat(h.movers[t]||[]),e.getHoverOutlinePath=t=>{const i=e.sliceSizes;if(!(h.reach[t]>i[t]))return o.call(e,t);e.sliceSizes=i.slice(),e.sliceSizes[t]=h.reach[t];try{return o.call(e,t)}finally{e.sliceSizes=i}},Ks(t,e)}function Ks(t,e){const i=e.renderInnerDataLabels,n=e.printInnerLabels;e.renderInnerDataLabels=(n,s,r)=>Vs(t,()=>i.call(e,n,Zs(t,s,0),r)),e.printInnerLabels=(i,s,r,a)=>Vs(t,()=>n.call(e,Zs(t,i,a?+a.parentNode.getAttribute("rel")-1:-1),s,r,a))}function Vs(t,e){var i,n;const s=t.w.globals,r=t.w.highlightData;if(!(null==r?void 0:r.active)||"part"!==(null!=(n=null==(i=t.cfg.dataLabels)?void 0:i.total)?n:"part"))return e();const a=s.seriesTotals;s.seriesTotals=r.parts.map(t=>{var e;return null!=(e=t[0])?e:0});try{return e()}finally{s.seriesTotals=a}}function Zs(t,e,i){var n,s;const r=t.w,a=r.highlightData;if(!(null==a?void 0:a.active))return e;const o=r.seriesData.series,h=a.parts.map(t=>t[0]),d=i>-1&&"part"===(null!=(s=null==(n=t.cfg.dataLabels)?void 0:n.value)?s:"part")?h[i]:null,u=t=>t.reduce((t,e)=>t+(Ls(e)?e:0),0),p=e.total.formatter,f=e.value.formatter;return c(l({},e),{total:c(l({},e.total),{formatter:p&&(t=>p(t,{highlight:Ps(u(h),u(o))}))}),value:c(l({},e.value),{formatter:(t,e)=>f(null!=d?d:t,e,{highlight:i>-1?Ps(h[i],o[i]):void 0})})})}const Js=(t,e,i)=>Object.create(t,l({getSliceExtent:{value:i=>t.getSliceExtent(c(l({},i),{size:e}))}},i));const Qs="r:",tr="r:o",er=["length","baseWidth","tipWidth","offsetY"],ir=.45,nr=`${ws} apexcharts-radialbar-highlight-lane`;function sr(t,e){var i,n,s,r,a,o;const c=t.w,h=c.highlightData,d=null==(n=null==(i=t.ctx.lastUpdateOptions)?void 0:i.tooltip)?void 0:n.enabled;if(null!=d?t._tipUser=d:t._tipOn&&(c.config.tooltip.enabled=!1),t._tipOn=!1,!h)return;t._render!==e&&t._beginRender(e,Qs),function(t){const e=t.ctx.morphTypeChange;if(!e||e._hfOut)return;e._hfOut=!0;const i=e.captureBeforeDestroy;e.captureBeforeDestroy=n=>{const s=function(t,e){var i,n,s,r,a;const o=t.w,l=o.globals,c=null==(i=o.dom.baseEl)?void 0:i.querySelector(".apexcharts-radialbar");if("radialBar"!==e&&"gauge"!==e||!c)return null;const h=t.ctx.morphTypeChange,d=null!=(s=null==(n=l.circleGeometry)?void 0:n.cx)?s:0,u=null!=(a=null==(r=l.circleGeometry)?void 0:r.cy)?a:0,p=new Map,f=new Set,g=new Set;c.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(e=>{var i,n,s,r;const a=e.parentNode,o=+a.getAttribute("data:realIndex"),l=Qs+e.getAttribute("j"),c=null!=(n=t._targets.get(l))?n:null==(i=t._prev())?void 0:i.get(l),m=a.querySelector(".apexcharts-radialbar-highlight-part");if(!(m||(null==c?void 0:c.s)>0||(null!=(r=null!=(s=null==c?void 0:c.lf)?s:null==c?void 0:c.f)?r:1)<1))return;f.add(e);const y=null==m?void 0:m.getAttribute("d"),x=+(null==m?void 0:m.getAttribute("stroke-width"));let _=null;if(y&&x>0&&"0"!==m.getAttribute("opacity"))_=h._radialArcToFilledSegment(y,x,d,u)||y,g.add(m);else{const t=/M\s*(-?[\d.e]+)\s+(-?[\d.e]+)/.exec(e.getAttribute("d")||"");t&&(_=`M ${t[1]} ${t[2]} L ${t[1]} ${t[2]} Z`)}_&&p.set(o,_)});const m=[...c.getElementsByClassName(ws)];return p.size||m.length?(m.forEach(t=>g.has(t)||t.closest(".apexcharts-tracks")||f.add(t)),{marks:p,ghost:()=>{const t="data-hf-ghost";f.forEach(e=>e.setAttribute(t,""));const e=o.dom.Paper.node.cloneNode(!0);f.forEach(e=>e.removeAttribute(t));const i=new Set(e.querySelectorAll(`[${t}]`)),n=new Set;i.forEach(i=>{i.removeAttribute(t);for(let t=i.parentNode;t&&t!==e;t=t.parentNode)n.add(t)});const s=t=>[...t.children].forEach(t=>{i.has(t)||(n.has(t)?s(t):"defs"!==t.tagName.toLowerCase()&&t.remove())});return s(e),e.removeAttribute("id"),[e,...e.querySelectorAll("*")].forEach(t=>{t.id&&(t.id+="-hf"),[...t.attributes].forEach(e=>{e.value.includes("url(#")&&t.setAttribute(e.name,e.value.replace(/url\(#([^)]+)\)/g,"url(#$1-hf)"))})}),e}}):null}(t,null==n?void 0:n.fromType);if(!s)return i.call(e,n);const r=e._captureFromDOM;let a;e._captureFromDOM=t=>{const i=r.call(e,t);return i.marks.forEach(t=>{var e;t.d=null!=(e=s.marks.get(t.realIndex))?e:t.d}),i};try{a=i.call(e,n)}finally{e._captureFromDOM=r}const o=e._snapshot;return!a||!o||e._ghost||o.pieceOut||o.pieceIn||(e._ghost=s.ghost()),a}}(t);const u=c.config.plotOptions.radialBar,p=null==(s=t.cfg.radialBar)?void 0:s.indicator;if(t._ind=null!=p?p:"needle"===u.shape?"needle":"arc","needle"!==u.shape||(null==(r=u.needle)?void 0:r.showValueArc)||("lanes"===t._ind&&(t._ind="needle"),"arc"!==p&&"lanes"!==p||t._warn("needleNoArc",`indicator '${p}' is drawn as a needle: a needle gauge without plotOptions.radialBar.needle.showValueArc has no arc to split.`)),!h.active&&!(null==(a=t._prev())?void 0:a.size))return;const f=c.config.tooltip;h.active&&!f.enabled&&null==t._tipUser&&k.isBrowser()&&(f.enabled=!0,t._tipOn=!0),Ks(t,e),function(t,e){const i=e.renderInnerDataLabels,n=e.printInnerLabels;e.renderInnerDataLabels=(n,s,r)=>{const a=i(n||e.dataLabelsGroup,s,r);return cr(t,e,s,-1,a),a},e.printInnerLabels=(i,s,r,a)=>{n(i,s,r,a),cr(t,e,i,a?+a.parentNode.getAttribute("rel")-1:-1)}}(t,e);const g=e.drawNeedle;e.drawNeedle=i=>{const n=g.call(e,i);return function(t,e,i){var n,s;const r=t.w,a=r.globals,o=r.highlightData.active,l=!a.dataChanged||!a.shouldAnimate,c=l||null==(n=t._prev())?void 0:n.get(tr);if(!o&&!c)return;const h=o?null!=(s=t.cfg.fadeOpacity)?s:.2:1,d=l?h:c?c.f:1,u={d:null,f:h,c:!o};t._targets.set(tr,u);const p=t=>{u.lf=t,t<1?i.node.setAttribute("opacity",String(t)):i.node.removeAttribute("opacity")},f=t.ctx.morphTypeChange,g=(null==f?void 0:f.isActive())?{delay:f.getSpeed(),speed:r.config.chart.animations.dynamicAnimation.speed}:e.needleMotion();g&&d!==h?(u.run=!0,t._tween(g.delay||0,g.speed,t=>p(Ss(d,h,t)),()=>u.run=!1,g.ease)):p(h);o&&k.isBrowser()&&Promise.resolve().then(()=>{var t;const e=r.dom.baseEl,n=null==e?void 0:e.querySelector(".apexcharts-radialbar-slice-0");n&&i.node.isConnected&&(Ts(n,i.node),null==(t=e.querySelector(".apexcharts-radialbar-hollow"))||t.setAttribute("pointer-events","none"))})}(t,e,n),n};const m=e.animatePaths,y=new Set;e.animatePaths=(i,n)=>{const s=l({},n);m.call(e,i,n),n.isTrack||(s.run=n.dur,y.add(s.i),rr(t,e,i,s,m))},!0===(null==(o=t.ctx.morphTypeChange)?void 0:o.isActive())&&Promise.resolve().then(()=>{var i;t._render!==e||c.globals.isDestroyed||null==(i=c.dom.baseEl)||i.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(i=>y.has(+i.getAttribute("j"))||rr(t,e,i.instance,null,m))})}function rr(t,e,i,n,s){var r,a,o,h,d,u;const p=t.w,f=p.globals,g=t.cfg,m=p.highlightData,y=m.active,x=i.node,_=n?n.i:Number(x.getAttribute("j")),v=Qs+_,w=!n,A=!f.dataChanged||!f.shouldAnimate,L=t._prev(),S=A||null==L?void 0:L.get(v),C=p.config.plotOptions.radialBar,E=t._ind,F=x.getAttribute("stroke"),P=x.getAttribute("fill"),D=F&&"transparent"!==F?F:w&&P&&"none"!==P?P:null,R=0===_&&("needle"===E||!D),T=p.seriesData.series[_],N=y&&f.collapsedSeriesIndices.indexOf(_)<0&&null!=(a=null==(r=m.parts[_])?void 0:r[0])?a:null,O=e.startAngle,$=n?n.endAngle:e._arcEnd(T),I=n?n.run:0,z=k.isBrowser()&&I>0,W=n&&+n.animBeginArr[_]||0,j=null!=(o=g.fadeOpacity)?o:.2,H=y&&!R&&!!D,Y={f:j,o:0},q=n?n.size:Math.hypot(x.getAttribute("data:cx")-f.circleGeometry.cx,x.getAttribute("data:cy")-f.circleGeometry.cy);if("lanes"===E&&D)return function(t,e,i,n){var s,r,a,o,h,d,u;const{i:p,c:f,prev:g,mount:m,pv:y,whole:x,wholeEnd:_,run:v,anim:w,delayMs:A,size:L}=n,S=t.w,C=S.globals,E=t.cfg,F=S.config.plotOptions.radialBar,P=S.highlightData.active,D=i.node,R=!f,T=e.startAngle,N=P&&C.collapsedSeriesIndices.indexOf(p)<0?1:0,O=R?k.isBrowser()&&!!N:w&&!m,$=!R&&w&&m,I=R?0:O?null!=(s=null==g?void 0:g.s)?s:0:N,z=R?{delayMs:t.ctx.morphTypeChange.getSpeed(),speed:S.config.chart.animations.dynamicAnimation.speed}:{delayMs:A,speed:v};0===p&&function(t,e){var i;const n=null==(i=t._render)?void 0:i._hfLine,s=null==n?void 0:n.rec;if(!s||s.run||s.lf===s.f)return;const r=s.lf,a=()=>{var t,e;if(s.run=!1,s.f)return;s.done=!0;const i=null==(t=n.node)?void 0:t.previousSibling;null!=s.hold&&i&&i.textContent===s.pv&&(i.textContent=s.vt=s.hold),null==(e=n.node)||e.remove(),n.node=null};if(!e)return s.lf=s.f,dr(n),void a();s.run=!0,t._tween(e.delayMs,e.speed,t=>{s.lf=Ss(r,s.f,t),dr(n)},a,void 0,e.el)}(t,O?c(l({},z),{el:i}):null);if(!N&&!I)return;const W=null!=y?e._arcEnd(y):T,B=_,j=N?W:B;let H=B,Y=j;R?Y="baseline"===E.enter?T:B:O?(H=null!=(r=null==g?void 0:g.we)?r:Ls(f.prevEndAngle)?f.prevEndAngle:B,Y=null!=(a=null==g?void 0:g.e)?a:"baseline"===E.enter?T:H):$&&(H=Y=T);const q=N?null!=(d=null==(h=null==(o=E.radialBar)?void 0:o.lanes)?void 0:h.opacity)?d:ir:1,X=R?1:O?g?g.f:1:q,G=R?e.getStrokeWidth({size:C.circleGeometry.r,series:S.seriesData.series}):Number(D.getAttribute("stroke-width")),U=D.getAttribute("stroke-opacity"),K=t=>{var e;const i=new b(S).drawPath({d:"",stroke:n.paint,strokeWidth:G,fill:"none",strokeOpacity:Es(D,"stroke-opacity"),strokeDashArray:null!=(e=D.getAttribute("stroke-dasharray"))?e:0,classes:`${nr} ${t}`});return i.node.setAttribute("aria-hidden","true"),Ns(D,i.node),i},V=K("apexcharts-radialbar-highlight-whole"),Z=K("apexcharts-radialbar-highlight-part");Os(D,V.node),Os(V.node,Z.node),V.node.setAttribute("pointer-events","none"),N&&W-B>.01?Ts(D,Z.node):Z.node.setAttribute("pointer-events","none");null!=y&&(y>(null!=x?x:0)||y>("number"==typeof F.max?F.max:100))&&$s(Z.node,"apexcharts-highlight-overflow");const J=S.seriesData.series.length,Q=function(t){var e,i;if(t._hfTracks)return t._hfTracks;const n=(t,e)=>{var i;return` ${null==(i=t.getAttribute)?void 0:i.call(t,"class")} `.includes(` ${e} `)},s=[...(null==(i=null==(e=t.w.dom.Paper)?void 0:e.node)?void 0:i.childNodes)||[]];let r=[];for(let t=s.length-1;t>=0&&!r.length;t--){const e=[...s[t].childNodes||[]].find(t=>n(t,"apexcharts-tracks"));e&&(r=[...e.childNodes].map(t=>[...t.childNodes].find(t=>n(t,"apexcharts-radialbar-area"))))}return t._hfTracks=r}(e)[F.inverseOrder?J-1-p:p],tt=Q&&[Q.getAttribute("d"),Q.getAttribute("stroke-width")],et=tt?(parseFloat(tt[1])||0)/(G||1):0;let it=null;if(Q){it=new b(S).drawPath({d:"",stroke:Q.getAttribute("stroke"),strokeWidth:0,fill:"none",strokeOpacity:null!=(u=Q.getAttribute("stroke-opacity"))?u:1,classes:`${ws} apexcharts-radialbar-highlight-track`});const t=Q.getAttribute("filter");t&&it.node.setAttribute("filter",t),it.node.setAttribute("pointer-events","none"),it.node.setAttribute("aria-hidden","true"),Os(Q,it.node)}const nt=L-G/2,st=L+G/2,rt=J<2,at=rt?Math.max(2,.12*G):Math.max(1,Math.min(.08*G,e.margin/3)),ot=rt?0:Math.max(0,(3*at-e.margin)/2),lt=Math.max(.5,(G-at)/2-ot),ct=(t,i)=>{const n=t-T;return n>.01?e.getPiePath({me:e,startAngle:T,angle:n===e.fullAngle?e.fullAngle-.01:n,size:i}):""},ht=t=>{const i=e.trackStartAngle;let n=e.trackEndAngle;Math.abs(n)+Math.abs(i)>=360&&(n=360-Math.abs(e.startAngle)-.1);const s=n<i?e.fullAngle+n-i:n-i;return e.getPiePath({me:e,startAngle:i,angle:s===e.fullAngle?s-.01:s,size:t})},dt=(t,e,i)=>{t.setAttribute("d",e),t.setAttribute("stroke-width",String(i))},ut={d:null,c:!P,f:q,cx:f?f.centerX:C.circleGeometry.cx,cy:f?f.centerY:C.circleGeometry.cy};t._targets.set(Qs+p,ut);const pt=(t,e,i)=>{ut.s=t,ut.we=e,ut.e=i;const n=st-ot*t,s=nt+t*(st-ot-lt-nt),r=nt+ot*t,a=r+t*lt;ut.mid=(s+a)/2,dt(V.node,ct(e,(s+n)/2),n-s),dt(Z.node,a>r?ct(i,(r+a)/2):"",a-r),Q&&(t?(dt(Q,ht((s+n)/2),(n-s)*et),dt(it.node,ht((r+a)/2),(a-r)*et)):(dt(Q,tt[0],tt[1]),dt(it.node,"",0)))},ft=[V.node,Z.node,null==it?void 0:it.node].filter(Boolean);let gt=!R;const mt=()=>{gt=!0,D.setAttribute("stroke-opacity","0"),ft.forEach(t=>t.removeAttribute("opacity"))};gt?mt():ft.forEach(t=>t.setAttribute("opacity","0"));pt(I,H,Y);let yt=!1;(O||$)&&V.animate(z.speed,z.delayMs).during(t=>{yt||(gt||mt(),pt(Ss(I,N,t),Ss(H,B,t),Ss(Y,j,t)))});if(t._fade(V.node,{f:X,o:0},{f:q,o:0},c(l({},z),{el:V}),{attr:"stroke-opacity",anim:O,force:O,done:N?void 0:()=>{yt=!0,ft.forEach(t=>t.remove()),Q&&dt(Q,tt[0],tt[1]),null==U?D.removeAttribute("stroke-opacity"):D.setAttribute("stroke-opacity",U),ut.s=0},rec:ut}),k.isBrowser()){let e=null,i=-1;const n=n=>{var s;(i!==ar||/over|start/.test(n.type))&&(e=null==(s=D.getScreenCTM)?void 0:s.call(D),i=ar,function(){if(or)return;or=!0,["scroll","resize"].forEach(t=>M.addWindowEventListener(t,()=>ar++,{capture:!0,passive:!0}))}()),t._lane=[p,lr(e,n,ut)]};["mouseover","mousemove","mousedown","touchstart","touchmove"].forEach(t=>D.addEventListener(t,n,!0))}}(t,e,i,{i:_,c:n,prev:S,mount:A,pv:N,whole:T,wholeEnd:$,run:I,anim:z,delayMs:W,size:q,paint:D}),void(0===_&&pr(t,e,i,!1,N,A,w,n));const X=H&&null!=N?e._arcEnd(N):null,G=null!=X&&X-O>.01,U=null!=(h=null==S?void 0:S.e)?h:null,K=!G&&null!=U&&z,V=K&&!H,Z=G?X:K?V?$:O:null;let J=Z,Q=!1;null!=Z&&z&&!A&&(null!=U?J=U:S||"baseline"===g.enter?J=O:(Q=!0,J=Ls(n.prevEndAngle)?n.prevEndAngle:$));const tt=t=>{const i=t-O;return e.getPiePath({me:e,startAngle:O,angle:i===e.fullAngle?e.fullAngle-.01:i,size:q})};let et=null;if(null!=Z&&D){et=new b(p).drawPath({d:"",stroke:D,strokeWidth:w?e.getStrokeWidth({size:f.circleGeometry.r,series:p.seriesData.series}):Number(x.getAttribute("stroke-width")),fill:"none",strokeOpacity:Es(x,"stroke-opacity"),strokeDashArray:null!=(d=x.getAttribute("stroke-dasharray"))?d:0,classes:`${ws} apexcharts-radialbar-highlight-part`});const t=et.node;t.setAttribute("aria-hidden","true"),Os(x,t),G&&N>("number"==typeof C.max?C.max:100)&&$s(t,"apexcharts-highlight-overflow"),Ns(x,t),G&&X-$>.01?Ts(x,t):t.setAttribute("pointer-events","none"),n&&z&&!A?(t.setAttribute("d",tt(J)),s.call(e,et,c(l({},n),{endAngle:Z,prevStartAngle:O,prevEndAngle:J,isTrack:!0}))):n?s.call(e,et,c(l({},n),{endAngle:Z,dur:I,isTrack:!0})):t.setAttribute("d",tt(Z))}const it=G&&X-$>.01?.75:0,nt=A?it:null!=(u=null==S?void 0:S.tk)?u:0;let st=null;if(et&&(it||nt&&z)){const t=Number(et.node.getAttribute("stroke-width"))||0,e=n?n.centerX:f.circleGeometry.cx,i=n?n.centerY:f.circleGeometry.cy;st=new b(p).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${ws} apexcharts-highlight-edge apexcharts-radialbar-highlight-edge`});const s=st.node;s.setAttribute("pointer-events","none"),s.setAttribute("aria-hidden","true"),s.setAttribute("stroke-opacity",String(nt)),Os(et.node,s);const r=n=>{const r=B.polarToCartesian(e,i,q-t/2,n),a=B.polarToCartesian(e,i,q+t/2,n);s.setAttribute("d",`M ${r.x} ${r.y} L ${a.x} ${a.y}`)},a=z?Ls(n.prevEndAngle)&&!A?n.prevEndAngle:O:$;r(a),a!==$&&st.animate(I,W).during(t=>r(Ss(a,$,t)))}const rt=[];et&&w&&rt.push(et.node),st&&w&&rt.push(st.node);const at={d:null,e:null,f:H?j:1,c:!y};if(D&&(y||S)){t._targets.set(v,at);const e=null!=J?J:0,s=null!=Z?Z:0;et&&(at.e=s),et&&n&&z&&!A&&e!==s&&(at.e=e,et.animate(I,W).during(t=>null!=at.e&&(at.e=Ss(e,s,t))));const r=p.config.chart.animations.dynamicAnimation.speed;t._fade(x,A&&!w?H?Y:As:Q?Ms:S?{f:S.f,o:0}:As,V?Ms:H?Y:As,w?{delayMs:t.ctx.morphTypeChange.getSpeed(),speed:r}:{delayMs:W,speed:I,el:i},{attr:"stroke-opacity",anim:w?k.isBrowser():z,force:!!et&&(w||e!==s||nt!==it),also:t=>{st&&(at.tk=Ss(nt,it,t),st.node.setAttribute("stroke-opacity",String(at.tk))),rt.forEach(e=>t<1?e.setAttribute("opacity",t):e.removeAttribute("opacity"))},land:V?As:void 0,done:K||st&&!it?()=>{K&&(null==et||et.remove(),at.e=null),null==st||st.remove(),at.tk=0}:void 0,rec:at}),et&&(at.n=et.node)}0===_&&pr(t,e,i,R,N,A,w,n)}let ar=0,or=!1;function lr(t,e,i){var n;const s=(null==(n=e.touches)?void 0:n[0])||e;if(!(t&&i.s>0))return"part";const r=s.clientX-t.e,a=s.clientY-t.f,o=t.a*t.d-t.b*t.c||1,l=(t.d*r-t.c*a)/o,c=(t.a*a-t.b*r)/o;return Math.hypot(l-i.cx,c-i.cy)>i.mid?"whole":"part"}function cr(t,e,i,n,s){var r,a,o;const l=t.w,c=l.globals;if("lanes"!==t._ind)return;const h=l.highlightData.active;let d=e._hfLine;if(!d){const n=!c.dataChanged||!c.shouldAnimate,s=n||null==(r=t._prev())?void 0:r.get("r:w"),o=h?ur(t,i,-1):"",l=o?1:0,u=n||!k.isBrowser()?l:null!=(a=null==s?void 0:s.f)?a:0;if(d=e._hfLine={node:null,rec:null},!l&&!u)return;d.rec={d:null,c:!h,t:o||(null==s?void 0:s.t)||"",f:l,lf:u,o0:u,pv:l?null:null==s?void 0:s.vt},t._targets.set("r:w",d.rec)}const u=d.rec;if(s){if(d.node=null,!u||!u.lf&&u.done)return;const e=s.node.childNodes,n=i.value.show?e[e.length-1]:null;if(!n)return;null==u.pv||u.done||(u.hold=n.textContent,n.textContent=u.pv),u.vt=n.textContent;const r=hr(l,i,n,(h?ur(t,i,-1):"")||u.t);s.add(r),d.node=r.node}else if(h){const e=ur(t,i,n),s=null==(o=l.dom.baseEl)?void 0:o.querySelector(".apexcharts-datalabel-value");!d.node&&e&&n>-1&&s&&(d.node=hr(l,i,s,e).node,s.parentNode.appendChild(d.node)),d.node&&(d.node.textContent=e),u&&s&&(u.vt=s.textContent)}dr(d)}function hr(t,e,i,n){const s=parseFloat(e.value.fontSize)||14,r=Math.max(11,Math.round(s/2)),a=new b(t).drawText({x:+i.getAttribute("x"),y:+i.getAttribute("y")+s/4+4+.8*r,text:n,textAnchor:"middle",fontSize:r+"px",fontFamily:e.value.fontFamily,fontWeight:400,foreColor:i.getAttribute("fill"),cssClass:"apexcharts-datalabel-whole"});return a.node.setAttribute("aria-hidden","true"),a}function dr(t){var e,i,n;null==(n=t.node)||n.setAttribute("fill-opacity",String(.6*(null!=(i=null==(e=t.rec)?void 0:e.lf)?i:1)))}function ur(t,e,i){var n,s;const r=t.w,a=t.cfg.dataLabels||{},o=r.seriesData.series,h=r.highlightData.parts.map(t=>t[0]),d=i>-1?i:o.length<2?0:-1,u=(t,e)=>{const i=String(t(e)),n=String(t(c(l({},e),{lane:"whole"})));return n!==i?n:"/ "+i};if(d>-1)return"part"===(null!=(n=a.value)?n:"part")&&Ls(h[d])?u(t=>e.value.formatter(o[d],r,t),{highlight:Ps(h[d],o[d])}):"";if(!e.total.show||"part"!==(null!=(s=a.total)?s:"part")||!e.total.formatter||!h.some(Ls))return"";const p=t=>t.reduce((t,e)=>t+(Ls(e)?e:0),0);return u(t=>e.total.formatter(r,t),{highlight:Ps(p(h),p(o))})}function pr(t,e,i,n,s,r,a,o){var l,c,h;const d=t.w,u=d.globals,p=t.cfg,f=d.highlightData.active,g=r||null==(l=t._prev())?void 0:l.get("r:n"),m=n&&null!=s?e._angleAtValue(s):null;if(null==m&&!g)return;const y=d.config.plotOptions.radialBar,x=a?null:"needle"===y.shape?e.needleMotion():o&&o.run>0&&k.isBrowser()?{speed:o.run,delay:+o.animBeginArr[0]||0}:null;let _,v=1,w=m,A=1;const L=null==m;if(L){if(!x)return;_=g.ang,v=g.op,w=f&&n?e.startAngle:e._angleAtValue(d.seriesData.series[0]),A=0}else x?r?_=e.startAngle:g?(_=g.ang,v=g.op):(_=e._angleAtValue(u.dataChanged?u.previousPaths[0]:d.seriesData.series[0]),v=0):_=w;const S=u.circleGeometry,C=(null==(c=p.radialBar)?void 0:c.needle)||{},E=y.needle||{},F={},P=t=>null!=t&&!(parseFloat(t)>0),D=P(E.baseWidth)&&P(E.tipWidth);er.forEach(t=>{var e;const i="length"===t?P(E.length):D&&("baseWidth"===t||"tipWidth"===t);F[t]=null!=(e=C[t])?e:i?void 0:E[t]});const R=null!=(h=C.color)?h:u.colors[0],{path:T,cx:N,cy:O}=e.needlePath({size:S.r,centerX:S.cx,centerY:S.cy,series:d.seriesData.series},F),$=new b(d),I=$.group({class:"apexcharts-gauge-needle-highlight"});L||!k.isBrowser()?I.node.setAttribute("pointer-events","none"):Ts(i.node,I.node),I.node.setAttribute("aria-hidden","true"),I.node.setAttribute("transform-origin",`${N} ${O}`),I.add($.drawPath({d:T,stroke:R,strokeWidth:0,fill:R,classes:`${ws} apexcharts-gauge-needle-highlight-shape`})),null!=s&&s>("number"==typeof y.max?y.max:100)&&$s(I.node,"apexcharts-highlight-overflow");const z=i.node.parentNode.parentNode;z.insertBefore(I.node,z.childNodes[0]||null);const W=()=>{const t=[...z.childNodes].filter(t=>t!==I.node),e=t.findIndex(t=>{var e;return` ${null==(e=t.getAttribute)?void 0:e.call(t,"class")} `.includes(" apexcharts-radialbar-hollow ")});return!(e<0||I.node.parentNode!==z)&&(z.insertBefore(I.node,t[e+1]||null),!0)};W()||Promise.resolve().then(W);const B={d:null,ang:_,op:v,c:!f};t._targets.set("r:n",B);const j=(t,e)=>{B.ang=t,B.op=e,I.node.setAttribute("transform",`rotate(${t})`),e<1?I.node.setAttribute("opacity",String(e)):I.node.removeAttribute("opacity")},H=t=>j(_+(w-_)*t,Ss(v,A,t)),Y=()=>{B.run=!1,L?I.remove():j(w,A)};if(a)return j(w,0),void t._tween(t.ctx.morphTypeChange.getSpeed(),d.config.chart.animations.dynamicAnimation.speed,t=>j(w,t),Y);if(!x||_===w&&v===A)return H(1),void Y();B.run=!0,H(0);const q=x;if(q.ease){const i=performance.now(),n=s=>{if(u.isDestroyed||t._render!==e)return;const r=Math.max(0,Math.min(1,(s-i)/q.speed));H(q.ease(r)),r<1?M.requestAnimationFrame(n):Y()};M.requestAnimationFrame(n)}else I.animate(q.speed,q.delay||0).during(t=>H(t)).after(Y)}function fr(t){var e,i,n,s;return!!(null==(s=null==(n=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:n.nested)?void 0:s.drilldownAsLevels)}const gr="apexcharts-highlight-tile",mr="apexcharts-highlight-overflow",yr=/^url\(/i;function xr(t,e,i){if(!Cs(e))return null;if(Array.isArray(e.children)&&e.children.length)return[e.children,i];const n=e.drilldown,s=null!=n&&fr(t)&&!i.includes(n)&&Zt(t,n);return s&&Array.isArray(s.data)&&s.data.length?[s.data,[...i,n]]:null}function _r(t,e){var i,n,s;const r=t.w,a=r.globals,o=r.highlightData;if(!o)return;t._beginRender(e,"t:"),t._tmDefs.forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),t._tmDefs=[];const c=t._tiles=new Map,h=o.active,d=r.seriesData.series;!function(t,e,i){const n=s=>{var r,a;const o=s.children;if(!o||!o.length){const t=null==(r=null==e?void 0:e[s._si])?void 0:r[s._di];return s.highlight=e?Ps(Ls(t)?t:null,null==(a=i[s._si])?void 0:a[s._di]):void 0,s.highlight}let l=null;if(o.forEach(t=>{const e=n(t);!e||null==e.value||e.value*(e.total||0)<0||(l=(l||0)+Math.abs(e.value))}),!e)return s.highlight=void 0;const c=t._subtreeArea(s),h=null!=l&&c?l/c:null;return s.highlight={value:l,total:c,share:h,overflow:null!=h&&h>1},s.highlight};(t.roots||[]).forEach(n)}(e,h?o.parts:null,d);const u=t._prev();if(!h&&!(null==u?void 0:u.size))return;const p=new Map;null==u||u.forEach(t=>p.set(t.ij,t)),null==(i=a.prevTreemapView)||i.querySelectorAll(`.${gr}`).forEach(t=>{t.classList.remove(gr,mr),t.removeAttribute("data:hl-share")});const f=t.cfg,g=h?null!=(n=f.fadeOpacity)?n:.2:1,m=!0===(null==(s=t.ctx.morphTypeChange)?void 0:s.isActive()),y=e.dynamicAnim,x=m||!!(a.dataChanged&&y.enabled&&a.shouldAnimate),_=m?t.ctx.morphTypeChange.getSpeed():y.speed,v=r.config.chart.foreColor;let w=!1;h&&function(t,e){const i=e._showParentTooltip;e._showParentTooltip=(n,s)=>{var r,a,o;i.call(e,n,s);const l=s.highlight,c=t.cfg.tooltip||{};if(null==(null==l?void 0:l.value)||!1===c.show||"function"==typeof(null==(a=null==(r=t.w.config.plotOptions.treemap.parents)?void 0:r.tooltip)?void 0:a.formatter))return;const h=null==(o=e._tip())?void 0:o.querySelector(".apexcharts-tooltip-text-y-value");if(!h)return;let d=`/ ${e._formatValue(l.total,s._si)}`;c.share&&l.total&&(d+=` \xb7 ${Math.round(100*l.share)}%`),h.innerHTML=`${e._formatValue(l.value,s._si)} <span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">${d}</span>`}}(t,e);let A=null;const M=e.helpers.calculateDataLabels;e.helpers.calculateDataLabels=t=>{const i=M.call(e.helpers,t),n=A=c.get(t.i+"|"+t.j);if(i&&n){const t=function(t){const e=[];return function t(i){"text"===String(i.tagName||i.nodeName).toLowerCase()&&e.push(i),Array.from(i.childNodes||[]).forEach(t)}(t),e}(i.node);n.lb=t.filter(t=>/^(#fff|#ffffff|white)$/i.test(t.getAttribute("fill")||""));const e=t[0],[,s,,r]=n.r;if(e&&r>s){const t=parseFloat(e.getAttribute("font-size"))||12;n.need=(r-parseFloat(e.getAttribute("y"))+.9*t)/(r-s)}br(n,v)}return i};const k=e.rotateToFitLabel;return e.rotateToFitLabel=(...t)=>{k.apply(e,t);const i=A;if(A=null,(null==i?void 0:i.lb)&&/rotate/.test(t[0].node.getAttribute("transform")||"")){const e=new b(r).getTextRects(t[2],String(t[1])).width;i.need=.5+e/2/(t[6]-t[4]),i.tone=null,br(i,v)}},(e,i,n,s,y)=>{var b,A,M,k;const L="t:"+y._key,S=i+"|"+n,C=null==(b=d[i])?void 0:b[n],E=x?(null==u?void 0:u.get(L))||(C?void 0:p.get(S)):void 0;if(!h&&!E)return;if(yr.test(s))return void(h&&!w&&(w=!0,t._warn("fill","treemap tiles with a gradient, pattern or image fill are drawn without their parts.")));const F=h?null==(A=o.parts[i])?void 0:A[n]:null;if(!C&&!E)return;const P=Ls(F)&&C?F/C:null;let D=h?{s:null==P||P<0?0:Math.min(P,1),f:g,c:s}:{s:1,f:0,c:s},R=D;if(E)R={s:E.s,f:E.f,c:E.col},!C&&h&&(D=l({},R));else if(x){const t=null==(M=a.previousPaths[i])?void 0:M[n];(m||(null==(k=null==t?void 0:t.rect)?void 0:k.width)>0)&&(R="baseline"===f.enter?{s:0,f:1,c:D.c}:{s:1,f:0,c:D.c},m||!t.fill||yr.test(t.fill)||(R.c=t.fill))}const T=R.s!==D.s||R.f!==D.f||R.c!==D.c;if(!h&&!T)return;const N=r.dom.Paper.gradient("linear",t=>{for(let e=0;e<4;e++)t.stop(0,s,1)});N.from(0,1).to(0,0),t._tmDefs.push(N.node);const O=Array.from(N.node.childNodes),$=e.node;h&&($.setAttribute("class",`${$.getAttribute("class")||""} ${gr}${null!=P&&P>1?" "+mr:""}`.trim()),$.setAttribute("data:hl-share",null==P?"":String(P)));const I={s:D.s,f:D.f,col:D.c,c:!h,ij:S,run:!1,base:s,r:y.rect,lb:null,need:.5,tone:null};t._targets.set(L,I),c.set(S,I);const z=function(t,e){const i=B.parseColor(String(t).trim()),n=B.parseColor(String(e).trim());if(t===e||!(null==i?void 0:i.every(Ls))||!(null==n?void 0:n.every(Ls)))return i=>i>=1?e:t;return t=>t>=1?e:`rgba(${[0,1,2].map(e=>Math.round(Ss(i[e],n[e],t))).join(",")},${+Ss(i[3],n[3],t).toFixed(3)})`}(R.c,D.c),W=t=>{I.ls=t.s,I.lf=t.f,I.lc=t.c,O.forEach((e,i)=>{e.setAttribute("offset",String(0===i?0:3===i?1:t.s)),e.setAttribute("stop-color",t.c),e.setAttribute("stop-opacity",String(i<2?1:t.f))}),br(I,v)},j=()=>{var t;I.run=!1,W(D),!h&&$.isConnected&&($.setAttribute("fill",s),null==(t=N.node.parentNode)||t.removeChild(N.node))};if(x&&T){I.run=!0,W(R);let e=null,i=!1;const n={finish(){t._live.delete(n),h?W({s:I.ls,f:e=D.f,c:I.lc}):(i=!0,j())}};t._hold(n),N.animate(_,0).during(t=>i||W({s:Ss(R.s,D.s,t),f:null!=e?e:Ss(R.f,D.f,t),c:z(t)})).after(()=>{t._live.delete(n),i||j()})}else W(D);return N.url()}}function br(t,e){var i;const n=(null!=(i=t.ls)?i:t.s)>=t.need-1e-9;t.lb&&t.tone!==n&&(t.tone=n,t.lb.forEach(t=>{null==t._apxFill&&(t._apxFill=t.getAttribute("fill")),t.setAttribute("fill",n?t._apxFill:e)}))}["prevHighlightParts","prevHighlightLabels"].forEach(t=>{-1===v.HELD.indexOf(t)&&v.HELD.push(t)});const vr="apexcharts-flip-x",wr="apexcharts-flip-y",Ar="apexcharts-flip-held",Mr="apexcharts-highlight-label-exit",kr="b:",Lr={f:1,o:0},Sr={f:1,o:1},Cr={f:0,o:1};function Er(t){if(!t)return!1;if(Array.isArray(t.highlightData))return!0;const e=t.data;if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++){const i=e[t];if(Cs(i)){if("highlight"in i)return!0}else if(null!=i)return!1}return!1}function Fr(t,e,i){return Cs(t)&&"highlight"in t?t.highlight:e?e[i]:null}function Pr(t,e){let i=1/0,n=-1/0;return String(t).replace(/([MLQCT])([^MLQCTZz]*)/g,(t,s,r)=>{const a=r.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let t=e;t<a.length;t+=2)a[t]<i&&(i=a[t]),a[t]>n&&(n=a[t]);return""}),[i,n]}function Dr(t){const e=new Map;return t.forEach((t,i)=>isFinite(null!=t?t:NaN)&&!e.has(+t)&&e.set(+t,i)),i=>{var n;return null!=(n=e.get(i))?n:function(t,e){let i=-1,n=1/0;return t.forEach((t,s)=>{null!=t&&Math.abs(t-e)<n&&(n=Math.abs(t-e),i=s)}),i}(t,i)}}function Rr(t){const e=t.previousElementSibling;return e&&"rect"===e.tagName.toLowerCase()?[e,t]:[t]}function Tr(t,e){return null!=e&&0!==e&&t/e>1}function Nr(t,e){const i=Cs(t)?t.y:Array.isArray(t)?t[1]:t;return"number"==typeof i?i:null!=e?e:null}function Or(t,e,i){return t?t.replace(/([MLQCT])([^MLQCTZz]*)/g,(t,i,n)=>{const s=n.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let t=0;t+1<s.length;t+=2)s[t]=e(s[t]);return`${i} ${s.join(" ")} `}):t}m.default.registerFeatures({highlightFilter:class{constructor(t,e){var i,n,s,r;this.w=t,this.ctx=e,this._targets=new Map,this._render=null,this._seen=new Set,this._cu=null,this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,this._warned=new Set,this._rows=[],this._level=null,this._live=new Set,this._sig="",this._drawnSig="",this._ride=null,this._tiles=null,this._tmDefs=[],this._tipUser=null==(n=null==(i=e.opts)?void 0:i.tooltip)?void 0:n.enabled,this._tipOn=!1,this._ind=void 0,this._lane=null,this._onRender=()=>this.afterRender(),null==(s=e.events)||s.addEventListener("mounted",this._onRender),null==(r=e.events)||r.addEventListener("updated",this._onRender)}get cfg(){return this.w.config.highlightFilter||{}}isActive(){var t;return!!(null==(t=this.w.highlightData)?void 0:t.active)}canDrawParts(){const t=this.w,e=t.config,i=e.chart.type;if(!t.globals.axisCharts)return Gs.indexOf(i)>-1||"radialBar"===i;const n=e.plotOptions.treemap.nested||{};return!(t.globals.comboCharts||"treemap"===i&&(t.globals.treemapRoots||!this._parsed&&!1!==n.enabled&&(e.series||[]).some(t=>(t&&Array.isArray(t.data)?t.data:[]).some(t=>t&&(t.children&&t.children.length||n.drilldownAsLevels&&null!=t.drilldown))))||"bar"!==i&&"line"!==i&&"area"!==i&&"treemap"!==i||t.rangeData.seriesRange.length||"histogram"===e.chart.requestedType)}callerCarriesParts(){return(this.w.config.series||[]).some(Er)}valueAt(t,e){var i,n,s;const r=null==(s=null==(n=null==(i=this.w.highlightData)?void 0:i.parts)?void 0:n[t])?void 0:s[this.w.globals.axisCharts?e:0];return null==r?null:r}_warn(t,e){this._warned.has(t)||(this._warned.add(t),console.warn("ApexCharts highlightFilter: "+e))}parse(){var t,e,i;const n=this.w,s=n.config,r=this.cfg,a=s.series||[],o=n.seriesData.series||[];if(this._parsed=!0,!n.globals.axisCharts)return this._parseCircle();const l=!!s.chart.stacked,c=s.chart.type,h="bar"===c,d=function(t,e){const i=t.w.globals;if("treemap"!==e||!i.treemapRoots)return!1;const n=i.treemapRawSeries||[];n.some(t=>Array.isArray(null==t?void 0:t.highlightData))&&t._warn("nested","on a nested treemap put the part on each leaf as { x, y, highlight }; highlightData is ignored.");const s=(e,i)=>{const n=xr(t.w,e,i);return!!n&&("highlight"in e||n[0].some(t=>s(t,n[1])))};return n.some(t=>((null==t?void 0:t.data)||[]).some(t=>s(t,[])))&&t._warn("parent","a parent's highlight is ignored: parents add up their leaves' parts."),!0}(this,c),u=Ys(n);let p=!1;for(let e=0;e<a.length;e++)if(d?Bs({data:null==(t=a[e])?void 0:t.data}):Er(a[e])||u&&qs(n,e)){p=!0;break}let f=d||this.canDrawParts();p&&!f&&this._unsupported();const g=(n.globals.seriesYAxisMap||[]).map((t,e)=>t&&t.length?e:-1).filter(t=>t>-1);p&&f&&l&&(g.length>1||g.some(t=>{var e;return null==(e=s.yaxis[t])?void 0:e.logarithmic}))&&(f=!1,this._warn("stack","parts are not drawn on a stacked chart with more than one y axis or a logarithmic y axis."));const m=!(!1===r.enabled||!p||!f);if(!m)return void this._inactive(f);const x=[];let _=!1,b=!1;const v=n.globals;for(let t=0;t<o.length;t++){const e=a[t]||{},i=Array.isArray(e.data)?e.data:[],s=!d&&Array.isArray(e.highlightData),r=d?null:s?e.highlightData:u?qs(n,t):null,l=v.collapsedSeriesIndices.indexOf(t)>-1||v.ancillaryCollapsedSeriesIndices.indexOf(t)>-1;r&&!l&&r.length!==i.length&&(s?_=!0:b=!0);const c=[],h=o[t]?o[t].length:0;for(let t=0;t<h;t++){const e=Fr(i[t],r,t);c.push(Ls(e)?l?0:e:null)}x.push(c)}m&&_&&this._warn("length","highlightData and data differ in length; the extra entries are ignored and the missing ones read as null."),m&&b&&this._warn("plugged-length","a plugin registered highlight parts that do not line up with the series data; the extra entries are ignored and the missing ones read as null.");const w=a.some(t=>Array.isArray(null==t?void 0:t.highlightData));w&&(null==(e=s.chart.dataReducer)?void 0:e.enabled)&&this._warn("reducer","highlightData cannot follow chart.dataReducer; put the part on each point as { x, y, highlight } instead."),w&&(null==(i=s.chart.streaming)?void 0:i.enabled)&&this._warn("stream","highlightData cannot follow chart.streaming; put the part on each point as { x, y, highlight } instead.");let A=null;l&&h?A=(t,e)=>this._barKey(t,e):l&&(A=(t,e)=>String(y.stackKey(n,t,e)));const M=m&&"clamp"!==r.axis&&"treemap"!==c&&!s.plotOptions.bar.isFunnel&&!(l&&"100%"===s.chart.stackType)?this._runningExt(x,A,h):null;this._publish(x,M)}_unsupported(){const t=this.w.config.chart;this._warn("type",`parts are not drawn on this chart (type "${t.requestedType||t.type}"). Supported: column, bar, line and area (stacked too), funnel, pie, donut, polarArea, radialBar, gauge and treemap.`)}_inactive(t){t||(this._targets=new Map),this.w.highlightData={active:!1,parts:[],ext:null,capture:()=>this.capture()},this._sig="",this._rows=[]}_parseCircle(){const t=this.w,e=t.config,i=this.cfg,n=t.globals,s=(t.seriesData.series||[]).length,r=Ws(e.series);let a=r.some(t=>"highlight"in t);a&&r.length!==s&&(this._warn("points","per-point highlight values do not line up with the slices; use highlightFilter.data instead."),a=!1);let o=Array.isArray(i.data)?i.data:null;o&&o.length!==s&&(this._warn("length",`highlightFilter.data has ${o.length} values for ${s} slices; it is ignored until they match.`),o=null),o&&o.some(t=>Array.isArray(t))&&(o.some(t=>Array.isArray(t)&&1!==t.length)?(this._warn("rows","highlightFilter.data takes one value per slice (or ring); a row of several values is ignored."),o=null):o=o.map(t=>Array.isArray(t)?t[0]:t));const l=this.canDrawParts(),c=a||!!o;if(c&&!l&&this._unsupported(),!1===i.enabled||!c||!l)return void this._inactive(l);const h=[];for(let t=0;t<s;t++){const e=a?r[t]:null,i=e&&"highlight"in e?e.highlight:o?o[t]:null;h.push([Ls(i)?n.collapsedSeriesIndices.indexOf(t)>-1?0:i:null])}this._publish(h,null)}_publish(t,e){const i=this.w.globals;this.w.highlightData={active:!0,parts:t,ext:e,capture:()=>this.capture()};const n=this._rows,s=[];for(let e=0;e<t.length;e++){const r=i.collapsedSeriesIndices.indexOf(e)>-1||i.ancillaryCollapsedSeriesIndices.indexOf(e)>-1;s.push(r&&e<n.length?n[e]:t[e].join(","))}this._rows=s,this._sig="#"+s.join("|")}capture(){const t=this.w.globals,e=new Map;this._targets.forEach((t,i)=>{var n,s,r,a,o,h,d;if(t.c&&!t.run)return;const u=t.n,p=!!(null==u?void 0:u.isConnected);e.set(i,c(l({},t),{d:p&&u.getAttribute("d")||t.d,a:(null==(n=t.m)?void 0:n.isConnected)&&t.m.getAttribute("d")||t.a,flip:p?u.classList.contains(wr)||u.classList.contains(vr):t.flip,f:null!=(s=t.lf)?s:t.f,o:null!=(r=t.lo)?r:t.o,s:null!=(a=t.ls)?a:t.s,col:null!=(o=t.lc)?o:t.col,al:null!=(h=t.la)?h:t.al,k:null!=(d=t.lk)?d:t.k,n:null,m:null,g:null,lb:null}))}),t.prevHighlightParts=e,t.prevHighlightLabels=this._captureLabels(),this._targets=new Map}_prev(){return this.w.globals.prevHighlightParts}_animates(){const t=this.ctx.renderer;return(!t||!t.kind||"svg"===t.kind)&&this._animatesUpdate()&&!!this.w.globals.shouldAnimate}_animatesUpdate(){const t=this.w,e=t.config.chart.animations;return!(!(k.isBrowser()&&e.enabled&&e.dynamicAnimation.enabled&&t.globals.dataChanged)||A())}_tween(t,e,i,n,s,r){const a=this.w,o=s||function(t){var e,i;const n=t.config.chart.animations;return L(null!=(i=null==(e=n.dynamicAnimation)?void 0:e.easing)?i:n.easing)}(a),l=this._live;let c=!1;const h={finish(){c||(c=!0,l.delete(h),i(1),n&&n())}};this._hold(h);const d=performance.now()+t,u=t=>{if(c)return;if(a.globals.isDestroyed)return c=!0,void l.delete(h);const n=Math.max(0,Math.min(1,(t-d)/e));i(o(n)),n<1?M.requestAnimationFrame(u):h.finish()};i(0),r?r.animate(e,t).during(t=>c||i(t)).after(()=>h.finish()):M.requestAnimationFrame(u)}_hold(t){const e=this._live,i=this.w.globals;e.add(t),i.highlightTween={finish:()=>Array.from(e).forEach(t=>t.finish())}}bar(t,e){var i,n,s,r,a,o,c,h;const d=this.w,u=d.highlightData;if(!u)return;this._render!==t&&this._beginRender(t,kr);const p=this._prev(),f=u.active;if(!f&&!(null==p?void 0:p.size))return;const{j:g,realIndex:m}=e,y=kr+`${m}::${t._keys(m)[g]}`;this._seen.add(y);const x=null==p?void 0:p.get(y),_=f?null==(i=u.parts[m])?void 0:i[g]:null;if(!f&&!x)return;const b=this.cfg,v=f?null!=(n=b.fadeOpacity)?n:.2:1,w=null==(s=d.seriesData.series[m])?void 0:s[g],A=!!d.config.chart.stacked,M=f&&A?this._stackGeometry(t,e,_,w,x):null==_?null:this._barGeometry(t,e,_,w),k={paint:(i,n)=>this._paintBar(e,i,n,{key:y,prev:x,geo:M,fadeTo:v,active:f,whole:w,bar:A?t:null})};if(f){const t={};"part"===(null!=(a=null==(r=b.dataLabels)?void 0:r.value)?a:"part")&&Object.assign(t,null==_?{hide:!0}:l({val:null!=(o=null==M?void 0:M.val)?o:_},null==M?void 0:M.label)),A&&"part"===(null!=(h=null==(c=b.dataLabels)?void 0:c.total)?h:"part")&&(t.total=M.total(null!=t.val?t.val<0:w<0)),k.label=t}return k}_beginRender(t,e){var i;this._render=t,this._targets=new Map,this._seen=new Set,this._cu=new y(this.w),this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,e===kr&&!this.w.config.chart.stacked&&(null==(i=this._prev())?void 0:i.size)&&Promise.resolve().then(()=>this._orphans())}_orphans(){const t=this.w,e=this._prev();if(!e||t.globals.isDestroyed||!this._animates())return;let i=null;e.forEach((e,n)=>{var s,r;if(this._seen.has(n)||0!==n.indexOf(kr))return;if(!i){const e=i=new Map;null==(s=t.dom.elGraphical)||s.node.querySelectorAll(".apexcharts-bar-ghost").forEach(t=>{const i=t.getAttribute("data:ghostKey");e.has(i)||e.set(i,t)})}const a=i.get(n.slice(2));if(!a)return;if(a.setAttribute("fill-opacity",String(e.f)),!e.d)return;const o=new b(t,this.ctx).drawPath({d:e.d,stroke:"none",strokeWidth:0,fill:Fs(a.getAttribute("fill"))[0],fillOpacity:null!=(r=e.al)?r:1,classes:`${ws} apexcharts-highlight-ghost`}).node;o.setAttribute("pointer-events","none"),o.setAttribute("clip-path",a.getAttribute("clip-path")||""),a.after(o);const l=a.style.transformOrigin||"",c=/^(left|right)/.test(l),h=parseFloat(a.getAttribute("data:ghostEdge")||""),[d]=Pr(e.d,c?0:1),u=o.style;u.transformBox="fill-box",u.transformOrigin=isFinite(h)?c?h-d+"px 50%":`50% ${h-d}px`:l;const p=()=>{a.parentNode&&!t.globals.isDestroyed?(u.transform=a.style.transform,u.opacity=a.style.opacity,M.requestAnimationFrame(p)):o.remove()};p()})}_barGeometry(t,e,i,n){const s=this.w,{j:r,realIndex:a,translationsIndex:o,paths:l}=e,c=t.barHelpers,h=c.getStrokeWidth(e.i,r,a);if(t.isFunnel){const t=n?Math.min(Math.abs(i/n),1):0,e=s.layout.gridWidth/2;return{pathTo:Or(l.pathTo,i=>e+(i-e)*t),base:Or(l.pathTo,()=>e),overflow:!1}}const d=s.config.yaxis[s.globals.seriesYAxisReverseMap[a]],u=(null==d?void 0:d.logarithmic)&&!s.globals.invalidLogScale&&this._cu?Math.max(0,this._cu.getLogValAtSeriesIndex(i,a)):i;if(t.isHorizontal){const t=e.zeroW,s=c.getXForValue(u,e.zeroW),o=this._rect(c,{a:l.barYPosition,len:l.barHeight,v1:t,v2:s,strokeWidth:h,realIndex:a,j:r,dir:u>=0?1:-1,horizontal:!0});return{pathTo:o.pathTo,base:o.base,overflow:Tr(i,n),label:{x:s,barWidth:Math.abs(s-t)}}}const p=e.zeroH,f=c.getYForValue(u,e.zeroH,o),g=this._rect(c,{a:l.barXPosition,len:l.barWidth,v1:p,v2:f,strokeWidth:h,realIndex:a,j:r,dir:u>=0?1:-1,horizontal:!1});return{pathTo:g.pathTo,base:g.base,overflow:Tr(i,n),label:{y:f,barHeight:Math.abs(f-p)}}}_rect(t,e){const i=((Array.isArray(e.strokeWidth)?e.strokeWidth[e.realIndex]:e.strokeWidth)||0)/2,n=e.v2-e.v1;if(Math.abs(n)<2*i){const s=e.v1+n/2,r=i*e.dir*(t.barCtx.isReversed?-1:1)*(e.horizontal?-1:1);e=c(l({},e),{v1:s+r,v2:s-r})}return t.barRect(e)}_stackGeometry(t,e,i,n,s){var r,a;const o=this.w,{j:l,realIndex:c,translationsIndex:h,paths:d}=e,u=t.barHelpers,p=t.isHorizontal,f=p?e.zeroW:e.zeroH;this._br||(this._br=u.createBorderRadiusArr(((null==(r=o.highlightData)?void 0:r.parts)||[]).map(t=>t.map(t=>null!=t?t:0))),B.isSafari()&&(this._br=this._br.map(t=>t.map(()=>"none"))));const g=this._br,m=this._barKey(c,l);let y=this._stk.get(m);y||(y={p:f,n:f,raw:0,any:!1},this._stk.set(m,y));const x="100%"===o.config.chart.stackType;let _=this._stk.get("%");x&&!_&&(this._stk.set("%",_=new Map),o.seriesData.series.forEach((t,e)=>t.forEach((t,i)=>{const n=this._barKey(e,i);_.set(n,(_.get(n)||0)+(+t||0))})));const b=x&&_.get(m),v=null==i?null:x?b?100*i/b:0:i,w=null!=v?v:0,A=null!=v?v<0:null!=(null==s?void 0:s.s)?s.s<0:n<0,M=(t,e)=>p?u.getXForValue(t,e):u.getYForValue(t,e,h);let k=A?y.n:y.p,L=M(w,k);A?y.n=L:y.p=L,null!=i&&(y.raw+=i,y.any=!0);const S=y.raw,C=y.any,E={p:y.p,n:y.n};let F=!1;if(x){const t=M(100,f),e=M(-100,f),i=Math.min(t,e),n=Math.max(t,e),s=t=>Math.min(n,Math.max(i,t));F=s(L)!==L,k=s(k),L=s(L),E.p=s(E.p),E.n=s(E.n)}const P=u.arrBorderRadius;let D;u.arrBorderRadius=g;try{D=this._rect(u,{a:p?d.barYPosition:d.barXPosition,len:p?o.globals.barHeight:o.globals.barWidth,v1:k,v2:L,strokeWidth:p?u.getStrokeWidth(e.i,l,c):t.strokeWidth,realIndex:c,j:l,dir:A?-1:1,horizontal:p})}finally{u.arrBorderRadius=P}return{pathTo:null==i?null:D.pathTo,square:D.squarePathTo,base:D.base,flip:null!=i&&t.cornerFlip(null==(a=g[c])?void 0:a[l],w),s:A?-1:1,overflow:F,val:v,label:p?{x:L,barWidth:Math.abs(L-k),keep:0===v}:{y:L,barHeight:Math.abs(L-k),keep:0===v},total:t=>!!C&&{val:S,edge:t?E.n:E.p}}}_barKey(t,e){const i=this.w;return i.labelData.seriesGroupIndex[t]+"|"+y.stackKey(i,t,e)}line(t,e,i,n,s,r,a){var o,h,d;const u=this.w,p=u.highlightData;if(!p||"line"!==e&&"area"!==e)return;this._render!==t&&this._beginRender(t,"l:");const f=this._prev(),g=p.active;if(!g&&!(null==f?void 0:f.size))return;const m="l:"+s,y=null==f?void 0:f.get(m);if(!g&&!y)return;const x=u.globals,_=this._animates(),b="area"===e,v=g&&p.parts[s]||[],w=v.some(t=>null!=t),A=g&&t._shapeOnly,M=(t,e)=>t&&(t._cmd?t._cmd[e]:t.node.getAttribute(e)),k=t.marks||[],S=b?k.find(t=>"none"!==M(t,"fill")):null,C=k.find(t=>t!==S),[E,F]=S&&u.config.chart.stacked?Fs(M(S,"fill")):[S&&M(S,"fill"),1],P=k.concat(b?k.filter(t=>t!==S&&!t._cmd).map(t=>t.node.nextElementSibling).filter(t=>/#forecastMask/.test((null==t?void 0:t.getAttribute("clip-path"))||"")).map(t=>({node:t})):[]),D=g&&!A&&(w||u.config.chart.stacked)?this._lineBuild(t,e,i,n,s,r,this._partRow(v,n,s,null==(o=t.percentRows)?void 0:o[s])):null;let R=A?{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")}:w?{d:D.linePaths.join(" "),a:D.areaPaths.join(" "),num:D.numericXY}:null;const T=!R&&!!(null==y?void 0:y.d)&&_,N=g&&_&&(T||R&&!(null==y?void 0:y.d)&&(y||"baseline"===this.cfg.enter))?this._lineBase(t,e,i,n,s,r,w?v:null):null;D&&u.config.chart.stacked&&(this._swap(t,()=>t._recordStackTops(s,D.yArrj,D.S[n])),this._stkPrev.push(D.yArrj)),T&&(R=g?N:{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")});const O=T&&!g;let $=R;const I={};let z=null,B=!1;if(R&&_)if(null==y?void 0:y.d){if($={d:y.d,a:y.a||R.a},!T)if(z=function(t,e,i,n){var s;const r=t.globals,a=r.prevStreamFrame;if(!a||!r.dataChanged||!(null==(s=t.axisFlags)?void 0:s.isXNumeric))return null;const o=a.seriesX[e],l=a.seriesY[e],c=t.seriesData.seriesX[e],h=t.seriesData.series[e];if(!(o&&l&&c&&h))return null;if(o.length<3||c.length<3)return null;let d=-1;for(let t=0;t<o.length;t++)if(o[t]===c[0]){d=t;break}if(-1===d)return null;const u=Math.min(o.length-d,c.length);if(u<2)return null;const p=c.length-u;if(0===d&&0===p)return null;for(let t=0;t<u;t++){if(o[d+t]!==c[t])return null;const e=l[d+t],i=h[t];if(e!==i&&(null!=e||null!=i))return null}const f=a.xPixels[e],g=a.yPixels[e];if(!f||!g)return null;let m=-1,y=-1;for(let t=0;t<u;t++)null!=f[d+t]&&null!=g[d+t]&&null!=i[t]&&null!=n[t]&&(-1===m&&(m=t),y=t);if(-1===m||y<=m)return null;const x=i[m],_=i[y],b=f[d+m],v=f[d+y];if(Math.abs(_-x)<1e-6)return null;const w=(v-b)/(_-x),A=b-w*x;if(!isFinite(w)||!isFinite(A))return null;if(Math.abs(w-1)>.02)return null;if(Math.abs(A)<.5)return null;let M=m,k=m;for(let t=m;t<=y;t++){const e=n[t];null!=e&&null!=g[d+t]&&(e<n[M]&&(M=t),e>n[k]&&(k=t))}let L=1,S=0;const C=n[M],E=n[k];if(Math.abs(E-C)>1e-6?(L=(g[d+k]-g[d+M])/(E-C),S=g[d+M]-L*C):S=g[d+M]-C,!isFinite(L)||!isFinite(S)||L<.2||L>5)return null;const F=Math.floor((m+y)/2);if(F!==m&&F!==y&&null!=i[F]&&null!=f[d+F]){const t=w*i[F]+A;if(Math.abs(t-f[d+F])>1.5)return null;if(null!=n[F]&&null!=g[d+F]){const t=L*n[F]+S;if(Math.abs(t-g[d+F])>1.5)return null}}return r.streamScrolled=!0,{ax:w,bx:A,ay:L,by:S}}(u,s,a.xArrj,a.yArrj),z)$={d:vs(R.d,z),a:vs(R.a,z)};else{const t=D||a,i=W(u,{type:e,realIndex:s,pathFromLine:y.d,pathFromArea:y.a||"",linePaths:t.linePaths,areaPaths:t.areaPaths});(null==i?void 0:i.line)&&([$.d,I.d]=[i.line.from,i.line.toInterp]),(null==i?void 0:i.area)&&([$.a,I.a]=[i.area.from,i.area.toInterp])}}else N?$=N:(B=!0,$={d:(null==C?void 0:C.node.getAttribute("pathFrom"))||R.d,a:(null==S?void 0:S.node.getAttribute("pathFrom"))||R.a});let j=null,H=null,Y=null;if(R){const i=this._partGroup(t.elSeries,"apexcharts-line-highlight"),r=R.num,a={i:n,j:"h",realIndex:s,delay:n,speed:u.config.chart.animations.dynamicAnimation.speed,cls:`apexcharts-${e} apexcharts-line-highlight-part`,chartType:e,clip:`url(#gridRectMask${x.cuid})`,scroll:!!z};if(S&&(j=this._emitPart(i,c(l({},a),{from:$.a,to:R.a,interp:I.a,paint:E,num:r&&{xs:r.xs,ys:r.ys,closeY:r.areaCloseY}}))),C){const e=c(l({},a),{from:$.d,to:R.d,interp:I.d,paint:"none",stroke:M(C,"stroke"),width:t.strokeWidth,num:r&&{xs:r.xs,ys:r.ys}});H=this._emitPart(i,e),null==H||H.attr("fill-rule","evenodd");const n=!C._cmd&&C.node.getAttribute("clip-path");if(H&&n&&n.indexOf("nonForecast")>-1){const t=u.config.forecastDataPoints;H.attr("clip-path",n),Y=this._emitPart(i,c(l({},e),{j:"hf",clip:`url(#forecastMask${x.cuid})`})),null==Y||Y.attr({"fill-rule":"evenodd","stroke-dasharray":t.dashArray,"stroke-width":t.strokeWidth||void 0})}}const o=this.ctx.renderer;o&&o.kind&&"svg"!==o.kind||!u.config.chart.animations.enabled||x.resized||x.dataChanged||[H,b&&C].forEach(t=>{const e=t&&t.node.getAttribute("stroke-dasharray");!t||e&&"0"!==e||t.node.setAttribute("stroke-dasharray","none")})}const q={d:null,a:null,f:1,o:g?1:0,n:T?null==H?void 0:H.node:null,m:T?null==j?void 0:j.node:null,c:!g};this._targets.set(m,q);const X=B?F:(null==y?void 0:y.d)&&null!=(h=y.al)?h:1,G=O?F:1;q.al=G,this._fadeLine(e,P,B?Cr:y?{f:y.f,o:null!=(d=y.o)?d:0}:Lr,O?Cr:g?Sr:Lr,{width:t.strokeWidth,also:j&&(X<1||G<1)?t=>{const e=Ss(X,G,t);q.la=e,j.node.setAttribute("fill-opacity",String(e))}:void 0,force:!!j&&X!==G,land:O?Lr:void 0,done:T?()=>{null==H||H.remove(),null==Y||Y.remove(),null==j||j.remove()}:void 0,rec:q,ease:z?L("linear"):void 0}),R&&!T&&Object.assign(q,{d:R.d,a:R.a,n:null==H?void 0:H.node,m:null==j?void 0:j.node}),this._lineLabels(t,e,n,s,v,D,a)}_partRow(t,e,i,n){const s=this.w,r=this._cu,a=s.config.yaxis[s.globals.seriesYAxisReverseMap[i]],o=s.seriesData.series[i]||[],l=n?t.map((t,e)=>null==t?t:o[e]?t*n[e]/o[e]:0):(null==a?void 0:a.logarithmic)&&!s.globals.invalidLogScale?t.map(t=>r.getLogValAtSeriesIndex(t,i)):t.slice(),c=s.config.fill.type,h=l.length-1;return"gradient"!==c&&"gradient"!==c[e]||null==l[h]||!l.every(t=>t===l[0])||(l[h]+=1e-6),l}_lineBuild(t,e,i,n,s,r,a){const o=this.w.globals.pointsArray,l=o[s],c=l?l.length:0,h=[t._shapeOnly,t.appendPathFrom],d=i.slice();d[n]=a,t._shapeOnly=!0;try{const i=this._swap(t,()=>t._buildSeriesPaths(e,d,n,s,r));return i.S=d,i}finally{[t._shapeOnly,t.appendPathFrom]=h,l?l.length=c:delete o[s]}}_swap(t,e){if(!this.w.config.chart.stacked)return e();const i=[t.prevSeriesYByX,t.prevSeriesY];t.prevSeriesYByX=this._stk,t.prevSeriesY=this._stkPrev;try{return e()}finally{[t.prevSeriesYByX,t.prevSeriesY]=i}}_lineBase(t,e,i,n,s,r,a){const o=(a||i[n]).map(t=>null==t?null:0),l=this._lineBuild(t,e,i,n,s,r,o);return{d:l.linePaths.join(" "),a:l.areaPaths.join(" "),num:l.numericXY}}_fadeLine(t,e,i,n,s){var r,a,o,l,c,h,d;const u=this.cfg,p=null!=(r=u.fadeOpacity)?r:.2,f=null!=(o=null==(a=u.outline)?void 0:a.width)?o:1,g=null!=(c=null==(l=u.outline)?void 0:l.opacity)?c:1,m=null!=(d=null==(h=u.line)?void 0:h.dashArray)?d:4,y=s.rec,x=["fill-opacity","stroke-opacity","stroke-width","stroke-dasharray"],_=e.map(e=>{var i;const n=e.node,s=x.map(t=>n.getAttribute(t)),r=parseFloat(null!=(i=s[0])?i:"1");return{node:n,own:s,k:isFinite(r)?r:1,fill:"area"===t&&"none"!==(e._cmd?e._cmd.fill:n.getAttribute("fill"))}}),b=(e,i)=>{y.lf=e,y.lo=i,_.forEach(({node:n,own:r,k:a,fill:o})=>{e>=1&&i<=0?x.forEach((t,e)=>null==r[e]?n.removeAttribute(t):n.setAttribute(t,r[e])):o?n.setAttribute("fill-opacity",String(a*e*Ss(1,p,i))):"area"===t?(n.setAttribute("stroke-opacity",String(e*Ss(1,g,i))),n.setAttribute("stroke-width",String(Ss(s.width,f,i)))):(n.setAttribute("stroke-opacity",String(e)),n.setAttribute("stroke-dasharray",i<1?`${m} ${m*i}`:String(m)))})},v=t=>{b(Ss(i.f,n.f,t),Ss(i.o,n.o,t)),s.also&&s.also(t)},w=()=>{y.run=!1,s.land&&b(s.land.f,s.land.o),s.done&&s.done()};this._animates()&&(i.f!==n.f||i.o!==n.o||s.done||s.force)?(y.run=!0,this._tween(0,this.w.config.chart.animations.dynamicAnimation.speed,v,w,s.ease)):(v(1),w())}_lineLabels(t,e,i,n,s,r,a){var o,l,c,h;const d=this.w,u=d.globals,p=t.elDataLabelsWrap;if(!d.config.dataLabels.enabled||!(null==p?void 0:p.node)||t._shapeOnly)return;const f=(null==(o=d.highlightData)?void 0:o.active)&&"part"===(null!=(c=null==(l=this.cfg.dataLabels)?void 0:l.value)?c:"part");if(f){const a=p.node;for(;a.firstChild;)a.removeChild(a.firstChild);const o=u.dataLabelsRects;if(o[n]=[],u.lastDrawnDataLabelsIndexes[n]=[],r&&s.some(t=>null!=t)){const a=new _s(d,this.ctx);for(let l=0;l<r.xArrj.length-1;l++){const c=t.lineHelpers.calculatePoints({series:r.S,x:r.xArrj[l+1],y:r.yArrj[l+1],realIndex:n,i:i,j:l,prevY:r.yArrj[0]});c.x.forEach((t,i)=>{if(null==s[l?l+1:i])return void o[n].push({x:NaN,y:NaN,width:0,height:0});const r=a.drawDataLabel({type:e,pos:{x:l?[t]:i?[NaN,t]:[t,NaN],y:c.y},i:n,j:l?l+1:1,row:s});r&&p.add(r)})}}}const g=f?null==r?void 0:r.xArrj:a.xArrj,m=f?null==r?void 0:r.yArrj:a.yArrj;if(!this._animates()||!g||z(d,n))return;const y=u.riseLabels;if(null==y?void 0:y.has(n)){const t=new Map(y);t.delete(n),u.riseLabels=t.size?t:null}const x=u.prevStreamFrame,_=null==(h=u.prevHighlightLabels)?void 0:h.get(n);Promise.resolve().then(()=>{var t,e;return this._rideLabels(p.node,g,m,_,[null==(t=null==x?void 0:x.xPixels)?void 0:t[n],null==(e=null==x?void 0:x.yPixels)?void 0:e[n]])})}_captureLabels(){const t=this.w,e=t.config.chart.type,i=t.dom.baseEl,n=Gs.indexOf(e)>-1;if(!t.config.dataLabels.enabled||"line"!==e&&"area"!==e&&!n||!i||!k.isBrowser())return null;const s=new Map;if(n){const t=new Map;return i.querySelectorAll(".apexcharts-pie-label").forEach(e=>{const[i,n]=Ds(e);t.set(Number(e.parentNode.getAttribute("data:slice")),{x:i,y:n})}),s.set(-1,t),s}return i.querySelectorAll(".apexcharts-datalabels[data\\:realIndex]").forEach(e=>{const i=Number(e.getAttribute("data:realIndex")),n=Dr(t.globals.seriesXvalues[i]||[]),r=new Map;e.querySelectorAll(`text.apexcharts-datalabel, text.${Mr}`).forEach(t=>{var e;const i=n(parseFloat(t.getAttribute("cx")));if(i<0)return;const[s,a]=Ds(t);r.set(i,{x:s,y:a,o:parseFloat(null!=(e=t.getAttribute("opacity"))?e:"1"),els:Rr(t)})}),s.set(i,r)}),s}_rideLabels(t,e,i,n,s){const r=this.w;if(r.globals.isDestroyed||!t.isConnected)return;const[a,o]=s,l=[],c=new Set,h=t=>"number"==typeof t&&isFinite(t),d=Dr(e);if(t.querySelectorAll("text.apexcharts-datalabel").forEach(t=>{const s=d(parseFloat(t.getAttribute("cx")));if(s<0)return;const[r,u]=Ds(t),p=null==n?void 0:n.get(s);let f=0,g=0,m=0;p?(c.add(s),f=p.x-r,g=p.y-u,m=p.o):!(null==n?void 0:n.size)&&[null==a?void 0:a[s],null==o?void 0:o[s],e[s],i[s]].every(h)&&(f=a[s]-e[s],g=o[s]-i[s]),(m<1||Math.abs(f)>.01||Math.abs(g)>.01)&&l.push({els:Rr(t),dx:f,dy:g,o:m,to:1})}),null==n||n.forEach((e,i)=>{if(c.has(i))return;const n=e.els.map(e=>{const i=e.cloneNode(!0);return i.setAttribute("class",Mr),i.setAttribute("pointer-events","none"),i.removeAttribute("transform"),t.appendChild(i),i}),[s,r]=Ds(n[n.length-1]);l.push({els:n,dx:e.x-s,dy:e.y-r,o:e.o,to:0,out:!0})}),!l.length)return;l.forEach(t=>{t.bases=t.els.map(t=>t.getAttribute("transform")||""),t.ops=t.els.map(e=>{var i;return parseFloat(null!=(i=e.getAttribute("opacity"))?i:"1")/(t.out&&t.o>0?t.o:1)})});this._tween(0,r.config.chart.animations.dynamicAnimation.speed,t=>l.forEach(({els:e,dx:i,dy:n,o:s,to:r,out:a,bases:o,ops:l})=>e.forEach((e,c)=>{const h=o[c],d=a?1:1-t;d?e.setAttribute("transform",`translate(${i*d} ${n*d}) ${h}`.trim()):h?e.setAttribute("transform",h):e.removeAttribute("transform");const u=Ss(s,r,t),p=l[c];u>=1&&p>=1?e.removeAttribute("opacity"):e.setAttribute("opacity",String(p*u))})),()=>l.forEach(t=>t.out&&t.els.forEach(t=>t.remove())))}_paintBar(t,e,i,n){var s,r,a,o,l,c,h,d,u,p;const f=this.w,g=this.cfg,m=this._animates(),{key:y,prev:x,geo:_,fadeTo:v,active:w,bar:A}=n,M=i.elSeries;let k=(null==_?void 0:_.pathTo)||null;const L=!k&&!!(null==x?void 0:x.d)&&m;L&&(k=this._exitTo(x,w,i.pathTo,null==_?void 0:_.base));const S=k&&!L?this._from(x,null==_?void 0:_.base,i.pathFrom,!!A):null;let C=S?S.d:(null==x?void 0:x.d)||null;const E=L&&!w;let F="apexcharts-bar-highlight-part",P=!1,D=null;if(A&&k){if(C&&C!==k){const t=A._pathToInterp;A._pathToInterp=null;const e=A.cornerMorph(C,k,L?void 0:_.square);e!==k&&(C=e,D=A._pathToInterp),A._pathToInterp=t}const t=A.isHorizontal?vr:wr,i=e.node.classList.contains(t);P=L?w?!!x.flip:i:_.flip;const n=(null==x?void 0:x.d)?!!x.flip:!!(null==S?void 0:S.cover)&&i;(P||m&&n)&&(F+=" "+t),!P&&m&&n&&(F+=" "+Ar,this._settleHeld(A))}const R="string"==typeof i.fill&&"none"!==i.fill&&i.fill.indexOf("url")<0?i.fill:f.globals.colors[f.config.plotOptions.bar.distributed?t.j:t.realIndex],[T,N]=Fs(i.fill&&"none"!==i.fill?i.fill:R),O=t.j>0&&i.elBarShadows?i.elBarShadows.node.lastElementChild:null,$=x?x.f:1,I=this._partGroup(M,"apexcharts-bar-highlight"),z=k?this._emitPart(I,{i:t.i,j:t.j,realIndex:t.realIndex,from:C||k,to:k,interp:D,paint:T,delay:i.delay,speed:i.speed,cls:F,chartType:"bar",clip:`url(#gridRectBarMask${f.globals.cuid})`}):null,W=Es(e.node),B=(null==S?void 0:S.cover)&&m?N:(null==x?void 0:x.d)&&null!=(s=x.al)?s:1,j=E?N:1,H=null!=(a=null==(r=g.outline)?void 0:r.width)?a:1,Y=n.whole||(null==x?void 0:x.o)?H:0,q=e.node,X=q.getAttribute("stroke"),G=(null==S?void 0:S.cover)&&m?1:(null==x?void 0:x.d)&&null!=(o=x.k)?o:0,U=E?1:0,K=!!z&&(Y>0||!(H>0)&&!!n.whole)&&(G>0||U>0)&&parseFloat(q.getAttribute("stroke-width"))>0&&!!X&&"none"!==X&&"transparent"!==X,V=Es(q,"stroke-opacity"),Z={};K&&(["stroke","stroke-width","stroke-opacity","stroke-dasharray"].forEach(t=>{var e;Z[t]=z.node.getAttribute(t),z.node.setAttribute(t,null!=(e=q.getAttribute(t))?e:"")}),q.hasAttribute("stroke-dasharray")||z.node.removeAttribute("stroke-dasharray"));const J={d:null,f:v,base:null!=(l=null==_?void 0:_.base)?l:null==x?void 0:x.base,edge:!1,s:null!=(c=null==_?void 0:_.s)?c:null==x?void 0:x.s,n:L?null==z?void 0:z.node:null,c:!w,al:j,k:K?U:0};this._targets.set(y,J);const Q=E?Ms:ks(v);if(this._fade(e.node,(null==S?void 0:S.cover)&&m?Ms:x?{f:x.f,o:null!=(h=x.o)?h:ks(x.f).o}:As,n.whole?Q:{f:Q.f,o:0},i,{outline:Y>0?{color:R,width:Y,opacity:null!=(u=null==(d=g.outline)?void 0:d.opacity)?u:1}:null,stroke:!(H>0),also:t=>{null==O||O.setAttribute("fill-opacity",String(Ss($,v,t))),(t=>{const e=Ss(B,j,t);if(J.la=e,z&&(W<1||B<1||j<1)&&z.node.setAttribute("fill-opacity",String(W*e)),!K)return;const i=Ss(G,U,t);J.lk=i,i>0||t<1?(z.node.setAttribute("stroke-opacity",String(V*i)),Y>0&&!(J.lo>0)&&i>0&&q.setAttribute("stroke-opacity","0")):z.attr(Z)})(t)},force:!!z&&(B!==j||K),land:E?As:void 0,done:L?()=>null==z?void 0:z.remove():void 0,rec:J}),!z||!k||L)return;if((null==_?void 0:_.overflow)&&z.node.classList.add("apexcharts-highlight-overflow"),(null==_?void 0:_.overflow)&&!A){const t=new b(f,this.ctx).drawPath({d:i.pathTo,stroke:"#fff",strokeWidth:1,fill:"none",strokeDashArray:3,classes:`${ws} apexcharts-highlight-edge`});t.attr("clip-path",`url(#gridRectBarMask${f.globals.cuid})`),t.node.setAttribute("pointer-events","none"),I.add(t);const e=e=>t.node.setAttribute("stroke-opacity",String(.75*e));m&&!(null==x?void 0:x.edge)?this._tween(i.delayMs,i.speed,e):e(1)}const tt=null==(p=this.ctx.renderer)?void 0:p.kind;tt&&"svg"!==tt||f.config.plotOptions.bar.isFunnel||this._hitProxy(I,k,i.pathTo,e.node,!!f.globals.isBarHorizontal),i.labels&&this._contrastLabels(i.labels,k),Object.assign(J,{d:k,base:null==_?void 0:_.base,edge:!!(null==_?void 0:_.overflow)&&!A,s:null==_?void 0:_.s,flip:P,n:z.node})}_hitProxy(t,e,i,n,s){const r=s?0:1,[a,o]=Pr(e,r),[l,c]=Pr(i,r),[h,d]=Pr(e,r?0:1);if(!(o-a>.5&&d-h>.5))return;const u=[];c-l>.5?(a<l&&u.push([a,Math.min(o,l)]),o>c&&u.push([Math.max(a,c),o])):u.push([a,o]);const p=new b(this.w,this.ctx);for(const[e,i]of u){if(i-e<.5)continue;const r=p.drawPath({d:s?`M ${e} ${h} L ${i} ${h} L ${i} ${d} L ${e} ${d} Z`:`M ${h} ${e} L ${d} ${e} L ${d} ${i} L ${h} ${i} Z`,stroke:"none",strokeWidth:0,fill:"none",classes:"apexcharts-highlight-hit"}).node;r.setAttribute("pointer-events","all"),r.setAttribute("clip-path",`url(#gridRectBarMask${this.w.globals.cuid})`),Ts(n,r),t.add(r)}}_settleHeld(t){if(this._held)return;this._held=!0;const e=this.w;Promise.resolve().then(()=>{var i;e.globals.isDestroyed||(null==(i=e.dom.baseEl)?void 0:i.querySelector(`.apexcharts-series > .${Ar}`))||t.settleHeldMirrors()})}_from(t,e,i,n){var s;return(null==t?void 0:t.d)?{d:t.d,cover:!1}:e&&(t||"baseline"===this.cfg.enter||n&&(!this.w.globals.dataChanged||(null==(s=this._prev())?void 0:s.size)))?{d:e,cover:!1}:i?{d:i,cover:!0}:null}_exitTo(t,e,i,n){return e?n||t.base||t.d:i}_partGroup(t,e){let i=t.node._apxHighlight;return i&&i.node.parentNode===t.node||(i=new b(this.w,this.ctx).group({class:e}),t.node._apxHighlight=i),t.add(i),i}_emitPart(t,e){const i=this.w,n=function(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}(this.ctx,new b(i,this.ctx)).renderPaths({i:e.i,j:e.j,realIndex:e.realIndex,pathFrom:e.from,pathTo:e.to,pathToInterp:e.interp||void 0,pathToNumeric:e.num,scrollMorph:!!e.scroll,stroke:e.stroke||"none",strokeWidth:e.width||0,fill:e.paint,animationDelay:e.delay,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:e.speed,className:`${ws} ${e.cls}`,chartType:e.chartType,bindEventsOnPaths:!1});return n&&n.node?(n.attr("clip-path",e.clip),n.node.setAttribute("pointer-events","none"),n.node.setAttribute("index",String(e.realIndex)),n.node.setAttribute("j",String(e.j)),t.add(n),n):null}_fade(t,e,i,n,s){var r;const a=s.attr||"fill-opacity",o=Es(t,a),l=s.outline,c=s.rec||{},h=!l&&!!s.stroke&&"stroke-opacity"!==a,d=h?Es(t,"stroke-opacity"):1,u=h?t.getAttribute("stroke-opacity"):null,p=l&&null==l.width?["stroke","stroke-opacity"]:["stroke","stroke-width","stroke-opacity"],f=p.map(e=>t.getAttribute(e)),g=(e,i)=>{if(c.lf=e,c.lo=l?i:0,t.setAttribute(a,String(o*e)),l)i<=0?p.forEach((e,i)=>null==f[i]?t.removeAttribute(e):t.setAttribute(e,f[i])):(t.setAttribute("stroke",l.color),null!=l.width&&t.setAttribute("stroke-width",String(l.width)),t.setAttribute("stroke-opacity",String(l.opacity*Math.min(1,i))));else{if(!h)return;e<1?t.setAttribute("stroke-opacity",String(d*e)):null==u?t.removeAttribute("stroke-opacity"):t.setAttribute("stroke-opacity",u)}},m=t=>{g(Ss(e.f,i.f,t),Ss(e.o,i.o,t)),s.also&&s.also(t)},y=()=>{c.run=!1,s.land&&g(s.land.f,s.land.o),s.done&&s.done()};(null!=(r=s.anim)?r:this._animates())&&(e.f!==i.f||e.o!==i.o||s.done||s.force)?(c.run=!0,this._tween(n.delayMs,n.speed,m,y,s.curve,n.el)):(m(1),y())}_runningExt(t,e,i){if(!e)return t;const n=new Map;return t.map((t,s)=>t.map((t,r)=>{if(null==t)return null;const a=e(s,r)+(i&&t<0?"-":"+"),o=(n.get(a)||0)+t;return n.set(a,o),o}))}_contrastLabels(t,e){const i=this.w,n=t.node;if(!n||/rotate\((?!0\))/.test(n.getAttribute("transform")||""))return;const[s,r]=Pr(e,0),[a,o]=Pr(e,1),l=new b(i);n.querySelectorAll("text").forEach(t=>{const e=(t.getAttribute("fill")||"").toLowerCase();if("#fff"!==e&&"#ffffff"!==e&&"white"!==e)return;const n=l.getTextRects(t.textContent,t.getAttribute("font-size"),t.getAttribute("font-family"),void 0,!0,t.getAttribute("font-weight")),c=parseFloat(t.getAttribute("x")),h=parseFloat(t.getAttribute("y")),d=t.getAttribute("text-anchor"),u="middle"===d?c-n.width/2:"end"===d?c-n.width:c;u>=s-1&&u+n.width<=r+1&&h-.75*n.height>=a-1&&h+.25*n.height<=o+1||t.setAttribute("fill",i.config.chart.foreColor)})}tooltipRow(t,e,i,n){var s,r,a,o,h,d,u,p,f,g,m;const y=this.w,x=this.cfg,_=x.tooltip||{},b=y.globals.axisCharts,v=this.isActive()&&!1!==_.show&&(null!=i||!b)&&!!t.yValue,w=b||"lanes"!==this._ind||"radialBar"!==y.config.chart.type?void 0:(null==(s=this._lane)?void 0:s[0])===e?this._lane[1]:"part";if(t.marker&&function(t,e,i=.2,n){const s=t.style,r=t.firstElementChild;if(!e){if(!t._apxHl)return;return t._apxHl=!1,s.background=s.boxShadow=s.borderRadius="",void(r&&(r.style.display=""))}t._apxHl=!0;const a="#"===e.charAt(0)?B.hexToRgba(e,i):`color-mix(in srgb, ${e} ${100*i}%, transparent)`;s.background="part"===n?e:n?a:`linear-gradient(90deg, ${e} 50%, ${a} 50%)`,s.boxShadow=`inset 0 0 0 1px ${e}`,s.borderRadius="3px",r&&(r.style.display="none")}(t.marker,v&&!y.config.tooltip.fillSeriesColor?(null==(a=null==(r=this._tiles)?void 0:r.get(e+"|"+i))?void 0:a.base)||y.globals.colors[e]:null,w?null!=(d=null==(h=null==(o=x.radialBar)?void 0:o.lanes)?void 0:h.opacity)?d:ir:x.fadeOpacity,w),!v)return;const A=this.valueAt(e,i),M=y.seriesData.series,k=b?null==(u=M[e])?void 0:u[i]:M[e],L=b?{series:M,seriesIndex:e,dataPointIndex:i,w:y}:c(l({},y),{w:y,series:M,seriesIndex:e,dataPointIndex:e,highlight:Ps(A,k),lane:w});if("function"==typeof _.formatter)return void(t.yValue.innerHTML=String(null!=(p=_.formatter(A,null!=k?k:null,L))?p:""));const S='<span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">';if("whole"===w){if(null!=A){const e=null!=(m=null==(g=null==(f=y.globals.locale)?void 0:f.highlightFilter)?void 0:g.part)?m:"part";t.yValue.innerHTML+=` ${S}(${e} ${n.yLbFormatter(A,L)})</span>`}return}let C=t.yValue.innerHTML;null!=A&&(C=`/ ${C}`,_.share&&k&&(C+=` \xb7 ${Math.round(A/k*100)}%`)),t.yValue.innerHTML=(null==A?"":`${n.yLbFormatter(A,L)} `)+`${S}${C}</span>`}drillView(t){Array.isArray(null==t?void 0:t.series)&&(t.series=t.series.map(zs),this._level={series:t.series,base:this.w.globals._initialSeriesPeek}),t&&null!=this.cfg.data&&(t.highlightFilter=c(l({},t.highlightFilter),{data:null}))}_drilled(){var t;const e=this._level;return!!(e&&((null==(t=this.ctx.drilldown)?void 0:t.depth)||0)>0&&this.w.globals._initialSeriesPeek===e.base)}_fire(t){var e;const i=null==(e=this.w.config.chart.events)?void 0:e.highlightFilterChanged;"function"==typeof i&&i(this.ctx,{active:"clear"!==t,phase:t})}pie(t){"radialBar"===t.chartType?sr(this,t):Us(this,t)}treemap(t){return _r(this,t)}afterRender(){this._tipOn&&(this._tipOn=!1,this.w.config.tooltip.enabled=!1);const t=this._ride;this._ride=null;const e=this.w.globals.circleTween;!t||e&&!e.done||t();const i=this._drawnSig,n=this._sig;i!==n&&(this._drawnSig=n,this._fire(i?n?"update":"clear":"enter"))}set(t,e={}){var i;const n=this.w,s=n.globals;if(!s.axisCharts)return this._setCircle(t,e);const r=e.series||this._rawSeries();if("treemap"===n.config.chart.type&&s.treemapRoots)return this._apply(function(t,e,i){const n=t.w;return e.map((t,e)=>{const s=zs(t),r=Array.isArray(null==i?void 0:i[e])?i[e]:null;if("function"!=typeof i&&!r)return s;let a=0;const o=(s,c)=>{var h,d,u;const p=xr(n,s,c);if(p){const t=p[0].map(t=>o(zs(t),p[1])),e=l({},s),i=p[0];return p[1]===c?e.children=t:Object.defineProperty(e,"children",{get:()=>{var e;return fr(n)&&(null==(e=Zt(n,s.drilldown))?void 0:e.data)===i?t:void 0}}),e}const f=a++,g=Cs(s)?l({},s):{x:"",y:s};return c.includes(g.drilldown)&&delete g.drilldown,g.highlight="function"==typeof i?i({seriesIndex:e,dataPointIndex:f,seriesName:t.name,x:null!=(h=g.x)?h:g.name,value:"number"==typeof(null!=(d=g.y)?d:g.value)?null!=(u=g.y)?u:g.value:null,datum:s,w:n}):null==r?void 0:r[f],g};return Array.isArray(s.data)&&(s.data=s.data.map(t=>o(t,[]))),s})}(this,r,t),e);const a=!e.series&&!!s.dataReducerRawSeries&&!!(null==(i=n.config.chart.dataReducer)?void 0:i.enabled),o=r.map((i,s)=>{const r=Array.isArray(i.data)?i.data:[],o="function"==typeof t?r.map((r,o)=>{var l;return t({seriesIndex:s,dataPointIndex:o,seriesName:i.name,x:Cs(r)?r.x:Array.isArray(r)?r[0]:n.labelData.labels[o],value:Nr(r,e.series||a?null:null==(l=n.seriesData.series[s])?void 0:l[o]),datum:r,w:n})}):Array.isArray(null==t?void 0:t[s])?t[s]:null,h=zs(i);return o&&(a&&h.data.every(t=>"number"!=typeof t)?h.data=h.data.map((t,e)=>null==t?t:Array.isArray(t)?{x:t[0],y:t[1],highlight:o[e]}:c(l({},t),{highlight:o[e]})):h.highlightData=o),h});return this._apply(o,e)}clear(t={}){return this.w.globals.axisCharts?this._apply(this._rawSeries().map(zs),t):this._setCircle(null,t)}_setCircle(t,e){const i=this.w,n=e.series||this._rawSeries(),s={};if((e.series||n.some(Bs))&&(s.series=n.map(zs)),"function"==typeof t){const s=Ws(n),r=e.series?[]:i.seriesData.series,a=i.seriesData.seriesNames,o=s.length||n.length,l=[];for(let e=0;e<o;e++){const o=s.length?s[e]:n[e];l.push(t({seriesIndex:e,dataPointIndex:e,seriesName:s.length?String(o.x):a[e],x:s.length?o.x:a[e],value:Nr(o,r[e]),datum:o,w:i}))}t=l}return s.highlightFilter={data:Array.isArray(t)?t:null},this.ctx.updateOptions(s,!1,!1!==e.animate,!0,!this._drilled())}_apply(t,e){const i=this._drilled();return i&&this._level&&(this._level.series=t.map(zs)),this.ctx._replaceSeries(t,!1!==e.animate,!i,{keepView:!0})}_rawSeries(){var t;const e=this.w.globals;return(this._drilled()&&(null==(t=this._level)?void 0:t.series)||e.treemapRawSeries||e._initialSeriesPeek||this.w.config.series).map(t=>Cs(t)?l({},t):t)}teardown(){var t,e;Array.from(this._live).forEach(t=>t.finish()),this._live.clear(),this._targets=new Map,this._render=null,this._cu=null,this._level=null,this._tiles=null,this._tmDefs=[],null==(t=this.ctx.events)||t.removeEventListener("mounted",this._onRender),null==(e=this.ctx.events)||e.removeEventListener("updated",this._onRender)}}});m.default.registerFeatures({radialTargets:class{constructor(t,e){this.w=t,this.ctx=e,this.angles=new Map}stop(){const t=this.w.globals;null!=t.radialTargetRAF&&(M.cancelAnimationFrame(t.radialTargetRAF),t.radialTargetRAF=null)}draw(t,e){var i;const n=this.w,s=n.globals,r=new b(this.w),a=n.config.plotOptions.radialBar;if(!Array.isArray(a.targets)||!a.targets.length)return this.stop(),this.angles=new Map,null;const o=e.geometry,{cx:l,cy:c}=o,h=r.group({class:"apexcharts-radial-targets"});h.node.setAttribute("pointer-events","none");const d="needle"===a.shape&&!(null==(i=a.needle)?void 0:i.showValueArc),u=n.config.chart.animations,p=t.initialAnim&&!s.dataChanged&&!s.resized,f=k.isBrowser()&&s.shouldAnimate,g=L(u.easing),m=this.angles,y=new Map,x=[];if(a.targets.forEach((i,a)=>{var g,_,b,v,w,A;if(!i)return;const M=null!=(g=i.seriesIndex)?g:0,k=o.rings[M];if(!k||(L=M,[...s.collapsedSeries||[],...s.ancillaryCollapsedSeries||[]].some(t=>t.index===L)))return;var L;const S="series"===i.value?e.series[M]:i.value;if(null==S||""===S)return;const C=Number(S);if(!Number.isFinite(C))return;const E="triangle"===i.shape||"circle"===i.shape?i.shape:"line",F="outside"===i.position||"inside"===i.position||"across"===i.position?i.position:"triangle"===E?"outside":"across",P=(0===M&&d&&o.bands?o.bands.thickness:k.thickness)/2,D=null!=(_=i.length)?_:"line"===E?"130%":10,R="string"==typeof D&&D.trim().endsWith("%")?k.thickness*parseFloat(D)/100:Math.max(0,Number(D)||0),T=Math.max(0,Number(null!=(b=i.width)?b:"line"===E?3:12)||0),N=k.radius,[O,$]="outside"===F?[N+P,N+P+R]:"inside"===F?[N-P,N-P-R]:[N-R/2,N+R/2],I=i.color||n.config.chart.foreColor,z=i.strokeColor||"none",W=null!=(v=i.strokeWidth)?v:0,j=["apexcharts-radial-target"];i.cssClass&&j.push(i.cssClass);const H=r.group({class:j.join(" ")});let Y;if(H.node.setAttribute("rel",String(M+1)),H.node.setAttribute("data-target-index",String(a)),null!=i.id&&H.node.setAttribute("data-target-id",String(i.id)),h.add(H),"line"===E)Y=r.drawLine(l,c-O,l,c-$,I,0,T);else if("triangle"===E)Y=r.drawPath({d:`M ${l} ${c-O} L ${l-T/2} ${c-$} L ${l+T/2} ${c-$} Z`,stroke:z,strokeWidth:W,fill:I,strokeLinecap:"butt"});else{const t=(O+$)/2;Y=r.drawCircle(R/2,{cx:l,cy:c-t,r:R/2,fill:I,stroke:z,"stroke-width":W})}Y.node.classList.add("apexcharts-radial-target-shape");const q=r.group({class:"apexcharts-radial-target-mark"});q.add(Y),H.add(q);const X=i.label;let G=null,U=()=>{};if(X&&null!=X.text&&""!==X.text){const t=X.style||{},e=t.fontSize||"11px",i=parseFloat(e)||11,n="inside"===F?-1:1,s="inside"===F?Math.min(O,$):Math.max(O,$),a=Number(null!=(w=X.offset)?w:4);G=r.drawText({x:l,y:c,text:String(X.text),textAnchor:"middle",dominantBaseline:"middle",fontSize:e,fontFamily:t.fontFamily,fontWeight:null!=(A=t.fontWeight)?A:600,foreColor:t.color||I,cssClass:"apexcharts-radial-target-label"}),U=t=>{const e=t*Math.PI/180,r=Math.sin(e)*n,o=-Math.cos(e)*n,h=s+n*(a+Math.abs(o)*i/2),d=B.polarToCartesian(l,c,h,t);G.node.setAttribute("x",String(d.x)),G.node.setAttribute("y",String(d.y)),G.node.setAttribute("text-anchor",r>.3?"start":r<-.3?"end":"middle")},H.add(G)}const K=o.angle(C),V=null!=i.id?`id:${i.id}`:`i:${a}`;y.set(V,K);const Z=m.get(V);let J=K,Q=0,tt=0;f&&p?(J=o.startAngle,Q=u.speed,tt=t.animBeginArr[M]||0):f&&t.dynamicAnim&&s.dataChanged&&void 0!==Z&&(J=Z,Q=u.dynamicAnimation.speed);const et=q.node,it=t=>{et.setAttribute("transform",`rotate(${t} ${l} ${c})`),U(t)};it(J),Q>0&&J!==K?x.push({node:et,label:G,from:J,to:K,delay:tt,dur:Q,place:it}):J!==K&&it(K)}),this.angles=y,this.stop(),x.length){const t=performance.now(),e=i=>{if(this.w.globals.isDestroyed)return void(s.radialTargetRAF=null);let n=!0;x.forEach(e=>{const s=Math.max(0,Math.min(1,(i-t-e.delay)/e.dur));s<1&&(n=!1),e.place(e.from+(e.to-e.from)*g(s))}),s.radialTargetRAF=n?null:M.requestAnimationFrame(e)};s.radialTargetRAF=M.requestAnimationFrame(e)}return h}}});const $r=/[MmLlHhVvCcSsQqTtAaZz]/;function Ir(t,e=.6,i=!1){const n=e>0?e:.6,s=t.length;let r=0;const a=[];let o=[],l=0,c=0,h=0,d=0,u=0,p=0,f="";const g=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function m(){for(;r<s&&g(t[r]);)r++}function y(){m();const e=r;for("+"!==t[r]&&"-"!==t[r]||r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if("."===t[r])for(r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if("e"===t[r]||"E"===t[r])for(r++,"+"!==t[r]&&"-"!==t[r]||r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if(r===e)return null;const i=parseFloat(t.slice(e,r));return isFinite(i)?i:null}function x(){m();const e=t[r];return"0"===e||"1"===e?(r++,"1"===e):null}function _(){o.length>(i?1:2)&&a.push(o),o=[]}function b(t,e){_(),l=h=t,c=d=e,o=[{x:t,y:e}]}function v(t,e){o.push({x:t,y:e}),l=t,c=e}function w(t,e,i,s,r,a){const h=Math.hypot(t-l,e-c)+Math.hypot(i-t,s-e)+Math.hypot(r-i,a-s),d=Math.max(2,Math.min(160,Math.ceil(h/n))),f=l,g=c;for(let n=1;n<=d;n++){const l=n/d,c=1-l,h=c*c*c,u=3*c*c*l,p=3*c*l*l,m=l*l*l;o.push({x:h*f+u*t+p*i+m*r,y:h*g+u*e+p*s+m*a})}u=i,p=s,l=r,c=a}function A(t,e,i,n){const s=t,r=e;w(l+2/3*(t-l),c+2/3*(e-c),i+2/3*(t-i),n+2/3*(e-n),i,n),u=s,p=r}function M(t,e,i,s,r,a,h){if(!t||!e)return void v(a,h);const d=l,f=c;t=Math.abs(t),e=Math.abs(e);const g=i*Math.PI/180,m=Math.cos(g),y=Math.sin(g),x=(d-a)/2,_=(f-h)/2,b=m*x+y*_,w=-y*x+m*_,A=b*b/(t*t)+w*w/(e*e);if(A>1){const i=Math.sqrt(A);t*=i,e*=i}const M=t*t*e*e-t*t*w*w-e*e*b*b,k=t*t*w*w+e*e*b*b,L=(s===r?-1:1)*Math.sqrt(Math.max(0,M/(k||1))),S=L*t*w/e,C=-L*e*b/t,E=m*S-y*C+(d+a)/2,F=y*S+m*C+(f+h)/2,P=(b-S)/t,D=(w-C)/e,R=(-b-S)/t,T=(-w-C)/e,N=Math.atan2(D,P);let O=Math.atan2(T,R)-N;!r&&O>0&&(O-=2*Math.PI),r&&O<0&&(O+=2*Math.PI);const $=Math.max(2,Math.min(320,Math.ceil(Math.abs(O)*Math.max(t,e)/n)));for(let i=1;i<=$;i++){const n=N+O*i/$,s=Math.cos(n),r=Math.sin(n);o.push({x:E+t*s*m-e*r*y,y:F+t*s*y+e*r*m})}u=a,p=h,l=a,c=h}for(;r<s&&(m(),!(r>=s));){let e=t[r];if($r.test(e))r++;else{if(!f)break;e="M"===f?"L":"m"===f?"l":f}const i=e>="a"&&e<="z",n=e.toUpperCase();if("Z"===n){o.length&&o.push({x:h,y:d}),_(),l=h,c=d,f=e;continue}const s=t=>null==t?NaN:t,g=s(y());if(isNaN(g))break;switch(n){case"M":{const t=s(y());if(isNaN(t))return a;b(i?l+g:g,i?c+t:t);break}case"L":{const t=s(y());if(isNaN(t))return a;v(i?l+g:g,i?c+t:t);break}case"H":v(i?l+g:g,c);break;case"V":v(l,i?c+g:g);break;case"C":{const t=[g,y(),y(),y(),y(),y()];if(t.some(t=>null==t))return a;const e=t;w(i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3],i?l+e[4]:e[4],i?c+e[5]:e[5]);break}case"S":{const t=[g,y(),y(),y()];if(t.some(t=>null==t))return a;const e=t,n=f&&"CcSs".indexOf(f)>=0;w(n?2*l-u:l,n?2*c-p:c,i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3]);break}case"Q":{const t=[g,y(),y(),y()];if(t.some(t=>null==t))return a;const e=t;A(i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3]);break}case"T":{const t=s(y());if(isNaN(t))return a;const e=f&&"QqTt".indexOf(f)>=0;A(e?2*l-u:l,e?2*c-p:c,i?l+g:g,i?c+t:t);break}case"A":{const t=g,e=y(),n=y(),s=x(),r=x(),o=y(),h=y();if(null==e||null==n||null==s||null==r||null==o||null==h)return a;M(t,e,n,s,r,i?l+o:o,i?c+h:h);break}default:return a}"C"!==n&&"S"!==n&&"Q"!==n&&"T"!==n&&(u=l,p=c),f=e}return _(),a}function zr(t){const e={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<e.x0&&(e.x0=t.x),t.y<e.y0&&(e.y0=t.y),t.x>e.x1&&(e.x1=t.x),t.y>e.y1&&(e.y1=t.y)})}),e}const Wr=128;function Br(t,e,i){const n=Math.max(1e-6,t.x1-t.x0),s=Math.max(1e-6,t.y1-t.y0),r=Math.min(e.width*i/n,e.height*i/s);return{scale:r,offX:e.x+e.width/2-(t.x0+n/2)*r,offY:e.y+e.height/2-(t.y0+s/2)*r}}function jr(t,e,i){const n=.42*e,s=.45*e,r=t.maxY-t.minY,a=Math.max(1,Math.floor(r/i)),o=t.minY+(r-a*i)/2,l=[];let c=0;for(let r=0;r<a;r++){const a=o+(r+.5)*i,h=t.spansAt(a);for(let t=0;t<h.length;t++){const i=h[t].x1-h[t].x0;let o;o=i>=2*n?Math.floor((i-2*n)/e)+1:i>=s?1:0,o&&(l.push({y:a,x0:h[t].x0,x1:h[t].x1,cap:o,row:r}),c+=o)}}return{cells:l,capacity:c,inset:n}}function Hr(t,e){const i=new Array(t.length).fill(0);let n=0;for(let e=0;e<t.length;e++)n+=t[e];if(!n||e<=0)return i;let s=0;const r=[];for(let a=0;a<t.length;a++){const o=e*t[a]/n;i[a]=Math.floor(o),s+=i[a],r.push({i:a,frac:o-i[a]})}r.sort((t,e)=>e.frac-t.frac);for(let t=0;s<e;t++,s++)i[r[t%r.length].i]++;return i}function Yr(t,e,i){let n=1,s=Math.max(t.maxY-t.minY,8);for(let r=0;r<34;r++){const r=(n+s)/2;jr(t,r,r*i).capacity>=e?n=r:s=r}return n}function qr(t,e){return Math.min(Math.max(t,e/3.2),e/2.3)}const Xr={rows:null,rowsUp:(t,e)=>e.y-t.y||t.x-e.x,cols:(t,e)=>(t.qx||0)-(e.qx||0)||t.y-e.y,colsRev:(t,e)=>(e.qx||0)-(t.qx||0)||t.y-e.y,centerOut:(t,e)=>(t.qd||0)-(e.qd||0)||t.y-e.y,centerIn:(t,e)=>(e.qd||0)-(t.qd||0)||t.y-e.y};function Gr(t,e,i,n){const s=void 0!==Xr[i]?Xr[i]:null;let r=e;if(s){let t=0,i=0;e.forEach(e=>{t+=e.x,i+=e.y}),t/=e.length||1,i/=e.length||1;const a=n>0?n:1;e.forEach(e=>{e.qx=Math.round(e.x/a),e.qd=Math.round(Math.hypot(e.x-t,e.y-i)/a)}),r=e.slice().sort(s)}const a=[];for(let e=0;e<t.length&&e<r.length;e++)a.push({id:t[e].id,x:r[e].x,y:r[e].y,r:r[e].r});return a}function Ur(t,e,i,n,s,r){if(e<=0)return;if(1===e)return void r.push({x:(t.x0+t.x1)/2,y:t.y,r:s,row:t.row});let a=t.x0+n;let o=(t.x1-n-a)/(e-1);o>1.5*i&&(o=i,a=(t.x0+t.x1)/2-o*(e-1)/2);for(let i=0;i<e;i++)r.push({x:a+i*o,y:t.y,r:s,row:t.row})}const Kr=new Set;function Vr(t,e){const i=e(t),n=t.minUnits||0,s=(e,s)=>{if(n&&e.length&&e.length<n&&!Kr.has(t.name)){Kr.add(t.name);const i="stroke"===t.kind?"A stroke thins to a dotted line below that, which may well be fine.":"Fine detail closes up below that.";console.warn(`[ApexCharts] unit shape "${t.name}" reads best from about ${n} units; this chart has ${e.length}. ${i} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return i(e,s)};return s.shape=Object.freeze(l({},t)),s.with=i=>Vr(l(l({},t),i),e),s}const Zr=new Map;function Jr(t){const e=t.path||"",i=t.order||"rows",n=null==t.padding?.94:t.padding,s=null==t.rowRatio?.88:t.rowRatio,r="evenodd"===t.fillRule,a=null==t.sampling?.6:t.sampling;return(t,o)=>{if(!t.length||!e)return[];const{polys:l,bounds:c}=function(t,e){const i=`${e}|${t}`;let n=Zr.get(i);if(!n){const s=Ir(t,e);n={polys:s,bounds:zr(s)},Zr.set(i,n)}return n}(e,a);if(!l.length)return[];const h=function(t,e,i={}){const n=!!i.evenOdd,s=[];let r=1/0,a=-1/0,o=1/0,l=-1/0;if(t.forEach(t=>{for(let i=0;i<t.length;i++){const n=t[i],c=t[(i+1)%t.length],h=e.offX+n.x*e.scale,d=e.offY+n.y*e.scale,u=e.offX+c.x*e.scale,p=e.offY+c.y*e.scale;h<o&&(o=h),u<o&&(o=u),h>l&&(l=h),u>l&&(l=u),d<r&&(r=d),p<r&&(r=p),d>a&&(a=d),p>a&&(a=p),d!==p&&s.push({x0:h,y0:d,x1:u,y1:p})}}),!s.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const c=Math.max(1e-6,a-r),h=[];for(let t=0;t<Wr;t++)h.push([]);return s.forEach(t=>{const e=Math.min(t.y0,t.y1),i=Math.max(t.y0,t.y1);let n=Math.floor((e-r)/c*Wr),s=Math.floor((i-r)/c*Wr);n=Math.max(0,Math.min(127,n)),s=Math.max(0,Math.min(127,s));for(let e=n;e<=s;e++)h[e].push(t)}),{minY:r,maxY:a,minX:o,maxX:l,spansAt:t=>{const e=Math.floor((t-r)/c*Wr);if(e<0||e>127)return[];const i=h[e],s=[];for(let e=0;e<i.length;e++){const n=i[e],r=n.y1>n.y0,a=r?n.y0:n.y1,o=r?n.y1:n.y0;t<a||t>=o||s.push({x:n.x0+(t-n.y0)/(n.y1-n.y0)*(n.x1-n.x0),dir:r?1:-1})}if(s.length<2)return[];s.sort((t,e)=>t.x-e.x);const a=[];if(n){for(let t=0;t+1<s.length;t+=2)a.push({x0:s[t].x,x1:s[t+1].x});return a}let o=0,l=0;for(let t=0;t<s.length;t++){const e=o;o+=s[t].dir,0===e&&0!==o?l=s[t].x:0!==e&&0===o&&a.push({x0:l,x1:s[t].x})}return a}}}(l,Br(c,o,n),{evenOdd:r}),d=Yr(h,t.length,s),u=jr(h,d,d*s);if(!u.cells.length)return[];const p=Hr(u.cells.map(t=>t.cap),t.length),f=qr(t[0].r>0?t[0].r:3,d),g=[];return u.cells.forEach((t,e)=>{Ur(t,p[e],d,u.inset,f,g)}),Gr(t,g,i,d)}}function Qr(t){return Vr(c(l({},t),{kind:"silhouette"}),Jr)}const ta=Qr({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),ea=Qr({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),ia=Qr({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),na=Qr({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),sa=Qr({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),ra=Qr({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),aa=Qr({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),oa=Qr({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),la=t=>t.reduce((t,e)=>t+e,0);function ca(t){const e=null==t.padding?.94:t.padding,i="centerIn"===t.order,n=null==t.twist?2.399963:t.twist;return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.min(s.width,s.height)/2*e,o=s.x+s.width/2,l=s.y+s.height/2,c=t=>{const e=[];for(let i=0;i<t;i++)e.push(Math.max(1,Math.round(2*Math.PI*(i+.5))));return e};let h=1;for(;h<400&&la(c(h))<r;)h++;const d=a/h,u=Hr(c(h),r),p=qr(t[0].r>0?t[0].r:3,d),f=[];for(let t=0;t<h;t++){const e=i?h-1-t:t,s=(e+.5)*d,r=u[e],a=n*e;for(let e=0;e<r;e++){const i=a+e/r*2*Math.PI;f.push({x:o+s*Math.cos(i),y:l+s*Math.sin(i),r:p,row:t})}}return Gr(t,f,"rows",d)}}function ha(t){const e=null==t.padding?.94:t.padding,i=(null==t.tilt?15:t.tilt)*Math.PI/180,n=t.order||"rows";return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.min(s.width,s.height)/2*e,o=s.x+s.width/2,l=s.y+s.height/2,c=Math.cos(i),h=Math.sin(i),d=(t,e,i)=>{const n=e*Math.cos(i);return{x:a*e*Math.sin(i),y:a*(t*c+n*h),depth:n*c-t*h}},u=t=>{const e=Math.max(3,Math.ceil(Math.PI*a/t)),i=Math.PI/e,n=.95*t,s=n,r=new Map,u=[];let p=0;const f=t=>{const e=Math.floor(t.x/s),i=Math.floor(t.y/s);for(let s=-1;s<=1;s++)for(let a=-1;a<=1;a++){const o=r.get(`${e+s},${i+a}`);if(o)for(let e=0;e<o.length;e++)if(Math.hypot(o[e].x-t.x,o[e].y-t.y)<n)return!1}const a=`${e},${i}`,o=r.get(a);return o?o.push(t):r.set(a,[t]),!0};for(let n=0;n<e;n++){const e=-Math.PI/2+(n+.5)*i,s=Math.cos(e),r=Math.sin(e),a=r*h/(s*c||1e-9);if(a>=1)continue;const g=a<=-1?Math.PI:Math.acos(a),m=g>=Math.PI-1e-9,y=[],x=[0];for(let t=0;t<=40;t++){const e=d(r,s,2*g*t/40-g);if(y.push(e),t>0){const i=y[t-1];x.push(x[t-1]+Math.hypot(e.x-i.x,e.y-i.y))}}const _=x[x.length-1],b=m?0:Math.min(.42*t,_/2),v=_-2*b;let w;if(w=m?Math.max(1,Math.round(_/t)):v>0?Math.floor(v/t)+1:_>=.45*t?1:0,!w)continue;const A=m?_/w:w>1?v/(w-1):0,M=[];let k=0;for(let t=0;t<w;t++){const e=m?t*A:w>1?b+t*A:_/2;for(;k<x.length-2&&x[k+1]<e;)k++;const i=x[k],n=x[k+1],s=n>i?(e-i)/(n-i):0,r=y[k],a=y[k+1],c={x:o+r.x+(a.x-r.x)*s,y:l+r.y+(a.y-r.y)*s,depth:r.depth+(a.depth-r.depth)*s};f(c)&&M.push(c)}M.length&&(u.push(M),p+=M.length)}return{rows:u,total:p}};let p=1,f=2*a;for(let t=0;t<30;t++){const t=(p+f)/2;u(t).total>=r?p=t:f=t}const g=p,{rows:m}=u(g),y=Hr(m.map(t=>t.length),r),x=qr(t[0].r>0?t[0].r:3,g),_=[];return m.forEach((t,e)=>{const i=y[e];if(i)for(let n=0;n<i;n++){const s=t[Math.min(t.length-1,Math.floor(n*t.length/i))];_.push({x:s.x,y:s.y,r:x*(.62+.38*Math.sqrt(Math.max(0,s.depth))),row:e})}}),_.sort((t,e)=>t.y-e.y||t.x-e.x),Gr(t,_,n,g)}}function da(t){const e=null==t.padding?.94:t.padding,i=null==t.rowRatio?.9:t.rowRatio,n=t.order||"rowsUp";return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.max(1,Math.round((Math.sqrt(8*r+1)-1)/2)),o=[];for(let t=0;t<a;t++)o.push(t+1);const l=Hr(o,r),c=Math.max(...l),h=Math.min(s.width*e/Math.max(1,c-1+1.6),s.height*e/(a*i)),d=h*i,u=s.x+s.width/2,p=s.y+(s.height-a*d)/2,f=qr(t[0].r>0?t[0].r:3,h),g=[];for(let t=0;t<a;t++)for(let e=0;e<l[t];e++)g.push({x:u+(e-(l[t]-1)/2)*h,y:p+(t+.5)*d,r:f,row:t});return Gr(t,g,n,h)}}function ua(t){return Vr(c(l({},t),{kind:"rings"}),ca)}function pa(t){return Vr(c(l({},t),{kind:"globe"}),ha)}function fa(t){return Vr(c(l({},t),{kind:"tiers"}),da)}const ga=ua({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),ma=pa({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),ya=fa({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),xa=Qr({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),_a=Qr({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),ba=Qr({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),va=Qr({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),wa=Qr({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),Aa=Qr({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),Ma=Qr({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),ka=Qr({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),La=Qr({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),Sa=Qr({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),Ca=Qr({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),Ea=Qr({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),Fa=Qr({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),Pa=Qr({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),Da=Qr({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),Ra=Qr({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),Ta=Qr({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),Na=Qr({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),Oa=Qr({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),$a=Qr({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),Ia=Qr({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),za=new Map;function Wa(t){const e=t.path||"",i=t.order||"rows",n=null==t.padding?.94:t.padding,s=null==t.rowRatio?.88:t.rowRatio,r=null==t.sampling?.6:t.sampling,a=Math.max(.5,(null==t.width?16:t.width)/2);return(t,o)=>{if(!t.length||!e)return[];const{polys:l,bounds:c}=function(t,e){const i=`${e}|${t}`;let n=za.get(i);if(!n){const s=Ir(t,e,!0);n={polys:s,bounds:zr(s)},za.set(i,n)}return n}(e,r);if(!l.length)return[];const h=function(t,e,i){const n=Math.max(1e-6,i*e.scale),s=[];let r=1/0,a=-1/0,o=1/0,l=-1/0;if(t.forEach(t=>{for(let i=0;i+1<t.length;i++){const c=e.offX+t[i].x*e.scale,h=e.offY+t[i].y*e.scale,d=e.offX+t[i+1].x*e.scale,u=e.offY+t[i+1].y*e.scale,p=Math.hypot(d-c,u-h),f=p>1e-9?-(u-h)/p*n:n,g=p>1e-9?(d-c)/p*n:0;s.push({ax:c,ay:h,bx:d,by:u,nx:f,ny:g}),Math.min(c,d)-n<o&&(o=Math.min(c,d)-n),Math.max(c,d)+n>l&&(l=Math.max(c,d)+n),Math.min(h,u)-n<r&&(r=Math.min(h,u)-n),Math.max(h,u)+n>a&&(a=Math.max(h,u)+n)}}),!s.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const c=Math.max(1e-6,a-r),h=[];for(let t=0;t<Wr;t++)h.push([]);s.forEach(t=>{const e=Math.min(t.ay,t.by)-n,i=Math.max(t.ay,t.by)+n;let s=Math.floor((e-r)/c*Wr),a=Math.floor((i-r)/c*Wr);s=Math.max(0,Math.min(127,s)),a=Math.max(0,Math.min(127,a));for(let e=s;e<=a;e++)h[e].push(t)});const d=(t,e,i)=>{const s=i-e;if(s<=-n||s>=n)return null;const r=Math.sqrt(n*n-s*s);return{x0:t-r,x1:t+r}};return{minY:r,maxY:a,minX:o,maxX:l,spansAt:t=>{const e=Math.floor((t-r)/c*Wr);if(e<0||e>127)return[];const i=h[e],n=[];for(let e=0;e<i.length;e++){const s=i[e],r=[s.ax+s.nx,s.bx+s.nx,s.bx-s.nx,s.ax-s.nx],a=[s.ay+s.ny,s.by+s.ny,s.by-s.ny,s.ay-s.ny];let o=1/0,l=-1/0;for(let e=0;e<4;e++){const i=(e+1)%4,n=a[e],s=a[i];if(n===s)continue;const c=Math.min(n,s),h=Math.max(n,s);if(t<c||t>=h)continue;const d=r[e]+(t-n)/(s-n)*(r[i]-r[e]);d<o&&(o=d),d>l&&(l=d)}l>o&&n.push({x0:o,x1:l});const c=d(s.ax,s.ay,t);c&&n.push(c);const h=d(s.bx,s.by,t);h&&n.push(h)}if(!n.length)return[];n.sort((t,e)=>t.x0-e.x0);const s=[n[0]];for(let t=1;t<n.length;t++){const e=s[s.length-1];n[t].x0<=e.x1?n[t].x1>e.x1&&(e.x1=n[t].x1):s.push(n[t])}return s}}}(l,Br({x0:c.x0-a,y0:c.y0-a,x1:c.x1+a,y1:c.y1+a},o,n),a),d=Yr(h,t.length,s),u=jr(h,d,d*s);if(!u.cells.length)return[];const p=Hr(u.cells.map(t=>t.cap),t.length),f=qr(t[0].r>0?t[0].r:3,d),g=[];return u.cells.forEach((t,e)=>{Ur(t,p[e],d,u.inset,f,g)}),Gr(t,g,i,d)}}function Ba(t){return Vr(c(l({},t),{kind:"stroke"}),Wa)}const ja=[ta,ea,ia,na,sa,ra,aa,oa,ga,ma,ya,xa,_a,ba,va,wa,Aa,Ma,ka,La,Sa,Ca,Ea,Fa,Pa,Da,Ra,Ta,Na,Oa,$a,Ia,Ba({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),Ba({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),Ba({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),Ba({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),Ba({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),Ba({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),Ba({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"})],Ha="__apexcharts_unit_layouts__";function Ya(t){const e=c(l({},t),{viewBox:t.viewBox||[0,0,100,100]});return e.with=e=>Ya(l(l({},t),e)),Object.freeze(e)}const qa=[Ya({name:"person",category:"people",source:"original",path:"M 37 18 A 13 13 0 0 1 63 18 A 13 13 0 0 1 37 18 Z M 50 34 C 61 34 69 40 70 50 L 73 72 L 65 72 L 63 58 L 61 96 L 53 96 L 51 66 L 49 66 L 47 96 L 39 96 L 37 58 L 35 72 L 27 72 L 30 50 C 31 40 39 34 50 34 Z"}),Ya({name:"house",category:"objects",source:"original",path:"M 50 8 L 94 46 L 82 46 L 82 92 L 58 92 L 58 64 L 42 64 L 42 92 L 18 92 L 18 46 L 6 46 Z"}),Ya({name:"heart",category:"symbols",source:"original",path:"M 50 90 C 22 70 6 54 6 36 C 6 21 17 11 30 11 C 39 11 46 16 50 24 C 54 16 61 11 70 11 C 83 11 94 21 94 36 C 94 54 78 70 50 90 Z"}),Ya({name:"tree",category:"nature",source:"original",path:"M 50 6 C 66 6 78 18 78 33 C 78 38 77 42 75 46 C 82 50 86 57 86 65 C 86 77 76 86 64 86 L 55 86 L 55 96 L 45 96 L 45 86 L 36 86 C 24 86 14 77 14 65 C 14 57 18 50 25 46 C 23 42 22 38 22 33 C 22 18 34 6 50 6 Z"}),Ya({name:"droplet",category:"nature",source:"original",path:"M 50 4 C 50 4 84 42 84 64 C 84 82 69 96 50 96 C 31 96 16 82 16 64 C 16 42 50 4 50 4 Z"}),Ya({name:"star",category:"symbols",source:"original",path:"M 50 6 L 61.2 36.6 L 93.8 37.8 L 68.1 57.9 L 77 89.2 L 50 71 L 23 89.2 L 31.9 57.9 L 6.2 37.8 L 38.8 36.6 Z"}),Ya({name:"car",category:"transport",source:"original",path:"M 6 72 L 9 53 C 10 46 15 41 22 40 L 32 23 C 35 19 39 17 44 17 L 60 17 C 65 17 69 19 71 23 L 81 40 C 88 41 93 46 94 53 L 97 72 L 97 80 L 6 80 Z M 13 88 A 11 11 0 1 1 35 88 A 11 11 0 1 1 13 88 Z M 65 88 A 11 11 0 1 1 87 88 A 11 11 0 1 1 65 88 Z"}),Ya({name:"bag",category:"objects",source:"original",path:"M 10 30 L 90 30 L 95 96 L 5 96 Z M 32 30 C 32 14 40 4 50 4 C 60 4 68 14 68 30 L 59 30 C 59 19 55 13 50 13 C 45 13 41 19 41 30 Z"}),Ya({name:"book",category:"objects",source:"original",path:"M 8 14 C 8 14 26 6 50 16 C 74 6 92 14 92 14 L 92 88 C 92 88 74 80 50 90 C 26 80 8 88 8 88 Z"}),Ya({name:"cup",category:"objects",source:"original",path:"M 14 22 L 70 22 L 70 34 L 80 34 C 90 34 96 41 96 51 C 96 63 87 71 75 71 L 69 71 C 65 84 55 92 42 92 C 26 92 14 79 14 61 Z"}),Ya({name:"bulb",category:"objects",source:"original",path:"M 50 4 C 32 4 18 18 18 36 C 18 48 25 56 31 63 C 35 68 37 72 37 78 L 63 78 C 63 72 65 68 69 63 C 75 56 82 48 82 36 C 82 18 68 4 50 4 Z M 38 84 L 38 90 L 62 90 L 62 84 Z M 42 94 L 45 99 L 55 99 L 58 94 Z"}),Ya({name:"plane",category:"transport",source:"original",path:"M 50 4 C 55 4 58 12 58 24 L 58 38 L 94 62 L 94 72 L 58 60 L 58 82 L 70 90 L 70 97 L 50 92 L 30 97 L 30 90 L 42 82 L 42 60 L 6 72 L 6 62 L 42 38 L 42 24 C 42 12 45 4 50 4 Z"})],Xa="__apexcharts_unit_marks__";!function(t){const e=function(){const t=globalThis;return t[Ha]||(t[Ha]=Object.create(null)),t[Ha]}(),i=[];(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,n])=>{const s=String(t),r=n;s&&"function"==typeof r&&(e[s]=r,i.push(s))})}(ja),function(t){const e=function(){const t=globalThis;return t[Xa]||(t[Xa]=Object.create(null)),t[Xa]}(),i=[];(Array.isArray(t)?t.map(t=>[t?t.name:"",t]):Object.entries(t)).forEach(([t,n])=>{const s=String(t);s&&n&&"string"==typeof n.path&&(e[s]=n,i.push(s))})}(qa);const Ga=g.default;Ga.unitShapes=ja,Ga.pictograms=qa,Object.defineProperty(exports,"default",{enumerable:!0,get:()=>g.default});
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=Math.pow,o=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,l=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&o(t,i,e[i]);if(n)for(var i of n(e))r.call(e,i)&&o(t,i,e[i]);return t},c=(t,n)=>e(t,i(n)),h=(t,e)=>{var i={};for(var a in t)s.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(null!=t&&n)for(var a of n(t))e.indexOf(a)<0&&r.call(t,a)&&(i[a]=t[a]);return i},d=(t,e,i)=>new Promise((n,s)=>{var r=t=>{try{o(i.next(t))}catch(t){s(t)}},a=t=>{try{o(i.throw(t))}catch(t){s(t)}},o=t=>t.done?n(t.value):Promise.resolve(t.value).then(r,a);o((i=i.apply(t,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("apexcharts"),p=require("apexcharts/core");function f(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const g=(t=>t&&t.__esModule?t:{default:t})(u),m=f(p),y=m.__apex_CoreUtils,x=m.__apex_ChartFactory_getChartClass,_=m.__apex_Fill,b=m.__apex_Graphics,v=m.__apex_Series,w=m.__apex_Animations,A=m.__apex_Animations_prefersReducedMotion,M=m.__apex_BrowserAPIs_BrowserAPIs,k=m.__apex_Environment_Environment,L=m.__apex_Easing_resolveEasing,S=m.__apex_PathMorphing_parsePath,C=m.__apex_PathMorphing_arrayToPath;function E(t,e,i){if(!t||"string"!=typeof t)return null;const n=S(t);if(!n.length||"M"!==n[0][0])return null;for(let t=1;t<n.length;t++)if("M"===n[t][0])return null;let s=n,r=null;if(i){if(n.length<5)return null;if(r=n.slice(-3),s=n.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===n[n.length-1][0])return null;if(s.length!==e||s.length<2)return null;const a=s[1][0];if("L"!==a&&"C"!==a)return null;for(let t=2;t<s.length;t++)if(s[t][0]!==a)return null;const o=s.map(t=>"C"===t[0]?[Number(t[5]),Number(t[6])]:[Number(t[1]),Number(t[2])]);for(const t of o)if(!isFinite(t[0])||!isFinite(t[1]))return null;return{body:s,closing:r,segType:a,anchors:o}}function F(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]}function P(t,e,i){const n=t,s=[e[1],e[2]],r=[e[3],e[4]],a=[e[5],e[6]],o=F(n,s,i),l=F(s,r,i),c=F(r,a,i),h=F(o,l,i),d=F(l,c,i),u=F(h,d,i);return{first:["C",o[0],o[1],h[0],h[1],u[0],u[1]],second:["C",d[0],d[1],c[0],c[1],a[0],a[1]],mid:u}}function D(t,e,i){const n=[e[1],e[2]],s=F(t,n,i);return{first:["L",s[0],s[1]],second:["L",n[0],n[1]],mid:s}}function R(t,e){const{body:i,closing:n,segType:s,anchors:r}=t,a=r.length,o=e.length,l=t=>"C"===s?["C",t[0],t[1],t[0],t[1],t[0],t[1]]:["L",t[0],t[1]],c=[["M",r[0][0],r[0][1]]];let h=0;for(;h<o&&0!==e[h];)h++;for(let t=1;t<=h;t++)c.push(l(r[0]));let d=h+1;for(let t=0;t<a-1;t++){let n=0;for(;d+n<o&&-1===e[d+n];)n++;const a=i[t+1];if(n){const e=n+1;let i=r[t],o=a;for(let t=0;t<n;t++){const n=1/(e-t),r="C"===s?P(i,o,n):D(i,o,n);c.push(r.first),i=r.mid,o=r.second}c.push(o)}else c.push(a.slice());d+=n+1}for(;d<o;)c.push(l(r[a-1])),d++;return n&&n.forEach(t=>c.push(t.slice())),c}function T(t,e,i,n,s,r){const a=E(t,n,r);if(!a)return null;const o=E(e,s,r);if(!o)return null;if(a.segType!==o.segType)return null;if((a.closing||o.closing)&&(!a.closing||!o.closing||a.closing[0][0]!==o.closing[0][0]))return null;const l=i.map(t=>t.oldJ),c=i.map(t=>t.newJ);return{from:C(R(a,l)),toInterp:C(R(o,c))}}function N(t,e,i){var n,s;return O(null==(n=t.axisFlags)?void 0:n.isXNumeric,null==(s=t.seriesData)?void 0:s.seriesX,t.globals.labels,e,i)}function O(t,e,i,n,s){if(t){const t=null==e?void 0:e[n];if(t&&t.length&&null!=t[s])return"x:"+t[s]}const r=null==i?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}function $(t,e){const i=new Map;t.forEach((t,e)=>{i.has(t)||i.set(t,e)});const n=new Array(e.length),s=new Set;let r=-1,a=!0,o=t.length===e.length;e.forEach((t,e)=>{const l=i.has(t)&&!s.has(i.get(t))?i.get(t):-1;n[e]=l,-1!==l&&(s.add(l),l<r&&(a=!1),r=l),l!==e&&(o=!1)});const l=[];for(let e=0;e<t.length;e++)s.has(e)||l.push(e);return{toOld:n,exits:l,ordered:a,changed:!o}}function I(t){const e=new Map;return t.map(t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`})}function z(t,e,i=!1,n=!1,s=function(t,e){var i,n;if(!function(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const n=null!=(e=i.largeDatasetThreshold)?e:0;return!(n>0&&t.globals.dataPoints>n||!(k.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate))}(t))return null;const s=t.globals.prevStreamFrame;if(!s)return null;const r=null==(i=s.seriesY)?void 0:i[e],a=null==(n=t.seriesData.series)?void 0:n[e];if(!Array.isArray(r)||!Array.isArray(a))return null;if(!r.length||!a.length)return null;const o=I(r.map((t,i)=>function(t,e,i){return O(t.isXNumeric,t.seriesX,t.labels,e,i)}(s,e,i))),l=function(t,e,i=0|(i=>null==(i=t.seriesData.series[e])?void 0:i.length)()){return I(Array.from({length:i},(i,n)=>N(t,e,n)))}(t,e);return{join:$(o,l),oldKeys:o,newKeys:l}}(t,e)){return s&&(s.join.ordered||n)&&(s.join.changed||i)?s:null}function W(t,{type:e,realIndex:i,pathFromLine:n,pathFromArea:s,linePaths:r,areaPaths:a,join:o}){var l,c;const h=z(t,i,!1,!1,null==o?void 0:o());if(!h)return null;const{join:d,oldKeys:u,newKeys:p}=h,f=null==(l=t.globals.prevStreamFrame.seriesY)?void 0:l[i],g=null==(c=t.seriesData.series)?void 0:c[i];if(f.length<2||g.length<2)return null;if(f.some(t=>null===t)||g.some(t=>null===t))return null;const m=function(t,e){const i=new Set(t.exits),n=[];let s=0;for(let e=0;e<t.toOld.length;e++){const r=t.toOld[e];if(-1!==r){for(;s<r;)i.has(s)&&n.push({oldJ:s,newJ:-1}),s++;n.push({oldJ:r,newJ:e}),s=r+1}else n.push({oldJ:-1,newJ:e})}for(;s<e;)i.has(s)&&n.push({oldJ:s,newJ:-1}),s++;return n}(d,u.length),y={};return Array.isArray(r)&&1===r.length&&n&&(y.line=T(n,r[0],m,u.length,p.length,!1)),"area"===e&&Array.isArray(a)&&1===a.length&&s&&(y.area=T(s,a[0],m,u.length,p.length,!0)),y.line||y.area?y:null}const B=m.__apex_Utils,j=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=Y(i,n),r=1;for(let a=t.length-1;r<a;r++)i=n,n=t[r+1],e[r]=.5*(s+(s=Y(i,n)));return e[r]=s,e}(t),i=t.length-1,n=[];let s,r,a,o;for(let n=0;n<i;n++)a=Y(t[n],t[n+1]),Math.abs(a)<1e-6?e[n]=e[n+1]=0:(s=e[n]/a,r=e[n+1]/a,o=s*s+r*r,o>9&&(o=3*a/Math.sqrt(o),e[n]=o*s,e[n+1]=o*r));for(let s=0;s<=i;s++)o=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([o||0,e[s]*o||0]);return n},H={points(t){const e=j(t),i=t[1],n=t[0],s=[],r=e[1],a=e[0];s.push(n,[n[0]+a[0],n[1]+a[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],r=e[i];s.push([n[0]-r[0],n[1]-r[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function Y(t,e){return(e[1]-t[1])/(e[0]-t[0])}function q({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:r,realIndex:a,wrapClass:o,pointClass:l}){if(!s||!1===s.show||!n.length)return;const c=null!=s.opacity?s.opacity:.9,h=null!=s.strokeColor?s.strokeColor:"#fff",d=null!=s.strokeWidth?s.strokeWidth:1,u=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:u?`${o} apexcharts-element-hidden`:o});u&&e.globals.delayedElements.push({el:p.node}),n.forEach(({groups:i,j:n})=>{const o=r?e.globals.colors[n]:e.globals.colors[a],u=s.fillColor,f="series"===u?o:"series-dark"===u?X(o,.45):u||X(o,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:f,stroke:d>0?h:"none",strokeWidth:d,fillOpacity:c,classes:l});s.attr("data:realIndex",a),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",p.add(s)})}),i.add(p)}function X(t,e){const i=B.parseColor(t)||B.parseColor(B.resolveColor(t));if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function G(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,r=B.parseHex(t[n])||[0,0,0],a=B.parseHex(t[Math.min(n+1,t.length-1)])||r,o=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${o(r[0],a[0])},${o(r[1],a[1])},${o(r[2],a[2])})`}function U(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function K(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function V(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const Z=class{};class J extends Z{constructor(t,e,i){!function(){const t=x("bar");if(Object.getPrototypeOf(J)===t)return;Object.setPrototypeOf(J,t),Object.setPrototypeOf(J.prototype,t.prototype)}(),super(t,e,i)}draw(t,e,i){var n,s,r;const a=this.w,o=new b(this.w),l=new _(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.jx=function(t,e){let i=1/0,n=-1/0;return t.slice(0,e.seriesData.series.length).flat(2).forEach(t=>{t===+t&&(t<i&&(i=t),t>n&&(n=t))}),[i,n]}(a.violinData.seriesViolinPoints,a),this.boxOptions=this.violinOptions.box||{},this.cloudSign=tt(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:tt(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?et(this.boxOptions.width,.15):0,this.rainFrac=et(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new y(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,i);const c=o.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let h,d;const u=[],p=[],f=a.globals.comboCharts?i[e]:e,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(f),m=o.group({class:"apexcharts-series",seriesName:B.escapeString(a.seriesData.seriesNames[f]),rel:e+1,"data:realIndex":f});v.addCollapsedClassToSeries(this.w,m,f),t[e].length>0&&(this.visibleI=this.visibleI+1);const y=this.setSeriesAxis(f),x=this.barHelpers.initialPositions(f),{y:_,barHeight:b,yDivision:w,zeroW:A,x:M,barWidth:k,xDivision:L,zeroH:S}=x;d=_,h=M,p.push(h+(null!=k?k:0)/2);const C=o.group({class:"apexcharts-datalabels","data:realIndex":f});if(this.seriesMaxWeight=0,"group"===this.normalize){(a.violinData.seriesViolinDensity[f]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const E=[];for(let i=0;i<a.globals.dataPoints;i++){const o=this.barHelpers.getStrokeWidth(e,i,f),c=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:f,translationsIndex:y},y:d,yDivision:w,barHeight:b,zeroW:A}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:f,translationsIndex:y},x:h,xDivision:L,barWidth:k,zeroH:S});h=c.x,d=c.y,i>0&&p.push(c.center),u.push(c.alongRepresentative);const x=this.buildPointsSubPath({realIndex:f,j:i,center:c.center,halfExtent:c.halfExtent,alongFn:c.alongFn,density:c.density,maxWeight:c.maxWeight,cloudBase:c.cloudBase,cloudMaxPx:c.cloudMaxPx,rainCenter:c.rainCenter,rainHalfPx:c.rainHalfPx});x.length&&E.push({groups:x,j:i});const _=l.fillPath({seriesNumber:this.distributed?i:f,dataPointIndex:i,color:this.distributed?a.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:f,pathFill:_,lineFill:a.globals.stroke.colors[f],j:i,i:e,pathFrom:c.pathFrom,pathTo:c.pathTo,strokeWidth:o,elSeries:m,x:h,y:d,series:t,columnGroupIndex:g,barHeight:b,barWidth:k,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin"});const v=m.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(v&&isFinite(c.alongRepresentative)&&v.setAttribute(this.isHorizontal?"cx":"cy",`${c.alongRepresentative}`),v&&v.setAttribute("data:center",`${c.center}`),c.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;c.boxPaths.forEach(n=>{this.renderSeries({realIndex:f,pathFill:n.filled?this.boxOptions.fillColor||_:"none",lineFill:a.globals.stroke.colors[f],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:m,x:h,y:d,series:t,columnGroupIndex:g,barHeight:b,barWidth:k,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box",noLabel:!0})})}const M=!v&&(null==(r=null==(s=a.globals.barCanvasCoords)?void 0:s[f])?void 0:r[i]);M&&isFinite(c.alongRepresentative)&&(this.isHorizontal?M.cx=c.alongRepresentative:(M.bodyCx=M.cx,M.cx=c.center,M.cy=c.alongRepresentative))}q({graphics:o,w:a,elSeries:m,pointsByCat:E,options:this.pointsOptions,distributed:this.distributed,realIndex:f,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[f]=p,a.globals.seriesYvalues[f]=u,c.add(m)}return c}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){const{realIndex:r,j:a,translationsIndex:o}=t,h=this.yRatio[o]*(this.isReversed?-1:1);let d=e+n*this.visibleI;return this.w.axisFlags.isXNumeric?({x:e,barXPosition:d}=this.getBarXForNumericXAxis({x:e,barWidth:n,realIndex:r,j:a})):e+=i,c(l({},this.buildViolin({realIndex:r,j:a,center:d+n/2,halfExtent:n/2,alongFn:t=>s-this.logVal(t,r)/h,vertical:!0})),{x:e,y:s})}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){const{realIndex:r,j:a}=t,o=this.invertedYRatio*(this.isReversed?-1:1),h=e+n*this.visibleI;return c(l({},this.buildViolin({realIndex:r,j:a,center:h+n/2,halfExtent:n/2,alongFn:t=>s+this.logVal(t,r)/o,vertical:!1})),{x:s,y:e+i})}buildViolin({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,vertical:r}){var a,o,l,c,h,d,u;const p=this.w,f=this.getDensity(t,e),g=this.effectiveMaxWeight(f),m=function({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const r=n*t,a=0===i?t:s*t,o=0===i?0:i*(t-a);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:o,rainHalfPx:a};const l=0===i?0:s,c=2*Math.max(0,1-l-n)*t,h=e*(t-c);return{cloudBaseOff:h,cloudMaxPx:c,boxCenterOff:h-e*r,boxHalfPx:r,rainCenterOff:o,rainHalfPx:a}}({halfExtent:n,cloudSign:null!=(a=this.cloudSign)?a:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(c=this.rainFrac)?c:0}),y=i+m.cloudBaseOff,x=t=>this.buildBodyPath({nodes:f.nodes,center:y,halfExtent:m.cloudMaxPx,maxWeight:g,vertical:r,alongFn:s,collapsed:t,sideSign:this.cloudSign}),_=x(!1);let b=null;const v=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(t,e);return v?b=v:p.globals.previousPaths.length>0&&(b=this._prevBody(t,e,_)),null==b&&(b=x(!0)),{pathTo:_,pathFrom:b,center:i,halfExtent:n,alongFn:s,density:f,maxWeight:g,cloudBase:y,cloudMaxPx:m.cloudMaxPx,rainCenter:i+m.rainCenterOff,rainHalfPx:m.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:t,j:e,boxCenter:i+m.boxCenterOff,boxHalfPx:m.boxHalfPx,alongFn:s,vertical:r}),alongRepresentative:s(null!=(u=p.seriesData.series[t][e])?u:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const r=[];let a=null;for(const t of s){const e=n.values[t];null!==a&&e===a||(r.push({v:e,w:n.weights[t]}),a=e)}return{nodes:r,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:r,collapsed:a,sideSign:o=0}){const l=new b(this.w);if(0===t.length){const t=r(0);return s?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const c=t=>{if(a||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},h=[],d=[];for(let i=0;i<t.length;i++){const n=r(t[i].v),a=c(t[i].w),l=0===o?e+a:e+o*a,u=0===o?e-a:e;s?(h.push([l,n]),d.push([u,n])):(h.push([n,l]),d.push([n,u]))}return d.reverse(),this.smoothSegment(h,s,!1)+this.smoothSegment(d,s,!0)+"z"}_prevBody(t,e,i){var n,s;const r=null==(s=null==(n=this._prevKeyedPaths(t))?void 0:n.get(N(this.w,t,e)))?void 0:s.d;return r&&J.pathCommandCount(r)===J.pathCommandCount(i)?r:null}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:r}){var a,o,l;const c=this.w;if(!this.boxShown||n<=0)return null;const h=null==(a=c.violinData.seriesViolinSummary[t])?void 0:a[e];if(!h)return null;const d=n*Math.min(1,Math.max(0,null!=(o=this.boxOptions.capWidth)?o:.5)),[u,p,f,g,m]=h.map(t=>s(t)),y=(t,e)=>{const n=new b(this.w),s=(t,e)=>r?[t,e]:[e,t],a=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),o=i;return{whiskers:a([s(o,u),s(o,p)])+a([s(o,g),s(o,m)])+a([s(o-t,u),s(o+t,u)])+a([s(o-t,m),s(o+t,m)]),box:a([s(o-e,p),s(o+e,p),s(o+e,g),s(o-e,g)])+"z"+a([s(o-e,f),s(o+e,f)])}},x=y(d,n),_=y(0,0),v=c.globals.previousPaths.length?this._prevKeyedPaths(t):null,w=(null==(l=null==v?void 0:v.get(N(c,t,e)))?void 0:l.box)||[];return[{pathTo:x.whiskers,pathFrom:w[0]||_.whiskers,filled:!1},{pathTo:x.box,pathFrom:w[1]||_.box,filled:!0}]}smoothSegment(t,e,i){const n=new b(this.w),s=t[0];let r=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=n.line(t[e][0],t[e][1]);return r}const a=t.map(([t,i])=>e?[i,t]:[t,i]),o=H.points(a);return r+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?o.map(Q):o),r}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:r,maxWeight:a,cloudBase:o,cloudMaxPx:l,rainCenter:c,rainHalfPx:h}){var d;const u=0!==this.rainSign,p=u?c:0!==this.cloudSign?o:i,f=u?h:0!==this.cloudSign?l:n;return function({points:t,extent:e,seedA:i,seedB:n,center:s,halfExtent:r,alongFn:a,isHorizontal:o,options:l,clampAt:c,sideSign:h}){var d,u;const p=l;if(!p||!1===p.show)return[];if(!t||!t.length)return[];const f=p.maxPoints||3e3,g=t.length>f?Math.ceil(t.length/f):1,m=null!=p.size?p.size:2.5,y=r*(null!=p.jitter?p.jitter:.5),x=!1!==p.constrainToViolin&&"function"==typeof c,_="square"===p.shape,b=p.colorScale,v=b&&Array.isArray(b.colors)&&b.colors.length>0,w=v?Math.max(2,b.steps||24):1,A=null!=(d=null==b?void 0:b.min)?d:e[0],M=(null!=(u=null==b?void 0:b.max)?u:e[1])-A||1,k=v?new Array(w).fill(""):[""];for(let e=0;e<t.length;e+=g){const r=t[e],l=a(r);let d=2*(U(7919*i+100003*n+e)-.5)*y;if(x){const t=c(r);d>t&&(d=t),d<-t&&(d=-t)}h&&(d=Math.abs(d)*h);const u=o?l:s+d,p=o?s+d:l,f=_?V(u,p,m):K(u,p,m);if(v){let t=(r-A)/M;t<0&&(t=0),t>1&&(t=1),k[Math.round(t*(w-1))]+=f}else k[0]+=f}if(!v)return k[0]?[{fill:null,d:k[0]}]:[];const L=[];for(let t=0;t<w;t++)k[t]&&L.push({fill:G(b.colors,t/(w-1)),d:k[t]});return L}({points:null==(d=this.w.violinData.seriesViolinPoints[t])?void 0:d[e],extent:this.jx,seedA:t,seedB:e,center:p,halfExtent:f,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:t=>this.halfWidthAtValue(t,r,f,a),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,r=null!=n?n:e.maxWeight;if(!s.length||r<=0)return 0;const a=t=>Math.min(i,t/r*i*this.bandwidthScale);if(t<=s[0].v)return a(s[0].w);if(t>=s[s.length-1].v)return a(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],r=n.v===i.v?0:(t-i.v)/(n.v-i.v);return a(i.w+(n.w-i.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function Q(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function tt(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function et(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}m.default.use({violin:J});const it=globalThis.console;function nt(t,...e){it.error(t,...e)}function st(t){it.warn(t)}const rt="APEX-",at=new Date("2027-07-31T00:00:00Z"),ot="__apex_license_v1__";function lt(){const t=globalThis;let e=t[ot];return e||(e={key:null,listeners:new Set,result:null},t[ot]=e),e}const ct=class{static get licenseKey(){return lt().key}static set licenseKey(t){lt().key=t}static get listeners(){return lt().listeners}static get validationResult(){return lt().result}static set validationResult(t){lt().result=t}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(t){return!!t&&this.validateKey(t).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}static setLicense(t){var e,i;if(!t)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const n=this.validateKey(t);n.valid||t===this.licenseKey||!(null==(i=this.validationResult)?void 0:i.valid)?(this.licenseKey=t,this.publish(n),n.valid||nt(`[Apex] ${n.message}`)):st(`[Apex] Ignoring license key: ${null!=(e=n.message)?e:"it is not valid"} A valid license is already active on this page.`)}static validateKey(t){const e=this.parseKey(t),i=this.validateStructure(t,e);if(!i.valid||!(null==e?void 0:e.signature))return i;const n=this.verdicts.get(t);return!1===n?{data:e.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===n&&this.verifySignature(t,e,i),c(l({},i),{signatureVerified:!0===n}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),i=e.padEnd(4*Math.ceil(e.length/4),"="),n=globalThis.atob;if("function"!=typeof n)throw new Error("no base64 decoder available");const s=n(i),r=new Uint8Array(s.length);for(let t=0;t<s.length;t++)r[t]=s.charCodeAt(t);return r}static canonicalPayload(t){const e=t.domains&&t.domains.length>0?t.domains.join(","):"";return`v1|${t.issueDate}|${t.expiryDate}|${t.plan}|${e}`}static notify(t){for(const e of this.listeners)try{e(t)}catch(t){}}static parseKey(t){if("string"!=typeof t||!t.startsWith(rt))return null;const e=t.slice(5);if(!e)return null;try{const t=(new TextDecoder).decode(this.base64ToBytes(e)),i=JSON.parse(t);return i.issueDate&&i.expiryDate&&i.plan?{data:{domains:Array.isArray(i.domains)?i.domains:void 0,expiryDate:i.expiryDate,issueDate:i.issueDate,plan:i.plan,valid:!0},signature:"string"==typeof i.sig&&i.sig?i.sig:null}:null}catch(t){return null}}static publish(t){this.validationResult=t,this.notify(t)}static validateStructure(t,e){const i=t=>({expired:!1,message:t,signatureVerified:!1,valid:!1});if("string"!=typeof t||!t.startsWith(rt))return i('Invalid license key format. License key must start with "APEX-".');if(!e)return i("Invalid license key. Unable to decode license data.");const{data:n,signature:s}=e;if(!s&&new Date>=at)return i("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(n.expiryDate)<new Date)return{data:n,expired:!0,message:`License expired on ${n.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(n.domains&&n.domains.length>0){const t="undefined"==typeof location?"":location.hostname;if(!n.domains.some(e=>t===e||t.endsWith(`.${e}`)))return{data:n,expired:!1,message:`License is not valid for this domain (${t}). Allowed domains: ${n.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:n,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(t,e,i){return d(this,null,function*(){var n;if(this.verifying.has(t)||this.verdicts.has(t))return;this.verifying.add(t);const s=this.epoch,r=null==(n=globalThis.crypto)?void 0:n.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(t),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,st(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(e.data));let o=!1;for(const t of this.publicKeysSpki){try{const i=yield r.importKey("spki",this.base64ToBytes(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},i,this.base64ToBytes(e.signature),a)}catch(t){o=!1}if(o)break}if(this.verifying.delete(t),this.epoch!==s)return;if(this.verdicts.set(t,o),o){const e=c(l({},i),{signatureVerified:!0});return void(this.licenseKey===t?this.publish(e):this.notify(e))}const h="Invalid license key. The license signature does not verify.",d={data:e.data,expired:!1,message:h,signatureVerified:!0,valid:!1};this.licenseKey===t?this.publish(d):this.notify(d),nt(`[Apex] ${h}`)})}};ct.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],ct.verdicts=new Map,ct.verifying=new Set,ct.warnedUnverifiable=!1,ct.epoch=0;let ht=ct;function dt(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const n=(i-1)*e,s=Math.floor(n),r=Math.ceil(n);return s===r?t[s]:t[s]+(t[r]-t[s])*(n-s)}function ut(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e);let n=i[0],s=i[i.length-1];const r=e.range;if(Array.isArray(r)&&2===r.length){const t=Number(r[0]),e=Number(r[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(n=t,s=e)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const a=s-n;let o,l;if("number"==typeof e.binWidth&&e.binWidth>0)o=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)o=a/Math.floor(e.bins),l="count";else{const t=function(t,e,i){const n=t.length,s=t=>e/Math.max(1,Math.ceil(t)),r=()=>s(Math.log2(n)+1);switch(i){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(t);return e>0?{width:3.49*e*Math.pow(n,-1/3),rule:"scott"}:{width:r(),rule:"sturges"}}case"fd":{const e=dt(t,.75)-dt(t,.25);return e>0?{width:2*e*Math.pow(n,-1/3),rule:"fd"}:{width:r(),rule:"sturges"}}case"auto":{const e=r(),i=dt(t,.75)-dt(t,.25);if(i<=0)return{width:e,rule:"sturges"};const s=2*i*Math.pow(n,-1/3);return s<e?{width:s,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:r(),rule:"sturges"}}}(i,a,"string"==typeof e.bins?e.bins:"auto");o=t.width,l=t.rule}(!Number.isFinite(o)||o<=0)&&(o=a);let c=Math.ceil(a/o);(!Number.isFinite(c)||c<1)&&(c=1);let h=!1;c>1e3&&(c=1e3,h=!0),o=a/c;const d=new Array(c+1);for(let t=0;t<=c;t++)d[t]=n+t*o;return d[c]=Math.max(d[c],s),{edges:d,binWidth:o,rule:l,capped:h}}function pt(t,e){const i=e.length-1;if(!(t>=e[0])||t>e[i])return-1;if(t===e[i])return i-1;const n=(e[i]-e[0])/i;if(n>0){let s=Math.floor((t-e[0])/n);return s<0&&(s=0),s>i-1&&(s=i-1),t<e[s]?s--:t>=e[s+1]&&s++,s<0||s>i-1?-1:s}let s=0,r=i-1;for(;s<=r;){const i=s+r>>1;if(t<e[i])r=i-1;else{if(!(t>=e[i+1]))return i;s=i+1}}return-1}const ft=class{static applyStyles(t){Object.assign(t.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(t){return t?t.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(t,e){return t&&"undefined"!=typeof document?(this.setManaged(t,e),this.paint(t)):null}static exists(t){return!!this.node(t)}static remove(t,e){t&&(this.setManaged(t,e),this.erase(t))}static untrack(t){this.managed.delete(t)}static createWatermarkPattern(){const t=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${t}</text>\n </svg>\n `.trim())}")`}static erase(t){var e;null==(e=this.node(t))||e.remove()}static paint(t){let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(this.WATERMARK_ATTR,""),t.appendChild(e)),this.applyStyles(e),"function"==typeof getComputedStyle&&"static"===getComputedStyle(t).position&&(t.style.position="relative"),e}static reconcile(){const t=ht.isLicenseValid();for(const e of this.managed)e.isConnected?t?this.erase(e):this.paint(e):this.managed.delete(e)}static setManaged(t,e){!1!==(null==e?void 0:e.manage)?this.track(t):this.managed.delete(t)}static track(t){this.managed.add(t),this.subscribed||(this.subscribed=!0,ht.onChange(()=>{this.reconcile()}))}};ft.WATERMARK_ATTR="data-apexcharts-watermark",ft.WATERMARK_TEXT="APEXCHARTS",ft.ATTR="data-apexcharts-watermark",ft.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},ft.managed=new Set,ft.subscribed=!1;let gt=ft;const mt=1/45;function yt(t,e,i,n){return{value:t,velocity:0,target:t,stiffness:e,damping:i}}function xt(t,e){if(e<=0)return bt(t);let i=e;for(;i>0;){const e=Math.min(i,mt),n=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=n*e,t.value+=t.velocity*e,i-=e}return!!bt(t)&&(t.value=t.target,t.velocity=0,!0)}function _t(t,e){t.target=e}function bt(t){var e,i;const n=null!=(e=t.restVelocity)?e:.05,s=null!=(i=t.restDisplacement)?i:.05;return Math.abs(t.velocity)<n&&Math.abs(t.value-t.target)<s}const vt={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function wt(t){const e=t.getRootNode?t.getRootNode():null;return e&&(9===e.nodeType||11===e.nodeType&&"host"in e)?e:t.ownerDocument||document}function At(t){const e="function"==typeof t.composedPath?t.composedPath():null;return(null==e?void 0:e.length)?e[0]:t.target}function Mt(t,e){const i=wt(t),n=i.querySelector(e);if(n)return n;const s=t.ownerDocument;return s&&s!==i?s.querySelector(e):null}const kt="__apexcharts_crossfilters__";function Lt(t){if(!Number.isFinite(t))return t;const e=Number(t.toPrecision(12));return Object.is(e,-0)?0:e}function St(t){return"number"==typeof t&&Number.isFinite(t)}function Ct(t){if("function"==typeof t)return t;if(t&&"object"==typeof t){if("string"==typeof t.sum){const e=t.sum;return t=>t.reduce((t,i)=>t+(Number(i[e])||0),0)}if("string"==typeof t.avg){const e=t.avg;return t=>t.length?t.reduce((t,i)=>t+(Number(i[e])||0),0)/t.length:0}if("string"==typeof t.min){const e=t.min;return t=>t.length?Math.min(...t.map(t=>Number(t[e])||0)):0}if("string"==typeof t.max){const e=t.max;return t=>t.length?Math.max(...t.map(t=>Number(t[e])||0)):0}}return t=>t.length}function Et(t,e){return"function"==typeof e?t.slice().sort(e):"asc"===e?t.slice().sort((t,e)=>t>e?1:t<e?-1:0):"desc"===e?t.slice().sort((t,e)=>t<e?1:t>e?-1:0):t}function Ft(t,e){if(!St(t))return-1;const i=e.length-1;if(t<e[0]||t>e[i])return-1;if(t===e[i])return i-1;for(let n=0;n<i;n++)if(t>=e[n]&&t<e[n+1])return n;return-1}function Pt(t){const e=[];for(let i=0;i<t.length-1;i++)e.push(Lt((t[i]+t[i+1])/2));return e}class Dt{constructor(t,e){this.dims=new Map,this.listeners=new Map,this.id=t,this.records=Array.isArray(e)?e:[]}static store(){const t=globalThis;return t[kt]||(t[kt]=new Map),t[kt]}static getOrCreate(t){if(!t||"string"!=typeof t.id)throw new Error("Crossfilter.getOrCreate requires an { id } string.");const e=Dt.store(),i=e.get(t.id);if(i)return t.records&&i.setRecords(t.records),i;const n=new Dt(t.id,t.records);return e.set(t.id,n),n}static get(t){return Dt.store().get(t)||null}setRecords(t){return this.records=Array.isArray(t)?t:[],this.dims.forEach(t=>this.recomputeDomain(t)),this.emit("records",this.state()),this.emit("change",this.state()),this}registerDimension(t,e){if(!e||"function"!=typeof e.dimension)throw new Error(`crossfilter.registerDimension("${t}") needs a dimension function.`);const i=e.type||(e.bins?"range":"category"),n={accessor:e.dimension,reducer:Ct(e.reduce),type:i,bins:e.bins,order:e.order,filter:null,labels:[],edges:null,xLabels:[],yLabels:[]};return this.dims.set(t,n),this.recomputeDomain(n),null!=e.filter&&this.setFilterOn(n,e.filter),this}hasDimension(t){return this.dims.has(t)}removeDimension(t){const e=this.dims.get(t),i=!!e&&this.hasFilter(e);return this.dims.delete(t),i&&this.emit("change",this.state()),this}recomputeDomain(t){if("matrix"===t.type){const e=function(t,e,i){const n=new Set,s=new Set,r=[],a=[];for(let i=0;i<t.length;i++){const o=e(t[i]);if(!o)continue;const l=o[0],c=o[1];null==l||n.has(l)||(n.add(l),r.push(l)),null==c||s.has(c)||(s.add(c),a.push(c))}return{xLabels:Et(r,i),yLabels:Et(a,i)}}(this.records,t.accessor,t.order);return t.xLabels=e.xLabels,t.yLabels=e.yLabels,void(t.edges=null)}if("range"===t.type)return t.edges=function(t,e,i){if(i&&Array.isArray(i.thresholds)&&i.thresholds.length>=2){const t=Array.from(new Set(i.thresholds.filter(St))).sort((t,e)=>t-e);return t.length>=2?t.map(Lt):[0,1]}let n=1/0,s=-1/0;for(let i=0;i<t.length;i++){const r=e(t[i]);St(r)&&(r<n&&(n=r),r>s&&(s=r))}if(n===1/0)return[0,1];if(n===s){const t=Math.abs(n)>0?Math.abs(n):1;return[Lt(n),Lt(n+t)]}if(i&&St(i.width)&&i.width>0){const t=i.width,e=Math.floor(n/t)*t;let r=Math.ceil(s/t)*t;r<=e&&(r=e+t);const a=Math.max(1,Math.round((r-e)/t)),o=new Array(a+1);for(let i=0;i<=a;i++)o[i]=Lt(e+i*t);return o}const r=i&&St(i.count)&&i.count>=1?Math.floor(i.count):30,a=(s-n)/r,o=new Array(r+1);for(let t=0;t<=r;t++)o[t]=Lt(n+t*a);return o[r]=Lt(s),o}(this.records,t.accessor,t.bins),void(t.labels=Pt(t.edges));if(t.labels=function(t,e,i){const n=new Set,s=[];for(let i=0;i<t.length;i++){const r=e(t[i]);null!=r&&(n.has(r)||(n.add(r),s.push(r)))}return Et(s,i)}(this.records,t.accessor,t.order),t.edges=null,t.filter instanceof Set){const e=new Set(t.labels);Array.from(t.filter).forEach(i=>{e.has(i)||t.filter.delete(i)})}}filter(t,e){const i=this.dims.get(t);return i?(this.setFilterOn(i,e),this.emit("change",this.state()),this):this}toggleKey(t,e){const i=this.dims.get(t);if(!i||"category"!==i.type)return this;i.filter instanceof Set||(i.filter=new Set);const n=i.filter;return n.has(e)?n.delete(e):n.add(e),0===n.size&&(i.filter=null),this.emit("change",this.state()),this}setFilterOn(t,e){if(null==e)return void(t.filter=null);if("range"===t.type){if(Array.isArray(e)&&2===e.length&&e.every(St)){const[i,n]=e;t.filter=[Math.min(i,n),Math.max(i,n)]}else t.filter=null;return}const i=new Set(e);t.filter=i.size?i:null}clear(t){const e=this.dims.get(t);return e&&(e.filter=null),this.emit("change",this.state()),this}reset(){return this.dims.forEach(t=>{t.filter=null}),this.emit("change",this.state()),this}hasFilter(t){return null!=t.filter&&(!(t.filter instanceof Set)||t.filter.size>0)}passes(t,e){if(!this.hasFilter(t))return!0;const i=t.accessor(e);if(t.filter instanceof Set)return t.filter.has(i);if(!St(i))return!1;const[n,s]=t.filter;return i>=n&&i<=s}filteredRecords(t){const e=[];return this.dims.forEach((i,n)=>{n!==t&&this.hasFilter(i)&&e.push(i)}),0===e.length?this.records:this.records.filter(t=>e.every(e=>this.passes(e,t)))}filteredRows(){return this.filteredRecords(null)}aggregateFor(t){const e=this.dims.get(t);if(!e)return{type:"category",labels:[],values:[],keys:[]};const i=this.filteredRecords(t);if("matrix"===e.type){const t=new Map(e.xLabels.map((t,e)=>[t,e])),n=new Map(e.yLabels.map((t,e)=>[t,e])),s=e.yLabels.map(()=>e.xLabels.map(()=>[]));for(let r=0;r<i.length;r++){const a=e.accessor(i[r]);if(!a)continue;const o=t.get(a[0]),l=n.get(a[1]);null!=o&&null!=l&&s[l][o].push(i[r])}return{type:"matrix",xLabels:e.xLabels.slice(),yLabels:e.yLabels.slice(),matrix:s.map(t=>t.map(t=>e.reducer(t)))}}if("range"===e.type){const t=e.edges||[0,1],n=t.length-1,s=Array.from({length:n},()=>[]);for(let n=0;n<i.length;n++){const r=Ft(e.accessor(i[n]),t);r>=0&&s[r].push(i[n])}return{type:"range",labels:Pt(t),values:s.map(t=>e.reducer(t)),keys:s.map((e,i)=>[t[i],t[i+1]]),edges:t}}const n=new Map;e.labels.forEach(t=>n.set(t,[]));for(let t=0;t<i.length;t++){const s=n.get(e.accessor(i[t]));s&&s.push(i[t])}return{type:"category",labels:e.labels.slice(),values:e.labels.map(t=>e.reducer(n.get(t)||[])),keys:e.labels.slice()}}aggregateAll(){const t={};return this.dims.forEach((e,i)=>{t[i]=this.aggregateFor(i)}),t}state(){const t={};return this.dims.forEach((e,i)=>{this.hasFilter(e)&&(t[i]=e.filter instanceof Set?Array.from(e.filter):e.filter.slice())}),{filters:t,filteredCount:this.filteredRows().length,total:this.records.length}}filterOf(t){const e=this.dims.get(t);return e&&this.hasFilter(e)?e.filter instanceof Set?new Set(e.filter):e.filter.slice():null}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>this.off(t,e)}off(t,e){var i;return null==(i=this.listeners.get(t))||i.delete(e),this}emit(t,e){var i;null==(i=this.listeners.get(t))||i.forEach(i=>{try{i(e)}catch(e){nt(`[Apex] a crossfilter ${t} listener threw`,e)}})}static esc(t){return String(null==t?"":t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}resolveColumns(t){if(Array.isArray(t)&&t.length)return t.map(t=>"string"==typeof t?{field:t,label:t}:{field:t.field,label:t.label||t.field,format:t.format});const e=this.records[0];return(e?Object.keys(e):[]).map(t=>({field:t,label:t}))}tableHTML(t,e,i){const n="<thead><tr>"+t.map(t=>`<th>${Dt.esc(t.label)}</th>`).join("")+"</tr></thead>",s="<tbody>"+e.map(e=>"<tr>"+t.map(t=>{const i=e[t.field],n=t.format?t.format(i,e):i;return`<td>${Dt.esc(n)}</td>`}).join("")+"</tr>").join("")+"</tbody>";return`<table class="apexcharts-cf-table"><caption>${e.length} of ${i} rows</caption>${n}${s}</table>`}dataTable(t,e){if(!t)return{refresh(){},destroy(){}};const i=e||{},n=this.resolveColumns(i.columns),s=i.pageSize||0,r=i.page||0,a=()=>{const e=this.filteredRows(),i=s?e.slice(r*s,r*s+s):e;t.innerHTML=this.tableHTML(n,i,e.length)};a();const o=this.on("change",a);return{refresh:a,destroy:()=>{o(),t.innerHTML=""}}}destroy(){Dt.store().delete(this.id),this.dims.clear(),this.listeners.clear(),this.records=[]}}const Rt="__apexcharts_unit_layouts__",Tt=globalThis;function Nt(t){const e=globalThis[Rt];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}Tt[Rt]||(Tt[Rt]=Object.create(null));const Ot="__apexcharts_unit_marks__",$t=globalThis;function It(t,e){if("string"==typeof t){const i=t.trim();return i?Object.freeze({name:e||"anonymous",path:i,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(c(l({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function zt(t){const e=globalThis[Ot];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}function Wt(t,e,i){if("string"!=typeof t)return null;const n=t.trim();return e.has(n)||e.set(n,B.parseColor(n)||B.parseColor(B.resolveColor(n,i))||null),e.get(n)}function Bt(t,e,i){const n=[0,1,2].map(n=>Math.round(t[n]+(e[n]-t[n])*i)),s=t[3]+(e[3]-t[3])*i;return s>=1?`rgb(${n})`:`rgba(${n},${s})`}function jt(t,e,i={}){const n=new b(t),s=i.fontSize||"12px",r=parseFloat(s)||12;let a=0;return e.forEach(t=>{if(null==t||""===t)return;const e=`${t}`,o=n.getTextRects(e,s,i.fontFamily,"",!0,i.fontWeight).width;a=Math.max(a,o>0?o:e.length*r*.58)}),a}$t[Ot]||($t[Ot]=Object.create(null));const Ht=Math.PI*(3-Math.sqrt(5)),Yt=new WeakMap,qt=(t,e)=>{const i=(t.get(e)||0)+1;return t.set(e,i),i>1?e+"#"+i:e},Xt=t=>("string"==typeof t&&(t=parseFloat(t)),"number"==typeof t&&isFinite(t)?t:null);function Gt(t,e){const[i,n]=null!=(r=vt[null!=(s=t)?s:"crisp"])?r:vt.crisp;var s,r;const a=800/Math.max(1,e);return[i*a*a,n*a]}m.default.use({unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,i=new b(e,this.ctx),n=i.group({class:"apexcharts-unit"});if(M.cancelAnimationFrame(e.globals.unitGatherRAF||0),M.cancelAnimationFrame(e.globals.unitExitRAF||0),e.globals.unitGatherRAF=e.globals.unitExitRAF=null,e.globals.noData||!Array.isArray(t)||0===t.length)return n;const s=e.config.plotOptions.unit,r="packed"===s.layout?"packed":"columns"===s.layout?"columns":"grid"===s.layout?"grid":"scatter"===s.layout?"scatter":"arc"===s.layout?"arc":"custom"===s.layout?"custom":"grouped",a=s.transition,o="flow"===a,h="identity"===a,d=s.unitValue>0?s.unitValue:1,u="grid"===r&&!(!s.grid||!s.grid.split);let p=t.map(t=>{const e=Math.abs(B.parseNumber(t))/d;return u?e:e>0?Math.max(1,Math.round(e)):0});u||"scatter"===r||(p=this._applyMaxUnits(p,s.maxUnits));const f=p.reduce((t,e)=>t+e,0),g="packed"===r?this._layoutPacked(p,s):"columns"===r?this._layoutColumns(p,s):"grid"===r?this._layoutGrid(p,s):"scatter"===r?this._layoutScatter(s):"arc"===r?this._layoutArc(p,s):"custom"===r?this._layoutCustom(p,s):this._layoutGrouped(p,s);"scatter"===r&&this._drawScatterAxes(n,i);const m=this._lastDotR,y=!(!this.ctx||!this.ctx._unitPrevDots),x=y&&this.ctx._unitPieces&&this.ctx.morphTypeChange?this.ctx.morphTypeChange.getSpeed():0,_=this._shouldAnimate(y&&!x),v=x||this._speed(y),w=this.ctx&&this.ctx.morphTypeChange,A=_&&!!w&&"function"==typeof w.isActive&&w.isActive()&&"function"==typeof w.getInitialSlotFor,k=A&&"function"==typeof w.usesPieceTakeover&&w.usesPieceTakeover(),L=_&&!A&&y?this.ctx._unitPrevDots:null,S=this.ctx&&this.ctx._unitPieces;S&&(this.ctx._unitPieces=null,L&&S.querySelectorAll("rect").forEach(t=>{const e=t.getAttribute("data-key"),i=L.get(e),n=e=>+t.getAttribute(e);i&&L.set(e,c(l({},i),{x:n("x")+n("width")/2,y:n("y")+n("height")/2,r:Math.min(n("width"),n("height"))/2,fill:t.getAttribute("fill")}))}));const C=new Map,E=[],F=e.seriesData.unitData||[],P=this._bubbleStats(F,s,m);let D=0;const R=new Map,T=u&&this._gridTrack&&this._gridTrack.cells||[],N=i.group({class:"apexcharts-unit-track"});T.length&&n.add(N);const O=s.grid&&s.grid.trackColor||"rgba(128,128,128,0.14)",$=this._baseSpec({shape:"square"===s.shape&&"square"},m),I=T.length/Math.max(1,g.length),z=this.ctx&&this.ctx._unitSprings,W=(t,e,i,n,s,r,a,o)=>{const l=L&&L.get(s),c=z&&z.get(s),h=l&&l.x===i&&l.y===n&&l.r===r&&(!c||c.x.value===i&&c.y.value===n);if(C.set(s,{x:i,y:n,fill:O,r:r,spec:e}),L&&_&&!k&&!h){const c=l?l.x:i,h=l?l.y:n;t.style.opacity=l?"1":"0",this._place(t,e,c,h),E.splice(a,0,{node:t,spec:e,x:i,y:n,cx0:c,cy0:h,key:s,r0:l&&null!=l.r?l.r:r,r1:r,delay:0,isEnter:!l,pair:o})}else this._place(t,e,i,n)},j=(t,e)=>{const n=this._drawDot(i,s,m,O,-1,0,$);n.node.classList.add("apexcharts-unit-track-cell"),N.add(n),W(n.node,$,T[t].x,T[t].y,"trk:"+t,m,E.length,e)};if(g.forEach((t,a)=>{const l=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",c=i.group({class:"apexcharts-series",seriesName:B.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),d=t.dots.length,g=F[t.i],y=E.length;t.dots.forEach((e,n)=>{T.length&&j(a*I+n,!0);const r=null!=e.j?e.j:n,p=g?g[r]:void 0,f=p&&"object"==typeof p&&p.fillColor?p.fillColor:l,y=null!=e.r?e.r:P?this._radiusForValue(this._unitValueOf(p),P):m,x=this._markSpecFor(s,p,t.i,y),b=this._drawDot(i,s,y,f,t.i,r,x);let v;if(c.add(b),h){const t=p&&"object"==typeof p?null!=p.id?p.id:p.name:void 0;v=null!=t?`id:${qt(R,String(t))}`:`g:${D}`}else v=o?String(D):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(D++,C.set(v,{x:e.x,y:e.y,fill:f,r:y,spec:x}),k)this._place(b.node,x,e.x,e.y),b.node.setAttribute("opacity","0"),b.node.setAttribute("data-piece-hidden","1"),b.node.setAttribute("data-key",v);else if(_){const i=L&&L.get(v),n=i||(A?w.getInitialSlotFor(t.i,r,d):null),a=s.gather&&s.gather.enter||"burst",o=u||"fade"===a||"rise"===a,l=n||u&&L&&L.get("trk:"+e.slot),c=l?l.x:o?e.x:t.cx,h=l?l.y:"rise"!==a||u?o?e.y:t.cy:e.y+14;b.node.style.opacity=n?"1":"0",this._place(b.node,x,c,h),E.push({node:b.node,spec:x,x:e.x,y:e.y,cx0:c,cy0:h,key:v,r0:i&&null!=i.r?i.r:y,r1:y,fill0:i?i.fill:f,fill1:f,delay:0,isEnter:!n})}else this._place(b.node,x,e.x,e.y)});for(let e=t.dots.length;e<I;e++)j(a*I+e,!1);if(("grouped"===r||"columns"===r||u)&&s.clusterLabels&&s.clusterLabels.show&&p[t.i]>0){const e=u?this._gridDenom:f,i=this._drawClusterLabel(c,t,p[t.i],e,s,l);if(i&&u){const e={pk:1,hx:0,hy:0,r:0},n=+(i.getAttribute("x")||0),s=+(i.getAttribute("y")||0);W(i,e,n,s,"lbl:"+t.i,0,y,E.length>y)}}n.add(c)}),this._outerLabelsOn(s)&&this._drawOuterLabels(n,g,p,f,s,_&&!L),L){const t=this._collectExits(L,C,s);if(t.length){const e=i.group({class:"apexcharts-unit-exits"});n.add(e),this._runExits(e,t,s,v)}}return this.ctx&&(this.ctx._unitPrevDots=C),!this.ctx||_&&!A||(this.ctx._unitSprings=null),_&&E.length?this._runGather(E,v):e.globals.animationEnded=!0,n}_applyMaxUnits(t,e){const i=t.reduce((t,e)=>t+e,0);if(!e||e<=0||i<=e)return t;const n=e/i,s=this.ctx||{};return s._unitCapWarned||(s._unitCapWarned=!0,console.warn(`[ApexCharts] unit chart: ${i} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`)),t.map(t=>t>0?Math.max(1,Math.round(t*n)):0)}_layoutCustom(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=t.reduce((t,e)=>t+e,0),a=this._resolveLayoutProvider(e);if(!a)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,n-2*o),height:s},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,r);this._lastDotR=this._dotRadiusFromStep(h,e);const d=this._lastDotR,u=this._layoutObjects(t,d);let p;try{p=a(u,l)}catch(i){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",i),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const f=new Map;p.forEach(t=>{t&&isFinite(t.x)&&isFinite(t.y)&&f.set(String(t.id),{x:t.x,y:t.y,r:"number"==typeof t.r&&t.r>0?t.r:void 0})});const g=t.map((t,e)=>({i:e,cx:n/2,cy:s/2,outerR:d,dots:[]}));return u.forEach(t=>{const e=f.get(t.id);e&&g[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})}),g.forEach(t=>{if(!t.dots.length)return;let e=0,i=0;t.dots.forEach(t=>{e+=t.x,i+=t.y}),t.cx=e/t.dots.length,t.cy=i/t.dots.length;let n=0;t.dots.forEach(e=>{n=Math.max(n,Math.hypot(e.x-t.cx,e.y-t.cy))}),t.outerR=n+d}),g}_layoutObjects(t,e){const i=this.w,n=i.seriesData.unitData||[],s=i.seriesData.seriesNames||[],r=[],a=new Map;let o=0;return t.forEach((t,i)=>{var l;const c=n[i];for(let n=0;n<t;n++){const t=c?c[n]:void 0,h=qt(a,!t||"object"!=typeof t||null==t.id&&null==t.name?`${i}:${n}`:String(null!=t.id?t.id:t.name));r.push({id:h,index:o,seriesIndex:i,dataPointIndex:n,label:s[i],value:null!=(l=this._unitValueOf(t))?l:void 0,datum:t,r:e}),o++}}),r}_resolveLayoutProvider(t){const e=t.positions;if("function"==typeof e)return e;if("string"==typeof e&&e){const t=Nt(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,a=t.map((t,e)=>e).filter(e=>t[e]>0),o=Math.max(1,a.length),l=new Array(t.length).fill(-1);a.forEach((t,e)=>l[t]=e);const c=n/o,h=s-r,d=Math.max(1,...t),u=.08*Math.min(c,h),p=Math.max(4,Math.min(c,h)/2-u),f=this._resolveStep(e,p,d);this._lastDotR=this._dotRadiusFromStep(f,e);const g=this._lastDotR,m=r+h/2,y=t.map(t=>f*Math.sqrt(Math.max(1,t))+g);let x=t.map((t,e)=>(t=>l[t]>=0?c*(l[t]+.5):n/2)(e));const _=a.map(t=>y[t]);let b=!1;for(let t=1;t<o;t++)if(x[a[t]]-x[a[t-1]]<_[t]+_[t-1]){b=!0;break}if(b){const e=Math.max(2*g,8),i=_.reduce((t,e)=>t+2*e,0)+e*(o-1);let s;if(i<=n){let t=(n-i)/2;s=_.map(i=>{const n=t+i;return t+=2*i+e,n})}else if(1===o)s=[n/2];else{const t=_[0],e=n-_[o-1];s=_.map((i,n)=>t+(e-t)*n/(o-1))}x=t.map((t,e)=>l[e]>=0?s[l[e]]:n/2)}return t.map((t,e)=>({i:e,cx:x[e],cy:m,outerR:y[e],dots:this._spiral(x[e],m,t,f,0)}))}_layoutPacked(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),a=Math.max(4,Math.min(n,s-6)/2-.06*Math.min(n,s)),o=this._resolveStep(e,a,r);this._lastDotR=this._dotRadiusFromStep(o,e);const l=n/2,c=6+(s-6)/2,h=t.map((t,e)=>e);!1!==e.sortByGroup&&h.sort((e,i)=>t[e]-t[i]);const d=t.map((t,e)=>({i:e,cx:l,cy:c,outerR:o*Math.sqrt(r)+this._lastDotR,dots:[]}));let u=0;return h.forEach(e=>{for(let i=0;i<t[e];i++){const t=o*Math.sqrt(u+.5),i=u*Ht;d[e].dots.push({x:l+t*Math.cos(i),y:c+t*Math.sin(i),slot:u}),u++}}),d}_layoutArc(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),a=e.arc||{},o="number"==typeof a.startAngle?a.startAngle:-90,l="number"==typeof a.endAngle?a.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,d=h-c||Math.PI,u=Math.max(0,Math.min(.95,"number"==typeof a.innerRadiusRatio?a.innerRadiusRatio:.4)),p=t=>Math.sin(t),f=t=>-Math.cos(t),g=this._arcBounds(c,h),m=.04*Math.min(n,s),y=Math.max(1e-6,g.maxX-g.minX),x=Math.max(1e-6,g.maxY-g.minY),_=t=>Math.max(4,Math.min((n-2*m-t)/y,(s-2*m-t)/x)),b=t=>_(2*this._arcAllocate(r,t*u,t,d,e).dotR);let v=_(0),w=b(v);for(let t=0;t<6;t++){const t=(w+v)/2;t<=b(t)?w=t:v=t}const A=n/2-(g.minX+g.maxX)/2*w,M=s/2-(g.minY+g.maxY)/2*w,k=this._arcAllocate(r,w*u,w,d,e);this._lastDotR=k.dotR;const L=[];for(let t=0;t<k.R;t++){const e=k.radii[t],i=k.seatsPerRow[t];for(let t=0;t<i;t++){const n=1===i?(c+h)/2:c+d*(t+.5)/i;L.push({a:n,x:A+e*p(n),y:M+e*f(n)})}}L.sort((t,e)=>t.a-e.a);const S=t.map((t,e)=>({i:e,cx:A,cy:M,outerR:w,dots:[]}));let C=0,E=0;return L.forEach((e,i)=>{for(;C<t.length&&E>=t[C];)C++,E=0;C>=t.length||(S[C].dots.push({x:e.x,y:e.y,slot:i}),E++)}),S}_arcBounds(t,e){const i=t=>Math.sin(t),n=t=>-Math.cos(t),s=Math.min(t,e),r=Math.max(t,e),a=[0,i(t),i(e)],o=[0,n(t),n(e)],l=Math.PI/2;for(let t=Math.ceil(s/l);t*l<=r;t++)a.push(i(t*l)),o.push(n(t*l));return{minX:Math.min(...a),maxX:Math.max(...a),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,i,n,s){const r=s.spacing>0?s.spacing:1.05,a=Math.abs(n)||Math.PI,o=this._fixedRadius(s),l=n=>{n=Math.max(1,Math.round(n));const s=[];for(let t=0;t<n;t++)s.push(1===n?(e+i)/2:e+t/(n-1)*(i-e));const o=s.reduce((t,e)=>t+e,0)||1,l=s.map(e=>t*e/o),c=l.map(t=>Math.floor(t));let h=t-c.reduce((t,e)=>t+e,0);for(l.map((t,e)=>({idx:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac).forEach(t=>{h>0&&(c[t.idx]++,h--)});h>0;)c[n-1]++,h--;const d=1===n?i-e||i:(i-e)/(n-1);let u=1/0;for(let t=0;t<n;t++){const e=c[t];if(e<=0)continue;const i=s[t]*a/e;i<u&&(u=i)}const p=Math.min(d,u);return{R:n,radii:s,seatsPerRow:c,dotR:Math.max(1,p/(2*r))}},c=s.arc&&s.arc.rows;let h;if("number"==typeof c&&c>=1)h=l(c);else if(o){h=l((i-e)/(2*o*r)+1)}else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>h.dotR&&(h=e)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),a=r&&"bottom"===e.clusterLabels.position,o=r&&!a?30:6,l=t.map((t,e)=>e).filter(e=>t[e]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((t,e)=>h[t]=e);const d=n/c,u=.62*d,p=Math.max(8,.04*s)+(a?30:0),f=Math.max(4,s-o-p),g=Math.max(1,...t),m=e.spacing>0?e.spacing:1,y=e.columns?e.columns.size:void 0;let x;x="image"!==e.shape&&"auto"===y?null:"image"!==e.shape&&"number"==typeof y&&y>0?y:this._fixedRadius(e);let _=1,b=0;if(x){b=2*x*m,this._lastDotR=x;const t=Math.max(1,Math.floor(f/b)),e=Math.max(1,Math.floor(u/b));_=Math.max(1,Math.min(e,Math.ceil(g/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(u/4)));for(let i=1;i<=e;i++){const e=Math.ceil(g/i),n=Math.min(u/i,f/e);n>t&&(t=n,_=i)}b=t,this._lastDotR=Math.max(1,b/(2*m))}const v=this._lastDotR,w=Math.ceil(g/_),A=o+(f+Math.min(f,w*b))/2;return t.map((t,e)=>{const i=h[e]>=0?d*(h[e]+.5):n/2,s=Math.ceil(Math.max(1,t)/_)*b,r=i-_*b/2+b/2,a=[];for(let e=0;e<t;e++){const t=Math.floor(e/_),i=e%_;a.push({x:r+i*b,y:A-v-t*b})}return{i:e,cx:i,cy:A-s/2,outerR:s/2,flat:!0,dots:a}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},a=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),c=l.reduce((t,e)=>t+e,0),h=Math.max(1,Math.ceil(Math.max(1,c)/a)),d=e.spacing>0?e.spacing:1,u=Math.max(4,n),p=Math.max(4,s-6),f=this._fixedRadius(e);let g=0;f?(g=2*f*d,this._lastDotR=f):(g=Math.min(u/a,p/h),this._lastDotR=Math.max(1,g/(2*d)));const m=a*g,y=h*g,x=(n-m)/2+g/2,_=6+(p-y)/2,b=t=>"bottom"===o?_+y-g/2-t*g:_+g/2+t*g,v=t.map((t,e)=>({i:e,cx:n/2,cy:6+p/2,outerR:Math.max(m,y)/2,dots:[]}));let w=0;for(let t=0;t<l.length;t++)for(let e=0;e<l[t];e++){const e=w%a,i=Math.floor(w/a);v[t].dots.push({x:x+e*g,y:b(i),slot:w}),w++}return v}_layoutGridSplit(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},a=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),c=Math.max(1,Math.ceil(l/a)),h=t.map((t,e)=>e).filter(e=>t[e]>0),d=Math.max(1,h.length),u=r.max>0?r.max:Math.max(...t)||1,p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(d)))),f=Math.max(1,Math.ceil(d/p)),g=!(e.clusterLabels&&!1===e.clusterLabels.show),m=g&&e.clusterLabels&&"bottom"===e.clusterLabels.position,y=g&&!m?22:4,x=g&&m?22:4,_=n/p,b=s/f,v=Math.max(4,.86*_),w=Math.max(4,b-y-x),A=e.spacing>0?e.spacing:1,M=this._fixedRadius(e);let k=0;M?(k=2*M*A,this._lastDotR=M):(k=Math.min(v/a,w/c),this._lastDotR=Math.max(1,k/(2*A)));const L=a*k,S=c*k,C=(t,e)=>"bottom"===o?t+S-k/2-e*k:t+k/2+e*k,E=[],F=[];return h.forEach((e,i)=>{const n=i%p,s=Math.floor(i/p),r=n*_,o=r+(_-L)/2+k/2,c=s*b+y+(w-S)/2,h=t=>({x:o+t%a*k,y:C(c,Math.floor(t/a))});for(let t=0;t<l;t++)E.push(h(t));const d=Math.max(0,Math.min(l,Math.round(t[e]/u*l))),f=[];for(let t=0;t<d;t++){const e=h(t);f.push({x:e.x,y:e.y,slot:i*l+t})}F.push({i:e,cx:r+_/2,cy:c+S/2,outerR:S/2,flat:!0,split:!0,dots:f})}),this._gridDenom=u,this._gridTrack={cells:E},F}_layoutScatter(t){const e=this.w,i=t.scatter||{},n=e.seriesData.unitData||[],s=n.map(t=>t?t.length:0),r=this._applyMaxUnits(s,t.maxUnits),a=(t,e)=>Math.floor((e+1)*r[t]/s[t])>Math.floor(e*r[t]/s[t]);if("value"===i.y)return this._layoutScatter2D(t,a);const o="vertical"===i.orientation,c=e.layout.gridWidth,h=e.layout.gridHeight,d=e.seriesData.seriesNames||[],u=t=>this._unitValueOf(t),p=this._scatterSizeStats(i,n),f=n.map(t=>Array.isArray(t)?t.map(u):[]),g=t=>null!=t&&isFinite(t),m=f.map((t,e)=>e).filter(t=>f[t].some(g)),y=Math.max(1,m.length);let x=1/0,_=-1/0;f.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<x&&(x=t),t>_&&(_=t))})),x===1/0&&(x=0,_=1);const b=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),v=this._scatterValueDomain(i.xMin,i.xMax,x,_,b),w=v.min,A=v.max,M=A-w||1,k={fontFamily:e.config.chart.fontFamily,fontWeight:600},L=t=>d[t]||`series-${t+1}`,S=o?0:null!=i.laneLabelWidth?Math.max(0,i.laneLabelWidth):y>1?Math.min(c/3,jt(e,m.map(L),k)+14):8,C=o?46+(i.xTitle?18:0):S,E=c-(o?10:8),F=h-(o?y>1?26:10:30+(i.xTitle?20:0)),P=Math.max(4,E-C),D=Math.max(4,F-10),R=o?t=>F-(t-w)/M*D:t=>C+(t-w)/M*P,T=(o?P:D)/y;let N=0;const O=this._fixedRadius(t);if(O)N=O;else{const t=Math.max(1,...m.map(t=>f[t].filter(g).length));N=Math.max(2,Math.min(6,.12*T,(o?D:P)/(2.5*Math.sqrt(t))))}this._lastDotR=N;const $=t.spacing>0?t.spacing:1,I=Math.max(.5,N*$),z="jitter"===i.spread,W=[],B=[],j=p?p.rMax:N;return m.forEach((t,i)=>{const s=(t=>(o?C:10)+T*(t+.5))(i);let r=L(t);const l=S>12?jt(e,[r],k):0;l>S-14&&l&&(r=r.slice(0,Math.max(1,Math.floor(r.length*(S-14)/l)-1))+"\u2026"),B.push(o?{i:t,cx:s,name:r}:{i:t,cy:s,name:r});const c=[];if((n[t]||[]).forEach((e,i)=>{const n=u(e);if(!g(n)||!a(t,i))return;const r={j:i,f:R(n),s:s};p&&(r.r=this._scatterRadius(e,p,N)),c.push(r)}),z){const e=Math.max(j,T/2-j);c.forEach(i=>{i.s=s+(2*U(7919*t+i.j)-1)*e})}else this._beeswarm(c,s,N,I,j);W.push({i:t,cx:o?s:(C+E)/2,cy:o?(10+F)/2:s,outerR:T/2,dots:c.map(t=>o?{x:t.s,y:t.f,r:t.r,j:t.j}:{x:t.f,y:t.s,r:t.r,j:t.j})})}),this._scatterAxis=l({mode:"1d",plotL:C,plotR:E,plotT:10,plotB:F,ticks:v.ticks,lanes:B,formatter:"function"==typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},o?{orientation:"vertical",vMin:w,vMax:A,plotY:R,valueTitle:i.xTitle}:{xMin:w,xMax:A,plotX:R,xTitle:i.xTitle}),W}_layoutScatter2D(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=t.scatter||{},a=i.seriesData.unitData||[],o=t=>null!=t,l=t=>t&&"object"==typeof t?Xt(t.x):null,c=t=>t&&"object"==typeof t?Xt(null!=t.y?t.y:t.value):null,h=a.map((t,e)=>e).filter(t=>(a[t]||[]).some(t=>o(l(t))&&o(c(t))));let d=1/0,u=-1/0,p=1/0,f=-1/0;a.forEach(t=>(t||[]).forEach(t=>{const e=l(t),i=c(t);o(e)&&o(i)&&(e<d&&(d=e),e>u&&(u=e),i<p&&(p=i),i>f&&(f=i))})),d===1/0&&(d=0,u=1,p=0,f=1);const g=this._scatterValueDomain(r.xMin,r.xMax,d,u,Math.max(2,Math.round(r.tickAmount>0?r.tickAmount:5))),m=this._scatterValueDomain(r.yMin,r.yMax,p,f,Math.max(2,Math.round(r.yTickAmount>0?r.yTickAmount:5))),y=g.min,x=g.max,_=m.min,b=m.max,v=x-y||1,w=b-_||1,A=46+(r.yTitle?18:0),M=30+(r.xTitle?20:0),k=A,L=n-12,S=s-M,C=Math.max(4,L-k),E=Math.max(4,S-10),F=t=>k+(t-y)/v*C,P=t=>S-(t-_)/w*E,D=this._scatterSizeStats(r,a),R=this._fixedRadius(t)||5;this._lastDotR=R;const T=[];return h.forEach(t=>{const i=[];(a[t]||[]).forEach((n,s)=>{const r=l(n),a=c(n);null!=r&&null!=a&&e(t,s)&&i.push({x:F(r),y:P(a),r:D?this._scatterRadius(n,D,R):void 0,j:s})}),T.push({i:t,cx:(k+L)/2,cy:(10+S)/2,outerR:E/2,dots:i})}),this._scatterAxis={mode:"2d",plotL:k,plotR:L,plotT:10,plotB:S,plotX:F,plotY:P,xTicks:g.ticks,yTicks:m.ticks,xTitle:r.xTitle,yTitle:r.yTitle,xFormatter:"function"==typeof r.xFormatter?r.xFormatter:null,yFormatter:"function"==typeof r.yFormatter?r.yFormatter:null,gridlines:!1!==r.gridlines},T}_scatterSizeStats(t,e){const i=t&&t.sizeRange;if(!Array.isArray(i)||i.length<2)return null;const n=Math.max(.5,+i[0]),s=Math.max(n,+i[1]),r=t.sizeField||"z";let a=1/0,o=-1/0;return e.forEach(t=>(t||[]).forEach(t=>{const e=t&&"object"==typeof t?t[r]:null;"number"==typeof e&&isFinite(e)&&(e<a&&(a=e),e>o&&(o=e))})),a===1/0?null:{zmin:a,zmax:o,rMin:n,rMax:s,field:r}}_scatterRadius(t,e,i){if(!e)return i;const n=t&&"object"==typeof t?t[e.field]:null;if("number"!=typeof n||!isFinite(n))return e.rMin;const s=e.zmax>e.zmin?(n-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,s)),a=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(a+r*(o-a))}_beeswarm(t,e,i,n,s){const r=t.slice().sort((t,e)=>t.f-e.f),a=[],o=null!=s?s:i;r.forEach(t=>{const s=null!=t.r?t.r:i;let r=0;for(let i=0;i<2e3;i++){const l=0===i?0:Math.ceil(i/2)*n*(i%2?1:-1),c=e+l;let h=!0;for(let e=a.length-1;e>=0;e--){const i=a[e],n=t.f-i.f;if(n>s+o)break;const r=s+i.r,l=c-i.s;if(n*n+l*l<r*r){h=!1;break}}if(h){r=l;break}}t.s=e+r,a.push({f:t.f,s:t.s,r:s})})}_scatterValueDomain(t,e,i,n,s){const r=(t,e,i)=>{const n=[];for(let s=0,r=t;r<=e+.5*i;r=t+ ++s*i)n.push(Math.abs(r)<1e-9*i?0:r);return n};if(null!=t||null!=e){let a=null!=t?t:e,o=null!=e?e:t;const l=o>a?(o-a)/Math.max(1,s-1):this._niceScale(Math.min(a,i),Math.max(o,n),s).spacing;if(i<a&&(a-=Math.ceil((a-i)/l)*l),n>o&&(o+=Math.ceil((n-o)/l)*l),o>a||(o=a+l),(o-a)/l<=2*s)return{min:a,max:o,ticks:r(a,o,l)};i=a,n=o}const a=this._niceScale(i,n,s),o=a.spacing||(a.max-a.min)/Math.max(1,s-1);return{min:a.min,max:a.max,ticks:r(a.min,a.max,o)}}_niceScale(t,e,i){const n=t;let s=e;s>n||(s=n+1);const r=this._niceNum(s-n,!1),a=this._niceNum(r/Math.max(1,i-1),!0);return{min:Math.floor(n/a)*a,max:Math.ceil(s/a)*a,spacing:a}}_niceNum(t,e){const i=t>0?t:1,n=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,n);let r;return r=e?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,r*Math.pow(10,n)}_drawScatterAxes(t,e){const i=this.w;if(!k.isBrowser())return;const n=this._scatterAxis;if(!n)return;const s="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}),a=i.config.grid&&i.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=i.config.xaxis&&i.config.xaxis.labels&&i.config.xaxis.labels.style&&i.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",d=(t,e,i,n,a)=>{const o=M.createElementNS(s,"line");o.setAttribute("x1",String(t)),o.setAttribute("y1",String(e)),o.setAttribute("x2",String(i)),o.setAttribute("y2",String(n)),o.setAttribute("stroke",a),o.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(o)},u=(t,e,n,a,o,l,c,h)=>{const d=M.createElementNS(s,"text");d.setAttribute("class",h),d.setAttribute("x",String(e)),d.setAttribute("y",String(n)),d.setAttribute("text-anchor",a),d.setAttribute("dominant-baseline","middle"),d.setAttribute("font-size",`${l}px`),d.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),d.setAttribute("font-weight",String(c)),d.setAttribute("fill",o),d.textContent=t,r.node.appendChild(d)};if("2d"!==n.mode){if("vertical"===n.orientation){if(n.ticks.forEach(t=>{const e=n.plotY(t);n.gridlines&&d(n.plotL,e,n.plotR,e,a);const i=n.formatter?String(n.formatter(t)):this._formatTick(t,n.ticks);u(i,n.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotT,n.plotL,n.plotB,o),n.valueTitle){const t=M.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,a=(n.plotT+n.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(a)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${a})`),t.textContent=String(n.valueTitle),r.node.appendChild(t)}return n.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,t.cx,n.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")}),void t.add(r)}n.ticks.forEach((t,e)=>{const i=n.plotX(t);n.gridlines&&d(i,n.plotT,i,n.plotB,a);const s=n.formatter?String(n.formatter(t)):this._formatTick(t,n.ticks),r=0===e?"start":e===n.ticks.length-1?"end":"middle";u(s,i,n.plotB+14,r,h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotB,n.plotR,n.plotB,o),n.xTitle&&u(String(n.xTitle),(n.plotL+n.plotR)/2,n.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),n.plotL>12&&n.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,n.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")}),t.add(r)}else{if(n.yTicks.forEach(t=>{const e=n.plotY(t);n.gridlines&&d(n.plotL,e,n.plotR,e,a);const i=n.yFormatter?String(n.yFormatter(t)):this._formatTick(t,n.yTicks);u(i,n.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),n.xTicks.forEach(t=>{const e=n.plotX(t);n.gridlines&&d(e,n.plotT,e,n.plotB,a);const i=n.xFormatter?String(n.xFormatter(t)):this._formatTick(t,n.xTicks);u(i,e,n.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),d(n.plotL,n.plotB,n.plotR,n.plotB,o),d(n.plotL,n.plotT,n.plotL,n.plotB,o),n.xTitle&&u(String(n.xTitle),(n.plotL+n.plotR)/2,n.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),n.yTitle){const t=M.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,a=(n.plotT+n.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(a)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${a})`),t.textContent=String(n.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t,e){if(!isFinite(t))return"";const i=Math.abs(t);if(i>=1e6)return+(t/1e6).toFixed(1)+"M";if(i>=1e4)return+(t/1e3).toFixed(1)+"k";if(Number.isInteger(t))return String(t);const n=Math.abs(e[1]-e[0])||1;return String(+t.toFixed(Math.min(20,Math.max(2,1-Math.floor(Math.log10(n))))))}_largestRemainder(t,e){const i=t.reduce((t,e)=>t+e,0);if(i<=0||e<=0)return t.map(()=>0);const n=t.map(t=>t/i*e),s=n.map(t=>Math.floor(t)),r=s.reduce((t,e)=>t+e,0),a=Math.max(0,e-r),o=n.map((t,e)=>({i:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac),l=s.slice();for(let t=0;t<a&&t<o.length;t++)l[o[t].i]++;return l}_spiral(t,e,i,n,s){const r=[];for(let a=0;a<i;a++){const i=s+a,o=n*Math.sqrt(i+.5),l=i*Ht;r.push({x:t+o*Math.cos(l),y:e+o*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"==typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"==typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){return Xt(t&&"object"==typeof t?null!=t.value?t.value:t.y:t)}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const i=e.max>e.min?(t-e.min)/(e.max-e.min):1,n=Math.max(0,Math.min(1,i));if("linear"===e.scale)return e.minR+n*(e.maxR-e.minR);const s=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(s+n*(r-s))}_bubbleStats(t,e,i){if(!this._bubbleActive(e))return null;let n=1/0,s=-1/0;if(t.forEach(t=>{t&&t.forEach(t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<n&&(n=e),e>s&&(s=e))})}),n===1/0||s<n)return null;const r=e.sizeByValue,a=i,o=Math.max(1,Math.min(a,"number"==typeof r.minRadius?r.minRadius:.35*a));return{min:n,max:s,minR:o,maxR:a,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,i){const n=t.spacing>0?t.spacing:1,s=this._fixedRadius(t);return s?2*s*n:e/(Math.sqrt(Math.max(1,i))+.5)}_dotRadiusFromStep(t,e){const i=e.spacing>0?e.spacing:1,n=this._fixedRadius(e);return n||Math.max(1,t/(2*i))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const i=null!=e?e:this._lastDotR;return{hx:i,hy:i}}_place(t,e,i,n,s=1){const r=e;2===r.pk?t.setAttribute("transform","translate("+(i-r.ox*s)+","+(n-r.oy*s)+(1===s?r.tail:") scale("+r.s*s+")")):1===r.pk?(t.setAttribute("x",String(i-r.hx*s)),t.setAttribute("y",String(n-r.hy*s))):(t.setAttribute("cx",String(i)),t.setAttribute("cy",String(n)))}_size(t,e,i){const n=e;0===n.pk?t.setAttribute("r",String(n.r*i)):1===n.pk&&(t.setAttribute("width",String(2*n.hx*i)),t.setAttribute("height",String(2*n.hy*i)))}_baseSpec(t,e){const i=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:i};const{hx:n,hy:s}=this._halfExtent(t,i);return{pk:1,hx:n,hy:s,r:i}}_resolveMark(t){if(null==t)return null;if("object"==typeof t)return It(t);if("string"!=typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return It(e);const i=zt(e);let n=i&&"object"==typeof i?Yt.get(i):null;return void 0===n&&(n=It(i,e),Yt.set(i,n)),n||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(i?`[ApexCharts] unit chart: mark "${e}" needs a path string and a viewBox of 4 numbers with a positive width and height.`:`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,i){const n=Math.round(10*e)/10,s=t.name+t.path+t.viewBox+t.fillRule+n,r=this._specCache.get(s);if(r)return r;const a=t.viewBox||[0,0,100,100],o=2*n*(1-Math.max(0,Math.min(.9,i.padding||0)))*("number"==typeof i.scale&&i.scale>0?i.scale:1),l="width"===i.fit?o/a[2]:"height"===i.fit?o/a[3]:o/Math.max(a[2],a[3]),c=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(a[0]+a[2]/2)*l,oy:(a[1]+a[3]/2)*l,tail:") scale("+l+")",r:n});return this._specCache.set(s,c),c}_markSpecFor(t,e,i,n){if("pictogram"!==t.shape)return this._baseSpec(t,n);const s=t.pictogram||{},r=e&&"object"==typeof e?e.mark:void 0,a=Array.isArray(s.mark)?s.mark[i%s.mark.length]:s.mark,o=this._resolveMark(null!=r?r:a);return o?this._glyphSpec(o,n,s):this._baseSpec(c(l({},t),{shape:"square"===s.fallback?"square":"circle"}),n)}_drawDot(t,e,i,n,s,r,a){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,c=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[s]||"none",h="number"==typeof o.config.fill.opacity?o.config.fill.opacity:1;let d;if(2===a.pk)d=o.dom.Paper.path(a.d),d.node.setAttribute("fill",n),"evenodd"===a.fillRule&&d.node.setAttribute("fill-rule","evenodd"),h<1&&d.node.setAttribute("fill-opacity",String(h)),d.node.setAttribute("data:r",String(a.r));else if(1===a.pk&&"image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,i=e.image.height||20;d=o.dom.Paper.image(e.image.src),d.node.setAttribute("width",String(t)),d.node.setAttribute("height",String(i)),d.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&d.node.setAttribute("filter",`url(#${this._tintFilter(n)})`)}else if(1===a.pk){const s=2*i;d=t.drawRect(0,0,s,s,e.borderRadius||0,n,1,l,c),d.node.setAttribute("fill",n),h<1&&d.node.setAttribute("fill-opacity",String(h))}else d=t.drawCircle(i,{fill:n,"stroke-width":l,stroke:c}),d.node.setAttribute("fill",n),h<1&&d.node.setAttribute("fill-opacity",String(h));return s>=0&&(d.node.classList.add("apexcharts-unit-area"),d.node.setAttribute("i",String(s)),d.node.setAttribute("j",String(r))),d}_tintFilter(t){const e=this.w,i="http://www.w3.org/2000/svg",n=this._tints||(this._tints=new Map);let s=n.get(t);if(s)return s;s=`apexcharts-unit-tint-${e.globals.chartID}-${n.size}`,n.set(t,s);const r=e.dom.Paper.node;let a=r.querySelector("defs");a||(a=M.createElementNS(i,"defs"),r.insertBefore(a,r.firstChild));const o=M.createElementNS(i,"filter");o.setAttribute("id",s),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=M.createElementNS(i,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=M.createElementNS(i,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),a.appendChild(o),s}_placeDot(t,e,i,n,s){this._place(t,s||this._baseSpec(e),i,n)}_shouldAnimate(t){var e;const i=this.w,n=i.config.chart.animations;return!!k.isBrowser()&&(!(!n||!1===n.enabled)&&((!t||!1!==(null==(e=n.dynamicAnimation)?void 0:e.enabled))&&(!1!==i.globals.shouldAnimate&&(!(i.globals.resized&&!i.globals.dataChanged)&&(!n.respectReducedMotion||!A())))))}_speed(t){var e;const i=this.w.config.chart.animations;return Math.max(1,(t?null==(e=i.dynamicAnimation)?void 0:e.speed:i.speed)||800)}_seedSprings(t,e,i){const[n,s]=Gt(e.spring,i),r=this.ctx?this.ctx._unitSprings:null,a=new Map;for(let e=0;e<t.length;e++){const i=t[e],o=r&&!i.isEnter&&null!=i.key?r.get(i.key):null,l=o?o.x:yt(i.cx0,n,s),c=o?o.y:yt(i.cy0,n,s);o&&(l.stiffness=n,c.stiffness=n,l.damping=s,c.damping=s,i.cx0=l.value,i.cy0=c.value,this._place(i.node,i.spec,i.cx0,i.cy0),0===l.velocity&&0===c.velocity||(i.delay=0)),i.sx=l,i.sy=c,null!=i.key&&a.set(i.key,{x:l,y:c})}this.ctx&&(this.ctx._unitSprings=a)}_stale(t){const e=this.w.dom.Paper;return!!this.w.globals.isDestroyed||!e||!e.node.contains(t)}_runGather(t,e){const i=this.w,n=i.config.plotOptions.unit,s=Math.min(.6*e,450),r=t.length;for(let e=r;e--;)t[e].delay=t[e].pair?t[e+1].delay:r>1?e/(r-1)*s:0;const a=n.gather||{},o=a.motion||"auto";"spring"===o||"auto"===o&&(!a.easing||"outCubic"===a.easing)?this._seedSprings(t,a,e):this.ctx&&(this.ctx._unitSprings=null);for(let e=0;e<r;e++){const i=t[e];i.r0!==i.r1&&(this._size(i.node,i.spec,i.r0/i.r1),this._place(i.node,i.spec,i.cx0,i.cy0,i.r0/i.r1))}const l=new Map,c=i.dom.elWrap;for(let e=0;e<r;e++){const i=t[e];i.fill0&&i.fill1&&i.fill0!==i.fill1&&(i._c0=Wt(i.fill0,l,c),i._c1=Wt(i.fill1,l,c))}const h=L("easeOutCubic"),d="outBack"===a.easing?(u="number"==typeof a.overshoot?a.overshoot:1.70158,t=>1+(u+1)*Math.pow(t-1,3)+u*Math.pow(t-1,2)):"inOutCubic"===a.easing?L("easeInOutCubic"):h;var u;const p=performance.now();let f=p;const g=i=>{if(this._stale(t[0].node))return void(this.w.globals.unitGatherRAF=null);const n=Math.min(.25,Math.max(0,(i-f)/1e3));f=i;let s=!0;for(let a=0;a<r;a++){const r=t[a],o=i-p-r.delay,l=Math.max(0,Math.min(1,o/e)),c=h(l);let u,f;if(r.sx&&r.sy){o>=0&&!r.released&&(_t(r.sx,r.x),_t(r.sy,r.y),r.released=!0);const t=xt(r.sx,n),e=xt(r.sy,n);r.released&&t&&e||(s=!1),u=r.sx.value,f=r.sy.value}else{const t=d(l);u=r.cx0+(r.x-r.cx0)*t,f=r.cy0+(r.y-r.cy0)*t}let g=1;r.r0!==r.r1&&(g=(r.r0+(r.r1-r.r0)*c)/r.r1,this._size(r.node,r.spec,g)),this._place(r.node,r.spec,u,f,g),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*l))),r._c0&&r._c1&&r.node.setAttribute("fill",Bt(r._c0,r._c1,c)),l<1&&(s=!1)}if(s){for(let e=0;e<r;e++){const i=t[e];i.node.style.opacity="",i._c1&&i.fill1&&i.node.setAttribute("fill",i.fill1),i.r0!==i.r1&&(this._size(i.node,i.spec,1),this._place(i.node,i.spec,i.x,i.y))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=M.requestAnimationFrame(g)};this.w.globals.unitGatherRAF=M.requestAnimationFrame(g)}_collectExits(t,e,i){const n=Math.max(0,i.maxUnits||5e3),s=[];for(const[i,r]of t)if(!e.has(i)&&"l"!==i[0]&&(s.push(r),s.length>=n))break;return s}_runExits(t,e,i,n){const s=this.w,r=new b(s,this.ctx),a=this._lastDotR,o=s.layout.gridWidth/2,l=s.layout.gridHeight/2,c="grid"===i.layout||"scatter"===i.layout||"arc"===i.layout||"custom"===i.layout?0:.35,h=[];e.forEach(e=>{const n=null!=e.r?e.r:a,s=e.spec||this._baseSpec(i,n),o=this._drawDot(r,i,n,e.fill,-1,0,s);o.node.classList.add("apexcharts-unit-exit"),this._place(o.node,s,e.x,e.y),t.add(o),h.push({node:o.node,x0:e.x,y0:e.y,spec:s})});const d=performance.now(),u=L("easeOutCubic"),p=e=>{if(this._stale(t.node))return void(this.w.globals.unitExitRAF=null);const i=Math.max(0,Math.min(1,(e-d)/n)),s=u(i);for(let t=0;t<h.length;t++){const e=h[t];if(c){const t=e.x0+(o-e.x0)*s*c,i=e.y0+(l-e.y0)*s*c;this._place(e.node,e.spec,t,i)}e.node.style.opacity=String(1-s)}i<1?this.w.globals.unitExitRAF=M.requestAnimationFrame(p):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=M.requestAnimationFrame(p)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,i,n){const s=this.w,r=s.seriesData.seriesNames[t]||`series-${t+1}`,a=i>0?e/i*100:0,o=n.clusterLabels,l="function"==typeof o.formatter?o.formatter(r,{seriesIndex:t,value:e,percent:a,w:s}):`${r}\n${a.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const i=this.w,n=e.clusterLabels,s=n.external.connector||{},r=t.reduce((t,e)=>t+e,0),a=[];if(t.forEach((t,i)=>{t>0&&a.push(...this._outerLabelLines(i,t,r,e))}),!a.length)return 0;const o=jt(i,a,{fontSize:n.fontSize,fontFamily:n.fontFamily||i.config.chart.fontFamily,fontWeight:n.fontWeight})+(null!=s.gap?s.gap:8)+(null!=s.length?s.length:22)+8+Math.abs(parseFloat(n.external.offsetX)||0);return Math.min(o,.25*i.layout.gridWidth)}_drawOuterLabels(t,e,i,n,s,r){const a=this.w;if(!k.isBrowser())return;const o=s.clusterLabels,l=o.external,c=l.connector||{},h=null!=c.gap?c.gap:8,d=null!=c.length?c.length:22,u=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,f=a.layout.gridWidth,g=a.layout.gridHeight,m=this._lastDotR,y=e.filter(t=>t.dots.length>0);if(!y.length)return;let x=0,_=0;if(y.length>1){const t=y.map(t=>t.cx),e=y.map(t=>t.cy);x=Math.max(...t)-Math.min(...t),_=Math.max(...e)-Math.min(...e)}const v=x>_,w=parseFloat(o.fontSize)||13,A=Math.round(1.35*w),M=[];if(y.slice().sort((t,e)=>t.cy-e.cy).forEach((t,e)=>{const r=this._outerLabelLines(t.i,i[t.i],n,s);if(!r.some(t=>""!==t))return;const a=v?t.cx>=f/2?"right":"left":e%2==0?"right":"left",o="right"===a?1:-1;let l=t.dots[0],c=-1/0;t.dots.forEach(e=>{const i=o*e.x-.75*Math.abs(e.y-t.cy);i>c&&(c=i,l=e)});const g={x:l.x+o*(l.r||m),y:l.y},y={x:g.x+o*h,y:g.y};M.push({i:t.i,lines:r,anchor:g,elbow:y,labelX:y.x+o*d+u,idealY:g.y+p,labelY:g.y+p,side:a})}),!M.length)return;const L=M.reduce((t,e)=>Math.max(t,e.lines.length),1)*A,S=L/2;["left","right"].forEach(t=>{!function(t,e,i,n){const s=t.slice().sort((t,e)=>t.idealY-e.idealY);s.forEach(t=>{t.labelY=t.idealY});for(let t=1;t<s.length;t++)s[t].labelY-s[t-1].labelY<e&&(s[t].labelY=s[t-1].labelY+e);const r=s[s.length-1],a=r?r.labelY-i:0;if(a>0)for(let t=s.length-1;t>=0;t--)s[t].labelY-=a,t<s.length-1&&s[t+1].labelY-s[t].labelY<e&&(s[t].labelY=s[t+1].labelY-e);if(null!=n&&s.length&&s[0].labelY<n){const t=n-s[0].labelY;for(let e=0;e<s.length;e++)s[e].labelY+=t}}(M.filter(e=>e.side===t),L+2,g-S,S)});const C=new b(a,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,a.config.chart.animations.speed||800);C.node.classList.add("apexcharts-unit-label-delay"),C.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}M.forEach(t=>{const e=a.globals.colors[t.i]||a.globals.colors[0]||"#008FFB";C.add(function(t,e){const{lines:i,lineHeight:n,anchor:s,elbow:r,labelX:a,labelY:o,side:l,connector:c,style:h,foreColor:d}=e,u=new b(t),p=u.group({class:e.groupClass||"apexcharts-outer-label-group"});if(c.show){const t=`M ${s.x} ${s.y} L ${r.x} ${r.y} L ${a} ${o}`,i=u.drawPath({d:t,stroke:c.color,strokeWidth:c.width,fill:"none",strokeLinecap:"round"});i.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(i)}const f="right"===l?a+4:a-4,g=i.length,m=o-(g-1)*n/2,y=u.drawText({x:f,y:m,text:1===g?i[0]:i,textAnchor:"right"===l?"start":"end",fontSize:h.fontSize,fontFamily:h.fontFamily,fontWeight:h.fontWeight,foreColor:d,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(g>1){const t=y.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${f}`),t[e].setAttribute("dy",0===e?"0":`${n}`)}return p.add(y),p}(a,{lines:t.lines,lineHeight:A,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==c.show,width:null!=c.width?c.width:1.5,color:c.color||e},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||a.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||a.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(C)}_drawClusterLabel(t,e,i,n,s,r){const a=this.w;if(!k.isBrowser())return;const o="http://www.w3.org/2000/svg",l=a.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=n>0?i/n*100:0,h=s.clusterLabels,d=parseFloat(h.fontSize)||13;let u;u="function"==typeof h.formatter?h.formatter(l,{seriesIndex:e.i,value:i,percent:c,w:a}):`${l} (${c.toFixed(1)}%)`;const p="string"==typeof u?u:String(u),f=M.createElementNS(o,"text");f.setAttribute("class","apexcharts-unit-label"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size",`${d}px`),f.setAttribute("font-family",h.fontFamily||a.config.chart.fontFamily||"inherit"),f.setAttribute("font-weight",String(h.fontWeight||600)),f.setAttribute("fill",h.color||r);const g="bottom"===h.position,m=e.outerR+.6*d+3+(h.offsetY||0),y=p.length*d*.55;if(!g&&!e.flat&&!1!==h.curved&&y<=Math.PI*m*.95){const i=e.cy,n=`M ${e.cx-m} ${i} A ${m} ${m} 0 0 1 ${e.cx+m} ${i}`,s=`apexcharts-unit-label-${a.globals.chartID}-${e.i}`,r=M.createElementNS(o,"path");r.setAttribute("id",s),r.setAttribute("d",n),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=M.createElementNS(o,"textPath");l.setAttribute("href",`#${s}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${s}`),l.setAttribute("startOffset","50%"),l.textContent=p,f.appendChild(l),t.node.appendChild(r)}else{f.setAttribute("x",String(e.cx));const t=g?e.cy+e.outerR+d+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);f.setAttribute("y",String(t)),f.textContent=p}return t.node.appendChild(f),f}}});const Ut=Math.PI/180,Kt=180/Math.PI;function Vt(t,e,i,n){return{x:t+i*Math.cos((n-90)*Ut),y:e+i*Math.sin((n-90)*Ut)}}const Zt=t=>`${t.x} ${t.y}`;function Jt(t,e){const i=t.config.drilldown;return(i&&Array.isArray(i.series)?i.series:[]).find(t=>t&&t.id===e)}function Qt(t,e){var i;const n=String(t).replace(/\//g,"%2F"),s=(null!=(i=e.get(n))?i:-1)+1;return e.set(n,s),`${s}:${n}`}function te(t,e,i,n,s,r=null,a={},o=new Map){var l,c,h;const d=e&&"object"==typeof e,u=d&&null!=(c=null!=(l=e.x)?l:e.name)?c:"",p=d?null!=(h=e.y)?h:e.value:e,f=null==p||""===p?NaN:Number(p),g={name:String(u),value:isNaN(f)?null:f,color:d&&e.color?e.color:void 0,_key:`${s}/${Qt(u,o)}`};n&&!g.color&&(g.color=n[i%n.length]),a.keepDatum&&(g._datum=e);const m=new Map;if(d&&Array.isArray(e.children)&&e.children.length)g.children=e.children.map((e,i)=>te(t,e,i,null,g._key,r,a,m));else if(d&&null!=e.drilldown&&!1!==a.expandDrilldown){const i=r||new Set;if(!i.has(e.drilldown)){const n=Jt(t,e.drilldown);if(n&&Array.isArray(n.data)&&n.data.length){const s=new Set(i);s.add(e.drilldown);const r=Array.isArray(n.colors)?n.colors:null;g.children=n.data.map((e,i)=>te(t,e,i,r,g._key,s,a,m))}}}return g}function ee(t,e={}){const i=t.config.series,n=i&&i[0],s=n&&Array.isArray(n.data)?n.data:i;if(!Array.isArray(s))return[];const r=new Map;return s.map((i,n)=>te(t,i,n,null,"",null,e,r))}function ie(t){t.children&&t.children.length&&(t.children.forEach(t=>ie(t)),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function ne(t){if("string"!=typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}const se="http://www.w3.org/1999/xhtml";function re(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return Object.assign({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i,e)}function ae(t,e){const i=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!i.length)return;const n=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<i.length+1;t++){const t=e.getBoundingClientRect(),s=i.find(e=>{const i=e.getBoundingClientRect();return t.left<i.right&&t.right>i.left&&t.top<i.bottom&&t.bottom>i.top});if(!s)break;e.style.top=s.getBoundingClientRect().bottom-n+4+"px"}}function oe(t,e,i,n){var s;const r=null==(s=null==e?void 0:e.dimensions)?void 0:s.dimHelpers,a=r?r.getTitleSubtitleCoords("title").height+r.getTitleSubtitleCoords("subtitle").height:0,o=i.getBoundingClientRect().height||18,l=n&&n.offsetY||0,c=function(t,e){const i=t.layout.translateY||0,n=t.dom.elWrap;if(!n)return i;const s=t.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!s.length)return i;const r=n.getBoundingClientRect().top,a=e.getBoundingClientRect();let o=i;for(let t=0;t<s.length;t++){const e=s[t].getBoundingClientRect();e.height&&(e.left>=a.right||e.right<=a.left||(o=Math.min(o,e.top-r)))}return o}(t,i);if(c-a>=o+1)return i.style.top=`${c-o-1+l}px`,!0;i.style.top=`${a+l}px`;const h="dark"===t.config.theme.mode;return i.style.background=h?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",i.style.borderRadius="4px",!1}function le(t){const e=t.dom.elWrap;if(!e)return;const i=e.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i)}function ce(t,e){if(!k.isBrowser())return null;const i=t.dom.elWrap;if(!i)return null;le(t);const n=e.config||re(t);if(!1===n.show)return null;const s=e.crumbs||[];if(s.length<2)return null;const r=M.createElementNS(se,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label",e.ariaLabel||"Breadcrumb"),de(r,n),e.compact&&(r.style.fontSize="11px",r.style.padding="0 2px");const a=null!=n.separator?n.separator:" / ";return s.forEach((t,i)=>{var o;if(i>0){const t=M.createElementNS(se,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=a,r.appendChild(t)}let l=0===i?null!=(o=n.rootLabel)?o:"All":t.label;if("function"==typeof n.formatter&&(l=n.formatter(l,{index:i,depth:s.length-1,data:t.data})),i===s.length-1){const t=M.createElementNS(se,"span");return t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=String(l),void r.appendChild(t)}const c=M.createElementNS(se,"button");if(c.setAttribute("type","button"),c.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const t=M.createElementNS(se,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.setAttribute("aria-hidden","true"),t.textContent="\u2190",c.appendChild(t)}const h=M.createElementNS(se,"span");h.setAttribute("class","apexcharts-breadcrumb-label"),h.textContent=String(l),c.appendChild(h),c.addEventListener("click",n=>e.onNavigate(i,t,n)),r.appendChild(c)}),i.appendChild(r),r}function he(t,e){var i,n,s;if(e.detail)return;const r=(null==(i=t.dom.elWrap)?void 0:i.querySelector(".apexcharts-breadcrumb-item"))||(null==(n=t.dom.Paper)?void 0:n.node);null==(s=null==r?void 0:r.focus)||s.call(r)}function de(t,e){const i=e.offsetX||0,n=e.offsetY||0;t.style.position="absolute",t.style.top=n+"px","top-right"===e.position?t.style.right=3-i+"px":t.style.left=i+"px"}function ue(t,e,i,n,s,r){if(t._show=!0,t._vDepth=e,t._t0=i,t._t1=n,t._parent=s,t._leaf=!(t.children&&t.children.length),t._clipped=!t._leaf&&null!=r.cap&&e>=r.cap,e>r.maxDepth&&(r.maxDepth=e),t._leaf||t._clipped)return;const a=t.children.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let o=i;for(let s=0;s<t.children.length;s++){const l=t.children[s],c=(n-i)*Math.max(0,l.value)/a;ue(l,e+1,o,o+c,t,r),o+=c}}function pe({roots:t,nodesAll:e,focus:i,t0:n,t1:s,cap:r}){for(let t=0;t<e.length;t++)e[t]._show=!1;const a={maxDepth:0,cap:r};if(i)return ue(i,0,n,s,i._parent,a),a.maxDepth;const o=t.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let l=n;for(let e=0;e<t.length;e++){const i=(s-n)*Math.max(0,t[e].value)/o;ue(t[e],0,l,l+i,null,a),l+=i}return a.maxDepth}function fe({maxDepth:t,near:e,far:i,gap:n=0}){const s=t+1,r=(i-e)/s,a=s>1?n:0;return{near:t=>e+t*r+(t>0?a/2:0),far:t=>e+(t+1)*r-a/2}}function ge(t,e,i,n,s){return t._leaf&&"extend"===n&&t._vDepth<i?s:e.far(t._vDepth)}const me=new Set;function ye(t,{type:e,remedy:i}){let n="";const s=t=>{var r;if(n||!(null==(r=t.children)?void 0:r.length))return;const a=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0),o=t.value;null!=o&&Math.abs(a-o)>1e-6*Math.max(Math.abs(o),a)&&(n=`ApexCharts ${e}: partition 'strict' but "${t.name}" (${o}) != sum of its children (${a}). ${i}`),t.children.forEach(s)};t.forEach(s),n&&!me.has(n)&&(me.size>99&&me.clear(),me.add(n),console.warn(n))}function xe(t){const e=[];let i=t;for(;i;)e.unshift(i),i=i._parent;return e}function _e(t,e){const i=1===t.length?t[0]:null,n=xe(e).map(t=>({label:t.name,data:t,focus:t===i?null:t}));return i?n:[{data:null,focus:null}].concat(n)}function be(t,e,i){let n=t===e?t._parent||null:t;return!n||n.children&&n.children.length||(n=n._parent||null),i&&1===i.length&&n===i[0]&&(n=null),n===e?{changed:!1,focus:e}:{changed:!0,focus:n}}function ve(t,e,i){var n;if(!t)return null;e.forEach(t=>{var e;return null==(e=t.children)?void 0:e.forEach(e=>e._parent=t)});const s=e.find(e=>e._key===t);return s&&(null==(n=s.children)?void 0:n.length)&&(1!==i.length||s!==i[0])?s:null}function we(t,e){k.isBrowser()&&!1!==t.cfg.zoomOnClick&&(e._el.node.style.cursor=be(e,t._focus,t._roots).changed?"pointer":"default")}function Ae(t,e,i=0){if("number"==typeof t)return t;const n=String(t).trim();if(n.endsWith("%"))return parseFloat(n)/100*e;const s=parseFloat(n);return isNaN(s)?i*e:s}function Me(t,e){if("string"!=typeof t||"#"!==t[0])return t;let i=t.slice(1);if(3===i.length&&(i=i.split("").map(t=>t+t).join("")),6!==i.length)return t;const n=parseInt(i,16);if(isNaN(n))return t;e=e>0?Math.min(e,1):0;let s=n>>16&255,r=n>>8&255,a=255&n;return s=Math.round(s+(255-s)*e),r=Math.round(r+(255-r)*e),a=Math.round(a+(255-a)*e),"#"+((1<<24)+(s<<16)+(r<<8)+a).toString(16).slice(1)}function ke(t,e,i,n){if(t._color=t.color||e,n.push(t),t.children)for(let e=0;e<t.children.length;e++){const s=t.children[e];ke(s,s.color||Me(t._color,i),i,n)}}class Le{constructor(t,e){this.w=t,this.ctx=e,this.total=1,this._el=null}_tip(){return this._el||(this._el=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._el}attach(t,e){this.w.config.tooltip.enabled&&k.isBrowser()&&(t.addEventListener("mouseenter",t=>this.show(t,e)),t.addEventListener("mousemove",t=>this.position(t)),t.addEventListener("mouseleave",()=>this.hide()))}show(t,e){var i;const n=this._tip();if(!n)return;const s=this.w,r=(e.value/this.total*100).toFixed(1),a=e._parent?e._parent.value:this.total,o=a>0?(e.value/a*100).toFixed(1):r;let l=s.config.tooltip.custom;Array.isArray(l)&&(l=l[0]);const c="function"==typeof l&&l({series:s.seriesData.series,seriesIndex:0,dataPointIndex:-1,w:s,ctx:this.ctx,node:e,percentOfParent:+o,percentOfTotal:+r});if(null==c?void 0:c.nodeName)n.replaceChildren(c.cloneNode(!0));else if("string"==typeof c||"number"==typeof c)n.innerHTML=c;else{const t=s.config.tooltip.y,a=null==(i=Array.isArray(t)?t[0]:t)?void 0:i.formatter,l=a?a(e.value,{seriesIndex:0,dataPointIndex:-1,w:s,node:e}):+e.value.toPrecision(12);n.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex"><span class="apexcharts-tooltip-marker"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${h=e.name,String(h).replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`)}: </span><span class="apexcharts-tooltip-text-y-value">${l} (${o}% of parent, ${r}% of total)</span></div></div></div>`;const c=n.firstChild;c.firstChild.style.backgroundColor=e._color,s.config.tooltip.fillSeriesColor&&(c.style.backgroundColor=e._color)}var h;n.classList.add("apexcharts-active"),n.style.opacity="1",this.position(t)}position(t){const e=this._tip();if(!e)return;const i=this.w.dom.elWrap.getBoundingClientRect(),n=e.offsetWidth,s=e.offsetHeight;let r=t.clientX-i.left+12;r+n>i.width&&(r=t.clientX-i.left-n-12),r=Math.max(0,Math.min(r,i.width-n));let a=t.clientY-i.top+12;a+s>i.height&&(a=t.clientY-i.top-s-12),a=Math.max(0,Math.min(a,i.height-s)),e.style.left=r+"px",e.style.top=a+"px"}hide(){const t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}}const Se=.58,Ce=(t,e,i)=>t+(e-t)*i;function Ee(t){const e=t.config.chart.animations;return e.enabled?t.globals.dataChanged?e.dynamicAnimation.enabled&&!1!==t.globals.shouldAnimate?"update":"none":t.globals.resized?"none":"intro":"none"}function Fe(t,e){var i,n;const s=t.config.chart.animations;if(!s.enabled||"none"===e)return 0;if("intro"===e)return null!=(i=s.speed)?i:500;const r=s.dynamicAnimation;return r.enabled?null!=(n=r.speed)?n:350:0}function Pe(t,e,i){t.attr({opacity:e>0?0:1}),e>0&&t.animate(250,e).during(e=>{i()&&t.attr({opacity:e})})}function De(t,e,i,n){const s=new Map;i.forEach(t=>{const e=n(t);e&&s.set(t._key,e)}),t[e]=s}const Re=Math.PI/180,Te=180/Math.PI,Ne="http://www.w3.org/2000/svg";m.default.use({sunburst:class{constructor(t,e){this.ctx=e,this.w=t;const i=t.config;this.cfg=i.plotOptions.sunburst,this.strokeWidth=i.stroke.show?i.stroke.width:0,this.strokeColor=Array.isArray(i.stroke.colors)?i.stroke.colors[0]:i.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltip=new Le(t,this.ctx),this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,i=new b(this.w);this._graphics=i;const n=i.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return n;const s=e.layout.gridWidth,r=e.layout.gridHeight;if(this.centerX=s/2+(this.cfg.offsetX||0),this.centerY=r/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(s,r)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5)return n;if(this._roots=ee(e),!this._roots.length)return n;this._roots.forEach(ie),this._validateStrict(),this._nodesAll=[];const a=e.globals.colors||[];return this._roots.forEach((t,e)=>{ke(t,t.color||a[e%a.length]||"#008FFB",this.cfg.tint,this._nodesAll)}),this.total=this._roots.reduce((t,e)=>t+Math.max(0,e.value),0)||1,this._tooltip.total=this.total,this._ringsG=i.group({class:"apexcharts-sunburst-rings"}),this._labelsG=i.group({class:"apexcharts-sunburst-labels"}),n.add(this._ringsG),n.add(this._labelsG),this._focus=ve(e.globals.sunburstFocusKey,this._nodesAll,this._roots),this._relayout(this._focus),this._applyLayout(Ee(e)),this._renderBreadcrumb(),n}_validateStrict(){"strict"===this.cfg.partition&&ye(this._roots,{type:"sunburst",remedy:"Angles are normalized to fill the wedge."})}_relayout(t){this.w.globals.sunburstFocusKey=t&&t._key,this._focusMaxDepth=pe({roots:this._roots,nodesAll:this._nodesAll,focus:t,t0:this.startAngle,t1:this.endAngle});const e=Ae(this.cfg.innerSize,this.maxRadius,.15),i=fe({maxDepth:this._focusMaxDepth,near:e,far:this.maxRadius,gap:1});this._innerR=i.near,this._outerR=i.far,this._nodesAll.forEach(t=>{t._show&&(t._iR=i.near(t._vDepth),t._oR=ge(t,i,this._focusMaxDepth,this.cfg.leaf,this.maxRadius))})}_applyLayout(t){var e;const i=this.w,n=Fe(i,t),s=++this._zoomGen,r=null==(e=this.ctx)?void 0:e.morphTypeChange,a="zoom"!==t&&!!r&&"function"==typeof r.isActive&&r.isActive()&&"function"==typeof r.getInitialPathAt,o=a?r.getSpeed():0;this._morphLeafIndex=0;const l="update"===t?this.ctx._sunburstPrevGeoms:null,c=t=>t._cur||{a0:t._t0,a1:t._t1,iR:t._iR,oR:t._oR},h=t=>{const e=(t.a0+t.a1)/2;return{a0:e,a1:e,iR:t.iR,oR:t.iR}};if(this._nodesAll.forEach(e=>{if(e._show){const i={a0:e._t0,a1:e._t1,iR:e._iR,oR:e._oR};e._el||(e._el=this._createArcEl(e)),we(this,e);const r=a?this._morphSourceFor(e):null,d=l&&l.get(e._key);if(d&&this._midMorph(d)&&this._adopt(e,d),r&&o>0)this._morphArcFrom(e,r,i,o,s);else if(this._midMorph(e))this._continueMorph(e,i,n,s);else if(("intro"===t||a)&&n>0)this._sweepArc(e,i,a?o:n,s);else{const t=e._cur||(d?c(d):h(i));this._animateArc(e,t,i,n,!1,!e._cur&&!d,s)}}else e._el&&this._midMorph(e)?this._continueMorph(e,null,n,s):e._el&&e._cur&&this._animateArc(e,e._cur,h(e._cur),n,!0,!1,s)}),l&&n&&!a){const t=new Set(this._nodesAll.map(t=>t._show&&t._key));l.forEach((e,i)=>{if(t.has(i)||!e._show&&!e._cur)return;const r=this._graphics.drawPath({fill:e._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,classes:"apexcharts-sunburst-arc"});r.node.setAttribute("data:name",e.name),this._ringsG.add(r.attr({opacity:e._el.attr("opacity")}));const a=c(e),o={_el:r,_color:e._color,name:e.name,_key:i,_cur:a};this._nodesAll.push(o),this._midMorph(e)?(this._adopt(o,e),this._continueMorph(o,null,n,s)):this._animateArc(o,a,h(a),n,!0,!1,s)})}const d=Math.max(n,o);d?this._ringsG.animate(d).after(()=>{this._zoomGen===s&&this._ringsG.node.isConnected&&new w(i,this.ctx).animationCompleted(this._ringsG.node)}):i.globals.animationEnded=!0,De(this.ctx,"_sunburstPrevGeoms",this._nodesAll,t=>t._show||t._cur?t:null),this._renderLabels(n)}_morphSourceFor(t){const e=this.ctx,i=e&&e.morphTypeChange;return i?"function"==typeof i.hasKeyedMarks&&i.hasKeyedMarks()&&"function"==typeof i.getInitialPathForKey?i.getInitialPathForKey(ne(t._key)):t.children&&t.children.length?null:i.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,i,n,s){const r=t._el,a=this._arcPath(i.iR,i.oR,i.a0,i.a1,this.cfg.borderRadius);r.node.style.display="",r.attr({d:e,opacity:1}),t._cur=i,t._pathEnd=this.w.globals.shouldAnimate?performance.now()+n:0,new w(this.w,this.ctx).morphSVG(this._gated(r,s),0,null,t._color,e,a,n,0)}_gated(t,e){const i=Object.create(t);return i.attr=(...n)=>this._zoomGen===e||1===n.length&&"string"==typeof n[0]?t.attr(...n):i,i}_midMorph(t){return t._pathEnd>0&&t._pathEnd>performance.now()}_adopt(t,e){t._el.attr({d:e._el.attr("d"),opacity:e._el.attr("opacity")}),t._pathEnd=e._pathEnd}_continueMorph(t,e,i,n){const s=t._el,r=e&&this._arcPath(e.iR,e.oR,e.a0,e.a1,this.cfg.borderRadius);e&&(t._cur=e),t._pathEnd=i?performance.now()+i:0;const a=()=>{e||(s.node.style.display="none",t._cur=null)};if(!i)return e&&s.attr({d:r,opacity:1}),void a();s.node.style.display="";const o=this._gated(s,n).animate(i);e&&o.plot(r,"polygons"),o.attr({opacity:e?1:0}).after(()=>{this._zoomGen===n&&a()})}_sweepArc(t,e,i,n){const s=t._el,r=this.cfg.borderRadius,a=this.startAngle,o=this.endAngle;s.node.style.display="",s.attr({d:"",opacity:1}),s.animate(i).during(i=>{if(this._zoomGen!==n)return;const l=a+(o-a)*i;if(l<=e.a0+.01)return void s.attr({d:""});const c=Math.min(e.a1,l);s.attr({d:this._arcPath(e.iR,e.oR,e.a0,c,r)}),t._cur={a0:e.a0,a1:c,iR:e.iR,oR:e.oR}}).after(()=>{this._zoomGen===n&&(t._cur=e)})}_createArcEl(t){const e=this._graphics.drawPath({fill:t._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,classes:"apexcharts-sunburst-arc"}),i=e.node;return i.setAttribute("data:name",t.name),i.setAttribute("data:value",String(t.value)),i.setAttribute("data:key",ne(t._key)),i.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._tooltip.attach(i,t),k.isBrowser()&&!1!==this.cfg.zoomOnClick&&i.addEventListener("click",()=>this._zoomTo(t)),this._ringsG.add(e),e}_animateArc(t,e,i,n,s,r,a){const o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),0===n)return o.attr({d:this._arcPath(i.iR,i.oR,i.a0,i.a1,l),opacity:s?0:1}),o.node.style.display=s?"none":"",void(t._cur=s?null:i);o.node.style.display="";const c=s?Number(o.attr("opacity"))||1:r?0:1,h=s?0:1;o.attr({opacity:c}),o.animate(n).during(n=>{if(this._zoomGen!==a)return;const s=Ce(e.a0,i.a0,n),r=Ce(e.a1,i.a1,n),d=Ce(e.iR,i.iR,n),u=Ce(e.oR,i.oR,n);o.attr({d:this._arcPath(d,u,s,r,l),opacity:Ce(c,h,n)}),t._cur={a0:s,a1:r,iR:d,oR:u}}).after(()=>{this._zoomGen===a&&(s?(o.node.style.display="none",t._cur=null):t._cur=i)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);if(!this.cfg.dataLabels.show||!1===this.w.config.dataLabels.enabled)return;this._nodesAll.forEach(t=>{t._show&&(t._t1-t._t0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(t))});const i=this._zoomGen;Pe(e,t,()=>this._zoomGen===i)}_renderCurvedLabel(t){const e=this.cfg.dataLabels.style,i=this.w,n=(t._iR+t._oR)/2,s=((t._t0+t._t1)/2%360+360)%360,r=s>90&&s<270,a=Math.min(n>0?4/n*Te:0,(t._t1-t._t0)/2),o=r?t._t1-a:t._t0+a,l=r?t._t0+a:t._t1-a,c=this._ptAt(n,o),h=this._ptAt(n,l),d=Math.abs(l-o)>180?1:0,u=r?0:1,p=`apx-sb-lbl-${i.globals.cuid}-${this._lblSeq++}`,f=M.createElementNS(Ne,"path");f.setAttribute("id",p),f.setAttribute("d",`M ${c.x} ${c.y} A ${n} ${n} 0 ${d} ${u} ${h.x} ${h.y}`),f.setAttribute("fill","none"),f.setAttribute("stroke","none");const g=e.colors,m=(Array.isArray(g)?g[0]:g)||"#fff",y=M.createElementNS(Ne,"text");y.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&y.setAttribute("font-family",e.fontFamily),y.setAttribute("font-weight",String(e.fontWeight||400)),y.setAttribute("fill",m),y.setAttribute("dominant-baseline","central"),y.style.pointerEvents="none";const x=M.createElementNS(Ne,"textPath");x.setAttribute("href","#"+p),x.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+p),x.setAttribute("startOffset","50%"),x.setAttribute("text-anchor","middle"),x.textContent=this._truncate(t.name,n,t._t1-t._t0,e.fontSize),y.appendChild(x),this._labelsG.node.appendChild(f),this._labelsG.node.appendChild(y)}_truncate(t,e,i,n){const s=e*i*Re-8,r=(parseFloat(n)||12)*Se,a=Math.floor(s/r);return a>=t.length?t:a<=1?"":t.slice(0,Math.max(1,a-1))+"\u2026"}_zoomTo(t){if(!1===this.cfg.zoomOnClick)return;const e=be(t,this._focus,this._roots);e.changed&&this._focusOn(e.focus)}_focusOn(t){this._focus=t,this._relayout(t),this._applyLayout("zoom"),this._renderBreadcrumb()}_renderBreadcrumb(){if(!k.isBrowser())return;if(!this._focus)return void le(this.w);const t=ce(this.w,{crumbs:_e(this._roots,this._focus),ariaLabel:"Sunburst breadcrumb",onNavigate:(t,e,i)=>{this._focusOn(e.focus),he(this.w,i)}});t&&ae(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*Re),y:this.centerY+t*Math.sin((e-90)*Re)}}_arcPath(t,e,i,n,s){if(e<=t+.01)return"";let r=n-i;const a=this.cfg.spacing;if(a>0&&r>0&&e>0){const t=a/e*Te,s=Math.min(t/2,Math.max(0,r/2-.25));r=(n-=s)-(i+=s)}if(r<=0)return"";const o=r*Re,l=this.centerX,c=this.centerY;let h=s;return h=Math.min(h,o*t/2,o*e/2,(e-t)/2),h>.5?function({cx:t,cy:e,rIn:i,rOut:n,a0:s,a1:r,r:a,spanDeg:o}){const l=(i,n)=>Vt(t,e,i,n),c=a/n*Kt,h=a/i*Kt,d=l(n,s+c),u=l(n,r-c),p=o-2*c>180?1:0,f=l(n,r),g=l(n-a,r),m=l(n,s),y=l(n-a,s),x=l(i,r-h),_=l(i,s+h),b=o-2*h>180?1:0,v=l(i,r),w=l(i+a,r),A=l(i,s),M=l(i+a,s);return["M",Zt(d),"A",n,n,0,p,1,Zt(u),"Q",Zt(f),Zt(g),"L",Zt(w),"Q",Zt(v),Zt(x),"A",i,i,0,b,0,Zt(_),"Q",Zt(A),Zt(M),"L",Zt(y),"Q",Zt(m),Zt(d),"Z"].join(" ")}({cx:l,cy:c,rIn:t,rOut:e,a0:i,a1:n,r:h,spanDeg:r}):function({cx:t,cy:e,rIn:i,rOut:n,a0:s,a1:r,spanDeg:a}){const o=(i,n)=>Vt(t,e,i,n),l=a>180?1:0,c=o(n,s),h=o(n,r),d=o(i,r),u=o(i,s);return["M",Zt(c),"A",n,n,0,l,1,Zt(h),"L",Zt(d),"A",i,i,0,l,0,Zt(u),"Z"].join(" ")}({cx:l,cy:c,rIn:t,rOut:e,a0:i,a1:n,spanDeg:r})}}});const Oe="http://www.w3.org/2000/svg";m.default.use({icicle:class{constructor(t,e){this.ctx=e,this.w=t;const i=t.config;this.cfg=i.plotOptions.icicle,this.strokeWidth=i.stroke.show?i.stroke.width:0,this.strokeColor=Array.isArray(i.stroke.colors)?i.stroke.colors[0]:i.stroke.colors||"#fff",this.width=0,this.height=0,this._vertical=!0,this._flip=!1,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._tooltip=new Le(t,this.ctx),this._graphics=null,this._cellsG=null,this._labelsG=null}draw(t){const e=this.w,i=new b(this.w);this._graphics=i;const n=i.group({class:"apexcharts-icicle"});if(e.globals.noData||!t||!t.length)return n;if(this.width=e.layout.gridWidth,this.height=e.layout.gridHeight,this.width<5||this.height<5)return n;const s=this.cfg.direction;return this._vertical="right"!==s&&"left"!==s,this._flip="up"===s||"left"===s,this._roots=ee(this.w),this._roots.length?(this._roots.forEach(t=>ie(t)),this._nodesAll=[],this._colorNodes(),function(t,e){if("value"!==e&&"name"!==e)return;const i="value"===e?(t,e)=>(e.value||0)-(t.value||0):(t,e)=>String(t.name).localeCompare(String(e.name)),n=t=>{t.sort(i);for(let e=0;e<t.length;e++)t[e].children&&t[e].children.length&&n(t[e].children)};n(t)}(this._roots,this.cfg.sort),"strict"===this.cfg.partition&&ye(this._roots,{type:"icicle",remedy:"Extents are normalized to fill the parent."}),this.total=this._roots.reduce((t,e)=>t+Math.max(0,e.value),0)||1,this._tooltip.total=this.total,this._cellsG=i.group({class:"apexcharts-icicle-cells"}),this._labelsG=i.group({class:"apexcharts-icicle-labels"}),n.add(this._cellsG),n.add(this._labelsG),this._focus=ve(e.globals.icicleFocusKey,this._nodesAll,this._roots),this._relayout(this._focus),this._applyLayout(Ee(e)),this._renderBreadcrumb(),n):n}_colorNodes(){const t=this.w.globals.colors||[],e=t[0]||"#008FFB";let i=this._roots;const n=[];for(;1===i.length&&i[0].children&&i[0].children.length;)n.push(i[0]),i=i[0].children;const s=Me(e,.62);n.forEach(t=>{t._color=t.color||s,this._nodesAll.push(t)}),i.forEach((i,n)=>{ke(i,i.color||t[n%t.length]||e,this.cfg.tint,this._nodesAll)})}_valueExtent(){return this._vertical?this.width:this.height}_depthExtent(){return this._vertical?this.height:this.width}_relayout(t){this.w.globals.icicleFocusKey=t&&t._key;const e=this._valueExtent(),i=this.cfg.maxDepth,n="number"==typeof i&&i>0?i:0;if(t&&"both"!==this.cfg.zoomType){const i=xe(t).length-1;this._focusMaxDepth=pe({roots:this._roots,nodesAll:this._nodesAll,focus:null,t0:0,t1:e,cap:n?n-1+i:void 0}),this._stretchTo(t,e)}else this._focusMaxDepth=pe({roots:this._roots,nodesAll:this._nodesAll,focus:t,t0:0,t1:e,cap:n?n-1:void 0});const s=this._depthExtent(),r=this._focusMaxDepth+1,a="equal"===this.cfg.levelSize?0:Ae(this.cfg.levelSize,s,0),o=a>0?Math.min(s,a*r):s,l=fe({maxDepth:this._focusMaxDepth,near:0,far:o,gap:1});this._nodesAll.forEach(t=>{t._sub=!1,t._show&&(t._d0=l.near(t._vDepth),t._d1=ge(t,l,this._focusMaxDepth,this.cfg.leaf,o),t._t1-t._t0<.5&&(t._show=!1,t._sub=!0))})}_stretchTo(t,e){const i=t._t1-t._t0;if(!(i>0))return;const n=e/i,s=t._t0;this._nodesAll.forEach(t=>{if(!t._show)return;const i=(t._t0-s)*n,r=(t._t1-s)*n;r<=.01||i>=e-.01?t._show=!1:(t._t0=Math.max(0,i),t._t1=Math.min(e,r))})}_box(t){const e=t._t0,i=Math.max(0,t._t1-t._t0),n=t._d0,s=Math.max(0,t._d1-t._d0);return this._vertical?{x:e,y:this._flip?this.height-n-s:n,w:i,h:s}:{x:this._flip?this.width-n-s:n,y:e,w:s,h:i}}_applyLayout(t){const e=Fe(this.w,t),i=++this._zoomGen,n=e>0&&"intro"!==t?this.ctx._iciclePrevGeoms:null;this._nodesAll.forEach(s=>{const r=s._cur||n&&n.get(s._key)&&n.get(s._key)();if(s._show){const n=this._box(s);if(s._el||(s._el=this._createCellEl(s)),s._el.node.setAttribute("data:clipped",String(!!s._clipped)),we(this,s),"intro"===t&&e>0)return void this._wipeCell(s,n,e,i);let a=r,o=!1;a||(a={x:n.x+n.w/2,y:n.y+n.h/2,w:0,h:0},o=!0),this._animateCell(s,a,n,e,!1,o,i)}else if(s._sub&&r&&!r.s)s._el||(s._el=this._createCellEl(s)),this._animateCell(s,r,this._box(s),e,!0,!1,i);else if(s._el&&s._cur){const t=s._cur,n={x:t.x+t.w/2,y:t.y+t.h/2,w:0,h:0};this._animateCell(s,t,n,e,!0,!1,i)}}),De(this.ctx,"_iciclePrevGeoms",this._nodesAll,t=>{if(!t._show&&!t._sub)return null;const e=this._box(t);return t._sub&&(e.s=1),()=>t._cur||e}),this._renderLabels(e)}_createCellEl(t){const e=this._box(t),i=this._graphics.drawRect(e.x,e.y,0,0,this.cfg.borderRadius,t._color,1,this.strokeWidth,this.strokeColor);i.node.setAttribute("class","apexcharts-icicle-cell");const n=i.node;return n.setAttribute("data:name",t.name),n.setAttribute("data:value",String(t.value)),n.setAttribute("data:key",ne(t._key)),n.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._tooltip.attach(n,t),k.isBrowser()&&!1!==this.cfg.zoomOnClick&&n.addEventListener("click",()=>this._zoomTo(t)),this._cellsG.add(i),i}_wipeCell(t,e,i,n){const s=t._el,r=this._focusMaxDepth+1,a=r>1?t._vDepth/r*i*.6:0,o=i-a,l=this._vertical?{x:e.x,y:e.y,w:0,h:e.h}:{x:e.x,y:e.y,w:e.w,h:0};this._setBox(s,l),s.attr({opacity:1}),s.node.style.display="",t._cur=l,s.animate(o,a).during(i=>{if(this._zoomGen!==n)return;const r={x:e.x,y:e.y,w:this._vertical?e.w*i:e.w,h:this._vertical?e.h:e.h*i};this._setBox(s,r),t._cur=r}).after(()=>{this._zoomGen===n&&(this._setBox(s,e),t._cur=e)})}_animateCell(t,e,i,n,s,r,a){const o=t._el;if(o.attr({fill:t._color}),0===n)return this._setBox(o,i),o.attr({opacity:s?0:1}),o.node.style.display=s?"none":"",void(t._cur=s?null:i);o.node.style.display="";const l=s?Number(o.attr("opacity"))||1:r?0:1,c=s&&!t._sub?0:1;o.attr({opacity:l}),o.animate(n).during(n=>{if(this._zoomGen!==a)return;const s={x:Ce(e.x,i.x,n),y:Ce(e.y,i.y,n),w:Ce(e.w,i.w,n),h:Ce(e.h,i.h,n)};this._setBox(o,s),o.attr({opacity:Ce(l,c,n)}),t._cur=s}).after(()=>{this._zoomGen===a&&(s?(o.node.style.display="none",t._cur=null):(this._setBox(o,i),t._cur=i))})}_setBox(t,e){const i=this.cfg.spacing||0,n=Math.min(i,Math.max(0,e.w-.5))/2,s=Math.min(i,Math.max(0,e.h-.5))/2;t.attr({x:e.x+n,y:e.y+s,width:Math.max(0,e.w-2*n),height:Math.max(0,e.h-2*s)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);if(!this.cfg.dataLabels.show||!1===this.w.config.dataLabels.enabled)return;this._nodesAll.forEach(t=>{t._show&&(this._renderLabel(t),t._clipped&&this._renderMoreMark(t))});const i=this._zoomGen;Pe(e,t,()=>this._zoomGen===i)}_renderLabel(t){const e=this.cfg.dataLabels,i=e.style,n=this._box(t),s="always"===e.rotate||"never"!==e.rotate&&n.h>n.w,r=s?n.h:n.w,a=s?n.w:n.h,o=parseFloat(i.fontSize)||12;if(r<e.minSizeToShow)return;if(a<o+2)return;const l=r-8;let c=t.name;if(e.showValue){const e=`${t.name}: ${+t.value.toPrecision(12)}`;this._fits(e,l,o)&&(c=e)}const h=this._truncate(c,l,o);if(!h)return;const d=i.colors,u=(Array.isArray(d)?d[0]:d)||"#fff",p=M.createElementNS(Oe,"text");p.setAttribute("font-size",i.fontSize||"12px"),i.fontFamily&&p.setAttribute("font-family",i.fontFamily),p.setAttribute("font-weight",String(i.fontWeight||400)),p.setAttribute("fill",u),p.setAttribute("dominant-baseline","central"),p.style.pointerEvents="none",p.textContent=h;const f="center"===e.align?"middle":"right"===e.align?"end":"start",g=n.x+4,m=n.x+n.w-4,y=n.x+n.w/2;if(s){const t=n.x+n.w/2,e=n.y+n.h-4,i=n.y+4,s=n.y+n.h/2,r="middle"===f?s:"end"===f?i:e;p.setAttribute("text-anchor",f),p.setAttribute("x",String(t)),p.setAttribute("y",String(r)),p.setAttribute("transform",`rotate(-90 ${t} ${r})`)}else{const t="middle"===f?y:"end"===f?m:g;p.setAttribute("text-anchor",f),p.setAttribute("x",String(t)),p.setAttribute("y",String(n.y+n.h/2))}this._labelsG.node.appendChild(p)}_renderMoreMark(t){const e=this._box(t);if((this._vertical?e.w:e.h)<18)return;const i=this._vertical?e.x+e.w/2:e.y+e.h/2,n=this._vertical?this._flip?e.y+2.5:e.y+e.h-2.5:this._flip?e.x+2.5:e.x+e.w-2.5,s=M.createElementNS(Oe,"g");s.setAttribute("class","apexcharts-icicle-more"),s.style.pointerEvents="none";for(let t=-1;t<=1;t++){const e=M.createElementNS(Oe,"circle");e.setAttribute("cx",String(this._vertical?i+5*t:n)),e.setAttribute("cy",String(this._vertical?n:i+5*t)),e.setAttribute("r","1.1"),e.setAttribute("fill","#fff"),e.setAttribute("fill-opacity","0.85"),s.appendChild(e)}this._labelsG.node.appendChild(s)}_fits(t,e,i){return t.length*i*Se<=e}_truncate(t,e,i){const n=i*Se,s=Math.floor(e/n);return s>=t.length?t:s<4?"":t.slice(0,s-1)+"\u2026"}_zoomTo(t){if(!1===this.cfg.zoomOnClick)return;const e=be(t,this._focus,this._roots);e.changed&&(this._focus=e.focus,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb())}_renderBreadcrumb(){if(!k.isBrowser())return;if(!this._focus)return void le(this.w);const t=re(this.w),e=ce(this.w,{crumbs:_e(this._roots,this._focus),ariaLabel:"Icicle breadcrumb",config:t,compact:!0,onNavigate:(t,e,i)=>{this._focus=e.focus,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb(),he(this.w,i)}});e&&oe(this.w,this.ctx,e,t)}}});const $e="__apexcharts_series_transforms__";function Ie(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[$e][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}function ze(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=dt(i,.25),s=dt(i,.5),r=dt(i,.75),a=r-n;let o=i[0],l=i[i.length-1],c=[];if("tukey"===e.whiskers&&a>0){const t=n-1.5*a,e=r+1.5*a;let s=0;for(;s<i.length&&i[s]<t;)s++;let h=i.length-1;for(;h>=0&&i[h]>e;)h--;s<=h&&(o=i[s],l=i[h],c=i.slice(0,s).concat(i.slice(h+1)))}return{summary:[o,n,s,r,l],outliers:c,iqr:a}}function We(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=i.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(i),e=dt(i,.75)-dt(i,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),a=i[0]-2*s,o=(i[n-1]+2*s-a)/(r-1),l=1/(n*s*Math.sqrt(2*Math.PI)),c=[];for(let t=0;t<r;t++){const e=a+t*o;let r=0;for(let t=0;t<n;t++){const n=(e-i[t])/s;r+=Math.exp(-.5*n*n)}c.push([e,r*l])}return{density:c,bandwidth:s}}function Be(t,e){const i=t.statsDerived||(t.statsDerived={});return i[e]||(i[e]=new Map)}function je(t,e,i,n,s){const r=JSON.stringify(n)+i;let a=t.get(e);return a&&a.s===r||t.set(e,a={s:r,e:s(i,n)}),a.e}function He(t,e,i){const n=(t.get(e)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(i)}globalThis[$e]||(globalThis[$e]={}),Ie("raincloud",function(t,e){var i,n;if(!Array.isArray(t))return t;const s=(null==(i=e.config.plotOptions)?void 0:i.violin)||{},r=s.kde||{},a=(null==(n=s.box)?void 0:n.whiskers)||"minmax",o=Be(e,"raincloudDensity"),h=Be(e,"raincloudSummary");return t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"raincloud"!==t.type&&"violin"!==t.type)return t;let i=!1;const n=t.data.map((t,n)=>{const s=e+":"+n,d=(null==t?void 0:t.y)&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{},u=!Array.isArray(d.density)||!d.density.length||He(o,s,d.density),p=!Array.isArray(d.summary)||5!==d.summary.length||He(h,s,d.summary);if(!u&&!p)return t;const f=function(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let i=null;if(Array.isArray(t.points)?i=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?i=t.y.points:Array.isArray(t.y)&&"number"==typeof t.y[0]&&(i=t.y),!i)return null;const n=[];for(let t=0;t<i.length;t++){const e=B.parseNumber(i[t]);null!==e&&isFinite(e)&&n.push(e)}return n.length?n:null}(t);if(!f)return t;const g=l({},d);if(u){const e=je(o,s,f,{bandwidth:r.bandwidth,resolution:r.resolution},We);if(!e)return t;g.density=e.density,g.points=f}if(p){const t=je(h,s,f,{whiskers:a},ze);t&&(g.summary=t.summary)}return i=!0,c(l({},t),{y:g})});return i?c(l({},t),{data:n}):t})});const Ye="http://www.w3.org/1999/xhtml";class qe{constructor(t,e,i){this.w=t,this.ctx=e,this.drilldown=i}render(t){if(!k.isBrowser())return;const e=this.w,i=e.dom.elWrap;if(!i)return;const n=i.querySelector(".apexcharts-breadcrumb[aria-label^=Drill]");n&&n.parentNode&&n.parentNode.removeChild(n);const s=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!s||!1===s.show)return;if(0===this.drilldown.depth)return;const r=M.createElementNS(Ye,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label","Drilldown breadcrumb"),de(r,s);const a=null!=s.separator?s.separator:" / ";t.forEach((e,i)=>{if(i>0){const t=M.createElementNS(Ye,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=a,r.appendChild(t)}const n=this._label(e,i);if(i===t.length-1){const t=M.createElementNS(Ye,"span");t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=n,r.appendChild(t)}else{const t=M.createElementNS(Ye,"button");if(t.setAttribute("type","button"),t.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const e=M.createElementNS(Ye,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",t.appendChild(e)}const e=M.createElementNS(Ye,"span");e.setAttribute("class","apexcharts-breadcrumb-label"),e.textContent=n,t.appendChild(e),t.addEventListener("click",()=>this.drilldown.drillToLevel(i)),r.appendChild(t)}}),i.appendChild(r),this.w.globals.axisCharts&&oe(this.w,this.ctx,r,s),ae(e,r)}_label(t,e){const i=this.w.config.drilldown.breadcrumb;let n;if(0===e)n=null!=i.rootLabel?i.rootLabel:"All";else{const i=(this.w.config.drilldown.series||[]).find(e=>e&&e.id===t),s=this.drilldown.stack[e-1];n=i&&i.name||s&&s.name||String(t)}return"function"==typeof i.formatter?i.formatter(n,{index:e,depth:this.drilldown.depth}):n}}const Xe="http://www.w3.org/1999/xhtml",Ge="apexcharts-drilldown-loading";class Ue{constructor(t){this.w=t,this.el=null}_cfg(){const t=this.w.config.drilldown,e=t&&t.loading;return!1===e?{show:!1}:e||{}}show(){if(!k.isBrowser())return;const t=this._cfg();if(!1===t.show)return;const e=this.w.dom.elWrap;if(!e)return;this.hide();const i=M.createElementNS(Xe,"div");i.setAttribute("class",Ge),i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-label",t.text||"Loading");const n=M.createElementNS(Xe,"div");if(n.setAttribute("class",`${Ge}-spinner`),n.setAttribute("aria-hidden","true"),i.appendChild(n),t.text){const e=M.createElementNS(Xe,"span");e.setAttribute("class",`${Ge}-text`),e.textContent=t.text,i.appendChild(e)}e.appendChild(i),this.el=i}hide(){const t=this.w.dom.elWrap;if(t){const e=t.querySelectorAll(`.${Ge}`);for(let t=0;t<e.length;t++){const i=e[t];i.parentNode&&i.parentNode.removeChild(i)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}}const Ke="__apexDrilldownMarker",Ve=["xaxis","yaxis","colors","plotOptions","fill","legend"];m.default.registerFeatures({drilldown:class{constructor(t,e){var i,n;this.w=t,this.ctx=e,this.stack=[],this._nav=0,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new qe(t,e,this),this.loading=new Ue(t),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this._wasOn=!!(null==(i=t.config.drilldown)?void 0:i.enabled),this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),(null==(n=t.config.drilldown)?void 0:n.enabled)&&t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series))}get path(){return["root",...this.stack.map(t=>t.id)]}get depth(){return this.stack.length}drillDown(t,e,i){const n=this._resolveChild(t);return n?this._drillInto(n,e,i):"function"==typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(t,e,i):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){const e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);const i=this.path[this.path.length-1],n=this.stack.slice(t),s=new Set(n.flatMap(t=>t.keys));this.stack=this.stack.slice(0,t);const r=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(n[0].restore,s),"up",{from:i,to:r})}_resolveChild(t){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(e=>e&&e.id===t)||null}_drillInto(t,e,i){var n;if(this.stack.length>=32)return console.warn("ApexCharts: drilldown max depth (32) reached."),Promise.resolve(this.ctx);const s=this.path[this.path.length-1],r={id:t.id,name:null!=(n=t.name)?n:null==t.id?this._pointLabel(e,i):void 0,keys:Ve.filter(e=>t[e]),restore:this._snapshot()};return this.stack.push(r),this._apply(this._viewFromChild(t),"down",{from:s,to:t.id,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex}).catch(e=>{throw this.stack[this.stack.length-1]===r&&this.stack.pop(),this._fire("drillDownError",{id:t.id,error:e}),e})}_drillDownAsync(t,e,i){const n=this.w.config.drilldown.onDrillDown,s=this._cacheGet(t);if(s)return this._drillInto(s,e,i);if(this._pending)return this._pending;const r=this._nav;let a;this.loading.show();try{a=n({id:t,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex})}catch(e){return this.loading.hide(),this._fire("drillDownError",{id:t,error:e}),Promise.resolve(this.ctx)}const o=()=>{this._pending=null,this.loading.hide()},h=Promise.resolve(a).then(n=>{if(o(),this._stale())return this.ctx;if(!n||!n.data&&!Array.isArray(n.series))return this._fire("drillDownError",{id:t,error:new Error(`drilldown: onDrillDown resolved without a drillable level for id "${t}" (expected an object with a \`data\` or \`series\` array).`)}),this.ctx;const s=null!=n.id?n:c(l({},n),{id:t});return this._cacheSet(t,s),r!==this._nav?this.ctx:this._drillInto(s,e,i)},e=>(o(),this._stale()||this._fire("drillDownError",{id:t,error:e}),this.ctx));return this._pending=h,h}_stale(){const t=this.w;return!t||!t.globals||!0===t.globals.isDestroyed||this._retired()}_cacheEnabled(){const t=this.w.config.drilldown;return!(!t||!1===t.cache)}_cacheGet(t){return this._cacheEnabled()&&null!=t&&this._asyncCache.get(t)||null}_cacheSet(t,e){this._cacheEnabled()&&null!=t&&this._asyncCache.set(t,e)}clearCache(t){return null==t?this._asyncCache.clear():this._asyncCache.delete(t),this.ctx}_snapshot(){const t=this.ctx.responsive,e=t?t.withoutBreakpoints(this.w.config):this.w.config,i={series:this._uncollapseSeries(B.clone(e.series))};Array.isArray(e.labels)&&e.labels.length&&(i.labels=B.clone(e.labels)),i.chart={type:e.chart.type,stacked:e.chart.stacked};for(const t of Ve)i[t]=B.clone(e[t]);const n=this.w.globals.lastXAxis;return i.xaxis&&n&&(i.xaxis.min=n.min,i.xaxis.max=n.max),i}_uncollapseSeries(t){const e=this.w,i=e.globals,n=[...i.collapsedSeries||[],...i.ancillaryCollapsedSeries||[]];if(!n.length)return t;const s=e.config.chart.type,r=("pie"===s||"donut"===s||"polarArea"===s)&&1===t.length&&t[0]&&"object"==typeof t[0]&&Array.isArray(t[0].data)?t[0].data:t;for(const e of n){const n=e.index;i.axisCharts?t[n]&&(t[n].data=Array.isArray(e.data)?e.data.slice():e.data):r[n]&&"object"==typeof r[n]?r[n].y=e.data:void 0!==r[n]&&(r[n]=e.data)}return t}_copyOptionalViewFields(t,e,i){for(const n of Ve)(i?i.has(n):e[n])&&(t[n]=e[n])}_viewFromChild(t){const e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];const i={};return t.chart&&t.chart.type&&(i.type=t.chart.type),t.chart&&null!=t.chart.stacked&&(i.stacked=t.chart.stacked),Object.keys(i).length&&(e.chart=i),this._copyOptionalViewFields(e,t),e}_viewFromSnapshot(t,e){const i={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(i.labels=t.labels),this._copyOptionalViewFields(i,t,e),i}_apply(t,e,i){var n;const s=this.w;this._nav++,s.interact.selectedDataPoints=[],s.globals.collapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeries=[],s.globals.ancillaryCollapsedSeriesIndices=[],s.globals.allSeriesCollapsed=!1,s.globals.risingSeries=[],t.markers=c(l({},t.markers||{}),{discrete:this._drillMarkers(t.series)});const r=(!s.config.drilldown.animation||!1!==s.config.drilldown.animation.enabled)&&!1!==s.config.chart.animations.enabled;"down"===e&&this._fire("drillDownStart",i),null==(n=this.ctx.highlightFilter)||n.drillView(t);const a=e=>this.ctx.updateOptions(t,!1,e,!1,!1),o=()=>(this._fire("down"===e?"drillDownEnd":"drillUp",i),this.ctx);if(r&&this._zoomEnabled()){const t=this._triggerOrigin(i);if(t)return this._zoomDrill(t,e,()=>a(!1)).then(o)}return a(r).then(o)}_zoomEnabled(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!(!t||!t.zoomFromPoint)}_svgNode(){const t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){const t=this._svgNode();return t&&"function"==typeof t.querySelector?t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap"):null}_triggerOrigin(t){if(!k.isBrowser())return null;const e=this._svgNode(),i=this._markGroup();if(!e||!i||"function"!=typeof i.animate||"function"!=typeof e.getBoundingClientRect)return null;const n=e.getBoundingClientRect();let s=null;if(t&&null!=t.seriesIndex&&null!=t.dataPointIndex&&this.w.dom.baseEl&&(s=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),s&&"function"==typeof s.getBoundingClientRect){const t=s.getBoundingClientRect();return{x:t.left+t.width/2-n.left,y:t.top+t.height/2-n.top}}const r=i.getBoundingClientRect();return{x:r.left+r.width/2-n.left,y:r.top+r.height/2-n.top}}_zoomDrill(t,e,i){return d(this,null,function*(){const n=this._zoomDuration(),s="down"===e,r=Math.round(.55*n),a=s?"scale(1.03)":"scale(0.97)",o=s?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=e=>{e.style.transformBox="view-box",e.style.transformOrigin=`${t.x}px ${t.y}px`},c=t=>{t.style.transform="",t.style.opacity="",t.style.transformOrigin="",t.style.transformBox=""},h=this._markGroup();let d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:a,opacity:0}],{duration:r,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch(t){}}try{yield i()}catch(t){throw d&&(d.cancel(),c(h)),t}const u=this._markGroup();if(u){l(u),u.style.opacity="0",u.style.transform=o,d&&h===u&&d.cancel();const t=u.animate([{transform:o,opacity:0},{transform:"scale(1)",opacity:1}],{duration:n,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield t.finished}catch(t){}c(u),t.cancel()}})}_zoomDuration(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&"number"==typeof t.speed?t.speed:260;return Math.max(80,e)}_fire(t,e){const i=this.w.config.chart.events&&this.w.config.chart.events[t];"function"==typeof i&&i(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,i){var n;if(!i||!(null==(n=this.w.config.drilldown)?void 0:n.enabled)||this._retired())return;const s=this._pointAt(i.seriesIndex,i.dataPointIndex);return s&&"object"==typeof s&&null!=s.drilldown?this.drillDown(s.drilldown,s,i):"function"==typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(null,s,i):void 0}_pointAt(t,e){const i=this.w.config.series;if(!Array.isArray(i)||null==t||null==e)return null;const n=i[t];return n&&Array.isArray(n.data)&&null!=n.data[e]?n.data[e]:null}_pointLabel(t,e){const i=t&&null!=t.x?t.x:e&&this.w.globals.labels[e.dataPointIndex];return null!=i?String(i):void 0}_retired(){return this.ctx.drilldown!==this&&(Promise.resolve().then(()=>{const t=this.ctx.events;t&&(t.removeEventListener("dataPointSelection",this._onPointSelect),t.removeEventListener("mounted",this._afterRender),t.removeEventListener("updated",this._afterRender))}),!0)}_afterRender(){var t;const e=this.w;if(this._retired())return;const i=null==(t=e.config.drilldown)?void 0:t.enabled;(i||this.stack.length||this._wasOn)&&(this._wasOn=i,i&&(this._markDrillableTargets(),this._wirePlotClick()),this.breadcrumb.render(this.path),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(i&&e.config.series)))}_markDrillableTargets(){if(!k.isBrowser())return;const t=this.w,e=t.dom.baseEl,i=t.config.series;if(!e||!Array.isArray(i))return;const n=new Set;if(i.forEach((t,e)=>{t&&Array.isArray(t.data)&&t.data.forEach((t,i)=>{t&&"object"==typeof t&&null!=t.drilldown&&n.add(e+":"+i)})}),!n.size)return;const s=new Set;e.querySelectorAll("[index][j]").forEach(t=>{const e=t.getAttribute("index")+":"+t.getAttribute("j");n.has(e)&&(s.add(e),this._isClickThroughMark(t)&&t.classList.remove("no-pointer-events"),t.classList.add("apexcharts-drilldown-target"))});const r=n.size-s.size;r&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${r} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!k.isBrowser())return;const t=this.w.dom.baseEl;t&&this._plotClickWired!==t&&(this._plotClickWired&&(this._plotClickWired.removeEventListener("mousedown",this._onPlotDown),this._plotClickWired.removeEventListener("click",this._onPlotClick)),t.addEventListener("mousedown",this._onPlotDown),t.addEventListener("click",this._onPlotClick),this._plotClickWired=t)}_onPlotDown(t){this._downAt={x:t.clientX,y:t.clientY}}_onPlotClick(t){const e=this.w;if(!e.config.drilldown||!e.config.drilldown.enabled)return;const i=this._downAt;if(this._downAt=null,i&&Math.hypot(t.clientX-i.x,t.clientY-i.y)>4)return;const n=t.target;if(!n||"function"!=typeof n.closest)return;if(n.closest(".apexcharts-drilldown-target"))return;if(n.closest(".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip"))return;const s=e.interact.capturedSeriesIndex,r=e.interact.capturedDataPointIndex;if(null==s||null==r||s<0||r<0)return;if(!this._isPointBasedSeries(e.config.series[s]))return;const a=this._pointAt(s,r);return a&&"object"==typeof a&&null!=a.drilldown?this.drillDown(a.drilldown,a,{seriesIndex:s,dataPointIndex:r}):void 0}_isClickThroughMark(t){return!(!t.classList||!t.classList.contains("no-pointer-events"))&&(!!t.classList.contains("apexcharts-marker")&&!("function"==typeof t.closest&&t.closest(".apexcharts-tooltip")))}_drillMarkers(t){const e=this.w,i=e.config.drilldown,n=Array.isArray(e.config.markers&&e.config.markers.discrete)?e.config.markers.discrete.filter(t=>!t||!t[Ke]):[],s=i&&i.marker||{};if(!1===s.show||!Array.isArray(t))return n;const r=[];return t.forEach((t,e)=>{if(!this._seriesNeedsDrillMarker(e,t))return;const i=t&&Array.isArray(t.data)?t.data:null;i&&i.forEach((t,i)=>{if(!t||"object"!=typeof t||null==t.drilldown)return;const n={seriesIndex:e,dataPointIndex:i,[Ke]:!0};void 0!==s.size&&(n.size=s.size),void 0!==s.shape&&(n.shape=s.shape),void 0!==s.fillColor&&(n.fillColor=s.fillColor),void 0!==s.strokeColor&&(n.strokeColor=s.strokeColor),r.push(n)})}),n.concat(r)}_seriesNeedsDrillMarker(t,e){if(!this._isPointBasedSeries(e))return!1;const i=this.w.config.markers&&this.w.config.markers.size,n=Array.isArray(i)?i[t]:i;return!(Number(n)>0)}_isPointBasedSeries(t){const e=t&&t.type||this.w.config.chart.type;return"line"===e||"area"===e}}});function Ze(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function Je(t,e){const i=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const n=t||{},{hidden:s}=n,r=h(n,["hidden"]);let a=r.data;if(Array.isArray(a)&&!a.length){const t=i.find(t=>t.index===e);t&&Array.isArray(t.data)&&(a=t.data)}return c(l({},r),{data:Array.isArray(a)?a.slice():a})})}const Qe=m.__apex_DateTime;function ti(t,e){if(t instanceof Date)return t.getTime();if(e&&"string"==typeof t){const e=Qe.prototype.parseDate(t);if(!isNaN(e))return e}return t}function ei(t,e){return t.map((t,i)=>null!==t&&"object"==typeof t?t:{x:e&&void 0!==e[i]?e[i]:i+1,y:t})}function ii(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],isSubtotal:!1,isTotal:!1,rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,isSubtotal:!0===t.isSubtotal,isTotal:!0===t.isTotal,rest:t}:{x:n,y:t,isSubtotal:!1,isTotal:!1,rest:{}}}function ni(t,e,i){if(t&&t.fillColor)return t.fillColor;const n=i[e];return"string"==typeof n&&n?n:void 0}function si(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}Ie("waterfall",function(t,e){var i,n,s;const r=e.config,a=e.globals;if(!Array.isArray(t))return t;a.waterfallRawSeries||(a.waterfallRawSeries=Je(t,a));const o=a.waterfallRawSeries,h=(null==(n=null==(i=r.plotOptions)?void 0:i.waterfall)?void 0:n.colors)||{},d=null==(s=r.xaxis)?void 0:s.categories,u=Ze(a),p=[],f=o.map((t,e)=>{const i=Array.isArray(null==t?void 0:t.data)?t.data:[];if(p[e]=[],-1!==u.indexOf(e))return c(l({},t),{data:[]});if((null==t?void 0:t.type)&&"waterfall"!==t.type&&"rangeBar"!==t.type)return Array.isArray(t.data)?c(l({},t),{data:ei(t.data,d)}):t;if(function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(i))return p[e]=i.map(t=>{const e=Array.isArray(t)?t[1]:t&&"object"==typeof t?t.y:t;if(!Array.isArray(e))return null;const i=B.parseNumber(e[0]),n=B.parseNumber(e[1]);return null===i||null===n?null:n-i}),t;const n=function(t,e,i){const n=[],s=[];let r=0,a=0;for(let o=0;o<t.length;o++){const{x:h,y:d,isSubtotal:u,isTotal:p,rest:f}=ii(t[o],o,e);let g,m,y;if(p||u)g=p?0:a,m=r,y=p?"total":"subtotal",a=r;else{const t=B.parseNumber(d);if(null===t||!isFinite(t)){n.push(c(l({},f),{x:h,y:null})),s.push(null);continue}g=r,m=r+t,r=m,y=t<0?"negative":"positive"}const x=ni(f,y,i);n.push(l(c(l({},f),{x:h,y:[g,m]}),x?{fillColor:x}:{})),s.push(m-g)}return{data:n,values:s}}(i,d,h);return p[e]=n.values,c(l({},t),{data:n.data})});return e.waterfallData={values:p,geometry:[]},f}),m.default.registerFeatures({waterfall:class{constructor(t,e){this.w=t,this.ctx=e}isActive(){return"waterfall"===this.w.config.chart.requestedType}drawConnectors(){var t,e;const i=this.w;if(!this.isActive())return;const n=null==(e=null==(t=i.config.plotOptions)?void 0:t.waterfall)?void 0:e.connectors;if(!n||!1===n.show)return;const s=i.dom.elGraphical,r=i.waterfallData&&i.waterfallData.geometry;if(!s||!r)return;this.removeConnectors();const a=new b(i,this.ctx),o=a.group({class:"apexcharts-waterfall-connectors"}),l=n.color||i.config.grid.borderColor,c=null==n.strokeWidth?1:n.strokeWidth,h=null==n.strokeDashArray?3:n.strokeDashArray;let d=0;for(let t=0;t<r.length;t++){const e=r[t];if(Array.isArray(e))for(let t=0;t<e.length-1;t++){const i=e[t],n=e[t+1];if(!i||!n)continue;if(!(n.slotStart-i.slotEnd>.5))continue;const s=i.horizontal?a.drawLine(i.levelEnd,i.slotEnd,i.levelEnd,n.slotStart,l,h,c):a.drawLine(i.slotEnd,i.levelEnd,n.slotStart,i.levelEnd,l,h,c);s.node.classList.add("apexcharts-waterfall-connector"),o.add(s),d++}}if(!d)return;o.attr("clip-path",`url(#gridRectBarMask${i.globals.cuid})`);const u=s.node.querySelector(".apexcharts-xaxis");u?s.node.insertBefore(o.node,u):s.add(o),this.holdUntilBarsLand(o)}removeConnectors(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-waterfall-connectors");e&&e.parentNode&&e.parentNode.removeChild(e)}holdUntilBarsLand(t){const e=this.w;k.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}}),Ie("dumbbell",function(t,e){var i;const n=e.config,s=e.globals;if(!Array.isArray(t))return t;s.dumbbellRawSeries||(s.dumbbellRawSeries=Je(t,s));const r=s.dumbbellRawSeries;if(r.some(t=>function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},t;const a=null==(i=n.xaxis)?void 0:i.categories,o=Ze(s),{xs:h,rows:d,byX:u}=function(t,e){var i;const n=[],s=[],r=new Map,a=[];for(let o=0;o<t.length;o++){const c=Array.isArray(null==(i=t[o])?void 0:i.data)?t[o].data:[],h=new Map;for(let t=0;t<c.length;t++){const{x:i,y:a,rest:o}=si(c[t],t,e),d=i instanceof Date?i.getTime():i;r.has(d)||(r.set(d,n.length),n.push(i),s.push(l({},o)));const u=r.get(d);h.set(u,B.parseNumber(a))}a.push(h)}return{xs:n,rows:s,byX:a}}(r,a),p=[],f=[],g=[];for(let t=0;t<r.length;t++)-1===o.indexOf(t)&&g.push(t);const m=[];for(let t=0;t<h.length;t++){const e=[];for(let i=0;i<r.length;i++){const n=u[i].has(t)?u[i].get(t):null;e.push(null!=n&&isFinite(n)?n:null)}p.push(e);let i=null,n=null,s=-1,a=-1;for(let t=0;t<g.length;t++){const r=g[t],o=e[r];null!==o&&((null===i||o<i)&&(i=o,s=r),(null===n||o>n)&&(n=o,a=r))}null!==i&&null!==n?(f.push([s,a]),m.push(c(l({},d[t]),{x:h[t],y:[i,n]}))):(f.push(null),m.push(c(l({},d[t]),{x:h[t],y:null})))}e.dumbbellData={form:"series",names:r.map((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`}),values:p,order:f,carrier:g.length?g[0]:0,hidden:r.map((t,e)=>e).filter(t=>-1!==o.indexOf(t))};const y=e.dumbbellData.carrier;return r.map((t,e)=>c(l({},t),{data:e===y&&g.length?m:[]}))});class ri{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/ri.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*ri.xRatio(t)}static plotRect(t){var e,i,n;const s=(null==(e=t.dom.Paper)?void 0:e.node)||(null==(i=t.dom.baseEl)?void 0:i.querySelector(".apexcharts-svg")),r=(null==(n=s||t.dom.elWrap)?void 0:n.getBoundingClientRect())||{left:0,top:0,width:0},a=(s&&t.globals.svgWidth?r.width/t.globals.svgWidth:1)||1;return{left:r.left+t.layout.translateX*a,top:r.top+t.layout.translateY*a,width:t.layout.gridWidth*a,height:t.layout.gridHeight*a,zoom:a}}static screenXToPlotPx(t,e,i=ri.plotRect(t)){return(e-i.left)/i.zoom}}const ai=["wiggle","silhouette","zero","expand"],oi=["inside-out","inverse","none"];function li(t,e,i){const n=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}Ie("streamgraph",function(t,e){var i,n,s,r;const a=e.config,o=e.globals;if(!Array.isArray(t))return t;o.streamgraphRawSeries||(o.streamgraphRawSeries=Je(t,o));const h=o.streamgraphRawSeries,d=h.map(t=>!(null==t?void 0:t.type)||"streamgraph"===t.type||"rangeArea"===t.type);if(h.some((t,e)=>d[e]&&function(t){for(let e=0;e<t.length;e++){const i=t[e],n=Array.isArray(i)?i[1]:i&&"object"==typeof i?i.y:i;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.streamgraphData=null,t;const u=(null==(i=a.plotOptions)?void 0:i.streamgraph)||{},p=-1!==ai.indexOf(u.offset)?u.offset:"wiggle",f=-1!==oi.indexOf(u.order)?u.order:"inside-out",g=null==(n=a.xaxis)?void 0:n.categories,m=Ze(o),y="datetime"===(null==(s=a.xaxis)?void 0:s.type),{xs:x,keys:_,rows:b,grids:v}=function(t,e,i,n){var s;const r=[],a=[],o=[],c=new Map,h=[];for(let d=0;d<t.length;d++){const u=n[d]&&Array.isArray(null==(s=t[d])?void 0:s.data)?t[d].data:[],p=new Map;for(let t=0;t<u.length;t++){const{x:n,y:s,rest:h}=li(u[t],t,e),d=ti(n,i);c.has(d)||(c.set(d,r.length),r.push(n),a.push(d),o.push(l({},h))),p.set(c.get(d),B.parseNumber(s))}h.push(p)}return{xs:r,keys:a,rows:o,grids:h}}(h,g,y,d),w=function(t){const e=[];for(let i=0;i<t.length;i++){if("number"!=typeof t[i]||!isFinite(t[i]))return null;e.push(i)}e.sort((e,i)=>t[e]-t[i]);for(let t=0;t<e.length;t++)if(e[t]!==t)return e;return null}(_),A=w?w.map(t=>x[t]):x,M=w?w.map(t=>b[t]):b,k=A.length,L=[];let S,C=!1;const E=[];for(let t=0;t<h.length;t++){const e=new Array(k);if(!d[t]){if(e.fill(null),-1===m.indexOf(t)&&L.push(t),!S){S=new Map;for(let t=0;t<k;t++)S.set(_[w?w[t]:t],t)}const i=Array.isArray(null==(r=h[t])?void 0:r.data)?h[t].data:[];for(let t=0;t<i.length;t++){const{x:n,y:s}=li(i[t],t,g),r=S.get(ti(n,y));void 0!==r&&(e[r]=B.parseNumber(s))}E.push(e);continue}for(let i=0;i<k;i++){const n=v[t].get(w?w[i]:i);let s=null==n?0:Number(n);isFinite(s)||(s=0),s<0&&(C=!0,s=0),e[i]=s}E.push(e)}C&&!o.streamgraphWarnedNegative&&(o.streamgraphWarnedNegative=!0,console.warn('ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.'));const F=[];for(let t=0;t<h.length;t++)d[t]&&-1===m.indexOf(t)&&F.push(t);let P=E;if("expand"===p){P=P.map(t=>t.slice());for(let t=0;t<k;t++){let e=0;for(let i=0;i<F.length;i++)e+=P[F[i]][t];if(e)for(let i=0;i<F.length;i++)P[F[i]][t]/=e}}const D=function(t,e,i){if("none"===t)return e.slice();if("inverse"===t)return e.slice().reverse();const n={},s={};for(let t=0;t<e.length;t++){const r=e[t],a=i[r];let o=0,l=-1/0,c=0;for(let t=0;t<a.length;t++)o+=a[t],a[t]>l&&(l=a[t],c=t);n[r]=o,s[r]=c}const r=e.slice().sort((t,e)=>s[t]-s[e]||t-e);let a=0,o=0;const l=[],c=[];for(let t=0;t<r.length;t++){const e=r[t];a<o?(a+=n[e],l.push(e)):(o+=n[e],c.push(e))}return c.reverse().concat(l)}(f,F,P),R=function(t,e,i,n){const s=new Array(n).fill(0);if(0===n||0===e.length)return s;if("zero"===t||"expand"===t)return s;if("silhouette"===t){for(let t=0;t<n;t++){let n=0;for(let s=0;s<e.length;s++)n+=i[e[s]][t];s[t]=-n/2}return s}let r=0;for(let t=1;t<n;t++){let n=0,a=0,o=0;for(let s=0;s<e.length;s++){const r=i[e[s]],l=r[t],c=l-r[t-1];n+=l,a+=(c/2+o)*l,o+=c}n&&(r-=a/n),s[t]=r}return s}(p,D,P,k),T=h.map(()=>null),N=h.map(()=>null);for(let t=0;t<D.length;t++)T[D[t]]=new Array(k),N[D[t]]=new Array(k);for(let t=0;t<k;t++){let e=R[t];for(let i=0;i<D.length;i++){const n=D[i],s=T[n],r=N[n];s[t]=e,e+=P[n][t],r[t]=e}}return e.streamgraphData={names:h.map((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`}),xs:A,values:E,lows:T,highs:N,order:D,lines:L,offset:p,hidden:h.map((t,e)=>e).filter(t=>-1!==m.indexOf(t))},h.map((t,e)=>{if(!d[e])return-1!==m.indexOf(e)?c(l({},t),{data:[]}):Array.isArray(null==t?void 0:t.data)?c(l({},t),{data:ei(t.data,g)}):t;const i=T[e],n=N[e];if(!i||!n)return c(l({},t),{data:[]});const s=new Array(k);for(let t=0;t<k;t++)s[t]=c(l({},M[t]),{x:A[t],y:[i[t],n[t]]});return c(l({},t),{data:s})})}),m.default.registerFeatures({streamgraph:class{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(t){var e;const i=this.w,n=i.globals,s=i.layout.gridHeight,r=n.maxY-n.minY;if(!r||!isFinite(r))return s/2;const a=(t-n.minY)/r;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?a*s:s-a*s}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,i,n,s,r,a;const o=this.w;if(!this.isActive())return;const l=null==(e=null==(t=o.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels;if(!l||!1===l.show)return;const c=o.dom.elGraphical,h=o.streamgraphData;if(!c||!h)return;this.removeLabels();const d=new b(o,this.ctx),u=d.group({class:"apexcharts-streamgraph-labels"}),p=(null==(i=l.style)?void 0:i.fontSize)||"auto",f=(null==(n=l.style)?void 0:n.fontFamily)||o.config.chart.fontFamily,g=(null==(s=l.style)?void 0:s.fontWeight)||600,m=null==l.minWidth?24:l.minWidth,y=[];for(let t=0;t<h.order.length;t++){const e=h.order[t],i=this._placeLabel(e,{fontSize:p,fontFamily:f,fontWeight:g,minWidth:m,graphics:d});i&&y.push(i)}let x=0;for(const t of this._deconflict(y)){const e=t.k,i=d.drawText({x:t.x,y:t.y,text:t.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:t.fontSize,fontFamily:f,fontWeight:g,foreColor:(null==(a=null==(r=l.style)?void 0:r.colors)?void 0:a[e])||t.color,cssClass:"apexcharts-streamgraph-label"});i.node.setAttribute("data:realIndex",String(e)),u.add(i),x++}if(!x)return;const _=c.node.querySelector(".apexcharts-xaxis");_?c.node.insertBefore(u.node,_):c.add(u),this.holdUntilBandsLand(u)}_placeLabel(t,{fontSize:e,fontFamily:i,fontWeight:n,minWidth:s,graphics:r}){const a=this.w,o=a.streamgraphData,l=o.lows[t],c=o.highs[t];if(!l||!c)return null;const h=a.globals.seriesXvalues[t],d=l.length;if(!Array.isArray(h)||h.length<d||0===d)return null;const u=new Array(d);let p=0;for(let t=0;t<d;t++){const e=Math.abs(this._yPx(c[t])-this._yPx(l[t]));u[t]=e,e>p&&(p=e)}if(p<=0)return null;const f=this._resolveFontSize(e,p),g=String(o.names[t]);let m=f,y=r.getTextRects(g,`${m}px`,i,"",!0,n);if(p<y.height+6)return null;const x=this._widestRun(u,h,y.height+6,d);if(!x)return null;if(y.width>x.width&&"auto"===e){const t=Math.floor(m*(x.width/y.width));if(t<this._autoBounds().min)return null;if(m=t,y=r.getTextRects(g,`${m}px`,i,"",!0,n),p<y.height+6)return null}const _=y.height+6,b=[];for(const e of this._runs(u,_,d)){const a=Number(h[e.l]),o=Number(h[e.r]);if(!isFinite(a)||!isFinite(o))continue;let u=o-a;if(u<=0&&d>1){const t=Math.abs(Number(h[Math.min(e.r+1,d-1)])-Number(h[Math.max(e.l-1,0)]));u=isFinite(t)?t:0}if(u<s||u<.35*y.width)continue;const p=y.width<=u?g:r.getTextBasedOnMaxWidth({text:g,maxWidth:u,fontSize:`${m}px`,fontFamily:i,fontWeight:n});if(!p||"..."===p)continue;const f=p===g?y.width:y.width*(p.length/g.length),x=[a+u/2];u>2.2*f&&x.push(a+f/2+2,o-f/2-2);for(const i of x){let n=e.l,s=1/0;for(let t=e.l;t<=e.r;t++){const e=Math.abs(Number(h[t])-i);e<s&&(s=e,n=t)}b.push({x:i,y:(this._yPx(l[n])+this._yPx(c[n]))/2,text:p,color:this._contrastOn(t),fontSize:`${m}px`,width:f,height:y.height})}if(b.length>=6)break}return b.length?{k:t,weight:p,candidates:b}:null}_runs(t,e,i){const n=[];let s=0;for(;s<i;){if(t[s]<e){s++;continue}let r=s,a=t[s];for(;r+1<i&&t[r+1]>=e;)r++,t[r]>a&&(a=t[r]);n.push({l:s,r:r,maxT:a}),s=r+1}return n.sort((t,e)=>e.maxT-t.maxT)}_widestRun(t,e,i,n){let s=-1;for(const r of this._runs(t,i,n)){const t=Number(e[r.r])-Number(e[r.l]);isFinite(t)&&t>s&&(s=t)}return s>=0?{width:s}:null}_deconflict(t){const e=t.slice().sort((t,e)=>e.weight-t.weight),i=[],n=t=>!i.some(e=>t.left<e.box.right&&t.right>e.box.left&&t.top<e.box.bottom&&t.bottom>e.box.top);for(const t of e)for(const e of t.candidates){const s={left:e.x-e.width/2,right:e.x+e.width/2,top:e.y-e.height/2,bottom:e.y+e.height/2};if(n(s)){i.push(c(l({k:t.k},e),{box:s}));break}}return i}_autoBounds(){var t,e;const i=(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels)||{};return{min:null==i.minFontSize?9:i.minFontSize,max:null==i.maxFontSize?30:i.maxFontSize}}_resolveFontSize(t,e){if("auto"!==t){const e=parseFloat(t);return isFinite(e)&&e>0?e:12}const{min:i,max:n}=this._autoBounds();return Math.max(i,Math.min(n,Math.round(.36*e)))}_contrastOn(t){var e;const i=this.w,n=null==(e=i.globals.colors)?void 0:e[t],s="string"==typeof n?B.parseHex(n):null;return s?B.relativeLuminance(s)>.45?"#000000":"#ffffff":i.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!k.isBrowser())return;if(!1===this._hoverCfg().show)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");e&&!e.__apexStreamHover&&(e.__apexStreamHover=!0,e.addEventListener("mousemove",t=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(t))}),e.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var t,e;return(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.hover)||{}}_bandAt(t){const e=this.w,i=e.streamgraphData;if(!i||!i.order.length)return-1;const n=ri.plotRect(e),s=ri.screenXToPlotPx(e,t.clientX,n),r=(t.clientY-n.top)/n.zoom;if(s<0||s>e.layout.gridWidth)return-1;if(r<0||r>e.layout.gridHeight)return-1;const a=e.globals.seriesXvalues[i.order[0]];if(!Array.isArray(a)||!a.length)return-1;const o=e.interact?e.interact.capturedDataPointIndex:-1;let l=-1;if(o>=0&&o<a.length)l=o;else{let t=1/0;for(let e=0;e<a.length;e++){const i=Math.abs(Number(a[e])-s);i<t&&(t=i,l=e)}}return l<0?-1:this.bandAt(r,l)}bandAtClientY(t,e){const i=ri.plotRect(this.w);return this.bandAt((t-i.top)/i.zoom,e)}bandAt(t,e){const i=this.w.globals,n=this.w.streamgraphData,s=i.maxY-i.minY;if(!(n&&Array.isArray(n.order)&&s&&isFinite(s)))return-1;let r=-1,a=1/0;for(let i=0;i<n.order.length;i++){const s=n.order[i],o=n.highs[s]&&n.highs[s][e],l=n.lows[s]&&n.lows[s][e];if(null==l||null==o)continue;const c=this._yPx(o),h=this._yPx(l),d=Math.min(c,h),u=Math.max(c,h);if(t>=d&&t<=u)return s;const p=t<d?d-t:t-u;p<a&&(a=p,r=s)}return r}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const i=this._hoverCfg(),n=null==i.opacity?.35:i.opacity,s=e.dom.baseEl.querySelectorAll(".apexcharts-series"),r=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),a=(e,i)=>t<0||i===t;for(let t=0;t<s.length;t++){const e=s[t];e.style.transition="opacity .15s ease",e.style.opacity=a(0,Number(e.getAttribute("data:realIndex")))?"":String(n)}for(let t=0;t<r.length;t++){const i=r[t];i.style.transition="opacity .15s ease, fill .15s ease",a(0,Number(i.getAttribute("data:realIndex")))?this._restoreLabel(i):(i.getAttribute("data:fill")||i.setAttribute("data:fill",i.getAttribute("fill")||""),i.setAttribute("fill",e.config.chart.foreColor),i.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let t=0;t<e.length;t++){e[t].style.opacity=""}const i=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let t=0;t<i.length;t++)this._restoreLabel(i[t])}holdUntilBandsLand(t){const e=this.w;k.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}});const ci=m.__apex_Resize_addResizeListener,hi=m.__apex_Resize_removeResizeListener;class di{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,i={}){return this.ctx.graphics.drawMarker(t,e,i)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const ui=["none","lighten","darken"];function pi(t){const e=t.config.series||[],i=t.config.chart.type,n="scatter"===i||"bubble"===i,s=t.config.markers&&t.config.markers.size,r=Array.isArray(s)?s.some(t=>t>0):(s||0)>0,a=!(!t.config.dataLabels||!t.config.dataLabels.enabled),o="heatmap"===i;let l=0,c=0;e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(n||r||o)&&(l+=e),a&&(l+=e)});return c>=5e4&&(l=Math.max(l,c)),l}function fi(t){const e=t.config,i=e.plotOptions||{},n=e.stroke&&e.stroke.fill,s=e.forecastDataPoints,r=i.line&&i.line.colors,a=e.states||{},o=t=>[].concat(t).some(t=>"pattern"===t||"image"===t||"gradient"===t),l=t=>{const e=t&&t.filter&&t.filter.type;return e&&!ui.includes(e)},c=t=>(e.series||[]).some(i=>t.test(i&&i.type||e.chart.type));return!!(o(e.fill&&e.fill.type)||n&&o(n.type)&&c(/line|area/i)||s&&s.count>0&&c(/^(line|area)$/)||r&&r.colorAboveThreshold&&r.colorBelowThreshold||"heatmap"===e.chart.type&&"rect"!==(i.heatmap&&i.heatmap.shape||"rect")||l(a.hover)||l(a.active))}const gi="__apexcharts_renderers__";function mi(){const t=globalThis;return t[gi]||(t[gi]=new Map),t[gi]}class yi{static get _rendererRegistry(){return mi()}static registerRenderer(t,e){mi().set(t,e)}static unregisterRenderer(t){mi().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new di(t,e),this.active=this.svg,this._activeKind="svg",this._instances={},this.w.globals.activeRenderer=this.active}_activate(t,e){this.active=e,this._activeKind=t,this.ctx.renderer=e,this.w.globals.activeRenderer=e}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!k.isBrowser())return"svg";if("svg"===e)return"svg";if(fi(this.w))return"svg";if("canvas"===e)return"canvas";return pi(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const i=mi().get(e);if(i)return this._instances[e]||(this._instances[e]=i(this.w,this.ctx)),this._activate(e,this._instances[e]),this._activeKind;t!==e||this._warned||(this._warned=1,function(t,e,i={}){const{module:n=`features/${e}`,entry:s,scripts:r=[`features/${e}.js`],tail:a}=i,o=r.map(t=>`<script src='.../dist/${t}'>`).join(" and ");globalThis.console.warn(`ApexCharts: ${t} requires the ${e} feature, which is not in this bundle. Bundler: import 'apexcharts/${n}'`+(s?` (or from 'apexcharts/${s}')`:"")+`. Script tag: add ${o} after the ApexCharts script, or load apexcharts.full.min.js instead.`+(a?` ${a}`:""))}(`\`chart.renderer: '${e}'\``,`renderer-${e}`,{tail:"Falling back to SVG."}))}else"canvas"===t&&!this._warned&&fi(this.w)&&(this._warned=1,console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill, a line forecast or a state color-matrix filter); falling back to SVG.'));const i=this._instances[this._activeKind];return i&&(i.destroy(),delete this._instances[this._activeKind]),this._activate("svg",this.svg),this._activeKind}pendingKind(){const t=this._desiredKind();return"svg"===t||mi().has(t)?t:"svg"}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg",this.w.globals.activeRenderer=null}}const xi=m.__apex_helpers_InitCtxVariables,_i=Symbol("facet"),bi=["name","data","type","group","color","hidden"];function vi(t){if(!Array.isArray(t)||0===t.length)return"empty";for(let e=0;e<t.length;e++){const i=t[e];if(null!=i)return Array.isArray(i)?"paired":"object"==typeof i?"object":"plain"}return"empty"}function wi(t,e,i){if(null!=t)return"paired"===e?ti(t[0],!!i):"object"===e?ti(t.x,!!i):void 0}function Ai(t,e){return"paired"===e?[t,null]:"object"===e?{x:t,y:null}:null}function Mi(t,e,i){const n="function"==typeof i?i(t,e):t?t[i]:void 0;return null==n||""===n?null:String(n)}function ki(t,e){if(!e||"first-seen"===e)return t.slice();if("asc"===e||"desc"===e){const i=t.slice().sort((t,e)=>{const i=Number(t),n=Number(e);return isFinite(i)&&isFinite(n)?i-n:t<e?-1:t>e?1:0});return"desc"===e?i.reverse():i}if(Array.isArray(e)){const i=e.map(String).filter(e=>-1!==t.indexOf(e)),n=t.filter(t=>-1===i.indexOf(t));return i.concat(n)}return"function"==typeof e?t.slice().sort(e):t.slice()}function Li(t,e,i){const n=[],s=new Set;let r=!1,a=!1,o=0,l="plain";t.forEach(t=>{const e=vi(t&&t.data);if("empty"!==e){if("plain"===e)return a=!0,void(o=Math.max(o,t.data.length));r=!0,l=e,t.data.forEach(t=>{const r=wi(t,e,i);if(void 0===r)return;const a=typeof r+":"+String(r);s.has(a)||(s.add(a),n.push(r))})}}),r&&a&&e.push("trellis: mixing x-keyed data ([x,y] / {x,y}) with plain value arrays; plain series are padded by position, not by x");const c=r&&n.every(t=>"number"==typeof t&&isFinite(t));return c&&n.sort((t,e)=>Number(t)-Number(e)),{unionX:n,sawKeyed:r,plainMaxLen:o,xForm:l,xIsNumeric:c,datetime:i}}const Si=["scatter","bubble"];function Ci(t,e,i,n){const s=[],r=new Set,a=new Map,o=new Set;return{align:e=>{const h=vi(e&&e.data),d=e&&null!=e.name?String(e.name):`series-${n.indexOf(e)+1}`;r.has(d)||(r.add(d),s.push(d));const u=c(l({},e),{name:d});if(!i)return u.data=Array.isArray(e.data)?e.data.slice():[],u;if("plain"===h||"empty"===h){const i=t.sawKeyed?t.unionX.length:t.plainMaxLen,n=Array.isArray(e.data)?e.data.slice(0,i):[];for(;n.length<i;)n.push(null);if(u.data=n,Array.isArray(e.highlightData)){const t=e.highlightData.slice(0,i);for(;t.length<i;)t.push(null);u.highlightData=t}return u}const p=new Map,f=new Map,g=Array.isArray(e.highlightData)?e.highlightData:null;let m=0;return e.data.forEach((e,i)=>{const n=wi(e,h,t.datetime);void 0!==n&&(p.has(n)?m++:(p.set(n,e),g&&f.set(n,g[i])))}),m&&!o.has(e)&&(o.add(e),a.set(d,(a.get(d)||0)+m)),u.data=t.unionX.map(t=>p.has(t)?p.get(t):Ai(t,h)),g&&(u.highlightData=t.unionX.map(t=>f.has(t)?f.get(t):null)),u},seriesNames:s,flush:()=>a.forEach((t,i)=>e.push(`trellis: ${t} duplicate x value(s) in series "${i}"; keeping the first of each`))}}function Ei(t,e={}){const i=t.xForm,n={bar:0,column:0,rangeBar:[0,0],candlestick:[0,0,0,0],boxPlot:[0,0,0,0,0]},s=e.chartType&&e.chartType in n?n[e.chartType]:null,r="plain"===i?t.unionX.map(()=>s):t.unionX.map(t=>{if(null===s)return Ai(t,i);const e=Array.isArray(s)?s.slice():s;return"object"===i?{x:t,y:e}:[t,e]});return{name:e.name||t.seriesNames[0]||"series-1",data:r}}function Fi(t,e={},i={}){const n=[],s=Array.isArray(t)?t:[],r=(a=i.chartType,!Si.includes(a||""));var a;if(e.row||e.column)return e.by&&n.push("trellis: `by` is ignored when `row`/`column` are set (they are mutually exclusive)"),function(t,e,i,n=!0,s){const r=e.row,a=e.column,o=new Map,l=new Map,c=new Map,h=[],d=[],u=[],p=(t,e)=>{-1===t.indexOf(e)&&t.push(e)};if(t.forEach((t,e)=>{var i,n;const s=r?Mi(t,e,r):"",f=a?Mi(t,e,a):"";if(null===s&&null===f)return void h.push(t);if(null===s)return p(u,f),c.has(f)||c.set(f,[]),void(null==(i=c.get(f))||i.push(t));if(null===f)return p(d,s),l.has(s)||l.set(s,[]),void(null==(n=l.get(s))||n.push(t));p(d,s),p(u,f);let g=o.get(s);g||(g=new Map,o.set(s,g));let m=g.get(f);m||(m=[],g.set(f,m)),m.push(t)}),!d.length&&!u.length)return Pi(["trellis: no series carries the row/column facet keys; nothing to split"]);"number"==typeof e.limit&&e.limit>0&&i.push("trellis: `limit` is not applied to a 2-D grid; ignoring it");const f=ki(d.length?d:[""],e.order),g=ki(u.length?u:[""],e.order),m=Li(t,i,s),{align:y,seriesNames:x,flush:_}=Ci(m,i,n,t),b=[];return f.forEach(t=>{g.forEach(e=>{var i;const n=((null==(i=o.get(t))?void 0:i.get(e))||[]).concat(l.get(t)||[]).concat(c.get(e)||[]).concat(h).map(y);b.push({key:[t,e].filter(t=>""!==t).join(" / ")||"all",rowKey:t,colKey:e,series:n,seriesNames:n.map(t=>t.name),empty:0===n.length})})}),_(),{mode:"2d",panels:b,rowKeys:f,colKeys:g,seriesNames:x,xForm:m.sawKeyed?m.xForm:"plain",unionX:m.sawKeyed?m.unionX:Array.from({length:m.plainMaxLen},(t,e)=>e),xIsNumeric:m.xIsNumeric,dropped:0,warnings:i}}(s,e,n,r,i.datetime);const o=e.by||"facet",l=new Map,c=[];if(s.forEach((t,e)=>{const i=Mi(t,e,t&&void 0!==t[_i]?_i:o);if(null===i)c.push(t);else{l.has(i)||l.set(i,[]);const e=l.get(i);e&&e.push(t)}}),0===l.size)return Pi(["trellis: no series carries the facet key; nothing to split"]);let h=ki(Array.from(l.keys()),e.order),d=0;"number"==typeof e.limit&&e.limit>0&&h.length>e.limit&&(d=h.length-e.limit,h=h.slice(0,e.limit));const u=Li(h.reduce((t,e)=>t.concat(l.get(e)||[]),[]).concat(c),n,i.datetime),{align:p,seriesNames:f,flush:g}=Ci(u,n,r,s),m=h.map(t=>{const e=(l.get(t)||[]).map(p),i=c.map(p),n=e.concat(i);return{key:t,rowKey:null,colKey:null,series:n,seriesNames:n.map(t=>t.name),empty:0===n.length}});return g(),{mode:"1d",panels:m,rowKeys:null,colKeys:null,seriesNames:f,xForm:u.sawKeyed?u.xForm:"plain",unionX:u.sawKeyed?u.unionX:Array.from({length:u.plainMaxLen},(t,e)=>e),xIsNumeric:u.xIsNumeric,dropped:d,warnings:n}}function Pi(t){return{mode:"1d",panels:[],rowKeys:null,colKeys:null,seriesNames:[],xForm:"plain",unionX:[],xIsNumeric:!1,dropped:0,warnings:t}}const Di=["heatmap","pie","donut","polarArea","radialBar"],Ri=["pie","donut","polarArea"];function Ti(t){const e=[];if(!Array.isArray(t))return e;for(let i=0;i<t.length;i++){const n=t[i];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const r=Number(s);null!=s&&isFinite(r)&&e.push(r)}return e}function Ni(t,e,i,n){var s,r,a,o,l,c;const h={plotOptions:null,yExtentOverride:null,skipYaxisPush:Di.includes(n),forceSharedY:!1,pieScaleOf:null,warnings:[]},d=t.panels,u=(null==i?void 0:i.plotOptions)||{};if("histogram"===n){const t=u.histogram||{},i=d.map(t=>t.series.map(t=>Ti(t.data))),n=ut(i.flat(2),{bins:t.bins,binWidth:t.binWidth,range:t.range});if(n&&n.edges.length>1){const r=n.edges;h.plotOptions={histogram:{range:[r[0],r[r.length-1]],binWidth:n.binWidth}};let a=0;i.forEach(e=>e.forEach(e=>{if(!e.length)return;(function(t,e={}){let i=t.slice();if(e.cumulative){let t=0;i=i.map(e=>t+=e)}const n=t.reduce((t,e)=>t+e,0);if(n<=0)return i;if("relative"===e.normalize)return i.map(t=>t/n*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return i.map(e=>e/(n*t))}return i})(function(t,e){const i=new Array(Math.max(0,e.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=pt(t[n],e);s>=0&&i[s]++}return i}(e,r),{normalize:t.normalize,cumulative:t.cumulative,binWidth:n.binWidth}).forEach(t=>{isFinite(t)&&t>a&&(a=t)})})),a>0&&(h.yExtentOverride={min:0,max:a});const o=(null==(s=e.scales)?void 0:s.y)||"shared";"independent-row"!==o&&"independent-column"!==o||(h.forceSharedY=!0,h.warnings.push("histogram trellis: group y scales would re-derive counts per group; using scales.y 'shared' (use 'independent' for per-panel count scales)."))}}if("violin"===n){const t=(null==(r=u.violin)?void 0:r.kde)||{};if(!("number"==typeof t.bandwidth&&t.bandwidth>0)){const t=[];d.forEach(e=>e.series.forEach(e=>{return i=e.data,n=t,Array.isArray(i)?(i.forEach(t=>{const e=t&&"object"==typeof t?t.y:null;Array.isArray(e)&&e.forEach(t=>{const e=Number(t);null!=t&&isFinite(e)&&n.push(e)})}),n):n;var i,n}));const e=t.length?We(t,{resolution:8}):null;e&&isFinite(e.bandwidth)&&e.bandwidth>0&&(h.plotOptions={violin:{kde:{bandwidth:e.bandwidth}}})}}if("heatmap"===n){"independent"===(null==(a=e.scales)?void 0:a.color)&&h.warnings.push("a heatmap trellis must share its color scale (the same color meaning different values per panel is a silent lie); ignoring scales.color 'independent'.");const t=null==(l=null==(o=u.heatmap)?void 0:o.colorScale)?void 0:l.ranges;if(!(Array.isArray(t)&&t.length>0)){let t=1/0,e=-1/0;d.forEach(i=>i.series.forEach(i=>{Ti(i.data).forEach(i=>{i<t&&(t=i),i>e&&(e=i)})})),isFinite(t)&&isFinite(e)&&(h.plotOptions={heatmap:{colorScale:{min:t,max:e}}})}}if("bubble"===n){"independent"===(null==(c=e.scales)?void 0:c.size)&&h.warnings.push("a bubble trellis must share its size scale; ignoring scales.size 'independent'.");let t=1/0,i=-1/0;d.forEach(e=>e.series.forEach(e=>{(function(t){const e=[];return Array.isArray(t)?(t.forEach(t=>{let i=null;Array.isArray(t)&&t.length>2?i=t[2]:t&&"object"==typeof t&&(i=t.z);const n=Number(i);null!=i&&isFinite(n)&&e.push(n)}),e):e})(e.data).forEach(e=>{e<t&&(t=e),e>i&&(i=e)})})),isFinite(t)&&isFinite(i)&&(h.plotOptions={bubble:{minZ:t,maxZ:i}})}if(Ri.includes(n)&&e.radiusByTotal){const t=new Map;let e=0;d.forEach(i=>{let n=0;i.series.forEach(t=>{Ti(t.data).forEach(t=>{n+=Math.abs(t)})}),t.set(i.key,n),n>e&&(e=n)}),e>0&&(h.pieScaleOf=i=>{const n=t.get(i);return"number"!=typeof n||n<=0?null:Math.sqrt(n/e)})}return h}const Oi=m.__apex_ThemePalettes_getThemePalettes;function $i(t,e,i=3){if(!isFinite(t)||!isFinite(e))return{min:0,max:1,tickAmount:1,decimals:0};if(t===e){const i=0===t?1:.1*Math.abs(t);t-=i,e+=i}const n=Math.max(1,i),s=(e-t)/n,r=Math.floor(Math.log10(s)),a=Math.pow(10,r);let o=1/0,l={min:0,max:1,tickAmount:0,decimals:0};return(a>=10?[1,2,2.5,5,10]:[1,2,5,10]).forEach(i=>{const s=i*a,c=Math.min(20,Math.max(0,(10===i?-1:0)-r)),h=+(Math.floor(t/s)*s).toFixed(c),d=+(Math.ceil(e/s)*s).toFixed(c),u=Math.max(1,Math.round((d-h)/s)),p=Math.abs(u-n);(p<o||p===o&&u<l.tickAmount)&&(o=p,l={min:h,max:d,tickAmount:u,decimals:c})}),l}const Ii=t=>null==t?t:Array.isArray(t)?t[1]:"object"==typeof t?t.y:t;function zi(t,e,i){const n=Ii(t);null!=n&&(Array.isArray(n)?n:[n]).forEach(t=>{const n=Number(t);!isFinite(n)||i&&n<=0||(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})}function Wi(t,e,i){const n=e&&"object"==typeof e&&!Array.isArray(e)&&"highlight"in e?e.highlight:Array.isArray(t.highlightData)?t.highlightData[i]:null;return"number"==typeof n&&isFinite(n)?n:null}function Bi(t){if("number"!=typeof t||!isFinite(t)||t%1==0)return 0;const e=String(t);return-1!==e.indexOf("e")||-1!==e.indexOf("E")?4:Math.min(4,(e.split(".")[1]||"").length)}function ji(t,e=!1,i=!1){const n={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach((s,r)=>{zi(s,n,i);const a=e?Wi(t,s,r):null;null!==a&&zi(a,n,i)})})),isFinite(n.min)&&isFinite(n.max)?n:null}function Hi(t,e={}){const i={min:1/0,max:-1/0},n=t=>{isFinite(t)&&(t<i.min&&(i.min=t),t>i.max&&(i.max=t))};return t.forEach(t=>{const s=new Map;t.series.forEach(t=>{var n;if(!Array.isArray(t.data))return;if(!function(t,e){if(!e.stackOnlyBar)return!0;const i=t&&t.type;return null==i||"bar"===i||"column"===i}(t,e))return void t.data.forEach(t=>zi(t,i));const r=String(null!=(n=t.group)?n:""),a=t=>{const e=s.get(t)||{pos:[],neg:[]};return s.set(t,e),e},o=a(r),l=e.parts?a("~"+r):null;t.data.forEach((e,i)=>{[o,l].forEach((n,s)=>{if(!n)return;void 0===n.pos[i]&&(n.pos[i]=0,n.neg[i]=0);const r=s?Wi(t,e,i):(t=>{const e=Ii(t);if(null==e||Array.isArray(e))return null;const i=Number(e);return isFinite(i)?i:null})(e);null!==r&&(r>0?n.pos[i]+=r:n.neg[i]+=r)})})}),s.forEach(t=>{t.pos.forEach(n),t.neg.forEach(n)})}),isFinite(i.min)&&isFinite(i.max)?i:null}function Yi(t,e={},i={}){const n=e.scales||{},s=n.x||"shared",r=n.y||"shared";let o=null;if("shared"===s&&t.xIsNumeric&&t.unionX.length){const e=t.unionX;o={min:e[0],max:e[e.length-1]}}const h=["bar","column","histogram"].includes(i.chartType||""),d=i.yaxis||[],u=i.axisNames,p=u?u.map((t,e)=>e):[0],f=(t,e)=>u?t.map(t=>c(l({},t),{series:t.series.filter(t=>u[e].includes(t.name))})):t,g=p.map(e=>i.yExtentOverride?0:function(t){let e=0;const i=t=>{const i=Bi(t);i>e&&(e=i)};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach(t=>{const e=Ii(t);Array.isArray(e)?e.forEach(i):i(e)})})),e}(f(t.panels,e))),m=!!i.stacked&&"100%"===i.stackType,y=!!i.stacked&&!m,x=(t,n)=>{const s=p.map(s=>((t,i)=>{if(!t)return null;const n=d[i]||{};if(n.logarithmic&&t.min>0){const e=n.logBase||10,s=t=>+(Math.log(t)/Math.log(e)).toFixed(9),r=Math.floor(s(t.min)),o=Math.max(r+1,Math.ceil(s(t.max)));return{min:a(e,r),max:a(e,o),tickAmount:o-r,decimals:Math.max(g[i],Bi(a(e,r)))}}h&&t.min>0&&(t.min=0);const s=$i(t.min,t.max,e.targetTicks||3);return s.decimals=Math.max(s.decimals,g[i]),s})(n||((t,e)=>{var n;const s=f(t,e);return(null==(n=d[e])?void 0:n.logarithmic)?ji(s,i.parts,!0):m?{min:0,max:100}:y?Hi(s,{stackOnlyBar:i.stackOnlyBar,parts:i.parts}):ji(s,i.parts)})(t,s),s));return u?s:s[0]};let _=null;"shared"===r&&(_=x(t.panels,u?null:i.yExtentOverride));const b=e=>{const i=new Map;t.panels.forEach(t=>{var n;const s=null!=(n=t[e])?n:"";i.set(s,(i.get(s)||[]).concat(t))});const n=new Map;return i.forEach((t,e)=>{const i=x(t);i&&n.set(e,i)}),n},v="independent-row"===r?b("rowKey"):null,w="independent-column"===r?b("colKey"):null,A=Oi(),M=Array.isArray(i.userColors)&&i.userColors.length?i.userColors:A[i.palette||""]||A.palette1,k=t.seriesNames;return{x:o,y:_,rowY:v,colY:w,colorOf:t=>M[Math.max(0,k.indexOf(t))%M.length],palette:M}}function qi({panelCount:t,containerWidth:e,cfg:i,hostHeight:n,chromeHeight:s}){var r,a;const o=null!=(r=i.gap)?r:12,l=function(t,e,i={}){var n,s;const r=null!=(n=i.gap)?n:12;if("number"==typeof i.columns&&i.columns>0)return Math.max(1,Math.min(Math.floor(i.columns),e));const a=null!=(s=i.minPanelWidth)?s:220,o=Math.floor((t+r)/(a+r));return Math.max(1,Math.min(o,e))}(e,t,i),c=Math.max(1,Math.ceil(t/l)),h=!i.header||!1!==i.header.show?22:0,d=Math.max(0,s||0),u=c*h+o*(c-1)+d,p="number"==typeof n&&n>0?n:0,f=Math.max(0,(e-o*(l-1))/l);let g;g="number"==typeof i.panelHeight&&i.panelHeight>0?i.panelHeight:p>0?(p-u)/c:f/(null!=(a=i.aspectRatio)?a:1.6);const m="number"==typeof i.minPanelHeight&&i.minPanelHeight>0?i.minPanelHeight:80;g=Math.max(m,Math.round(g));const y=c*(g+h)+o*(c-1),x=p>0?Math.max(0,y+d-p):0,_=i.axes&&i.axes.labels||"edges",b=i.scales||{},v=1===l,w=Array.from({length:t},(e,i)=>{const n=Math.floor(i/l),s=i%l;let r,a;return"none"===_?(r=!1,a=!1):"all"===_||v?(r=!0,a=!0):(r="independent"===b.x||n===function(t,e,i,n){return t<e-(n-1)*i?n-1:n-2}(s,t,l,c),a="independent"===b.y||"independent-column"===b.y||0===s),{i:i,r:n,c:s,showXLabels:r,showYLabels:a}});return{cols:l,rows:c,panelW:f,panelH:g,headerH:h,gap:o,cells:w,gridH:y,overflowH:x}}const Xi=["#cf4d3f","#8f9499","#26a75b"],Gi=(t,e,i)=>t+(e-t)*i;function Ui(t){return Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")}function Ki(t,e,i){const n=B.parseColor(Zi(t)),s=B.parseColor(Zi(e));return n&&s?Vi(n.map((t,e)=>Gi(t,s[e],i))):t}function Vi(t){return"#"+t.slice(0,3).map(Ui).join("")+(t[3]<1?Ui(255*t[3]):"")}function Zi(t){const e="string"==typeof t?B.parseColor(t.trim()):null;return e?Vi(e):"#000000"}function Ji(t,e,i,n){var s,r,a;if(!e||"object"!=typeof e)return null;const o=null==(a=null==(r=null==(s=t.config.plotOptions)?void 0:s.treemap)?void 0:r.colorScale)?void 0:a.colorValue;let l;if(l="function"==typeof o?o(e,{seriesIndex:i,dataPointIndex:n,w:t}):"string"==typeof o?e[o]:e.colorValue,null==l)return null;const c=Number(l);return Number.isFinite(c)?c:null}function Qi(t){var e,i,n,s;const r=null==(n=null==(i=null==(e=t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:n.colorScale,a=r&&r.gradient;if(!a)return null;if(!1===a.enabled)return null;const o=t.config.series||[];let l=1/0,c=-1/0,h=!1;for(let e=0;e<o.length;e++){const i=o[e]&&o[e].data;if(Array.isArray(i))for(let n=0;n<i.length;n++){const s=Ji(t,i[n],e,n);null!=s&&(h=!0,s<l&&(l=s),s>c&&(c=s))}}if(!h&&!0!==a.enabled)return null;Number.isFinite(l)||(l=0,c=0);const d=t=>Number.isFinite(Number(t))?Number(t):null,u=d(a.min),p=d(a.max);let f=null!=u?u:l,g=null!=p?p:c,m=null;if(null===a.midpoint?m=null:Number.isFinite(Number(a.midpoint))?m=Number(a.midpoint):f<0&&g>0&&(m=0),null!=m&&!1!==a.symmetric&&null==u&&null==p){const t=Math.max(Math.abs(f-m),Math.abs(g-m));f=m-t,g=m+t}g===f&&(f-=.5,g+=.5);const y=Array.isArray(a.stops)&&a.stops.length>=2,x=function(t,e,i,n,s,r){const a=t=>Zi(B.getThemeColor(t,r));if(s)return t.stops.filter(t=>t&&Number.isFinite(Number(t.value))).map(t=>({value:Number(t.value),color:a(t.color)})).sort((t,e)=>t.value-e.value);const o=(Array.isArray(t.colors)&&t.colors.length>=2?t.colors:Xi).map(a),l=o.length;if(null!=n&&l>=3){const t=Math.floor((l-1)/2),s=[];for(let i=0;i<=t;i++)s.push({value:Gi(e,n,i/t),color:o[i]});for(let e=t+1;e<l;e++)s.push({value:Gi(n,i,(e-t)/(l-1-t)),color:o[e]});return s}return o.map((t,n)=>({value:Gi(e,i,n/(l-1)),color:t}))}(a,f,g,m,y,null==(s=t.dom)?void 0:s.elWrap);if(x.length<2)return null;y&&(null==u&&(f=Math.min(f,x[0].value)),null==p&&(g=Math.max(g,x[x.length-1].value)));const _=t=>{if(!Number.isFinite(t))return x[Math.floor(x.length/2)].color;if(t<=x[0].value)return x[0].color;const e=x[x.length-1];if(t>=e.value)return e.color;for(let e=1;e<x.length;e++){const i=x[e];if(t<=i.value){const n=x[e-1],s=i.value-n.value,r=0===s?0:(t-n.value)/s;return Ki(n.color,i.color,r)}}return e.color},b=g-f,v=x.map(t=>{const e=Math.min(g,Math.max(f,t.value));return{percent:b&&(e-f)/b,color:e===t.value?t.color:_(e)}});return{min:f,max:g,midpoint:m,stops:x,at:_,legendStops:v}}function tn(t,e,i,n){const s=t.config.plotOptions[e],r=s.shadeIntensity,a=1.25*r;return t.globals.hasNegs||n?s.reverseNegativeShade?(i<0?i:1-i)*a:i<=0?1-(1+i)*r:(1-i)*r:"treemap"===e?(1-i)*a:1-i}const en=m.__apex_tooltip_Utils,nn="http://www.w3.org/2000/svg";class sn{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._grad=null,this._bandHitEls=[],this._activeBandIndex=-1,this._targetEl=null,this.panelsW=null,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this._cfg();return"function"==typeof t.formatter?t.formatter:t=>{if(!Number.isFinite(t))return String(t);const e=Math.abs(t);return e>=1e3?t.toFixed(0):e>=10?t.toFixed(1):t.toFixed(2)}}static colorScaleOf(t){var e,i,n,s,r;const a=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return a&&(null==(r=null==(s=null==(n=null==t?void 0:t.config)?void 0:n.plotOptions)?void 0:s[a])?void 0:r.colorScale)||null}static configFor(t){const e=sn.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return sn.configFor(this.w)||{}}static isEnabled(t){if(!sn.supports(t))return!1;const e=sn.configFor(t);return!(!e||!e.enabled)}static supports(t){var e,i;const n=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return"heatmap"===n||"treemap"===n}draw(t=null){var e,i,n,s,r,a,o,l;const c=this.w;this._targetEl=t;const h=t||c.dom.elLegendWrap;if(!h)return;const d=this._cfg(),u=c.config.legend.position,p="left"===u||"right"===u,f=null!=(i=null==(e=d.arrow)?void 0:e.size)?i:8,g=f+4,m=d.showLabels?28:4,y=d.showLabels?20:4,x=d.showLabels?44:0,_=this._resolveStripLength(p?d.height:d.width,p),b=d.thickness,v=p?Math.max(b+g+4,x):_+2*m,w=p?_+2*y:b+g+4,A=(v-(b+g))/2,k=p?"left"===u?A:A+g:m,L=p?y:"top"===u?g:4,S=M.createElementNS(nn,"svg");S.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),S.setAttribute("width",String(v)),S.setAttribute("height",String(w)),S.setAttribute("overflow","visible");const C=M.createElementNS(nn,"defs"),E=`apexcharts-heatmap-gradient-${c.globals.cuid}`,F=M.createElementNS(nn,"linearGradient");F.setAttribute("id",E),p?(F.setAttribute("x1","0"),F.setAttribute("y1","1"),F.setAttribute("x2","0"),F.setAttribute("y2","0")):(F.setAttribute("x1","0"),F.setAttribute("y1","0"),F.setAttribute("x2","1"),F.setAttribute("y2","0")),this._grad=F;const{min:P,max:D,bands:R}=this._paintStops();C.appendChild(F),S.appendChild(C);const T=M.createElementNS(nn,"rect");if(T.setAttribute("x",String(k)),T.setAttribute("y",String(L)),T.setAttribute("width",String(p?b:_)),T.setAttribute("height",String(p?_:b)),T.setAttribute("rx","2"),T.setAttribute("fill",`url(#${E})`),S.appendChild(T),d.showLabels){const t=(null==(n=d.labelStyle)?void 0:n.colors)||(Array.isArray(c.config.legend.labels.colors)?c.config.legend.labels.colors[0]:c.config.legend.labels.colors)||c.config.chart.foreColor,e=(null==(s=d.labelStyle)?void 0:s.fontSize)||"11px",i=(null==(r=d.labelStyle)?void 0:r.fontFamily)||c.config.chart.fontFamily,a=this._getFormatter(),o=(n,s,r,a)=>{const o=M.createElementNS(nn,"text");return o.setAttribute("x",String(s)),o.setAttribute("y",String(r)),o.setAttribute("text-anchor",a),o.setAttribute("dominant-baseline","middle"),o.setAttribute("fill",t),o.setAttribute("font-size",e),i&&o.setAttribute("font-family",i),o.textContent=String(n),o};if(p){const t=k+b/2;S.appendChild(o(a(P),t,L+_+10,"middle")),S.appendChild(o(a(D),t,L-10,"middle"))}else{const t=L+b/2;S.appendChild(o(a(P),k-6,t,"end")),S.appendChild(o(a(D),k+_+6,t,"start"))}}const N=(null==(a=d.arrow)?void 0:a.color)||c.config.chart.foreColor,O=this._buildArrow(N);if(S.appendChild(O),this.arrowEl=O,this._bandHitEls=[],c.config.legend.onItemHover.highlightDataSeries&&R.length>0&&R.forEach(t=>{const e=M.createElementNS(nn,"rect");if(p){const i=L+_-t.p2*_,n=L+_-t.p1*_;e.setAttribute("x",String(k)),e.setAttribute("y",String(i)),e.setAttribute("width",String(b)),e.setAttribute("height",String(Math.max(0,n-i)))}else e.setAttribute("x",String(k+t.p1*_)),e.setAttribute("y",String(L)),e.setAttribute("width",String(Math.max(0,(t.p2-t.p1)*_))),e.setAttribute("height",String(b));e.setAttribute("fill","transparent"),e.setAttribute("class","apexcharts-heatmap-gradient-band"),e.setAttribute("data:range-index",String(t.index)),e.style.cursor="pointer",S.appendChild(e),this._bandHitEls.push(e)}),this._geom={isVertical:p,position:u,stripX:k,stripY:L,stripLength:_,stripThickness:b,arrowSize:f,svgWidth:v,svgHeight:w},d.showHoverValue){const t=M.createElement("div");t.classList.add("apexcharts-heatmap-gradient-legend-value"),t.style.position="absolute",t.style.fontSize=(null==(o=d.labelStyle)?void 0:o.fontSize)||"11px",t.style.fontFamily=(null==(l=d.labelStyle)?void 0:l.fontFamily)||c.config.chart.fontFamily||"",t.style.background="rgba(0,0,0,0.65)",t.style.color="#fff",t.style.padding="2px 6px",t.style.borderRadius="3px",t.style.pointerEvents="none",t.style.whiteSpace="nowrap",t.style.opacity="0",t.style.transition="opacity 120ms ease",this.hoverValueEl=t}h.classList.add("apexcharts-heatmap-gradient-legend-wrap"),h.classList.add("apx-legend-position-"+u),h.appendChild(S),this.hoverValueEl&&h.appendChild(this.hoverValueEl),this.svgEl=S,t?(h.style.width=v+"px",h.style.height=w+"px",h.style.position="relative",h.style.overflow="visible"):this._applyWrapAlignment(h,u,p,v,w),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const i=this.w,n=e?i.globals.svgHeight||i.config.chart.height||300:i.globals.svgWidth||i.config.chart.width||600;if("string"==typeof t){const e=t.trim();if(e.endsWith("%")){const t=parseFloat(e)||0;return Math.max(20,n*t/100)}const i=parseFloat(e);return Number.isFinite(i)?i:200}return"number"==typeof t&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,i,n,s){const r=this.w,a=this._cfg().align||"center",o=12,l=r.globals.svgWidth||r.config.chart.width||600,c=r.globals.svgHeight||r.config.chart.height||300,h=r.config.legend.offsetX||0,d=r.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=n+"px",t.style.height=s+"px",t.style.right="auto",t.style.bottom="auto",i){const i=c-s-24;let r;r="start"===a?o:"end"===a?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.top=r+d+"px",t.style.left="left"===e?o+h+"px":l-n-o+h+"px"}else{const i=l-n-24;let r;r="start"===a?o:"end"===a?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.left=r+h+"px",t.style.top="top"===e?o+d+"px":c-s-o+d+"px"}}repositionToPlot(){var t,e;if(this._grad&&this._paintStops(),!k.isBrowser())return;if(this._targetEl)return;const i=this.w,n=i.globals,s=i.dom.elLegendWrap;if(!s||!this._geom)return;if(!Number.isFinite(n.gridWidth)||!Number.isFinite(n.gridHeight))return;const{isVertical:r,position:a,svgWidth:o,svgHeight:l,stripX:c,stripY:h,stripThickness:d}=this._geom,u=this._cfg().align||"center",p=i.config.legend.offsetX||0,f=i.config.legend.offsetY||0,g=null==(e=null==(t=this.ctx)?void 0:t.dimensions)?void 0:e.dimHelpers,m=g?g.getTitleSubtitleCoords("title").height+g.getTitleSubtitleCoords("subtitle").height:0,y=i.layout.xAxisHeight||0,x=(t,e)=>{const i=Math.max(0,t-e);return"start"===u?0:"end"===u?i:i/2};if(r){s.style.top=n.translateY+x(n.gridHeight,l)+f+"px";const t=(("left"===a?0:n.translateX+n.gridWidth)+("left"===a?n.translateX:n.svgWidth))/2;s.style.left=t-c-d/2+p+"px"}else{s.style.left=n.translateX+x(n.gridWidth,o)+p+"px";const t=(("top"===a?m:n.translateY+n.gridHeight+y)+("top"===a?n.translateY:n.svgHeight))/2;s.style.top=t-h-d/2+f+"px"}M.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,i=this.svgEl&&this.svgEl.querySelector("rect");if(!e||!i||!this._geom)return;if(!t.dom.baseEl||!t.dom.baseEl.querySelector(".apexcharts-svg"))return;const n=i.getBoundingClientRect(),s=en.plotRect(t);if(!(n.width&&n.height&&s.width&&s.height))return;const r=s.left,a=s.left+s.width,o=s.top,l=s.top+s.height,c=s.zoom,{isVertical:h,position:d}=this._geom;if(h){const t=("left"===d?r-n.right:n.left-a)/c;if(t<16){const i=parseFloat(e.style.left)||0,n=16-t;e.style.left=i+("left"===d?-n:n)+"px"}}else{const t=("top"===d?o-n.bottom:n.top-l)/c;if(t<16){const i=parseFloat(e.style.top)||0,n=16-t;e.style.top=i+("top"===d?-n:n)+"px"}}}destroy(){var t,e,i,n,s,r,a;for(let i=0;i<this._bandHitEls.length;i++){const n=this._bandHitEls[i];null==(t=n.removeEventListener)||t.call(n,"mousemove",this._onBandEnter),null==(e=n.removeEventListener)||e.call(n,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,null==(i=this.ctx)?void 0:i.events)try{null==(s=(n=this.ctx.events).removeEventListener)||s.call(n,"dataPointMouseEnter",this._onCellEnter),null==(a=(r=this.ctx.events).removeEventListener)||a.call(r,"dataPointMouseLeave",this._onCellLeave)}catch(t){}}_attachBandHoverListeners(){if(k.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,i,n,s;const r=this.w,a=t.currentTarget,o=parseInt(null!=(e=a.getAttribute("data:range-index"))?e:"-1",10);o<0||o===this._activeBandIndex||(this._activeBandIndex=o,null==(s=null==(n=null==(i=this.ctx)?void 0:i.events)?void 0:n.fireEvent)||s.call(n,"legendHover",[this.ctx,o,r]),this._highlightRange(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,this._highlightRange(t,"reset")}_highlightRange(t,e){var i;((null==(i=this.panelsW)?void 0:i.call(this))||[this.w]).forEach(i=>new v(i).highlightRangeInSeries(t,e))}_attachHoverListeners(){var t,e;k.isBrowser()&&(null==(e=null==(t=this.ctx)?void 0:t.events)?void 0:e.addEventListener)&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,i,n;if(!this.arrowEl)return;const s=t[t.length-1];if(!s||"object"!=typeof s)return;const r=s.w||this.w,a=s.seriesIndex,o=s.dataPointIndex;if("number"!=typeof a||"number"!=typeof o)return;if(!sn.supports(r))return;let l;l=this._continuous?function(t,e,i){const n=t.config.series[e];return Ji(t,n&&Array.isArray(n.data)?n.data[i]:null,e,i)}(r,a,o):null==(n=null==(i=null==(e=r.seriesData)?void 0:e.series)?void 0:i[a])?void 0:n[o],null==l||Number.isNaN(l)||this._positionArrow(l)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:i,stripX:n,stripY:s,stripLength:r,stripThickness:a,arrowSize:o}=this._geom,l=this._min,c=this._max-l;let h;if(h=0===c?.5:(t-l)/c,h<0&&(h=0),h>1&&(h=1),e){const t=s+r-h*r;let e,l;"left"===i?(e=n+a,l=e+o):(e=n,l=e-o);const c=[`${e},${t}`,`${l},${t-o/2}`,`${l},${t+o/2}`].join(" ");this.arrowEl.setAttribute("points",c)}else{const t=n+h*r;let e,l;"top"===i?(e=s+a,l=e+o):(e=s,l=e-o);const c=[`${t},${e}`,`${t-o/2},${l}`,`${t+o/2},${l}`].join(" ");this.arrowEl.setAttribute("points",c)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const l=this._getFormatter();if(this.hoverValueEl.textContent=l(t),e){const t=s+r-h*r;"left"===i?this.hoverValueEl.style.left=`${n+a+o+8}px`:(this.hoverValueEl.style.left=n-o-8+"px",this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=t-9+"px"}else{const t=n+h*r;this.hoverValueEl.style.left=`${t}px`,this.hoverValueEl.style.transform="translateX(-50%)",this.hoverValueEl.style.top="top"===i?`${s+a+o+8}px`:s-o-18+"px"}this.hoverValueEl.style.opacity="1"}}_buildArrow(t){const e=M.createElementNS(nn,"polygon");return e.setAttribute("fill",t),e.setAttribute("opacity","0"),e.setAttribute("class","apexcharts-heatmap-gradient-arrow"),e.setAttribute("points","0,0 0,0 0,0"),e.setAttribute("pointer-events","none"),e}_paintStops(){const t=this._computeStops(),e=this._grad;return this._min=t.min,this._max=t.max,e.innerHTML="",t.stops.forEach(t=>{const i=M.createElementNS(nn,"stop");i.setAttribute("offset",`${(100*t.percent).toFixed(2)}%`),i.setAttribute("stop-color",t.color),e.appendChild(i)}),t}_computeStops(){var t;const e=this.w,i=sn.colorScaleOf(e)||{},n=this._cfg(),s=Qi(e);if(s)return this._continuous=!0,{min:s.min,max:s.max,stops:s.legendStops,bands:[]};this._continuous=!1;let r=1/0,a=-1/0;const o=(null==(t=e.seriesData)?void 0:t.series)||[];for(let t=0;t<o.length;t++){const e=o[t];if(e)for(let t=0;t<e.length;t++){const i=e[t];null==i||Number.isNaN(i)||(i<r&&(r=i),i>a&&(a=i))}}Number.isFinite(r)||(r=0),Number.isFinite(a)||(a=0);let h=r,d=a;const u=void 0!==i.min&&void 0!==i.max&&i.max>i.min;u?(h=i.min,d=i.max):(void 0!==i.min&&(h=i.min<r?i.min:r),void 0!==i.max&&(d=i.max>a?i.max:a));const p=[],f=[];if(i.ranges&&i.ranges.length>0){const t=i.ranges.map((t,e)=>c(l({},t),{_originalIndex:e})).sort((t,e)=>t.from-e.from),e=t[0].from,n=t[t.length-1].to;h=e,d=n;const s=n-e||1;t.forEach(t=>{const i=(t.from-e)/s,n=(t.to-e)/s;p.push({percent:(i+n)/2,color:t.color}),f.push({index:t._originalIndex,p1:i,p2:n})})}else{const t=e.globals.colors[0]||"#008FFB",s=new B,r=e.config.chart.type,a=e.config.plotOptions[r]||{},o=e.globals,l="heatmap"===r&&!a.distributed&&!u&&o.maxY>=o.minY,c=l?o.maxY:d,f=Math.abs(c)+Math.abs(l?i.min<o.minY?i.min:o.minY:h),g=Math.max(2,n.stops||16);for(let i=0;i<g;i++){const n=i/(g-1),o=0===f?0:Math.min(h+n*(d-h),c)/f,l=Math.max(-1,Math.min(1,tn(e,r,o,!1))),u=a.enableShades?s.shadeColor("dark"===e.config.theme.mode?-l:l,t):t;p.push({percent:n,color:u})}}return{min:h,max:d,stops:p,bands:f}}}const rn={zoom:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="10.5" cy="10.5" r="6"/><path d="M15 15l5 5"/><path d="M8 10.5h5M10.5 8v5"/></svg>',pan:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 3v18M3 12h18"/><path d="M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3"/></svg>',reset:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M4 10a8 8 0 1 1 2 6"/><path d="M4 4v6h6"/></svg>',download:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 4v11"/><path d="M7 11l5 5 5-5"/><path d="M4 20h16"/></svg>'};function an(t,e,i,n){var s;const r=t.sync.isHidden(i),a=t.scales?t.scales.colorOf(i):"#008FFB";e.firstChild.style.background=a;const o=e.querySelector(".apexcharts-legend-text");if(o){const e=(null==(s=t.w.config.legend)?void 0:s.labels)||{},i=e.useSeriesColors?a:Array.isArray(e.colors)?e.colors[n]:e.colors;o.style.color=i||""}e.classList.toggle("apexcharts-inactive-legend",r),e.setAttribute("data:collapsed",String(r))}class on{constructor(t){this.trellis=t,this.elLegend=null,this.elToolbar=null,this.elTitle=null,this.elSubtitle=null,this.elBreadcrumb=null,this.gradientLegend=null,this._gradPending=null,this._gradWire=null}buildHeader(t,e,i){const n=this.trellis,s=n.cfg.header||{};if(!1===s.show)return;const r=M.createElement("div");r.className="apexcharts-trellis-header";let a=e;"function"==typeof s.formatter&&(a=s.formatter(e,{dimension:"string"==typeof n.cfg.by?n.cfg.by:void 0,index:i.index,count:i.count})),r.textContent=null==a?"":String(a);const o=s.style||{};if(o.fontSize&&(r.style.fontSize=o.fontSize),o.fontWeight&&(r.style.fontWeight=String(o.fontWeight)),o.color&&(r.style.color=o.color),!1!==n.cfg.promote){r.classList.add("apexcharts-trellis-header-clickable"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("title","Expand this panel");const t=()=>{n._promotedKey===e?n.restorePromotion():n.promote(e)};r.addEventListener("click",t),r.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())})}t.appendChild(r)}stripEl(t,e,i){const n=this.trellis.cfg.header||{},s=M.createElement("div");s.className=`apexcharts-trellis-strip apexcharts-trellis-strip-${t}`;let r=e;"function"==typeof n.formatter&&(r=n.formatter(e,{dimension:t,index:i.index,count:i.count})),s.textContent=null==r?"":String(r);const a=n.style||{};return a.fontSize&&(s.style.fontSize=a.fontSize),a.fontWeight&&(s.style.fontWeight=String(a.fontWeight)),a.color&&(s.style.color=a.color),s}buildBreadcrumb(t,e,i){this.removeBreadcrumb();const n=M.createElement("div");n.className="apexcharts-trellis-breadcrumb";const s=M.createElement("button");s.setAttribute("type","button"),s.className="apexcharts-trellis-breadcrumb-back",s.textContent="All panels",s.addEventListener("click",i);const r=M.createElement("span");r.className="apexcharts-trellis-breadcrumb-sep",r.textContent="/";const a=M.createElement("span");a.className="apexcharts-trellis-breadcrumb-current",a.textContent=e,n.appendChild(s),n.appendChild(r),n.appendChild(a),t.appendChild(n),this.elBreadcrumb=n}removeBreadcrumb(){this.elBreadcrumb&&this.elBreadcrumb.parentNode&&this.elBreadcrumb.parentNode.removeChild(this.elBreadcrumb),this.elBreadcrumb=null}buildTitle(t){const e=this.trellis.w.config,i=i=>{var n,s,r;const a=e[i];if(!a||!a.text)return null;const o=M.createElement("div");o.className="apexcharts-trellis-"+i,o.textContent=a.text;const{fontSize:l,fontWeight:c,fontFamily:h,color:d}=a.style||{},u=o.style;l&&(u.fontSize=l);const p="title"===i?null==(r=null==(s=null==(n=this.trellis.ctx.opts)?void 0:n.title)?void 0:s.style)?void 0:r.fontWeight:c;return p&&(u.fontWeight=String(p)),h&&(u.fontFamily=h),(d||"title"!==i)&&(u.color=d||"var(--apx-fore, var(--apx-trellis-fore, #373d3f))"),"title"!==i&&(u.padding="0 0 6px"),a.align&&"left"!==a.align&&(u.textAlign=a.align),t.appendChild(o),o};this.elTitle=i("title"),this.elSubtitle=i("subtitle")}buildLegend(t){const e=this.trellis;if(this._names=null,"shared"!==(e.cfg.legend||"shared"))return;if("heatmap"===e.w.config.chart.type)return void this.buildGradientLegend(t);const i=e.split?e.split.seriesNames:[];if(i.length<2)return;const n=M.createElement("div");n.className="apexcharts-trellis-legend apexcharts-legend",n.setAttribute("role","list");const s=e.w.config.legend.fontFamily;s&&(n.style.fontFamily=s),i.forEach((t,i)=>{const s=M.createElement("div");s.className="apexcharts-legend-series apexcharts-trellis-legend-item",s.setAttribute("role","listitem"),s.setAttribute("tabindex","0");const r=M.createElement("span");r.className="apexcharts-legend-marker";const a=M.createElement("span");a.className="apexcharts-legend-text",a.textContent=t,s.appendChild(r),s.appendChild(a),an(e,s,t,i);const o=()=>{e.sync.toggleSeries(t),an(e,s,t,i)};s.addEventListener("click",o),s.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),o())}),n.appendChild(s)}),t.appendChild(n),this.elLegend=n,this._names=JSON.stringify(i)}rebuildLegend(){const t=this.trellis,e=this.elLegend,i=t.split?t.split.seriesNames:[];if(e&&this._names===JSON.stringify(i))return void i.forEach((i,n)=>an(t,e.children[n],i,n));this.destroyGradientLegend(),this.elLegend=null,t.elWrap&&this.buildLegend(t.elWrap);const n=this.elLegend;e&&(n?e.replaceWith(n):e.remove())}buildGradientLegend(t){const e=this.trellis,i=e.panels.find(t=>t.chart);if(!i){if(this._gradPending)return;const i=()=>{var n,s;this._gradPending=null,null==(s=(n=e.ctx.events).removeEventListener)||s.call(n,"panelMounted",i),this.buildGradientLegend(t)};return this._gradPending=i,void e.ctx.events.addEventListener("panelMounted",i)}const n=M.createElement("div");n.className="apexcharts-trellis-legend apexcharts-trellis-gradient-legend",t.appendChild(n),this.elLegend=n;const s=i.chart,r=new sn(s.w,s.ctx);r.draw(n),this.gradientLegend=r,r.panelsW=()=>e.panels.filter(t=>t.chart).map(t=>t.chart.w);const a=(t,e)=>{var i;const n=e.chart!==s&&(null==(i=e.chart)?void 0:i.ctx.events);n&&(n.addEventListener("dataPointMouseEnter",r._onCellEnter),n.addEventListener("dataPointMouseLeave",r._onCellLeave))};e.panels.forEach(t=>a(0,t)),e.ctx.events.addEventListener("panelMounted",a),this._gradWire=a}destroyGradientLegend(){var t,e;const i=this.trellis;this._gradPending&&(null==(e=(t=i.ctx.events).removeEventListener)||e.call(t,"panelMounted",this._gradPending),this._gradPending=null),i.ctx.events.removeEventListener("panelMounted",this._gradWire),this._gradWire=null;const n=this.gradientLegend;if(n){i.panels.forEach(t=>{var e;const i=null==(e=t.chart)?void 0:e.ctx.events;null==i||i.removeEventListener("dataPointMouseEnter",n._onCellEnter),null==i||i.removeEventListener("dataPointMouseLeave",n._onCellLeave)});try{n.destroy()}catch(t){}this.gradientLegend=null}}buildToolbar(t){var e,i,n;const s=this.trellis;if("shared"!==(s.cfg.toolbar||"shared"))return;const r=M.createElement("div");r.className="apexcharts-trellis-toolbar";const a={},o=t=>{s._tool=t,s.panels.forEach(e=>{if(!e.chart)return;const i=e.chart.w.interact;i.zoomEnabled="zoom"===t&&e.chart.w.config.chart.zoom.enabled,i.panEnabled="pan"===t,i.selectionEnabled=!1}),a.zoom.classList.toggle("apexcharts-selected","zoom"===t),a.pan.classList.toggle("apexcharts-selected","pan"===t),a.zoom.setAttribute("aria-pressed",String("zoom"===t)),a.pan.setAttribute("aria-pressed",String("pan"===t))},l=(t,e,i)=>{const n=M.createElement("button");return n.className=`apexcharts-trellis-tool apexcharts-trellis-tool-${t}`,n.setAttribute("type","button"),n.setAttribute("aria-label",e),n.setAttribute("title",e),n.innerHTML=rn[t],n.addEventListener("click",i),a[t]=n,r.appendChild(n),n},c="none"!==s.cfg.zoom&&!1!==(null==(n=null==(i=null==(e=s.ctx.opts)?void 0:e.chart)?void 0:i.zoom)?void 0:n.enabled);if(c&&(l("zoom","Selection zoom",()=>o("zoom")),l("pan","Pan",()=>o("pan")),l("reset","Reset zoom",()=>{s.sync.resetAll()})),s.ctx.exports){const t=M.createElement("div");t.className="apexcharts-trellis-menu",[["png","Download PNG"],["svg","Download SVG"],["csv","Download CSV"]].forEach(([e,i])=>{const n=M.createElement("button");n.setAttribute("type","button"),n.className="apexcharts-trellis-menu-item",n.textContent=i,n.addEventListener("click",()=>{t.classList.remove("apexcharts-trellis-menu-open"),s.exports.download(e)}),t.appendChild(n)}),l("download","Download",()=>{t.classList.toggle("apexcharts-trellis-menu-open")}),r.appendChild(t)}r.firstChild&&(c&&(a.zoom.classList.add("apexcharts-selected"),a.zoom.setAttribute("aria-pressed","true"),a.pan.setAttribute("aria-pressed","false")),t.appendChild(r),this.elToolbar=r,t.classList.add("apexcharts-trellis-has-toolbar"))}}function ln(t,e){const i=B.clone(t.w.config.yaxis);return(Array.isArray(i)?i:[i]).map(t=>B.extend(t,e))}class cn{constructor(t){this.trellis=t,this._syncing=!1,this._hidden=new Set,this.currentWindow=null}_noteWindow(t,e){const i=t&&t.xaxis;i&&null!=i.min&&null!=i.max?this.currentWindow={x:{min:i.min,max:i.max},y:this.currentWindow&&this.currentWindow.y||null,zoomed:e||!(!this.currentWindow||!this.currentWindow.zoomed)}:e&&(this.currentWindow=null)}makeZoomedHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!0),this.onZoomed(i)}}makeScrolledHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!1)}}onZoomed(t){const e=this.trellis;if(this._syncing)return;const i=e.cfg;if(!i||"shared"!==(i.scales.y||"shared"))return;if(!e.autoScaleYaxis)return;const n=t&&t.xaxis;if(!n||null==n.min||null==n.max)return;if(!e.split||!e.split.xIsNumeric)return;const s=function(t,e,i,n,s=!1){const r={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach((e,a)=>{if(null===e||"object"!=typeof e)return;const o=Number(ti(Array.isArray(e)?e[0]:e.x,!0));if(!isFinite(o)||o<i||o>n)return;zi(e,r);const l=s?Wi(t,e,a):null;null!==l&&zi(l,r)})})),isFinite(r.min)&&isFinite(r.max)?r:null}(e.split.panels,e.split.xForm,n.min,n.max,e._stackingHost().parts);if(!s)return;const r=$i(s.min,s.max,i.targetTicks||3);this.currentWindow&&(this.currentWindow.y={min:r.min,max:r.max,tickAmount:r.tickAmount}),this._syncing=!0;const a=e.panels.map(t=>t.chart?t.chart.updateOptions({yaxis:ln(t.chart,{min:r.min,max:r.max,tickAmount:r.tickAmount})},!1,!1,!1).catch(()=>{}):Promise.resolve());Promise.all(a).finally(()=>{this._syncing=!1})}resetAll(){const t=this.trellis;this.currentWindow=null;const e=t.scales&&t.scales.x?{min:t.scales.x.min,max:t.scales.x.max}:{min:void 0,max:void 0};this._syncing=!0;const i=t.panels.map(i=>{if(!i.chart)return Promise.resolve();i.chart.w.interact.zoomed=!1;const n={xaxis:e},s=t.split?t._yBoundsFor(t.split.panels[i.index]):null;return s&&(n.yaxis=ln(i.chart,{min:s.min,max:s.max,tickAmount:s.tickAmount})),i.chart.updateOptions(n,!1,!1,!1).catch(()=>{})});return Promise.all(i).finally(()=>{this._syncing=!1})}toggleSeries(t){const e=!this._hidden.has(t);return e?this._hidden.add(t):this._hidden.delete(t),this.trellis.panels.forEach(i=>{const n=i.chart;if(!n)return;if(-1!==(n.w.seriesData.seriesNames||[]).indexOf(t))try{e?n.hideSeries(t):n.showSeries(t)}catch(t){}}),e}isHidden(t){return this._hidden.has(t)}prune(t){this._hidden.forEach(e=>{t.includes(e)||this._hidden.delete(e)})}applyHiddenTo(t){if(!this._hidden.size||!t)return;const e=t.w.seriesData&&t.w.seriesData.seriesNames||[];this._hidden.forEach(i=>{if(-1!==e.indexOf(i))try{t.hideSeries(i)}catch(t){}})}wireCrosshairs(t){let e=0,i=null;const n=new WeakMap,s=t=>{let e=n.get(t);return e&&t.contains(e)||n.set(t,e=t.querySelector(".apexcharts-xcrosshairs")),e},r=["x","x1","x2"],a=()=>{const t=i&&i.closest?i.closest(".apexcharts-trellis-cell"):null,e=t?s(t):null,n=e&&e.classList.contains("apexcharts-active")&&r.map(t=>e.getAttribute(t)||"0");this.trellis.panels.forEach(e=>{if(!e.cellEl||e.cellEl===t)return;const i=s(e.cellEl);i&&(n&&r.forEach((t,e)=>{i.getAttribute(t)!==n[e]&&i.setAttribute(t,n[e])}),i.classList.toggle("apexcharts-active",!!n))})},o=()=>{if(t!==this.trellis.elGrid)return e=0;a(),e=i?requestAnimationFrame(o):0};t.addEventListener("mousemove",t=>{i=t.target,e||(e=requestAnimationFrame(o))},{passive:!0}),t.addEventListener("mouseleave",()=>{i=null,e&&(cancelAnimationFrame(e),e=0),this.trellis.panels.forEach(t=>{const e=t.cellEl&&s(t.cellEl);e&&e.classList.remove("apexcharts-active")})},{passive:!0})}}function hn(t,e){const i=null!=t,n=null!=e;return i||n?{min:i?t:null,max:n?e:null}:null}function dn(t){return Array.isArray(t)?t.map(t=>Array.isArray(t)?t.slice():t):[]}function un(t,e){return"function"==typeof t&&e?t===e.addXaxisAnnotation?"xaxis":t===e.addYaxisAnnotation?"yaxis":t===e.addPointAnnotation?"point":null:null}function pn(t,e){const i=t.config.annotations?B.clone(t.config.annotations):null,n=[],s=t.globals.memory&&t.globals.memory.methodsToExec||[];for(const t of s){if(!t||"addAnnotation"!==t.label)continue;const i=un(t.method,e);i&&n.push({kind:i,params:B.clone(t.params)})}return{static:i,dynamic:n}}function fn(t){const e=t&&t.measure;if(!e||"function"!=typeof e.getPins)return null;const i=e.getPins();return Array.isArray(i)&&i.length?{pins:i}:null}function gn(t,e){var i,n;const s=t.config.xaxis||{},r=(Array.isArray(t.config.yaxis)?t.config.yaxis:t.config.yaxis?[t.config.yaxis]:[]).map(t=>hn(t&&t.min,t&&t.max)),a=r.some(t=>null!==t),o=t.config.theme,l=e&&e.drilldown;return{v:1,window:{xaxis:hn(s.min,s.max),yaxis:a?r:null},zoomed:!!t.interact.zoomed,collapsed:(t.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(t.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:dn(t.interact.selectedDataPoints),theme:o?{mode:null!=(i=o.mode)?i:null,palette:null!=(n=o.palette)?n:null,paletteExplicit:!!t.globals.themePaletteExplicit}:null,locale:t.config.chart&&t.config.chart.defaultLocale||null,annotations:pn(t,e),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:fn(e)}}function mn(t,e){t&&e&&null!=e.palette&&(t.globals.themePaletteExplicit="boolean"==typeof e.paletteExplicit?e.paletteExplicit:e.palette!==("dark"===t.config.theme.mode?"palette4":"palette1"))}function yn(t,e){if(!t||!e)return;const i=t.w;i.interact.zoomed=!!e.zoomed,function(t,e,i){const n=t.w;if(null==e&&null==i)return;const s=n.globals.seriesNames||[],r=new Set([...e||[],...i||[]]),a=new Set([...n.globals.collapsedSeriesIndices||[],...n.globals.ancillaryCollapsedSeriesIndices||[]]);for(let e=0;e<s.length;e++){const i=s[e];if(null==i)continue;const n=r.has(e),o=a.has(e);n&&!o?t.hideSeries(i):!n&&o&&t.showSeries(i)}}(t,e.collapsed,e.ancillaryCollapsed),e.annotations&&Array.isArray(e.annotations.dynamic)&&e.annotations.dynamic.forEach(e=>{const i=function(t){switch(t){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(e.kind);i&&"function"==typeof t[i]&&t[i](e.params,!0)}),function(t,e){Array.isArray(e)&&(t.w.interact.selectedDataPoints=dn(e))}(t,e.selectedDataPoints),e.locale&&e.locale!==i.config.chart.defaultLocale&&t.setLocale(e.locale),t.measure&&"function"==typeof t.measure.setPins&&t.measure.setPins(e.measure&&e.measure.pins||[])}class xn{constructor(t){this.trellis=t,this.active=!1,this._io=null,this._byCell=new Map,this._dirty=new Set,this._raf=null,this._draining=!1,this._gutterFloor=0}static supported(){return"undefined"!=typeof IntersectionObserver}_rootMargin(){const t=this.trellis.layout,e=t?Math.max(0,Math.round(t.panelH+t.headerH+t.gap)):300;return`${e}px 0px ${e}px 0px`}start(){xn.supported()&&(this.active=!0,this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this.trellis.panels.forEach(t=>{var e;t.wantMounted=!1,t.cellEl&&(this._byCell.set(t.cellEl,t),null==(e=this._io)||e.observe(t.cellEl))}))}refresh(){this.active&&this._io&&(this._io.disconnect(),this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this._byCell.forEach((t,e)=>{var i;return null==(i=this._io)?void 0:i.observe(e)}))}_onEntries(t){if(this.active){for(const e of t){const t=this._byCell.get(e.target);t&&(t.wantMounted=e.isIntersecting,this._dirty.add(t))}this._schedule()}}_schedule(){var t;this._raf||this._draining||!this.active||(this._raf=(t=()=>{this._raf=null,this._drain()},"function"==typeof requestAnimationFrame?{kind:"raf",id:requestAnimationFrame(t)}:{kind:"timeout",id:setTimeout(()=>t(0),16)}))}_drain(){return d(this,null,function*(){if(!this._draining&&this.active){this._draining=!0;try{let t=0,e=0;for(;this.active&&this._dirty.size&&t<2&&e<6;){const i=this._dirty.values().next().value;this._dirty.delete(i);const n=!!i.wantMounted;n!==!!i.chart&&(e++,n?(t++,yield this._mount(i)):this._unmount(i))}}finally{this._draining=!1,this.active&&this._dirty.size?this._schedule():this.active&&(this.trellis.w.globals.animationEnded=!0)}}})}_liveWindow(t){const e=this.trellis.panels.find(e=>e!==t&&e.chart);if(!e||!e.chart)return null;const i=e.chart.w,n=i.config.xaxis||{},s=Array.isArray(i.config.yaxis)?i.config.yaxis[0]:i.config.yaxis;return{zoomed:!!i.interact.zoomed,x:null!=n.min||null!=n.max?{min:n.min,max:n.max}:null,y:!s||null==s.min&&null==s.max?null:{min:s.min,max:s.max,tickAmount:s.tickAmount}}}_patchYaxis(t,e){const i=Array.isArray(t.yaxis)?t.yaxis:t.yaxis?[t.yaxis]:[{}];i.forEach(t=>{Object.keys(e).forEach(i=>{"labels"===i?t.labels=l(l({},t.labels||{}),e.labels):t[i]=e[i]})}),t.yaxis=i}_mount(t){return d(this,null,function*(){var e,i,n,s,r,a,o,h;const d=this.trellis;if(!t.el||t.chart||t.noMount)return;const u=t.viewStash,p="shared"===d._yMode(),f=!p,g=d._assemblePanelOptions(t.index,{noAnimation:!!u}),m=u&&u.window;m&&m.xaxis&&(g.xaxis=c(l({},g.xaxis||{}),{min:null!=(e=m.xaxis.min)?e:void 0,max:null!=(i=m.xaxis.max)?i:void 0})),f&&m&&Array.isArray(m.yaxis)&&m.yaxis[0]&&this._patchYaxis(g,{min:null!=(n=m.yaxis[0].min)?n:void 0,max:null!=(s=m.yaxis[0].max)?s:void 0});const y=this._liveWindow(t);y&&y.x&&(g.xaxis=c(l({},g.xaxis||{}),{min:y.x.min,max:y.x.max})),y&&y.y&&p&&this._patchYaxis(g,l({min:y.y.min,max:y.y.max},null!=y.y.tickAmount?{tickAmount:y.y.tickAmount}:{}));const x=d.sync.currentWindow;x&&x.x&&(g.xaxis=c(l({},g.xaxis||{}),{min:x.x.min,max:x.x.max})),x&&x.y&&p&&this._patchYaxis(g,l({min:x.y.min,max:x.y.max},null!=x.y.tickAmount?{tickAmount:x.y.tickAmount}:{})),f&&this._gutterFloor>0&&this._patchYaxis(g,{labels:{minWidth:this._gutterFloor}}),t.el.classList.remove("apexcharts-trellis-skeleton");const _=d._createPanelChart(t.el,g);t.chart=_;try{yield _.render()}catch(e){return t.chart=null,void t.el.classList.add("apexcharts-trellis-skeleton")}if(this.active){if(_.w.interact.zoomed=x?!!x.zoomed:y?y.zoomed:!(!u||!u.zoomed),d.sync.applyHiddenTo(_),u&&u.annotations&&Array.isArray(u.annotations.dynamic)){const t={xaxis:"addXaxisAnnotation",yaxis:"addYaxisAnnotation",point:"addPointAnnotation"},e=_;u.annotations.dynamic.forEach(i=>{const n=t[i.kind];n&&"function"==typeof e[n]&&e[n](i.params,!0)})}if(t.viewStash=null,f){const t=null==(h=null==(o=null==(a=null==(r=_.w)?void 0:r.globals)?void 0:a.yLabelsCoords)?void 0:o[0])?void 0:h.width;if("number"==typeof t&&isFinite(t)){const e=_.w.globals.isBarHorizontal?0:d._yLabelPad(),i=Math.max(0,t-e);i>this._gutterFloor+.5&&(this._gutterFloor=i,yield d._pushGutterFloor(this._gutterFloor))}}d._fire("panelMounted",{key:t.key,index:t.index,chart:_,remounted:!!u})}})}_unmount(t){if(t.chart){try{t.viewStash=gn(t.chart.w,t.chart)}catch(e){t.viewStash=null}try{t.chart.destroy()}catch(t){}if(t.chart=null,t.el){t.el.classList.add("apexcharts-trellis-skeleton");const e=this.trellis.layout;e&&(t.el.style.minHeight=`${e.panelH}px`)}}}stop(){var t;this.active=!1,this._io&&(this._io.disconnect(),this._io=null),this._byCell.clear(),this._dirty.clear(),(t=this._raf)&&("raf"===t.kind?cancelAnimationFrame(t.id):clearTimeout(t.id)),this._raf=null,this._gutterFloor=0}}Object.setPrototypeOf({funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin",column:"bar"},null);const _n=["bar","rangeBar","candlestick","boxPlot","violin"];class bn{constructor(t){this.trellis=t,this.el=null,this._raf=0,this._lastEvent=null,this._key=null,this._split=null,this._scales=null}wire(t,e){const i=M.createElement("div");i.className="apexcharts-trellis-tooltip apexcharts-theme-light",i.setAttribute("role","status"),e.appendChild(i),this.el=i;const n=()=>{this._update(e),this._raf=this._lastEvent?requestAnimationFrame(n):0};t.addEventListener("mousemove",t=>{this._lastEvent=t,this._raf||(this._raf=requestAnimationFrame(n))},{passive:!0}),t.addEventListener("mouseleave",()=>{this._lastEvent=null,this._key=null,this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),i.classList.remove("apexcharts-trellis-tooltip-active")},{passive:!0})}_hoverIndex(t,e,i){const n=t.w,s=n.globals,r=s.dataPoints;if(!r||r<1)return-1;const a=n.layout.gridWidth;if(!a)return-1;const o=en.plotRect(n);this._zoom=o.zoom;const l=ri.screenXToPlotPx(n,e,o),c=s.barPadForNumericAxis||0;if(l<-c||l>a+c)return-1;const h=n.dom&&n.dom.baseEl;if(h&&h.querySelector(".apexcharts-svg")&&o.height&&(i<o.top||i>o.top+o.height))return-1;let d;if(s.isBarHorizontal)d=Math.floor((i-o.top)/o.zoom/(n.layout.gridHeight/r));else if(n.axisFlags&&n.axisFlags.isXNumeric){const t=s.seriesX.find(t=>t.length)||[],e=ri.pxToDataX(n,l);d=0;for(let i=1;i<t.length;i++)Math.abs(t[i]-e)<Math.abs(t[d]-e)&&(d=i)}else d=!_n.includes(n.config.chart.type)&&"between"!==n.config.xaxis.tickPlacement||n.config.xaxis.convertedCatToNumeric?Math.round(l/(a/Math.max(1,r-1))):Math.ceil(l/(a/r))-1;return Math.max(0,Math.min(r-1,d))}_valueAt(t,e,i,n){var s,r;const a=t.series.find(t=>t.name===e);if(!a||!Array.isArray(a.data))return null;const o=a.data[n];if(null==o)return null;let l=o;if(Array.isArray(o)?l=o[1]:"object"==typeof o&&(l=o.y),null==l)return null;const c=this.trellis.w.config,h=Array.isArray(null==(s=c.tooltip)?void 0:s.y)?c.tooltip.y[i]:null==(r=c.tooltip)?void 0:r.y,d=Array.isArray(c.yaxis)?c.yaxis[0]:c.yaxis,u=h&&"function"==typeof h.formatter&&h.formatter||d&&d.labels&&"function"==typeof d.labels.formatter&&d.labels.formatter||null,p=t=>{if(u)try{return String(u(t,{seriesIndex:i,dataPointIndex:n,w:null}))}catch(e){return String(t)}return String(t)};return Array.isArray(l)?l.map(p).join(" / "):p(l)}_update(t){const e=this.trellis,i=this.el,n=this._lastEvent,s=e.split;if(!i||!n||!s)return;const r=n!==this._e;this._e=n;const a=n.target&&n.target.closest?n.target.closest(".apexcharts-trellis-cell"):null,o=a?e.panels.find(t=>t.cellEl===a):void 0,l=o&&o.chart?this._hoverIndex(o.chart,n.clientX,n.clientY):-1;if(!o||-1===l)return i.classList.remove("apexcharts-trellis-tooltip-active"),void(this._key=null);let c=this._titleEl;c&&a.contains(c)||(c=this._titleEl=a.querySelector(".apexcharts-tooltip-title"));const h=c&&c.textContent||"",d=o.key+"\n"+l+"\n"+h;if(d!==this._key||s!==this._split||e.scales!==this._scales){this._key=d,this._split=s,this._scales=e.scales;let t=h?`<div class="apexcharts-tooltip-title">${vn(h)}</div>`:"";s.panels.forEach(i=>{let n="";s.seriesNames.forEach((t,s)=>{const r=this._valueAt(i,t,s,l);if(null===r)return;const a=e.scales?e.scales.colorOf(t):"#008FFB";n+=`<span class="apexcharts-trellis-tooltip-val"><span class="apexcharts-trellis-tooltip-marker" style="background:${wn(a)}"></span>${vn(r)}</span>`}),t+=`<div class="apexcharts-trellis-tooltip-row${i.key===o.key?" apexcharts-trellis-tooltip-row-active":""}" data-key="${wn(i.key)}"><span class="apexcharts-trellis-tooltip-key">${vn(i.key)}</span><span class="apexcharts-trellis-tooltip-vals">${n}</span></div>`}),i.innerHTML=t,i.classList.add("apexcharts-trellis-tooltip-active")}else if(!r)return;const u=t.getBoundingClientRect(),p=this._zoom||1;let f=(n.clientX-u.left)/p+14,g=(n.clientY-u.top)/p+14;const m=i.offsetWidth,y=i.offsetHeight,x=u.width/p,_=u.height/p;f+m>x-4&&(f=Math.max(4,f-m-28)),g+y>_-4&&(g=Math.max(4,g-y-28)),i.style.left=`${Math.round(f)}px`,i.style.top=`${Math.round(g)}px`}destroy(){this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),this._lastEvent=null,this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=null}}function vn(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function wn(t){return String(t).replace(/"/g,""")}class An{constructor(t){this.trellis=t}supported(){return!!this.trellis.ctx.exports}_rectIn(t){const e=this.trellis.elWrap.getBoundingClientRect(),i=t.getBoundingClientRect();return{x:i.left-e.left,y:i.top-e.top,w:i.width,h:i.height}}_shown(){return this.trellis.panels.filter(t=>{var e;return!(null==(e=t.cellEl)?void 0:e.classList.contains("apexcharts-trellis-cell-parked"))})}_size(){const t=this.trellis.elWrap.getBoundingClientRect();return{w:Math.ceil(t.width),h:Math.ceil(t.height)}}_background(){const t=this.trellis.panels.find(t=>t.chart),e=t&&t.chart.exports;if(e&&"function"==typeof e.resolveExportBackground){const t=e.resolveExportBackground();if(t&&"transparent"!==t)return t}return"#fff"}_chromeTexts(){const t=this.trellis,e=[],i=(t,i)=>{if(!t||!t.textContent)return;const n=this._rectIn(t),s=getComputedStyle(t),r=t.style.textAlign||i;e.push({text:t.textContent,x:n.x+("left"===r?0:"right"===r?n.w:n.w/2),y:n.y+n.h/2,font:`${s.fontWeight} ${s.fontSize} ${s.fontFamily}`,fontSize:parseFloat(s.fontSize)||12,color:s.color||"#373d3f",align:r})};return i(t.chrome.elTitle,"left"),i(t.chrome.elSubtitle,"left"),this._shown().forEach(t=>{t.cellEl&&i(t.cellEl.querySelector(".apexcharts-trellis-header"),"center")}),t.chrome.elLegend&&t.chrome.elLegend.querySelectorAll(".apexcharts-legend-text").forEach(t=>i(t,"left")),e}_legendMarkers(){const t=this.trellis.chrome.elLegend;return t?Array.from(t.querySelectorAll(".apexcharts-legend-marker"),t=>({rect:this._rectIn(t),color:t.style.background||t.style.backgroundColor||"#008FFB"})):[]}dataURI(){return d(this,arguments,function*(t={}){const e=t.scale||1,i=this._size(),n=document.createElement("canvas");n.width=i.w*e,n.height=i.h*e;const s=n.getContext("2d");if(!s)return{imgURI:""};const r=s;r.scale(e,e),r.fillStyle=this._background(),r.fillRect(0,0,i.w,i.h);for(const t of this._shown()){if(!t.el)continue;const i=this._rectIn(t.el);if(!t.chart){r.fillStyle="rgba(120, 120, 120, 0.06)",r.fillRect(i.x,i.y,i.w,i.h);continue}const{imgURI:n}=yield t.chart.dataURI({scale:e});if(!n)continue;const s=yield Mn(n);r.drawImage(s,i.x,i.y,i.w,i.h)}for(const t of this._chromeTexts())r.font=t.font,r.fillStyle=t.color,r.textAlign=t.align,r.textBaseline="middle",r.fillText(t.text,t.x,t.y);for(const t of this._legendMarkers())r.fillStyle=t.color,r.beginPath(),r.arc(t.rect.x+t.rect.w/2,t.rect.y+t.rect.h/2,Math.max(2,t.rect.w/2),0,2*Math.PI),r.fill();return{imgURI:n.toDataURL("image/png")}})}svgString(t=1){return d(this,null,function*(){const e=this._size(),i=[];i.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${e.w*t}" height="${e.h*t}" viewBox="0 0 ${e.w} ${e.h}">`),i.push(`<rect width="${e.w}" height="${e.h}" fill="${this._background()}"/>`);for(const t of this._shown()){if(!t.el)continue;const e=this._rectIn(t.el);if(!t.chart){i.push(`<rect x="${e.x}" y="${e.y}" width="${e.w}" height="${e.h}" fill="rgba(120,120,120,0.06)" rx="4"/>`);continue}const n=yield t.chart.getSvgString();i.push(`<g transform="translate(${e.x}, ${e.y})">${n}</g>`)}for(const t of this._chromeTexts()){const e="left"===t.align?"start":"right"===t.align?"end":"middle";i.push(`<text x="${t.x}" y="${t.y}" text-anchor="${e}" dominant-baseline="central" style="font:${Sn(t.font)};fill:${Sn(t.color)}">${Ln(t.text)}</text>`)}for(const t of this._legendMarkers())i.push(`<circle cx="${t.rect.x+t.rect.w/2}" cy="${t.rect.y+t.rect.h/2}" r="${Math.max(2,t.rect.w/2)}" fill="${Sn(t.color)}"/>`);return i.push("</svg>"),i.join("")})}csv(t={}){var e,i,n,s;const r=this.trellis,a=r.split;if(!a)return"";const o=r.w,l=t.columnDelimiter||(null==(n=null==(i=null==(e=o.config.chart.toolbar)?void 0:e.export)?void 0:i.csv)?void 0:n.columnDelimiter)||",",c=o.config.xaxis&&"datetime"===o.config.xaxis.type,h=t=>{if(null==t)return"";const e=String(t);return/[",\n]/.test(e)||-1!==e.indexOf(l)?`"${e.replace(/"/g,'""')}"`:e},d="plain"===a.xForm&&((null==(s=o.config.xaxis.categories)?void 0:s.length)?o.config.xaxis.categories:o.config.labels||[]),u=t=>{var e;return d&&(t=null!=(e=d[t])?e:t+1),Array.isArray(t)&&(t=t.join(" ")),c&&"number"==typeof t?new Date(t).toISOString():t},p=a.seriesNames,f=[["x","facet",...p].map(h).join(l)];return a.panels.forEach(t=>{a.unionX.forEach((e,i)=>{const n=[u(e),t.key];p.forEach(e=>{const s=t.series.find(t=>t.name===e);if(!s||!Array.isArray(s.data))return void n.push("");const r=s.data[i];let a=r;Array.isArray(r)?a=r[1]:r&&"object"==typeof r&&(a=r.y),n.push(Array.isArray(a)?a.join("|"):a)}),f.push(n.map(h).join(l))})}),f.join(t.lineDelimiter||"\n")}download(t){return d(this,arguments,function*(t,e={}){var i;const n=this.trellis,s=(null==(i=n.w.config.chart.toolbar)?void 0:i.export)||{},r=String(n.w.globals.chartID||"trellis");if("png"===t){const{imgURI:t}=yield this.dataURI();kn(t,s.png&&s.png.filename||r,".png")}else if("svg"===t){const t=yield this.svgString();kn("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(t),s.svg&&s.svg.filename||r,".svg")}else{kn("data:text/csv;charset=utf-8,"+encodeURIComponent("\ufeff"+this.csv(e)),e.fileName||s.csv&&s.csv.filename||r,".csv")}})}}function Mn(t){return new Promise((e,i)=>{const n=new Image;n.onload=()=>e(n),n.onerror=i,n.src=t})}function kn(t,e,i){const n=document.createElement("a");n.href=t,n.download=e+i,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Ln(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Sn(t){return String(t).replace(/"/g,""")}function Cn(t){const e=t.w;if(!e.globals.axisCharts)return;const i=t.titleBlockPad||0;if("top"===e.config.xaxis.position)return void(t.gridPad.top-=i);const n=e.layout.gridHeight-t.gridPad.top-t.gridPad.bottom+i+10;t.gridPad.top+=function(t,e){const i=t.w,n=i.config,s=i.globals,r=new b(i),a=t=>{const e=r.getTextRects("0",t.fontSize,t.fontFamily,void 0,!0,t.fontWeight),i=e.height/2-(e.centerOffset||0);return{ascent:i>=0&&i<=e.height?i:e.height,height:e.height}},o=t=>"number"==typeof t&&isFinite(t)?t:0,l=t=>Math.max(0,...[].concat(t).map(o));let c=0;n.yaxis.forEach(t=>{if(!t.show||!t.labels.show)return;const n=parseFloat(t.labels.style.fontSize)||0,r=a(t.labels.style).ascent,l=o(t.labels.offsetY);if(!s.isBarHorizontal)return void(c=Math.max(c,r-n/3-l));const h=i.labelData.labels||[],d=Math.max(1,h.length),u=Math.max(0,...h.map(t=>Array.isArray(t)?t.length:0)),p=r+(u?u/2*n:0)-l,f=1-1/2.2;c=Math.max(c,(p-f*e/d)/(1-f/d))}),n.stroke.show&&(c=Math.max(c,l(n.stroke.width)/2));const h=[n.chart.type].concat(n.series.map(t=>t&&t.type).filter(Boolean)),d=["line","area","scatter","bubble","rangeArea"];if(h.some(t=>d.includes(t))){const t=n.markers,e=Math.max(l(t.size),...(t.discrete||[]).map(t=>o(t.size)));if(e>0&&(c=Math.max(c,e+l(t.strokeWidth)/2)),n.dataLabels.enabled){const t=o(n.dataLabels.offsetY),e=Math.max(0,t+2)+t;c=Math.max(c,a(n.dataLabels.style).ascent-e)}}const u=n.plotOptions.bar.dataLabels.total;if(n.chart.stacked&&u.enabled&&!s.isBarHorizontal&&h.some(t=>_n.includes(t))){const t=a(u.style);c=Math.max(c,t.ascent+.3*t.height-o(n.dataLabels.offsetY)-o(u.offsetY))}return Math.ceil(Math.max(0,c))}(t,n)-10-i}const En=["pie","donut","polarArea","radialBar","radar","treemap"],Fn=["annotations","colors","dataLabels","fill","forecastDataPoints","grid","markers","noData","states","stroke","tooltip"],Pn={treemap:"trellis does not support treemap: area encoding needs room a panel cannot give. Rendering a single chart.",sunburst:"trellis does not support sunburst: its labels are illegible at panel size. Rendering a single chart.",unit:"the unit type has its own small-multiples mode (plotOptions.unit.grid.split), which beats a trellis of unit charts. Rendering a single chart."};m.default.registerFeatures({trellis:class{constructor(t,e){this.w=t,this.ctx=e,this.panels=[],this._stripEls=[],this.split=null,this.scales=null,this.layout=null,this.cfg={},this.sync=new cn(this),this.chrome=new on(this),this.virtual=new xn(this),this.exports=new An(this),this.gridTooltip=null,this._promotedKey=null,this._ApexCharts=m.default,this._virtualActive=!1,this._panelRenderer=null,this.elWrap=null,this.elGrid=null,this._mounted=!1,this._rendering=!1,this._renderPromise=null,this._raf=0,this._lastWidth=0,this._lastHeight=0,this._chromeH=0,this._overflowWarned=!1,this._resizeHandler=this._onContainerResize.bind(this),this.autoScaleYaxis=!1,this._elChromeTop=null,this._vetoWarned=!1,this._noKeyWarned=!1,this._frames=null,this._gen=0,this._tool=null}isActive(){var t;const e=this.w.config.trellis;if(!e||!(e.by||e.row||e.column))return!1;const i=null==(t=this.w.config.chart)?void 0:t.type;if(i&&Pn[i])return this._vetoWarned||(this._vetoWarned=!0,console.warn(`ApexCharts: ${Pn[i]}`)),!1;if(e.by&&!e.row&&!e.column&&!Array.isArray(e.data)){if(!(this.w.config.series||[]).some((t,i)=>null!==Mi(t,i,e.by))){if(!this._noKeyWarned){this._noKeyWarned=!0;const t="function"==typeof e.by?"the `trellis.by` function returned no key for any series":`no series carries the \`trellis.by\` key '${e.by}'`;console.warn(`ApexCharts: ${t}; there is nothing to split. Rendering as a single chart.`)}return!1}}return!0}_layoutCfg(){const t=this._effectiveCfg();return this.split&&"2d"===this.split.mode&&this.split.colKeys?c(l({},t),{columns:this.split.colKeys.length}):t}_effectiveCfg(){var t;const e=this._yMode();return e!==((null==(t=this.cfg.scales)?void 0:t.y)||"shared")?c(l({},this.cfg),{scales:c(l({},this.cfg.scales||{}),{y:e})}):this.cfg}_deriveShared(t,e=!0){var i,n;const s=this.w,r=s.config.chart;!e&&this._frames||(this._frames=Ni(t,this.cfg,s.config,"histogram"===r.requestedType?"histogram":r.type));const a=this._multiY();let o=null;if(a){const e=t.seriesNames,i=new y({config:{series:e.map(t=>({name:t})),yaxis:a},globals:{}});i.setSeriesYAxisMappings(),o=i.w.globals.seriesYAxisMap.map(t=>t.map(t=>e[t]).filter(t=>null!=t))}this._axisNames=o;const c=s.config.theme,h=this.scales=Yi(t,this._effectiveCfg(),l({chartType:r.type,userColors:this.ctx.opts&&this.ctx.opts.colors,palette:c.palette,yaxis:a||s.config.yaxis,axisNames:o,yExtentOverride:this._frames.yExtentOverride},this._stackingHost()));if((null==(i=c.monochrome)?void 0:i.enabled)||(null==(n=c.accessibility)?void 0:n.colorBlindMode)||h.palette.some(t=>"function"==typeof t)){const t=h.colorOf;h.colorOf=(e,i)=>{if(!i)for(const t of this.panels){const i=t.chart&&t.chart.w,n=i?i.seriesData.seriesNames.indexOf(e):-1,s=n>-1&&i.globals.colors[n];if("function"==typeof s)return s({value:i.seriesData.series[n][0]||0,seriesIndex:n,dataPointIndex:0,w:i});if(s)return s}return t(e)}}}_splitHost(){const t=this.w.config;return{chartType:t.chart.type,datetime:"datetime"===t.xaxis.type}}_multiY(){var t;const e=null==(t=this.ctx.opts)?void 0:t.yaxis;return Array.isArray(e)&&e.length>1&&!this._valueAxisIsX()?e:null}_stackingHost(){var t,e;const i=this.w.config,n=i.chart||{},s=i.highlightFilter||{};return{stacked:!!n.stacked,stackType:n.stackType,stackOnlyBar:!!n.stackOnlyBar,parts:!!xi._featureRegistry.get("highlightFilter")&&!1!==s.enabled&&"clamp"!==s.axis&&["bar","line","area"].includes(n.type)&&!(null==(e=null==(t=i.plotOptions)?void 0:t.bar)?void 0:e.isFunnel)}}_yMode(){var t;return this._frames&&this._frames.forceSharedY?"shared":(null==(t=this.cfg.scales)?void 0:t.y)||"shared"}_yBoundsFor(t,e){var i,n;const s=this.scales;if(!s)return null;if(this._frames&&this._frames.skipYaxisPush)return null;const r=this._yMode(),a="shared"===r?s.y:"independent-row"===r&&s.rowY?s.rowY.get(null!=(i=t.rowKey)?i:""):"independent-column"===r&&s.colY?s.colY.get(null!=(n=t.colKey)?n:""):null;return!a||!e&&Array.isArray(a)?null:a}_valueAxisIsX(){var t,e;const i=this.w.config;return["bar","boxPlot","violin"].includes(i.chart.type)&&!!(null==(e=null==(t=i.plotOptions)?void 0:t.bar)?void 0:e.horizontal)}_valueAxisXPatch(t){var e,i;const n={min:t.min,max:t.max};return"number"!=typeof(null==(i=null==(e=this.ctx.opts)?void 0:e.xaxis)?void 0:i.tickAmount)&&(n.tickAmount=t.tickAmount),n}_groupId(){return`${this.w.globals.chartID}-tg`}_fire(t,e){var i,n;const s=null==(n=null==(i=this.w.config.chart)?void 0:i.events)?void 0:n[t];"function"==typeof s&&s(this.ctx,e),this.ctx.events.fireEvent(t,[this.ctx,e])}render(){if(this._rendering&&this._renderPromise)return this._renderPromise;const t=this._render();return this._renderPromise=t,t}whenSettled(){return this._rendering&&this._renderPromise?this._renderPromise.catch(()=>{}):Promise.resolve()}_render(){return d(this,null,function*(){var t,e,i;const n=this.w;if(this._mounted||this._rendering)return;if(!k.isBrowser())return void console.warn("ApexCharts: trellis rendering is browser-only in this version; SSR hosts render nothing.");this._rendering=!0;const s=this._gen;try{this.cfg=n.config.trellis||{},this.autoScaleYaxis=!!(null==(e=null==(t=n.config.chart)?void 0:t.zoom)?void 0:e.autoScaleYaxis)&&!this._multiY();let r=n.config.series||[];if(Array.isArray(this.cfg.data)){const t=function(t,e={}){const i=[],n=e.by;if("string"!=typeof n||!n)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs a string `by` column name"]};const s=e.x,r=e.y;if(!s||!r)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs `x` and `y` column names"]};const a=Array.isArray(t)?t:[];if(!a.length)return{series:[],warnings:["trellis: trellis.data is empty"]};const o=e.seriesBy;let l=0,c=0;const h=new Map;a.forEach(t=>{if(!t||"object"!=typeof t)return void l++;const e=t[n],i=t[s];if(null==e||null==i)return void l++;const a=o&&void 0!==t[o]&&null!==t[o]?String(t[o]):String(r);let d=h.get(String(e));d||(d=new Map,h.set(String(e),d));let u=d.get(a);u||(u=new Map,d.set(a,u));const p=i instanceof Date?i.getTime():i;u.has(p)&&c++;const f=t[r];u.set(p,void 0===f?null:f)}),l&&i.push(`trellis: ${l} row(s) missing "${n}" or "${s}" were skipped`),c&&i.push(`trellis: ${c} duplicate (panel, series, x) row(s); kept the last. Aggregate the rows first if you want sums or means.`);const d=[];return h.forEach((t,e)=>{t.forEach((t,i)=>{const s={name:i,data:Array.from(t,([t,e])=>({x:t,y:e}))};-1===bi.indexOf(n)&&(s[n]=e),Object.defineProperty(s,_i,{value:e}),d.push(s)})}),{series:d,warnings:i}}(this.cfg.data,this.cfg);t.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),t.series.length&&(r.length&&console.warn("ApexCharts: trellis received both `series` and `trellis.data`; using trellis.data."),r=t.series)}const a=Fi(r,this.cfg,this._splitHost());if(this.split=a,a.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),!a.panels.length)return;a.dropped>0&&console.warn(`ApexCharts: trellis rendered ${a.panels.length} panels; ${a.dropped} more hidden by trellis.limit.`);const o=null!=(i=this.cfg.virtualize)?i:"auto";let l=!0===o||"auto"===o&&a.panels.length>64;l&&!xn.supported()&&(console.warn("ApexCharts: trellis virtualization needs IntersectionObserver; rendering eagerly."),l=!1),this._virtualActive=l,!l&&a.panels.length>64&&console.warn(`ApexCharts: trellis with ${a.panels.length} panels renders eagerly; set trellis.virtualize (or trellis.limit).`),a.panels.length>256&&console.warn(`ApexCharts: ${a.panels.length} trellis panels is a lot to read at once; consider trellis.limit.`),this._deriveShared(a);this._frames.warnings.forEach(t=>console.warn(`ApexCharts: ${t}`)),this._seeded||(this._seeded=!0,a.panels.forEach(t=>t.series.forEach(t=>t.hidden&&this.sync._hidden.add(t.name)))),this.sync.prune(a.seriesNames),this._panelRenderer=function(t,e,i,n){if(i&&i.chart&&i.chart.renderer)return null;if(!n)return null;const s={config:{series:t.panels.reduce((t,e)=>t.concat(e.series),[]),chart:{type:e.chart.type},markers:e.markers,dataLabels:e.dataLabels,fill:e.fill,plotOptions:e.plotOptions,states:e.states}};if(fi(s))return null;const r=e.chart.rendererThreshold||8e3;return pi(s)>=r?"canvas":null}(a,n.config,this.ctx.opts,yi._rendererRegistry.has("canvas")),this._buildSkeleton();const c=this._containerWidth();this._lastWidth=c,this._lastHeight=this._hostHeight()||0,this._chromeH=0,this.layout=qi({panelCount:a.panels.length,containerWidth:c,cfg:this._layoutCfg(),hostHeight:this._hostHeight(),chromeHeight:this._chromeH}),this._applyGridStyle(),this._buildCells();const h="shared"!==this._yMode(),d=this.elWrap;if(l)this.virtual.start();else{h&&(d.style.visibility="hidden");for(let t=0;t<this.panels.length;t++){const e=this.panels[t];if(e.noMount)continue;const i=this._assemblePanelOptions(e.index),n=this._createPanelChart(e.el,i);if(e.chart=n,yield n.render(),s!==this._gen)return;this._fire("panelMounted",{key:e.key,index:e.index,chart:n})}if(h){if(yield this._alignGutters(),s!==this._gen)return;d.style.visibility=""}}this.chrome.buildTitle(this._elChromeTop),this.chrome.buildToolbar(d),this.chrome.buildLegend(d),this.sync.wireCrosshairs(this.elGrid),"grid"===(this.cfg.tooltip||"panel")&&(this.gridTooltip=new bn(this),this.gridTooltip.wire(this.elGrid,d)),this._mounted=!0,this._refitForChrome(),ci(this.ctx.el,this._resizeHandler),l||(n.globals.animationEnded=!0),this._fire("trellisMounted",{panels:this.getPanels()})}finally{s===this._gen&&(this._rendering=!1)}})}_containerWidth(){const t=this.ctx.el;return t.getBoundingClientRect().width||t.clientWidth||800}_hostHeight(){var t;const e=this.w.config.chart&&this.w.config.chart.height;if(null==e||""===e||"auto"===e)return;const i=String(e).trim();if(i.endsWith("%")){const e=parseFloat(i);if(!isFinite(e)||e<=0)return;const n=null==(t=this.ctx.el)?void 0:t.parentNode;if(!n||"function"!=typeof n.getBoundingClientRect)return;const s=(n.getBoundingClientRect().height||n.clientHeight||0)*e/100;return s>0?s:void 0}const n=parseFloat(i);return isFinite(n)&&n>0?n:void 0}_chromeHeight(){const t=this.elWrap,e=this.elGrid;if(!t||!e||"function"!=typeof t.getBoundingClientRect)return 0;const i=t.getBoundingClientRect().height-e.getBoundingClientRect().height;return isFinite(i)&&i>0?i:0}_buildSkeleton(){var t,e;const i=this.ctx.el,n=M.createElementNS("http://www.w3.org/1999/xhtml","div");n.className="apexcharts-trellis",this.split&&"2d"===this.split.mode&&n.classList.add("apexcharts-trellis-2d"),n.id=`apexcharts-trellis${this.w.globals.chartID}`,n.setAttribute("data-tooltip-mode",this.cfg.tooltip||"panel");const s=null==(t=this.w.config.chart)?void 0:t.foreColor;s&&n.style.setProperty("--apx-trellis-fore",s);const r=null==(e=this.w.config.chart)?void 0:e.fontFamily;r&&(n.style.fontFamily=r);const a=M.createElement("div");a.className="apexcharts-trellis-chrome",n.appendChild(a),this._elChromeTop=a;const o=M.createElement("div");o.className="apexcharts-trellis-grid",n.appendChild(o),i.appendChild(n),this.elWrap=n,this.elGrid=o,this.w.dom.baseEl=i,this.w.dom.elWrap=n}_applyGridStyle(){var t;const e=this.elGrid,i=this.layout;e.style.display="grid";const n=this.split&&"2d"===this.split.mode&&!1!==(null==(t=this.cfg.header)?void 0:t.show);e.style.gridTemplateColumns=n?`auto repeat(${i.cols}, minmax(0, 1fr))`:`repeat(${i.cols}, minmax(0, 1fr))`,e.style.gap=`${i.gap}px`}_buildCells(){var t;const e=this.elGrid,i=this.split,n=this.layout,s="2d"===i.mode,r=s&&!1!==(null==(t=this.cfg.header)?void 0:t.show);this._stripEls=[];const a=this.cfg.emptyPanels||"placeholder";if(r){const t=M.createElement("div");t.className="apexcharts-trellis-corner",e.appendChild(t),this._stripEls.push(t),(i.colKeys||[]).forEach((t,n)=>{const s=this.chrome.stripEl("column",t,{index:n,count:(i.colKeys||[]).length});e.appendChild(s),this._stripEls.push(s)})}this.panels=[],i.panels.forEach((t,o)=>{var l;if(r&&o%n.cols===0){const t=Math.floor(o/n.cols),s=this.chrome.stripEl("row",null!=(l=(i.rowKeys||[])[t])?l:"",{index:t,count:(i.rowKeys||[]).length});e.appendChild(s),this._stripEls.push(s)}const c=M.createElement("div");c.className="apexcharts-trellis-cell",c.setAttribute("data-key",t.key),this._applyCellMutes(c,n.cells[o]),s||this.chrome.buildHeader(c,t.key,{index:o,count:i.panels.length});const h=M.createElement("div");h.className="apexcharts-trellis-panel",this._virtualActive&&(h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${n.panelH}px`),c.appendChild(h);const d=t.empty&&"placeholder"!==a;if(t.empty)if(c.classList.add("apexcharts-trellis-cell-empty"),"hide"===a)c.classList.add("apexcharts-trellis-cell-hidden");else if("skip"===a)h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${n.panelH}px`;else{const t=M.createElement("div");t.className="apexcharts-trellis-empty-label",t.textContent=this.w.config.noData&&this.w.config.noData.text||"no data",c.appendChild(t)}e.appendChild(c),this.panels.push({key:t.key,index:o,el:h,cellEl:c,chart:null,empty:t.empty,noMount:d})})}_applyCellMutes(t,e){t.classList.toggle("apexcharts-trellis-mute-x",!e.showXLabels),t.classList.toggle("apexcharts-trellis-mute-y",!e.showYLabels)}_hasPlotChrome(t){var e;return!(null==(e=null==t?void 0:t.sparkline)?void 0:e.enabled)&&!En.includes(this.w.config.chart.type)}_createPanelChart(t,e){const i=new this._ApexCharts(t,e);return this._hasPlotChrome(e.chart)&&(i.panelTopBand=Cn),i}_assemblePanelOptions(t,{noAnimation:e=!1}={}){var i,n,s,r,a,o,d,u,p,f;const g=this.w,m=this.split,y=this.layout,x=m.panels[t],_=this.ctx.opts||{},{series:b,trellis:v,responsive:w}=_,A=h(_,["series","trellis","responsive"]),M=B.clone(A);M.annotations&&(M.annotations=function(t,e){if(!t||"object"!=typeof t)return t;const i=l({},t);for(const t of["yaxis","xaxis","points","texts","images"]){const n=i[t];Array.isArray(n)&&(i[t]=n.filter(t=>!t||void 0===t.scope||null===t.scope||"trellis"===t.scope||(Array.isArray(t.scope)?-1!==t.scope.map(String).indexOf(e):String(t.scope)===e)).map(t=>{if(!t||void 0===t.scope)return t;const e=l({},t);return delete e.scope,e}))}return i}(M.annotations,x.key));const k=M.chart||{},L=k.events||{},S=g.globals.chartID,C=null==(s=null==(n=null==(i=this.ctx.opts)?void 0:i.chart)?void 0:n.animations)?void 0:s.enabled,E=e||m.panels.length>16&&void 0===C,F=x.empty&&"placeholder"===(this.cfg.emptyPanels||"placeholder"),P=this._panelDataPatch(t),D=l(l(c(l({chart:c(l(l({id:`${S}-tp${t}`,group:this._groupId(),height:y.panelH,width:"100%",redrawOnParentResize:!1,redrawOnWindowResize:!1,print:{enabled:!1},parentHeightOffset:0,toolbar:this._tool?{show:!1,autoSelected:this._tool}:{show:!1},zoom:{enabled:"none"!==this.cfg.zoom&&!1!==(null==(o=null==(a=null==(r=this.ctx.opts)?void 0:r.chart)?void 0:a.zoom)?void 0:o.enabled),resetControl:"none"==this.cfg.toolbar&&!1!==g.config.chart.zoom.resetControl}},E?{animations:{enabled:!1}}:{}),this._panelRenderer?{renderer:this._panelRenderer}:{}),{events:c(l({},L),{zoomed:this.sync.makeZoomedHandler(L.zoomed),scrolled:this.sync.makeScrolledHandler(L.scrolled)})}),series:P.series},P.colors?{colors:P.colors}:{}),{title:{text:"",margin:0,floating:!0},subtitle:{text:"",margin:0,floating:!0},legend:{show:!1}}),F?{tooltip:{enabled:!1}}:{}),y.panelH<120&&"grid"!==this.cfg.tooltip&&"boolean"!=typeof(null==(u=null==(d=this.ctx.opts)?void 0:d.tooltip)?void 0:u.compact)?{tooltip:{compact:!0}}:{});if(this._hasPlotChrome(k)){const t=M.grid&&M.grid.padding||{},e="datetime"===(null==(f=null==(p=this.ctx.opts)?void 0:p.xaxis)?void 0:f.type)?2:7;D.grid={padding:{bottom:("number"==typeof t.bottom?t.bottom:0)-e}}}if(P.xaxis&&(D.xaxis=P.xaxis),P.yaxis){const t=[].concat(M.yaxis||{});D.yaxis=Array.isArray(P.yaxis)?P.yaxis.map((e,i)=>B.extend(t[i]||{},e)):B.extend(t[0]||{},P.yaxis),delete M.yaxis}P.plotOptions&&(D.plotOptions=P.plotOptions);let R=B.extend(M,D);if("function"==typeof this.cfg.panel){const e=this.cfg.panel(x.key,{index:t,seriesNames:x.seriesNames});e&&"object"==typeof e&&(R=B.extend(R,e))}return R}_panelDataPatch(t){var e,i,n,s;const r=this.w,a=this.split,o=this.scales,h=a.panels[t],d=r.config.chart.type,u=h.empty&&"placeholder"===(this.cfg.emptyPanels||"placeholder")?[Ei(a,{chartType:d})]:h.series,p={series:u};["pie","donut","polarArea","radialBar"].includes(d)?p.series=u.flatMap(t=>Array.isArray(t.data)?t.data:[]).map(t=>"number"==typeof t&&isFinite(t)?t:0):(p.colors=u.map(t=>o.colorOf(t.name,!0)),p.series=u.map(t=>c(l({},t),{hidden:this.sync.isHidden(t.name)})));const f=this._valueAxisIsX();o.x&&!f&&(p.xaxis={min:o.x.min,max:o.x.max});const g=this._yBoundsFor(h,!0);if(g){const t=null==(e=this.ctx.opts)?void 0:e.yaxis,i=this._axisNames;p.yaxis=[].concat(g).map((e,n)=>{var s;const r=e?{min:e.min,max:e.max,tickAmount:e.tickAmount}:{};i&&(r.seriesName=i[n]);const a=Array.isArray(t)?t[n]:t;return e&&"function"!=typeof(null==(s=null==a?void 0:a.labels)?void 0:s.formatter)&&(r.labels={formatter:t=>"number"==typeof t&&isFinite(t)?t.toFixed(e.decimals):t}),r}),Array.isArray(g)||(p.yaxis=p.yaxis[0]),f&&(p.xaxis=B.extend(p.xaxis||{},this._valueAxisXPatch(g)))}const m=this._frames;m&&m.plotOptions&&(p.plotOptions=B.clone(m.plotOptions));const y=m&&m.pieScaleOf?m.pieScaleOf(h.key):null;if(null!==y){const t=null==(s=null==(n=null==(i=this.ctx.opts)?void 0:i.plotOptions)?void 0:n.pie)?void 0:s.customScale;p.plotOptions=B.extend(p.plotOptions||{},{pie:{customScale:y*("number"==typeof t?t:1)}})}return p}_alignGutters(t=!1){return d(this,null,function*(){var e,i,n,s;const r=this.panels.map(t=>{var e,i,n,s,r;return null==(r=null==(s=null==(n=null==(i=null==(e=t.chart)?void 0:e.w)?void 0:i.globals)?void 0:n.yLabelsCoords)?void 0:s[0])?void 0:r.width}).filter(t=>"number"==typeof t&&isFinite(t));if(!r.length)return;const a=!!(null==(s=null==(n=null==(i=null==(e=this.panels[0])?void 0:e.chart)?void 0:i.w)?void 0:n.globals)?void 0:s.isBarHorizontal)?0:10,o=Math.max(0,Math.max(...r)-a);t&&o<=this.virtual._gutterFloor+.5||(this.virtual._gutterFloor=o,yield this._pushGutterFloor(o))})}_yLabelPad(){return 10}_pushGutterFloor(t){return d(this,null,function*(){for(const e of this.panels)e.chart&&(yield e.chart.updateOptions({yaxis:ln(e.chart,{labels:{minWidth:t}})},!1,!1,!1).catch(()=>{}))})}_refitForChrome(){if(!this._hostHeight())return;const t=this._chromeHeight();t<=0||Math.round(t)===Math.round(this._chromeH)?this._warnIfOverflowing():(this._chromeH=t,this._relayout(this._containerWidth()))}_warnIfOverflowing(){const t=this.layout;t&&t.overflowH&&!this._overflowWarned&&(this._overflowWarned=!0,console.warn(`ApexCharts: trellis needs ${Math.round(t.gridH+this._chromeH)}px but its container gives ${Math.round(this._hostHeight()||0)}px; ${t.rows} rows cannot go below the ${t.panelH}px panel floor. Raise the container, use fewer panels (trellis.limit) or more columns (trellis.columns), or lower trellis.minPanelHeight.`))}_onContainerResize(){this._mounted&&(this._raf||(this._raf=requestAnimationFrame(()=>{this._raf=0;const t=this._containerWidth(),e=this._hostHeight()||0;if(Math.round(t)!==Math.round(this._lastWidth)||Math.round(e)!==Math.round(this._lastHeight)){if(this._lastWidth=t,this._lastHeight=e,this._promotedKey){const t=this.panels.find(t=>t.key===this._promotedKey);return void(t&&t.chart&&t.chart.updateOptions({},!1,!1,!1).catch(()=>{}))}this._relayout(t)}})))}promote(t){return d(this,null,function*(){var e;const i=this.panels.find(e=>e.key===String(t));if(!i||i.noMount||!this._mounted)return;if(this._promotedKey===i.key)return;this._promotedKey&&(yield this.restorePromotion()),this._promotedKey=i.key;const n=this.layout,s=this.elGrid?this.elGrid.getBoundingClientRect().height:0,r=Math.round(Math.max(280,Math.min(560,s||(n?2.4*n.panelH:420))));null==(e=this.elWrap)||e.classList.add("apexcharts-trellis-promoting"),this.panels.forEach(t=>{if(!t.cellEl)return;const e=t===i;t.cellEl.classList.toggle("apexcharts-trellis-cell-promoted",e),t.cellEl.classList.toggle("apexcharts-trellis-cell-parked",!e)}),this._stripEls.forEach(t=>t.classList.add("apexcharts-trellis-cell-parked")),this.chrome.buildBreadcrumb(this._elChromeTop,i.key,()=>this.restorePromotion()),!i.chart&&this._virtualActive&&(i.wantMounted=!0,this.virtual._dirty.add(i),this.virtual._schedule()),i.el&&(i.el.style.minHeight=`${r}px`),i.chart&&(yield i.chart.updateOptions({chart:{height:r}},!1,!1,!1).catch(()=>{})),this._fire("panelPromoted",{key:i.key,chart:i.chart})})}restorePromotion(){return d(this,null,function*(){var t;if(!this._promotedKey)return;const e=this.panels.find(t=>t.key===this._promotedKey);this._promotedKey=null,null==(t=this.elWrap)||t.classList.remove("apexcharts-trellis-promoting"),this.panels.forEach(t=>{t.cellEl&&(t.cellEl.classList.remove("apexcharts-trellis-cell-promoted"),t.cellEl.classList.remove("apexcharts-trellis-cell-parked"))}),this._stripEls.forEach(t=>t.classList.remove("apexcharts-trellis-cell-parked")),this.chrome.removeBreadcrumb();const i=this.layout;e&&e.el&&i&&(e.el.style.minHeight=`${i.panelH}px`),e&&e.chart&&i&&(yield e.chart.updateOptions({chart:{height:i.panelH}},!1,!1,!1).catch(()=>{})),this._lastWidth=0,this._relayout(this._containerWidth()),this._lastWidth=this._containerWidth(),this._fire("panelRestored",{key:e?e.key:null})})}_relayout(t){const e=this.split;if(!e)return;const i=this.layout?this.layout.panelH:0;this.layout=qi({panelCount:e.panels.length,containerWidth:t,cfg:this._layoutCfg(),hostHeight:this._hostHeight(),chromeHeight:this._chromeH}),this._applyGridStyle(),this._warnIfOverflowing();const n=this.layout;this.panels.forEach((t,e)=>{if(t.cellEl&&this._applyCellMutes(t.cellEl,n.cells[e]),t.el&&this._virtualActive&&(t.el.style.minHeight=`${n.panelH}px`),!t.chart)return;const s=n.panelH!==i?{chart:{height:n.panelH}}:{};t.chart.updateOptions(s,!1,!1,!1).catch(()=>{})}),this._virtualActive&&this.virtual.refresh()}canApplyInPlace(t){if(!this._mounted||this._promotedKey)return!1;if(!t||"object"!=typeof t)return!1;const e=Object.keys(t);return!!e.length&&e.every(t=>Fn.includes(t))}applyPanelOptions(t=!0){return d(this,null,function*(){const e=this.split;e&&(this._deriveShared(e,!1),yield Promise.all(this.panels.map(e=>{if(!e.chart)return Promise.resolve();const i=this._assemblePanelOptions(e.index);return delete i.series,delete i.xaxis,delete i.yaxis,i.chart&&delete i.chart.height,e.chart.updateOptions(i,!1,t,!1,!1).catch(()=>{})})),this.chrome.rebuildLegend())})}updateSeries(t,e=!0){return d(this,null,function*(){const i=this.w;if(Array.isArray(this.cfg.data)&&this.cfg.data.length)return console.warn("ApexCharts: this trellis renders from trellis.data; update it via updateOptions({ trellis: { data } })."),Promise.resolve();if(i.config.series=t,this.ctx.opts&&(this.ctx.opts.series=t),!this._mounted)return this.ctx.render();const n=Fi(t||[],this.cfg,this._splitHost());if(!(n.panels.length===this.panels.length&&n.panels.every((t,e)=>t.key===this.panels[e].key&&!!t.empty==!!this.panels[e].empty)))return this.teardown(),this.ctx.render();this.split=n,this._deriveShared(n),this.sync.prune(n.seriesNames),this.sync.currentWindow=null,this.panels.forEach(t=>{t.viewStash&&(t.viewStash=c(l({},t.viewStash),{window:null,zoomed:!1})),t.chart&&(t.chart.w.interact.zoomed=!1)});const s=this._gen;yield Promise.all(this.panels.map(t=>{if(!t.chart)return Promise.resolve();const i=this._panelDataPatch(t.index),n=i.yaxis;return n&&(i.yaxis=ln(t.chart,{}).map((t,e)=>B.extend(t,(Array.isArray(n)?n[e]:n)||{}))),t.chart.updateOptions(i,!1,e,!1).catch(()=>{})})),s===this._gen&&("shared"!==this._yMode()&&(yield this._alignGutters(!0)),s===this._gen&&(this.chrome.rebuildLegend(),this._refitForChrome()))})}getPanels(){return this.panels.map(t=>({key:t.key,index:t.index,chart:t.chart,el:t.cellEl}))}getPanel(t){const e=this.panels.find(e=>e.key===String(t));return e?e.chart:null}teardown(){this._gen++,this._rendering=!1,this.virtual.stop(),this._virtualActive=!1,this._panelRenderer=null,this._promotedKey=null,this._frames=null,this._tool=null,this.sync.currentWindow=null,this.chrome.destroyGradientLegend();const t=this.chrome;t.elLegend=t.elToolbar=t.elTitle=t.elSubtitle=t.elBreadcrumb=null,this._elChromeTop=null,this.gridTooltip&&(this.gridTooltip.destroy(),this.gridTooltip=null),this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),k.isBrowser()&&this.ctx.el&&hi(this.ctx.el,this._resizeHandler),this.panels.forEach(t=>{if(t.chart)try{t.chart.destroy()}catch(t){}t.chart=null}),this.panels=[],this._stripEls=[],this.elWrap&&this.elWrap.parentNode&&this.elWrap.parentNode.removeChild(this.elWrap),this.elWrap=null,this.elGrid=null,this._mounted=!1,this.ctx._renderPromise=null}}});m.default.registerFeatures({measure:class{constructor(t,e){this.w=t,this.ctx=e,this.graphics=new b(t),this.pins=[],this.drag=null,this.armed=!1,this.persistent=!1,this.pane=null,this._seedActive=!1,this._onKeyDown=this._onKeyDown.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onSeedDown=this._onSeedDown.bind(this),this._onSeedKey=this._onSeedKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.measure||{}}_enabled(){return this.w.globals.axisCharts&&!0===this._cfg().enabled}_mode(){return"free"===this._cfg().mode?"free":"span"}_snapToSeries(t){const e=(this.w.config.series||[])[0];if(!e)return null;const i=this._points(e.data||[]);if(!i.length)return null;let n=i[0],s=Math.abs(i[0].x-t);for(let e=1;e<i.length;e++){const r=Math.abs(i[e].x-t);r<s&&(s=r,n=i[e])}return n}_resolve(t){if("free"===this._mode())return t;const e=this._snapToSeries(t.x);if(!e)return t;const i=this._dataToGrid(e.x,e.y);return{x:e.x,y:e.y,gx:i.gx,gy:i.gy}}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_bindKeys(){if(this._keysBound)return;const t=this._doc();t&&(t.addEventListener("keydown",this._onKeyDown),t.addEventListener("keyup",this._onKeyUp),this._keysBound=!0)}_onKeyDown(t){if(!this._enabled())return;if("Escape"===t.key)return void this._cancelDrag();if(this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&this._arm()}_onKeyUp(t){if(this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&(this.drag||this._disarm())}startMeasure(){this._enabled()&&(this.persistent=!0,this._arm())}stopMeasure(){this.persistent=!1,this._cancelDrag(),this._disarm()}seedFromClient(t,e){if(!this._enabled())return;this._cancelDrag(),this._endSeed(!1);const i=this._project(t,e);this.drag={a:i,b:i},this._seedActive=!0;const n=this._doc();n&&(n.addEventListener("mousemove",this._onMove),n.addEventListener("touchmove",this._onMove,{passive:!1}),n.addEventListener("mousedown",this._onSeedDown,!0),n.addEventListener("touchstart",this._onSeedDown,!0),n.addEventListener("keydown",this._onSeedKey,!0)),this._renderLive()}_onSeedDown(t){if(!this._seedActive||!this.drag)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:i}=this._clientXY(t);this.drag.b=this._project(e,i),this._endSeed(!0)}_onSeedKey(t){"Escape"===t.key&&this._endSeed(!1)}_endSeed(t){var e,i;if(!this._seedActive)return;this._seedActive=!1;const n=this._doc();n&&(n.removeEventListener("mousemove",this._onMove),n.removeEventListener("touchmove",this._onMove),n.removeEventListener("mousedown",this._onSeedDown,!0),n.removeEventListener("touchstart",this._onSeedDown,!0),n.removeEventListener("keydown",this._onSeedKey,!0));const s=this.drag;if(this.drag=null,this._clearLive(),!t||!s)return;const r=this._resolve(s.a),a=this._resolve(s.b);if(Math.abs(r.gx-a.gx)<2&&Math.abs(r.gy-a.gy)<2)return;const o=this._mode();!1!==this._cfg().pinOnRelease&&(this.pins.push({xa:r.x,ya:r.y,xb:a.x,yb:a.y,mode:o}),this._renderPins(),null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,"measure")),this._fireMeasured(r,a)}clearMeasures(){var t,e;this.pins=[],this._renderPins(),null==(e=null==(t=this.ctx.history)?void 0:t.snapshot)||e.call(t,"clear measures")}getPins(){return this.pins.map(t=>({xa:t.xa,ya:t.ya,xb:t.xb,yb:t.yb,mode:"free"===t.mode?"free":"span"}))}setPins(t){this.pins=Array.isArray(t)?t.filter(t=>t&&isFinite(t.xa)&&isFinite(t.ya)&&isFinite(t.xb)&&isFinite(t.yb)).map(t=>({xa:+t.xa,ya:+t.ya,xb:+t.xb,yb:+t.yb,mode:"free"===t.mode?"free":"span"})):[],this._renderPins()}_points(t){const e=[];for(let i=0;i<t.length;i++){const n=t[i];let s,r;Array.isArray(n)?(s=+n[0],r=+n[1]):n&&"object"==typeof n?(s=+n.x,r=+n.y):(s=i,r=+n),isFinite(s)&&isFinite(r)&&e.push({x:s,y:r})}return e}_arm(){if(this.armed||!this._enabled())return;const t=this.w,e=t.dom.elGraphical;if(!e)return;this.armed=!0;const i=this.graphics.drawRect(0,0,t.layout.gridWidth,t.layout.gridHeight);i.node.setAttribute("class","apexcharts-measure-capture"),i.node.setAttribute("fill","transparent"),i.node.style.cursor="crosshair",i.node.style.pointerEvents="all",i.node.addEventListener("mousedown",this._onDown),i.node.addEventListener("touchstart",this._onDown,{passive:!1}),e.add(i),this.pane=i}_disarm(){if(this.armed=!1,this.pane){this.pane.node.removeEventListener("mousedown",this._onDown),this.pane.node.removeEventListener("touchstart",this._onDown);const t=this.pane.node;t.parentNode&&t.parentNode.removeChild(t),this.pane=null}}_clientXY(t){const e=t.touches&&t.touches[0]?t.touches[0]:t;return{cx:e.clientX,cy:e.clientY}}_plotRect(){const t=this.w;return t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg")?en.plotRect(t):null}_yRange(){const t=this.w.globals,e=t.yAxisScale&&t.yAxisScale[0];return e&&isFinite(e.niceMin)&&isFinite(e.niceMax)&&e.niceMax!==e.niceMin?[e.niceMin,e.niceMax]:[t.minY,t.maxY]}_project(t,e){const i=this.w,n=this._plotRect(),s=i.layout.gridWidth,r=i.layout.gridHeight,a=t=>t<0?0:t>1?1:t,o=n&&n.width?a((t-n.left)/n.width):0,l=n&&n.height?a((e-n.top)/n.height):0,[c,h]=this._yRange();return{x:i.globals.minX+o*(i.globals.maxX-i.globals.minX),y:h-l*(h-c),gx:o*s,gy:l*r}}_dataToGrid(t,e){const i=this.w,n=i.layout.gridWidth,s=i.layout.gridHeight,r=i.globals.maxX-i.globals.minX||1,[a,o]=this._yRange(),l=o-a||1;return{gx:(t-i.globals.minX)/r*n,gy:s-(e-a)/l*s}}_onDown(t){if(!this.armed)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:i}=this._clientXY(t),n=this._project(e,i);this.drag={a:n,b:n};const s=this._doc();s&&(s.addEventListener("mousemove",this._onMove),s.addEventListener("mouseup",this._onUp),s.addEventListener("touchmove",this._onMove,{passive:!1}),s.addEventListener("touchend",this._onUp)),this._renderLive()}_onMove(t){if(!this.drag)return;t.cancelable&&t.preventDefault();const{cx:e,cy:i}=this._clientXY(t);this.drag.b=this._project(e,i),this._renderLive()}_onUp(t){var e,i;const n=this._doc();if(n&&(n.removeEventListener("mousemove",this._onMove),n.removeEventListener("mouseup",this._onUp),n.removeEventListener("touchmove",this._onMove),n.removeEventListener("touchend",this._onUp)),!this.drag)return;const s=this.drag.a,r=this.drag.b;if(this.drag=null,this._clearLive(),Math.abs(s.gx-r.gx)<2&&Math.abs(s.gy-r.gy)<2)return void(this.persistent||this._disarm());const a=this._mode(),o=this._resolve(s),l=this._resolve(r);!1!==this._cfg().pinOnRelease&&(this.pins.push({xa:o.x,ya:o.y,xb:l.x,yb:l.y,mode:a}),this._renderPins(),null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,"measure")),this._fireMeasured(o,l),this.persistent||this._disarm()}_cancelDrag(){const t=this._doc();t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("touchend",this._onUp)),this.drag=null,this._clearLive()}_stats(t,e){const i=e.x-t.x,n=e.y-t.y;return{dx:i,dy:n,pct:0!==t.y?n/Math.abs(t.y)*100:NaN,slope:0!==i?n/i:NaN}}_fmt(t){if(!isFinite(t))return"n/a";const e=Math.abs(t);return 0!==e&&(e<.01||e>=1e6)?t.toExponential(2):String(Math.round(100*t)/100)}_computedStyle(){if(!k.isBrowser())return null;const t=this.w.dom.elGraphical&&this.w.dom.elGraphical.node;if(!t||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(t)}catch(t){return null}}_resolveColor(t,e,i,n){if(t)return t;const s=void 0!==n?n:this._computedStyle();return(s?s.getPropertyValue(e).trim():"")||i}_colors(){const t=this._cfg().colors||{},e=this._computedStyle();return{up:this._resolveColor(t.up,"--apx-measure-up","#16a34a",e),down:this._resolveColor(t.down,"--apx-measure-down","#dc2626",e),neutral:this._resolveColor(t.neutral,"--apx-measure-neutral","#64748b",e),guide:this._resolveColor(t.guide,"--apx-measure-guide","#94a3b8",e)}}_dirColor(t){const e=this._colors();return 0===t?e.neutral:t>0?e.up:e.down}_dirClass(t){return 0===t?"apexcharts-measure-flat":t>0?"apexcharts-measure-up":"apexcharts-measure-down"}_fmtPct(t){if(!isFinite(t))return"n/a";const e=this._cfg().format&&this._cfg().format.percent;if("function"==typeof e)try{const i=e(t);if(null!=i)return String(i)}catch(t){}return(t>=0?"+":"")+this._fmt(t)+"%"}_label(t,e,i,n){const s=this._cfg().label;if("function"==typeof s){const r=s({from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:i.dx,dy:i.dy,percentChange:i.pct,slope:i.slope,mode:n});return Array.isArray(r)?r.map(String):[String(r)]}if("span"===n){const n=0===i.dy?"":i.dy>0?" \u2191":" \u2193",s=isFinite(i.pct)?"("+this._fmtPct(i.pct)+")":"";return[this._fmtY(i.dy)+" "+s+n,this._fmtX(t.x)+" to "+this._fmtX(e.x)]}return["\u0394x "+this._fmtDx(i.dx),"\u0394y "+this._fmtY(i.dy),this._fmtPct(i.pct)]}_fmtDx(t){if("datetime"===this.w.config.xaxis.type){const e=t/864e5;return Math.round(10*e)/10+"d"}return this._fmt(t)}_fmtY(t){const e=this._cfg().format&&this._cfg().format.y;if("function"==typeof e)try{const i=e(t);if(null!=i)return String(i)}catch(t){}const i=this.w.globals.yLabelFormatters&&this.w.globals.yLabelFormatters[0];if("function"==typeof i)try{const e=i(t,{seriesIndex:0,dataPointIndex:-1,w:this.w});if(null!=e&&""!==e)return String(e)}catch(t){}return this._fmt(t)}_fmtX(t){const e=this.w,i=this._cfg().format&&this._cfg().format.x;if("function"==typeof i)try{const e=i(t);if(null!=e)return String(e)}catch(t){}if("datetime"===e.config.xaxis.type){return new Date(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}const n=e.globals.xLabelFormatter;if("function"==typeof n)try{const i=n(t,{w:e});if(null!=i&&""!==i)return String(i)}catch(t){}return this._fmt(t)}_liveGroup(){const t=this.w;if(this._live&&this._live.node&&this._live.node.parentNode)return this._live;const e=this.graphics.group({class:"apexcharts-measure-live"});return e.node.style.pointerEvents="none",t.dom.elGraphical&&t.dom.elGraphical.add(e),this._live=e,e}_clearLive(){if(this._live&&this._live.node){const t=this._live.node;t.parentNode&&t.parentNode.removeChild(t)}this._live=null}_renderLive(){if(!this.drag)return;const t=this._liveGroup();for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);const e=this._resolve(this.drag.a),i=this._resolve(this.drag.b);this._drawRuler(t,e,i,!1,this._mode())}_renderPins(){const t=this.w,e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-measure-pins");if(e&&e.parentNode&&e.parentNode.removeChild(e),!this.pins.length||!t.dom.elGraphical)return;const i=this.graphics.group({class:"apexcharts-measure-pins"});i.node.style.pointerEvents="none",t.dom.elGraphical.add(i),this.pins.forEach(t=>{const e=c(l({},this._dataToGrid(t.xa,t.ya)),{x:t.xa,y:t.ya}),n=c(l({},this._dataToGrid(t.xb,t.yb)),{x:t.xb,y:t.yb});this._drawRuler(i,e,n,!0,t.mode||"span")})}_drawRuler(t,e,i,n,s){const r=this._stats(e,i),a=this.graphics.group({class:"apexcharts-measure-ruler "+this._dirClass(r.dy)+(n?" apexcharts-measure-pinned":"")});"free"===(s||this._mode())?this._drawFree(a,e,i,r):this._drawSpan(a,e,i,r),t.add(a)}_dot(t,e,i){if(!1===this._cfg().markers)return;const n=this.graphics.drawMarker(e.gx,e.gy,{pSize:4,shape:"circle",pointFillColor:i,pointFillOpacity:1,pointStrokeColor:"#fff",pointStrokeWidth:2,pointStrokeOpacity:1});t.add(n)}_readout(t,e,i,n,s,r,a){const o=this.graphics.drawRect(i,n,s,r,4);o.node.setAttribute("class","apexcharts-measure-label-bg"),o.attr({fill:"#ffffff","fill-opacity":.95,stroke:a,"stroke-width":1}),t.add(o);const l=this.graphics.drawText({x:i+9,y:n+15,text:e,textAnchor:"start",fontSize:"11px",foreColor:"#1e293b",cssClass:"apexcharts-measure-label"});t.add(l)}_drawSpan(t,e,i,n){const s=this.w,r=this._cfg(),a=s.layout.gridHeight,o=this._dirColor(n.dy),l=Math.min(e.gx,i.gx),c=Math.max(e.gx,i.gx);if(!1!==r.band){const e=this.graphics.drawRect(l,0,Math.max(0,c-l),a,0);e.node.setAttribute("class","apexcharts-measure-band"),e.attr({fill:o,"fill-opacity":.09,stroke:"none"}),t.add(e)}!1!==r.guides&&[e,i].forEach(e=>{const i=this.graphics.drawLine(e.gx,0,e.gx,a,this._colors().guide,4,1);i.node.setAttribute("class","apexcharts-measure-vline"),t.add(i)}),[e,i].forEach(e=>this._dot(t,e,o));const h=this._label(e,i,n,"span"),d=h.reduce((t,e)=>Math.max(t,e.length),0),u=Math.max(148,6.4*d),p=20+15*h.length;let f=(l+c)/2-u/2;f=Math.max(2,Math.min(f,s.layout.gridWidth-u-2)),this._readout(t,h,f,4,u,p,o)}_drawFree(t,e,i,n){const s=this._dirColor(n.dy),r=this.graphics.drawLine(e.gx,e.gy,i.gx,i.gy,s,0,2);r.node.setAttribute("class","apexcharts-measure-line"),t.add(r),[e,i].forEach(e=>this._dot(t,e,s));const a=this._label(e,i,n,"free"),o=a.reduce((t,e)=>Math.max(t,e.length),0),l=Math.max(72,6.2*o),c=16+15*a.length;let h=(e.gx+i.gx)/2+8,d=(e.gy+i.gy)/2-c/2;h=Math.max(2,Math.min(h,this.w.layout.gridWidth-l-2)),d=Math.max(2,Math.min(d,this.w.layout.gridHeight-c-2)),this._readout(t,a,h,d,l,c,s)}_fireMeasured(t,e){const i=this._stats(t,e),n={from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:i.dx,dy:i.dy,percentChange:i.pct,slope:i.slope},s=this.w.config.chart.events.measured;"function"==typeof s&&s(this.ctx,n),this.ctx.events.fireEvent("measured",[this.ctx,n])}_afterRender(){this._enabled()&&(this._bindKeys(),this.w.interact.measureEnabled&&!this.persistent&&(this.persistent=!0),this.pins.length&&this._renderPins(),this.persistent&&!this.drag&&(this._disarm(),this._arm()))}teardown(){this._cancelDrag(),this._endSeed(!1),this._disarm();const t=this._doc();t&&this._keysBound&&(t.removeEventListener("keydown",this._onKeyDown),t.removeEventListener("keyup",this._onKeyUp)),this._keysBound=!1,this.pins=[]}}});const Dn=[".apexcharts-bar-area",".apexcharts-candlestick-area",".apexcharts-boxPlot-area",".apexcharts-rangebar-area",".apexcharts-marker"].join(", "),Rn=[".apexcharts-pie-area",".apexcharts-bar-area"].join(", "),Tn="apexcharts-crossfilter-dimmed",Nn=["pie","donut","polarArea","radialBar"];m.default.registerFeatures({linkedViews:class{constructor(t,e){this.w=t,this.ctx=e,this._dimmed=!1,this._wired=!1,this._pending=!1,this._lastValues=null,this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onChange=this._onChange.bind(this),"filter"===this._mode()&&this._initEngine()}_mode(){const t=this.w.config.chart.link;return t&&"function"==typeof t.dimension?"filter":t&&t.enabled?"highlight":"off"}_enabled(){const t=this.w.config.chart.link;return!(!t||!t.enabled)}onSourceSelection(t){var e;const i=this._mode();if("off"===i)return;if(!t||null==t.min||null==t.max)return;let n=Math.min(t.min,t.max),s=Math.max(t.min,t.max);const r=this.w.globals.minX,a=this.w.globals.maxX;if(isFinite(r)&&isFinite(a)&&a>r){const t=1e-6*(a-r);n-r<=t&&(n=r),a-s<=t&&(s=a)}if("filter"===i){const t=this._cf();if(!t)return;return t.filter(this._chartId(),[n,s]),void this._fireFilterChange(t,[n,s])}this._group().forEach(t=>{var e;null==(e=null==t?void 0:t.linkedViews)||e.applyDim(n,s)});const o={xaxis:{min:n,max:s},sourceChartID:this.w.globals.chartID};"function"==typeof this.w.config.chart.events.crossFilter&&this.w.config.chart.events.crossFilter(this.ctx,o),null==(e=this.ctx.events)||e.fireEvent("crossFilter",[this.ctx,o])}_group(){const t="function"==typeof this.ctx.getGroupedCharts?this.ctx.getGroupedCharts():[];return[this.ctx,...t]}applyDim(t,e){if(!this._enabled())return;const i=this.w,n=i.dom.baseEl;if(!n)return;const s=i.config.chart.link.dimOpacity;i.dom.elWrap&&"number"==typeof s&&i.dom.elWrap.style.setProperty("--apx-cf-dim",String(s));const r=i.globals.seriesX||[];n.querySelectorAll(Dn).forEach(i=>{const n=i.getAttribute("j");if(null===n)return;const s=parseInt(n,10),a=i.getAttribute("index"),o=null===a?0:parseInt(a,10),l=r[o]||r[0];if(!l)return;const c=l[s];null!=c&&i.classList.toggle(Tn,c<t||c>e)}),this._dimmed=!0}clear(){const t=this.w.dom.baseEl;t&&(t.querySelectorAll("."+Tn).forEach(t=>t.classList.remove(Tn)),this._dimmed=!1)}clearGroup(){if("filter"===this._mode()){const t=this._cf();return void(t&&t.reset())}this._group().forEach(t=>{var e;return null==(e=null==t?void 0:t.linkedViews)?void 0:e.clear()})}_chartId(){return this.w.globals.chartID}_cf(){const t=this.w.config.chart.link,e=t&&(t.id||this.w.config.chart.group);return e?Dt.get(e):null}_isPie(){return-1!==Nn.indexOf(this.w.config.chart.type)}_isHeatmap(){return"heatmap"===this.w.config.chart.type}_initEngine(){const t=this._cf(),e=this.w.config.chart.link;if(!t){const t=e&&e.id||this.w.config.chart.group;return void console.warn(`[apexcharts] chart.link.dimension is set but no crossfilter coordinator "${t}" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`)}const i=this._chartId();t.hasDimension(i)||t.registerDimension(i,{dimension:e.dimension,reduce:e.reduce,type:e.type||(this._isHeatmap()?"matrix":void 0),bins:e.bins,order:e.order}),this._injectSeries(t.aggregateFor(i)),this._wire(t)}_seriesFromAgg(t){if("matrix"===t.type)return t.yLabels.map((e,i)=>({name:String(e),data:t.xLabels.map((e,n)=>({x:String(e),y:t.matrix[i][n]}))}));if(this._isPie())return t.values.slice();const e=this.w.config.chart.link.seriesName||"Count";return"range"===t.type?[{name:e,data:t.labels.map((e,i)=>[e,t.values[i]])}]:[{name:e,data:t.values.slice()}]}_sigOf(t){return JSON.stringify(t.matrix||t.values)}_injectSeries(t){const e=this.w;this._lastValues=this._sigOf(t),e.config.series=this._seriesFromAgg(t),"matrix"!==t.type&&(this._isPie()?e.config.labels=t.labels.map(String):"category"===t.type?(e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.categories=t.labels.map(String)):"range"===t.type&&this._pinRangeDomain(t.edges))}_pinRangeDomain(t){if(!Array.isArray(t)||t.length<2)return;const e=this.w;e.config.xaxis||(e.config.xaxis={}),null==e.config.xaxis.min&&(e.config.xaxis.min=t[0]),null==e.config.xaxis.max&&(e.config.xaxis.max=t[t.length-1])}_wire(t){this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.on("change",this._onChange))}_onPointSelect(t,e,i){if("filter"!==this._mode()||!i||null==i.dataPointIndex)return;const n=this._cf();if(!n)return;const s=this._chartId(),r=n.aggregateFor(s);if("matrix"===r.type)return;const a=r.keys[i.dataPointIndex];null!=a&&(n.toggleKey(s,a),this._fireFilterChange(n,a))}_onChange(){"filter"!==this._mode()||this._pending||(this._pending=!0,Promise.resolve().then(()=>{this._pending=!1,this.w.globals.isDestroyed||this._applyAggregation()}))}_applyAggregation(){if("filter"!==this._mode())return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),i=this._sigOf(e);i!==this._lastValues?(this._lastValues=i,this.ctx._replaceSeries(this._seriesFromAgg(e),!0,!0,{keepView:!0})):this._applySelfDim()}_afterRender(){if("filter"!==this._mode())return;const t=this.w.config.series;t&&0!==t.length?this._applySelfDim():this._reassertSeries()}_reassertSeries(){this._pending||(this._pending=!0,Promise.resolve().then(()=>{if(this._pending=!1,this.w.globals.isDestroyed)return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),i=this._seriesFromAgg(e);i.length&&(this._lastValues=this._sigOf(e),this.ctx._replaceSeries(i,!0,!0,{keepView:!0}))}))}_applySelfDim(){const t=this._cf();if(!t)return;const e=this.w,i=e.dom.baseEl;if(!i)return;const n=this._chartId(),s=t.filterOf(n),r=e.config.chart.link.dimOpacity;e.dom.elWrap&&"number"==typeof r&&e.dom.elWrap.style.setProperty("--apx-cf-dim",String(r));const a=s instanceof Set,o=Array.isArray(s),l=t.aggregateFor(n);if("matrix"===l.type)return;const c=l.keys;i.querySelectorAll(Rn).forEach(t=>{const e=t.getAttribute("j");if(null===e)return;const i=c[parseInt(e,10)];let n=!1;a?n=!s.has(i):o&&Array.isArray(i)&&(n=i[1]<=s[0]||i[0]>=s[1]),t.classList.toggle(Tn,n)}),this._dimmed=!!s}_fireFilterChange(t,e){var i;const n=c(l({},t.state()),{sourceChartID:this._chartId(),key:e}),s=this.w.config.chart.events;"function"==typeof s.filterChange&&s.filterChange(this.ctx,n),null==(i=this.ctx.events)||i.fireEvent("filterChange",[this.ctx,n])}teardown(){var t,e,i,n,s,r;if(this.clear(),this._wired){null==(e=(t=this.ctx).removeEventListener)||e.call(t,"dataPointSelection",this._onPointSelect),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"mounted",this._afterRender),null==(r=(s=this.ctx).removeEventListener)||r.call(s,"updated",this._afterRender);const a=this._cf();a&&(a.off("change",this._onChange),a.removeDimension(this._chartId())),this._wired=!1}}},crossfilter:Dt});const On=m.__apex_Options,$n=["point","xaxis","yaxis"],In=[10,11,12,14,17,20],zn=["circle","square","diamond","triangle"],Wn={circle:"\u25cf",square:"\u25a0",diamond:"\u25c6",triangle:"\u25b2"},Bn=["#ffffff","#334155","#2563eb","#16a34a","#d97706","#dc2626"];class jn{constructor(t,e){this.w=t,this.ctx=e,this._wired=!1,this._drag=null,this._editor=null,this._creating=!1,this._createSeq=0,this._attach=this._attach.bind(this),this._onRerender=this._onRerender.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onCreateClick=this._onCreateClick.bind(this),this._onDocDownEditor=this._onDocDownEditor.bind(this),(this._enabledGlobally()||this._hasDraggable()||this._paletteEnabled())&&this._wire()}_enabledGlobally(){const t=this.w.config.chart.ink;return!(!t||!t.enabled)}_paletteEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.palette)}_snapEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.snap)}_nearest(t,e){let i=t,n=1/0;for(let s=0;s<e.length;s++){const r=Math.abs(e[s]-t);r<n&&(n=r,i=e[s])}return i}_snapX(t){if(!this._snapEnabled()||"number"!=typeof t)return t;const e=this.w.globals.xAxisScale;return e&&Array.isArray(e.result)&&e.result.length?this._nearest(t,e.result):t}_snapY(t,e){if(!this._snapEnabled()||"number"!=typeof t)return t;const i=this.w.globals.yAxisScale,n=i&&i[e];return n&&Array.isArray(n.result)&&n.result.length?this._nearest(t,n.result):t}_annoList(t){const e=this.w.config.annotations;if(!e)return[];const i="point"===t?"points":t;return Array.isArray(e[i])?e[i]:[]}_isDraggable(t){return!!t&&(!0===t.draggable||!1!==t.draggable&&this._enabledGlobally())}_hasDraggable(){return $n.some(t=>this._annoList(t).some(t=>this._isDraggable(t)))}_wire(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onRerender),this.ctx.addEventListener("updated",this._onRerender))}_onRerender(){if(this._closeEditor(!1),this._attach(),this._creating){const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0))}}_attach(){const t=this.w,e=t.dom.baseEl;e&&($n.forEach(i=>{this._annoList(i).forEach((n,s)=>{this._isDraggable(n)&&(n.id||(n.id="apexcharts-ink-"+i+"-"+s+"-"+t.globals.chartID),e.querySelectorAll("."+n.id).forEach(t=>{t.__inkBound||(t.__inkBound=!0,t.style.cursor="move",t.classList.add("apexcharts-ink-draggable"),t.addEventListener("mousedown",t=>this._onDown(t,i,s)),t.addEventListener("touchstart",t=>this._onDown(t,i,s)),t.addEventListener("dblclick",t=>{t.preventDefault(),t.stopPropagation(),this._startEdit(i,s,{select:!0})}))}))})}),this._paletteEnabled()&&this._renderPalette())}_onDown(t,e,i){if(t.button&&0!==t.button)return;const n=this.w,s=n.dom.baseEl&&n.dom.baseEl.ownerDocument;if(!s)return;t.stopPropagation(),t.cancelable&&t.preventDefault();const r="touchstart"===t.type?t.touches[0]:t,a=n.dom.Paper&&n.dom.Paper.node,o=a&&a.getScreenCTM?a.getScreenCTM():null,l=this._annoList(e)[i];let c="move",h=null,d=0,u=0;if("xaxis"===e&&null!=l.x2&&(h=n.dom.baseEl.querySelector(".apexcharts-annotation-rect."+l.id),h)){const t=h.getBoundingClientRect();Math.abs(r.clientX-t.left)<=8?c="resize-x1":Math.abs(r.clientX-t.right)<=8&&(c="resize-x2"),d=parseFloat(h.getAttribute("x"))||0,u=parseFloat(h.getAttribute("width"))||0}this._drag={type:e,index:i,anno:l,els:Array.from(n.dom.baseEl.querySelectorAll("."+l.id)),mode:c,rect:h,origX:d,origW:u,startX:r.clientX,startY:r.clientY,scaleX:o&&o.a?o.a:1,scaleY:o&&o.d?o.d:1,dxPixel:0,dyPixel:0,moved:!1},s.addEventListener("mousemove",this._onMove),s.addEventListener("touchmove",this._onMove,{passive:!1}),s.addEventListener("mouseup",this._onUp),s.addEventListener("touchend",this._onUp)}_onMove(t){const e=this._drag;if(!e)return;t.cancelable&&t.preventDefault();const i="touchmove"===t.type?t.touches[0]:t;if(e.dxPixel=(i.clientX-e.startX)/e.scaleX,e.dyPixel=(i.clientY-e.startY)/e.scaleY,(Math.abs(e.dxPixel)>2||Math.abs(e.dyPixel)>2)&&(e.moved=!0),"move"===e.mode){const t=`translate(${e.dxPixel} ${e.dyPixel})`;e.els.forEach(e=>e.setAttribute("transform",t))}else e.rect&&("resize-x1"===e.mode?(e.rect.setAttribute("x",e.origX+e.dxPixel),e.rect.setAttribute("width",Math.max(1,e.origW-e.dxPixel))):"resize-x2"===e.mode&&e.rect.setAttribute("width",Math.max(1,e.origW+e.dxPixel)))}_onUp(){const t=this._drag;if(this._drag=null,this._teardownDocListeners(),!t||!t.moved)return void(t&&(t.els.forEach(t=>t.removeAttribute("transform")),this._startEdit(t.type,t.index)));const e=this._annoList(t.type)[t.index];e&&(this._applyDelta(t,e),t.els.forEach(t=>t.removeAttribute("transform")),this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:drag"),this._fireDragged(t.type,e,t.index))}_checkpoint(t){var e,i;null==(i=null==(e=this.ctx.history)?void 0:e.snapshot)||i.call(e,t)}_applyDelta(t,e){const i=this.w,n=i.layout.gridWidth?t.dxPixel*(i.globals.xRange/i.layout.gridWidth):0;if("point"===t.type){const{newX:n,newY:s}=this._invertPoint(e,t.dxPixel,t.dyPixel);if(e.x=this._snapX(n),null!=s){const t=e.yAxisIndex||0,n=i.globals.seriesYAxisMap;e.y=this._snapY(s,n&&n[t]?n[t][0]:0)}return}if("xaxis"!==t.type){if("yaxis"===t.type){const n=e.yAxisIndex||0,s=i.globals.seriesYAxisMap,r=s&&s[n]?s[n][0]:0,a=i.globals.yRange?i.globals.yRange[r]:null;if(null==a||!i.layout.gridHeight)return;const o=-t.dyPixel*(a/i.layout.gridHeight);"number"==typeof e.y2?("number"==typeof e.y&&(e.y+=o),e.y2+=o):"number"==typeof e.y&&(e.y=this._snapY(e.y+o,r))}}else{if("number"!=typeof e.x)return;if("move"===t.mode)"number"==typeof e.x2?(e.x+=n,e.x2+=n):e.x=this._snapX(e.x+n);else if("resize-x1"===t.mode||"resize-x2"===t.mode){const i=null==e.x2||e.x<=e.x2;("resize-x2"===t.mode?!i:i)?e.x=this._snapX(e.x+n):"number"==typeof e.x2&&(e.x2=this._snapX(e.x2+n))}}}_invertPoint(t,e,i){const n=this.w,s=("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric)&&!n.axisFlags.dataFormatXNumeric;let r=t.x;!s&&"number"==typeof t.x&&n.layout.gridWidth&&(r=t.x+e*(n.globals.xRange/n.layout.gridWidth));let a=t.y;const o=t.yAxisIndex||0,l=n.globals.seriesYAxisMap,c=l&&l[o]?l[o][0]:0,h=n.globals.yRange?n.globals.yRange[c]:null,d=n.config.yaxis[o]&&n.config.yaxis[o].logarithmic;return"number"==typeof t.y&&null!=h&&!d&&n.layout.gridHeight&&(a=t.y-i*(h/n.layout.gridHeight)),{newX:r,newY:a}}_redrawAnno(t,e,i){const n=this.w.dom.baseEl,s=this.ctx.annotations;if(!n||!s)return;n.querySelectorAll("."+e.id).forEach(t=>t.remove());const r=n.querySelector(".apexcharts-"+t+"-annotations");if(!r)return;"point"===t&&s.pointsAnnotations?s.pointsAnnotations.addPointAnnotation(e,r,i):"xaxis"===t&&s.xAxisAnnotations?s.xAxisAnnotations.addXaxisAnnotation(e,r,i):"yaxis"===t&&s.yAxisAnnotations&&s.yAxisAnnotations.addYaxisAnnotation(e,r,i);const a=n.querySelector(".apexcharts-"+t+"-annotation-label."+e.id);if(a&&s.helpers&&e.label&&e.label.text){const t=s.helpers.addBackgroundToAnno(a,e);t&&a.parentNode&&a.parentNode.insertBefore(t.node,a)}this._attach()}_fireAnnotationEvent(t,e){var i;const n=this.w.config.chart.events;"function"==typeof n[t]&&n[t](this.ctx,e),null==(i=this.ctx.events)||i.fireEvent(t,[this.ctx,e])}_fireDragged(t,e,i){const n={type:t,id:e.id,index:i,x:e.x,y:e.y};null!=e.x2&&(n.x2=e.x2),null!=e.y2&&(n.y2=e.y2),this._fireAnnotationEvent("annotationDragged",n)}startCreate(){if(this._creating)return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(this._creating=!0,t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0),this._syncPalette())}stopCreate(){if(!this._creating)return;this._creating=!1;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="",t.removeEventListener("click",this._onCreateClick,!0)),this._syncPalette()}_onCreateClick(t){if(!this._creating)return;t.preventDefault(),t.stopPropagation();const e=this._pixelToData(t.clientX,t.clientY);this.stopCreate(),e&&this.createAt(e.x,e.y)}createAt(t,e,i={}){const n=this.w;this._wire(),this._createSeq+=1;const s="apexcharts-ink-new-"+this._createSeq+"-"+n.globals.chartID,r=B.extend((new On).pointAnnotation,{x:t,y:e,id:s,owner:"ink",draggable:!0,label:{text:i.text||"Note"}});n.config.annotations||(n.config.annotations={}),Array.isArray(n.config.annotations.points)||(n.config.annotations.points=[]),n.config.annotations.points.push(r);const a=n.config.annotations.points.length-1;return this._redrawAnno("point",r,a),this._checkpoint("ink:create"),this._fireCreated("point",r,a),this._startEdit("point",a,{select:!0}),r}createLineAt(t,e,i={}){const n=this.w;this._wire(),this._createSeq+=1;const s="apexcharts-ink-new-"+this._createSeq+"-"+n.globals.chartID,r="y"===t?"yaxis":"xaxis",a="yaxis"===r?(new On).yAxisAnnotation:(new On).xAxisAnnotation,o={id:s,owner:"ink",draggable:!0,strokeDashArray:null!=i.strokeDashArray?i.strokeDashArray:4,label:{text:i.text||""}};i.color&&(o.borderColor=i.color,o.label.borderColor=i.color),"yaxis"===r?o.y=e:o.x=e;const l=B.extend(a,o);n.config.annotations||(n.config.annotations={}),Array.isArray(n.config.annotations[r])||(n.config.annotations[r]=[]),n.config.annotations[r].push(l);const c=n.config.annotations[r].length-1;return this._redrawAnno(r,l,c),this._checkpoint("ink:create"),this._fireCreated(r,l,c),!1!==i.select&&this._startEdit(r,c,{select:!0}),l}_pixelToData(t,e){const i=this.w;if(!i.globals.axisCharts||!i.dom.baseEl||!i.dom.baseEl.querySelector(".apexcharts-svg"))return null;const n=en.plotRect(i);if(!n.width||!n.height)return null;const s=(t-n.left)/n.width,r=(e-n.top)/n.height;let a=i.globals.minX+s*i.globals.xRange;const o=(i.globals.minYArr&&null!=i.globals.minYArr[0]?i.globals.minYArr[0]:i.globals.minY)+(1-r)*(i.globals.yRange&&null!=i.globals.yRange[0]?i.globals.yRange[0]:i.globals.maxY-i.globals.minY);return("category"===i.config.xaxis.type||i.config.xaxis.convertedCatToNumeric)&&!i.axisFlags.dataFormatXNumeric&&(a=Math.round(a)),{x:a,y:o}}_fireCreated(t,e,i){const n={type:t,id:e.id,index:i};void 0!==e.x&&(n.x=e.x),void 0!==e.y&&(n.y=e.y),this._fireAnnotationEvent("annotationCreated",n)}_renderPalette(){const t=this.w.dom.elWrap;if(!t||t.querySelector(".apexcharts-ink-palette"))return;const e=t.ownerDocument,i=e.createElement("div");i.className="apexcharts-ink-palette";const n=i.style;n.position="absolute",n.top="6px",n.left="6px",n.zIndex="15";const s=e.createElement("button");s.type="button",s.className="apexcharts-ink-add",s.textContent="+ Note";const r=s.style;r.cursor="pointer",r.font="12px sans-serif",r.padding="4px 9px",r.borderRadius="5px",r.border="1px solid #6366f1",r.color="#4338ca",r.background="#fff",s.addEventListener("click",t=>{t.stopPropagation(),this._creating?this.stopCreate():this.startCreate()}),i.appendChild(s),t.appendChild(i),this._syncPalette()}_syncPalette(){const t=this.w.dom.elWrap,e=t&&t.querySelector(".apexcharts-ink-add");e&&(this._creating?(e.style.background="#6366f1",e.style.color="#fff",e.textContent="Click chart..."):(e.style.background="#fff",e.style.color="#4338ca",e.textContent="+ Note"))}_noteColors(){const t=this.w.config.chart.ink;return t&&Array.isArray(t.noteColors)&&t.noteColors.length?t.noteColors:Bn}static _isLight(t){const e=String(t||"").replace("#",""),i=3===e.length?e.split("").map(t=>t+t).join(""):e,n=parseInt(i,16);if(isNaN(n)||6!==i.length)return!1;return(.299*(n>>16&255)+.587*(n>>8&255)+.114*(255&n))/255>.72}static _isBold(t){const e=t&&t.fontWeight;return"bold"===e||parseInt(String(e),10)>=600}_cardBtn(t,e,i,n,s,r){const a=t.createElement("button");return a.type="button",a.className="apexcharts-ink-btn"+(s?" "+s:""),a.title=i,a.setAttribute("aria-label",i),r?a.innerHTML=e:a.textContent=e,a.addEventListener("mousedown",t=>t.preventDefault()),a.addEventListener("click",t=>{t.stopPropagation(),n()}),a}_cardLabel(t,e){const i=t.createElement("span");return i.className="apexcharts-ink-cardlabel",i.textContent=e,i}_mkSwatch(t,e,i,n){const s=t.createElement("button");return s.type="button",s.className="apexcharts-ink-swatch"+(n?" "+n:""),s.title=e,s.setAttribute("aria-label","Color "+e),s.dataset.color=e,s.style.background=e,s.addEventListener("mousedown",t=>t.preventDefault()),s.addEventListener("click",t=>{t.stopPropagation(),i(e)}),s}_startEdit(t,e,i={}){const n=this.w,s=this._annoList(t)[e],r=n.dom.baseEl,a=n.dom.elWrap;if(!(s&&s.id&&r&&a))return;this._closeEditor(!1);const o=r.ownerDocument,l=o.createElement("div");l.className="apexcharts-ink-card",l.setAttribute("role","dialog"),l.setAttribute("aria-label","Edit note"),l.style.visibility="hidden";const c=o.createElement("div");c.className="apexcharts-ink-card-row";const h=o.createElement("input");h.type="text",h.className="apexcharts-ink-editor",h.placeholder="Note text",h.value=s.label&&s.label.text||"",c.appendChild(h),c.appendChild(this._cardBtn(o,'<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/></svg>',"Delete note",()=>this._deleteAnno(),"apexcharts-ink-btn--delete",!0)),l.appendChild(c);const d=o.createElement("div");d.className="apexcharts-ink-card-row","point"!==t&&d.appendChild(this._cardLabel(o,"Label")),this._noteColors().forEach(t=>{d.appendChild(this._mkSwatch(o,t,t=>this._applyColor(t)))});const u=o.createElement("span");if(u.className="apexcharts-ink-sep",d.appendChild(u),d.appendChild(this._cardBtn(o,"B","Bold",()=>this._toggleBold(),"apexcharts-ink-btn--bold")),d.appendChild(this._cardBtn(o,"A-","Smaller text",()=>this._stepFont(-1))),d.appendChild(this._cardBtn(o,"A+","Larger text",()=>this._stepFont(1))),l.appendChild(d),"point"!==t){const t=o.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(o,"Line")),this._noteColors().forEach(e=>{t.appendChild(this._mkSwatch(o,e,t=>this._applyLineColor(t),"apexcharts-ink-swatch--line"))}),l.appendChild(t)}if("point"===t){const t=o.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(o,"Marker")),t.appendChild(this._cardBtn(o,"-","Smaller marker",()=>this._stepMarker(-1)));const e=o.createElement("span");e.className="apexcharts-ink-marker-size",t.appendChild(e),t.appendChild(this._cardBtn(o,"+","Larger marker",()=>this._stepMarker(1))),t.appendChild(this._cardBtn(o,Wn.circle,"Marker shape",()=>this._cycleShape(),"apexcharts-ink-btn--shape")),l.appendChild(t)}a.appendChild(l),this._editor={card:l,input:h,type:t,index:e},this._positionCard(),this._syncCard(),l.style.visibility="",h.focus(),i.select&&h.select(),l.addEventListener("keydown",t=>{"Escape"===t.key?(t.preventDefault(),t.stopPropagation(),this._closeEditor(!1)):"Enter"===t.key&&t.target===h&&(t.preventDefault(),this._closeEditor(!0))}),o.addEventListener("mousedown",this._onDocDownEditor,!0),o.addEventListener("touchstart",this._onDocDownEditor,!0)}_onDocDownEditor(t){const e=this._editor;e&&!e.card.contains(At(t))&&this._closeEditor(!0)}_positionCard(){const t=this._editor;if(!t)return;const e=this.w,i=e.dom.baseEl,n=e.dom.elWrap,s=this._annoList(t.type)[t.index];if(!i||!n||!s)return;const r=i.querySelector(".apexcharts-"+t.type+"-annotation-label."+s.id)||i.querySelector("."+s.id);if(!r)return;const a=n.getBoundingClientRect(),o=r.getBoundingClientRect(),l=t.card.offsetWidth,c=t.card.offsetHeight;let h=Math.round(o.left-a.left),d=Math.round(o.bottom-a.top)+8;d+c>n.clientHeight-4&&(d=Math.round(o.top-a.top)-c-8),h+l>n.clientWidth-4&&(h=n.clientWidth-l-4),t.card.style.left=Math.max(4,h)+"px",t.card.style.top=Math.max(4,d)+"px"}_syncCard(){const t=this._editor;if(!t)return;const e=this._annoList(t.type)[t.index];if(!e)return;const i=e.label&&e.label.style||{},n=String(i.background||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===n)});const s=String(e.borderColor||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch--line").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===s)});const r=t.card.querySelector(".apexcharts-ink-btn--bold");r&&r.classList.toggle("apexcharts-ink-btn--active",jn._isBold(i));const a=e.marker||{},o=t.card.querySelector(".apexcharts-ink-marker-size");o&&(o.textContent=String("number"==typeof a.size?a.size:4));const l=t.card.querySelector(".apexcharts-ink-btn--shape");l&&(l.textContent=Wn[a.shape]||Wn.circle)}_commitTextOf(t){const e=this._annoList(t.type)[t.index];if(!e)return;const i=t.input.value;e.label||(e.label={}),e.label.text!==i&&(e.label.text=i,this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:edit"),this._fireEdited(t.type,e,t.index))}_closeEditor(t){const e=this._editor;if(!e)return;this._editor=null;const i=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;i&&(i.removeEventListener("mousedown",this._onDocDownEditor,!0),i.removeEventListener("touchstart",this._onDocDownEditor,!0)),e.card.parentNode&&e.card.parentNode.removeChild(e.card),t&&this._commitTextOf(e)}_applyStyle(t,e){const i=this._editor;if(!i)return;const n=this._annoList(i.type)[i.index];n&&(this._commitTextOf(i),n.label||(n.label={}),n.label.style||(n.label.style={}),e(n),this._redrawAnno(i.type,n,i.index),this._checkpoint(t),this._fireStyled(i.type,n,i.index),this._syncCard(),this._positionCard())}_applyColor(t){const e=this._editor;if(!e)return;const i=jn._isLight(t);this._applyStyle("ink:style",n=>{n.label.style.background=t,n.label.style.color=i?"#334155":"#ffffff",n.label.borderColor=i?"#cbd5e1":t,"point"===e.type&&(n.marker||(n.marker={}),n.marker.strokeColor=i?"#334155":t,n.marker.fillColor=i?"#ffffff":t)})}_applyLineColor(t){const e=this._editor;e&&"point"!==e.type&&this._applyStyle("ink:style",e=>{e.borderColor=t,null==e.x2&&null==e.y2||(e.fillColor=t)})}_stepFont(t){this._applyStyle("ink:style",e=>{const i=parseFloat(e.label.style.fontSize)||11;let n=0;for(let t=1;t<In.length;t++)Math.abs(In[t]-i)<Math.abs(In[n]-i)&&(n=t);n=Math.min(In.length-1,Math.max(0,n+t)),e.label.style.fontSize=In[n]+"px"})}_toggleBold(){this._applyStyle("ink:style",t=>{t.label.style.fontWeight=jn._isBold(t.label.style)?400:700})}_stepMarker(t){this._applyStyle("ink:style",e=>{e.marker||(e.marker={});const i="number"==typeof e.marker.size?e.marker.size:4;e.marker.size=Math.min(14,Math.max(2,i+t))})}_cycleShape(){this._applyStyle("ink:style",t=>{t.marker||(t.marker={});const e=zn.indexOf(t.marker.shape);t.marker.shape=zn[(e+1)%zn.length]})}_deleteAnno(){const t=this._editor;if(!t)return;const e=this._annoList(t.type),i=e[t.index];if(this._closeEditor(!1),!i)return;const n=this.w.dom.baseEl;n&&i.id&&n.querySelectorAll("."+i.id).forEach(t=>t.remove()),e.splice(t.index,1);for(let i=t.index;i<e.length;i++)this._redrawAnno(t.type,e[i],i);this._checkpoint("ink:delete"),this._fireDeleted(t.type,i,t.index)}_fireEdited(t,e,i){const n={type:t,id:e.id,index:i,text:e.label?e.label.text:""};this._fireAnnotationEvent("annotationEdited",n)}_fireStyled(t,e,i){const n={type:t,id:e.id,index:i,label:e.label,marker:e.marker};this._fireAnnotationEvent("annotationStyled",n)}_fireDeleted(t,e,i){const n={type:t,id:e.id,index:i};this._fireAnnotationEvent("annotationDeleted",n)}_teardownDocListeners(){const t=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchend",this._onUp))}teardown(){var t,e,i,n;this._teardownDocListeners(),this._closeEditor(!1),this.stopCreate(),this._drag=null,this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onRerender),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onRerender),this._wired=!1)}}m.default.registerFeatures({ink:jn});const Hn="https://apexcharts.com/pricing",Yn="__apexcharts_license_enforcer_v1__";globalThis[Yn]||(globalThis[Yn]={perspectivesTokenDecoded:!1,enforced:new Set});const qn=globalThis[Yn],Xn=qn.enforced;function Gn(){qn.perspectivesTokenDecoded=!0,Jn()}const Un=new Set(["premium","enterprise"]);function Kn(t,e){const i=gt.add(e,{manage:!1});if(t._wmPainted=!0,!i||"undefined"==typeof MutationObserver)return;if(t._wmNodeObserver&&t._wmObservedNode===i)return;t._wmNodeObserver&&t._wmNodeObserver.disconnect();const n=new MutationObserver(()=>{const t=gt.node(e);t&&(n.disconnect(),gt.applyStyles(t),n.takeRecords(),n.observe(t,{attributes:!0,attributeFilter:["style"]}))});n.observe(i,{attributes:!0,attributeFilter:["style"]}),t._wmNodeObserver=n,t._wmObservedNode=i}function Vn(t,e){if(!t._wmPainted)return;t._wmPainted=!1,t._wmWrapObserver&&(t._wmWrapObserver.disconnect(),t._wmWrapObserver=null),t._wmNodeObserver&&(t._wmNodeObserver.disconnect(),t._wmNodeObserver=null),t._wmObservedNode=null,t._wmObservedWrap=null;const i=e||t.w&&t.w.dom&&t.w.dom.elWrap;i&>.remove(i,{manage:!1})}function Zn(t,e){try{if(!k.isBrowser())return;if(t&&t.globals&&t.globals.isDestroyed)return void Xn.delete(e);const i=t&&t.dom&&t.dom.elWrap;if(!i)return;const n=function(t,e){var i;const n=t&&t.config&&t.config.chart||{},s=[];"unit"===n.type&&s.push("unit"),"raincloud"===n.requestedType&&s.push("raincloud"),e.trellis&&"function"==typeof e.trellis.isActive&&e.trellis.isActive()&&s.push("trellis"),e.storyboard&&e.storyboard._used&&s.push("storyboard");const r=n.link;return e.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),e.ink&&n.ink&&!0===n.ink.enabled&&s.push("ink"),e.measure&&n.measure&&!0===n.measure.enabled&&s.push("measure"),e.contextMenu&&n.contextMenu&&!0===n.contextMenu.enabled&&s.push("context-menu"),e.perspectives&&(e.perspectives._used||qn.perspectivesTokenDecoded)&&s.push("perspectives"),e.history&&n.history&&!0===n.history.enabled&&s.push("history"),(null==(i=e._highlightFilter)?void 0:i.isActive())&&s.push("highlight-filter"),s}(t,e);if(0===n.length)return Xn.delete(e),void Vn(e,i);Xn.add(e);const s=function(t){const e=t&&t.config&&t.config.chart&&t.config.chart.license;if(e)return e;const i=ht.getKey();if(i)return i;const n=k.getApex();return n&&n.license?n.license:null}(t);if(function(t){if(!t)return!1;const e=ht.validateKey(t);if(!e.valid)return!1;const i=e.data&&e.data.plan;return"string"==typeof i&&Un.has(i.toLowerCase())}(s))return void Vn(e,i);!function(t,e){if(Kn(t,e),"undefined"==typeof MutationObserver)return;if(t._wmWrapObserver&&t._wmObservedWrap===e)return;t._wmWrapObserver&&t._wmWrapObserver.disconnect();const i=new MutationObserver(()=>{gt.node(e)||Kn(t,e)});i.observe(e,{childList:!0}),t._wmWrapObserver=i,t._wmObservedWrap=e}(e,i),function(t,e,i){if(t._premiumLicenseNotified)return;t._premiumLicenseNotified=!0;const n=i.length>1;if(!e)return void console.warn(`[ApexCharts] Premium feature${n?"s":""} in use (${i.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${Hn}`);const s=ht.validateKey(e);if(s.valid){const t=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${n?"s":""} in use (${i.join(", ")}) require a Premium or Enterprise license; the ${t} plan does not include ${n?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${Hn}`)}e!==ht.getKey()&&console.error(`[Apex] ${s.message}`)}(e,s,n)}catch(t){}}function Jn(){if(!k.isBrowser())return;const t=new Set,e=k.getApex(),i=e&&e._chartInstances;Array.isArray(i)&&i.forEach(e=>{const i=e&&e.chart;i&&i.w&&!i.w.globals.isDestroyed&&(t.add(i),Zn(i.w,i))}),Array.from(Xn).forEach(e=>{const i=e&&e.w,n=i&&i.dom&&i.dom.elWrap;i&&!i.globals.isDestroyed&&n&&!1!==n.isConnected?t.has(e)||Zn(i,e):Xn.delete(e)})}ht.onChange(Jn);const Qn="apex";function ts(t){return function(t){if("undefined"!=typeof Buffer)return Buffer.from(t,"utf-8").toString("base64");const e=(new TextEncoder).encode(t);let i="";for(let t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return btoa(i)}(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function es(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4;)e+="=";return function(t){if("undefined"!=typeof Buffer)return Buffer.from(t,"base64").toString("utf-8");const e=atob(t),i=new Uint8Array(e.length);for(let t=0;t<e.length;t++)i[t]=e.charCodeAt(t);return(new TextDecoder).decode(i)}(e)}class is{constructor(t,e){this.w=t,this.ctx=e,this._saved=[],this._counter=0,this._used=!1}capture(){const t={v:1,view:gn(this.w,this.ctx)},e=this._serializableDelta();return e&&Object.keys(e).length&&(t.options=e),t}_serializableDelta(){const t=this.w.config,e=t.chart&&t.chart.perspectives&&t.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],i={};return e.forEach(e=>{if(void 0!==t[e]){const n=function(t){try{return JSON.parse(JSON.stringify(t))}catch(t){return}}(t[e]);void 0!==n&&(i[e]=n)}}),i}encode(t){const e=t||this.capture();return ts(JSON.stringify(e))}decode(t){return is.decode(t)}toURL(){if(!k.isBrowser())return"";const t=this.encode(this.capture()),e=new URL(window.location.href);return e.hash=`${Qn}=${t}`,e.toString()}apply(t,e={}){const i="string"==typeof t?is.decode(t):t;if(!i||!i.view)return;this._used=!0,Zn(this.w,this.ctx);const n=void 0===e.animate||e.animate,s=B.extend(i.options?B.clone(i.options):{},e.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(t=>{!function(t,e,{animate:i=!0,mergeOptions:n}={}){var s,r;if(!t||!e)return;"number"==typeof e.v&&e.v>1&&console.warn(`[apexcharts] ViewState v${e.v} is newer than this build understands (v1); applying best-effort.`),t.clearAnnotations();const a=n?B.clone(n):{},o=e.window&&e.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=e.window&&e.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(t=>{var e,i;return t?{min:null!=(e=t.min)?e:void 0,max:null!=(i=t.max)?i:void 0}:{}})),e.theme){const t={};null!=e.theme.mode&&(t.mode=e.theme.mode),null!=e.theme.palette&&(t.palette=e.theme.palette),Object.keys(t).length&&(a.theme=Object.assign({},a.theme,t))}e.annotations&&e.annotations.static&&(a.annotations=B.clone(e.annotations.static)),t.updateOptions(a,!1,i,!1,!1),mn(t.w,e.theme),yn(t,e)}(t,i.view,{animate:n,mergeOptions:r})})}save(t){const e="perspective-"+ ++this._counter;return this._saved.push({id:e,name:t||e,token:this.capture()}),this._used=!0,Zn(this.w,this.ctx),e}list(){return this._saved.map(t=>({id:t.id,name:t.name,token:t.token}))}delete(t){const e=this._saved.findIndex(e=>e.id===t);e>-1&&this._saved.splice(e,1)}teardown(){this._saved=[],this._counter=0}static decode(t){if("string"!=typeof t||!t)return null;try{const e=JSON.parse(es(t));return e&&"object"==typeof e?1!==e.v?(console.warn(`apexcharts: unsupported perspective version ${e.v} (expected 1).`),null):e:null}catch(t){return console.warn("apexcharts: failed to decode perspective token.",t),null}}static fromURL(t){try{const e=t||(k.isBrowser()?window.location.href:"");if(!e)return null;const i=new URL(e).hash.replace(/^#/,"");if(!i)return null;const n=i.split("&").map(t=>t.split("=")).find(t=>t[0]===Qn);return n&&null!=n[1]?is.decode(decodeURIComponent(n[1])):null}catch(t){return null}}}m.default.registerFeatures({perspectives:is,perspectivesStatics:{decode:t=>(Gn(),is.decode(t)),fromURL:t=>(Gn(),is.fromURL(t))}}),m.default.registerFeatures({storyboard:class{constructor(t,e){this.w=t,this.ctx=e,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(t={}){var e;if(this.unbind(),!k.isBrowser())return 0;if(!(this.ctx.el&&this.ctx.el.ownerDocument)||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(t.scroller&&(i="string"==typeof t.scroller?Mt(this.ctx.el,t.scroller):t.scroller),this._beats=this._resolveBeats(this.ctx.el,i,t.beats),!this._beats.length)return 0;this._animate=!1!==t.animate;const n=Math.min(Math.max(null!=(e=t.offset)?e:.5,0),1),s=+(100*n).toFixed(3),r=+(100-100*n).toFixed(3);return this._observer=new IntersectionObserver(t=>this._onIntersect(t),{root:i,rootMargin:`-${s}% 0px -${r}%`,threshold:0}),this._beats.forEach(t=>{var e;return null==(e=this._observer)?void 0:e.observe(t.el)}),this._used=!0,Zn(this.w,this.ctx),this._beats.length}_resolveBeats(t,e,i){const n=[];if(Array.isArray(i))return i.forEach((e,i)=>{var s,r;if(!e)return;const a=e.el&&"object"==typeof e.el?e.el:e.selector?Mt(t,e.selector):null;a?n.push({el:a,key:null!=(r=null!=(s=e.key)?s:a.getAttribute("data-apex-beat"))?r:String(i),view:e.view,options:e.options,announce:e.announce,onEnter:"function"==typeof e.onEnter?e.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${i} has no resolvable element; skipped.`)}),n;return(e?Array.from(e.querySelectorAll("[data-apex-beat]")):function(t,e){const i=wt(t),n=Array.from(i.querySelectorAll(e));if(n.length)return n;const s=t.ownerDocument;return s&&s!==i?Array.from(s.querySelectorAll(e)):[]}(t,"[data-apex-beat]")).forEach((t,e)=>{n.push({el:t,key:t.getAttribute("data-apex-beat")||String(e),view:t.getAttribute("data-apex-view")||void 0,options:void 0,announce:t.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),n}_onIntersect(t){t.forEach(t=>{const e=this._beats.findIndex(e=>e.el===t.target);e<0||(t.isIntersecting?this._activate(e):e===this._activeIndex&&t.rootBounds&&t.boundingClientRect.top>=t.rootBounds.bottom&&e>0&&this._activate(e-1))})}_activate(t,e={}){var i,n;if(t===this._activeIndex)return;const s=this._beats[t];if(!s)return;const r=t>this._activeIndex?"down":"up";this._activeIndex=t;const a=(void 0!==e.animate?e.animate:this._animate)&&!A();if(null!=s.view||s.options)if(this.ctx.perspectives){const t=null!=(i=s.view)?i:{},e="string"==typeof t||t.view?t:{view:this._normalizeView(t)};this.ctx.perspectives.apply(e,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:t,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(n=this.ctx.events)||n.fireEvent("beatChange",[this.ctx,o])}_normalizeView(t){const e=t.annotations&&t.annotations.static||{};return c(l({},t),{annotations:{static:l({points:[],xaxis:[],yaxis:[],texts:[],images:[]},e),dynamic:t.annotations&&t.annotations.dynamic||[]}})}goTo(t,e={}){const i="number"==typeof t?t:this._beats.findIndex(e=>e.key===t);i>=0&&i<this._beats.length&&this._activate(i,e)}current(){if(this._activeIndex<0)return null;const t=this._beats[this._activeIndex];return{index:this._activeIndex,key:t?t.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,Zn(this.w,this.ctx)}teardown(){this.unbind()}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const i=e.dom.baseEl;if(!i)return;const n=i.querySelector(".apexcharts-sr-status");n&&(n.textContent="",setTimeout(()=>{n.textContent=t},0))}}});const ns={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},ss=Symbol("never");const rs={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},as=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function os(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let i=1/0,n=1/0,s=-1/0,r=-1/0,a=0,o=0,l=0,c=0,h="",d=0;const u=()=>Number(e[d++]),p=(t,e)=>{isFinite(t)&&isFinite(e)&&(i=Math.min(i,t),n=Math.min(n,e),s=Math.max(s,t),r=Math.max(r,e))},f=t=>{const e=h===h.toLowerCase();let i=a,n=o;for(let s=0;s<t;s++)i=u()+(e?a:0),n=u()+(e?o:0),p(i,n);a=i,o=n};for(;d<e.length;){if(/^[a-z]$/i.test(e[d])){h=e[d++],"Z"!==h&&"z"!==h||(a=l,o=c);continue}const t=h===h.toLowerCase();switch(h.toUpperCase()){case"M":f(1),l=a,c=o,h=t?"l":"L";break;case"L":case"T":f(1);break;case"H":a=u()+(t?a:0),p(a,o);break;case"V":o=u()+(t?o:0),p(a,o);break;case"S":case"Q":f(2);break;case"C":f(3);break;case"A":d+=5,f(1);break;default:d++}}return isFinite(i)?{x:i,y:n,width:s-i,height:r-n}:null}(t.d),t.boxOf=t.d),t.box}const ls={attr:()=>ls,plot:()=>ls,during:()=>ls,after:t=>("function"==typeof t&&t(),ls),animate:()=>ls,delay:()=>ls,loop:()=>ls,finish:()=>ls,stop:()=>ls},cs={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},hs={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>hs,add:()=>hs,addTo:()=>hs,remove:()=>hs,clear:()=>hs,css:()=>hs,hide:()=>hs,show:()=>hs,removeClass:()=>hs,animate:()=>ls};class ds{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return cs}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return ls}}const us={__isCanvasMark:!0,node:cs,attr:()=>us,add:()=>us,addTo:()=>us,remove:()=>us,css:()=>us,animate:()=>ls};class ps{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,i){e._applyAttr(t,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const i=this._cmd;if(!i)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(i.clip=t))}if("index"===t)return void(i.si=i.z=Number(e));const n=ns[t];void 0!==n&&(i[n]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?os(t):null;return e?l({},e):{x:0,y:0,width:0,height:0}}animate(){return ls}}class fs{constructor(t){this.w=t,this._g=new b(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=ss,this._ls=ss,this._lsw=ss,this._ld=ss,this._lfo=ss,this._lso=ss,this._lid=-1,this._lofFill=ss,this._lofBase=-1,this._lofId=-1,this._rlf=ss,this._rls=ss,this._rlsw=ss,this._rlfo=ss,this._rlso=ss,this._rlid=-1}_resetStyleCache(){this._lf=ss,this._ls=ss,this._lsw=ss,this._ld=ss,this._lfo=ss,this._lso=ss,this._lid=-1,this._lofFill=ss,this._lofBase=-1,this._lofId=-1,this._rlf=ss,this._rls=ss,this._rlsw=ss,this._rlfo=ss,this._rlso=ss,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config,e=t.series||[],i=t.markers&&t.markers.size;let n=16,s=16;for(let r=0;r<e.length;r++){const a=e[r],o=a&&Array.isArray(a.data)?a.data.length:0,l=a&&a.type||t.chart&&t.chart.type;"heatmap"===l?s+=o:("scatter"===l||"bubble"===l||(Array.isArray(i)?i[r]:i)>0)&&(n+=o)}n=Math.ceil(1.15*n)+16,n>this._mcap&&this._allocMarkers(n),this._crn=0,this._cellRadius=0,s=Math.ceil(1.15*s)+16,s>this._crcap&&this._allocRects(s)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const i=new Float64Array(t);i.set(this._cry),this._cry=i;const n=new Float64Array(t);n.set(this._crw),this._crw=n;const s=new Float64Array(t);s.set(this._crh),this._crh=s;const r=new Int32Array(t);r.set(this._crstyle),this._crstyle=r;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const o=new Int32Array(t);o.set(this._crdi),this._crdi=o,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const i=new Float64Array(t);i.set(this._my),this._my=i;const n=new Float64Array(t);n.set(this._msize),this._msize=n;const s=new Int16Array(t);s.set(this._mshape),this._mshape=s;const r=new Int32Array(t);r.set(this._mstyle),this._mstyle=r;const a=new Int32Array(t);a.set(this._msi),this._msi=a;const o=new Int32Array(t);o.set(this._mdi),this._mdi=o,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,i,n,s,r){const a=`${t}|${e}|${i}|${n}|${s}|${r}`,o=this._styleMap.get(a);if(void 0!==o)return o;const l=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:i,strokeDash:n,fillOpacity:s,strokeOpacity:r}),this._styleMap.set(a,l),l}_setMarkerFill(t,e){const i=this._mstyle[t];if(e===this._lofFill&&i===this._lofBase)return void(this._mstyle[t]=this._lofId);const n=this._styles[i];if(!n||n.fill===e)return this._lofFill=e,this._lofBase=i,void(this._lofId=i);const s=this._internStyle(e,n.stroke,n.strokeWidth,n.strokeDash,n.fillOpacity,n.strokeOpacity);this._mstyle[t]=s,this._lofFill=e,this._lofBase=i,this._lofId=s}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}drawRectCell(t,e,i,n,s={}){const r=this._rectStyleId(s);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=e||0,this._crw[a]=i>0?i:0,this._crh[a]=n>0?n:0,this._crstyle[a]=r,this._crsi[a]=null==s.seriesIndex?-1:s.seriesIndex,this._crdi[a]=null==s.dataPointIndex?-1:s.dataPointIndex,s.radius&&(this._cellRadius=s.radius),us}_rectStyleId(t){const e=t.fill,i=t.stroke,n=t.strokeWidth,s=t.fillOpacity,r=t.strokeOpacity;if(e===this._rlf&&i===this._rls&&n===this._rlsw&&s===this._rlfo&&r===this._rlso)return this._rlid;const a=this._internStyle(e,i,n,0,s,r);return this._rlf=e,this._rls=i,this._rlsw=n,this._rlfo=s,this._rlso=r,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const i={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(i),i}group(t){return hs}drawMarker(t,e,i={}){var n;const s=this._markerStyleId(i);this._mn>=this._mcap&&this._growMarkers();const r=this._mn++;return this._mx[r]=t||0,this._my[r]="number"==typeof e?e:NaN,this._msize[r]=i.pSize||0,this._mshape[r]=null!=(n=rs[i.shape||"circle"])?n:0,this._mstyle[r]=s,this._msi[r]=null==i.seriesIndex?-1:i.seriesIndex,this._mdi[r]=-1,new ds(this,r)}_markerStyleId(t){const e=t.shape||"circle",i="line"===e||"plus"===e||"cross"===e,n=i?"none":t.pointFillColor,s=i?t.pointFillColor:t.pointStrokeColor,r=t.pointStrokeWidth,a=t.pointStrokeDashArray,o=t.pointFillOpacity,l=i?t.pointFillOpacity:t.pointStrokeOpacity;if(n===this._lf&&s===this._ls&&r===this._lsw&&a===this._ld&&o===this._lfo&&l===this._lso)return this._lid;const c=this._internStyle(n,s,r,a,o,l);return this._lf=n,this._ls=s,this._lsw=r,this._ld=a,this._lfo=o,this._lso=l,this._lid=c,c}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap||this.w.config.stroke.lineCap,e.strokeDash=this._g.seriesDash(t.realIndex),e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const i=this.w.globals;e.clip="bar"===t.chartType&&!i.isBarHorizontal||i.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new ps(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap||this.w.config.stroke.lineCap,e.strokeDash=t.strokeDashArray,new ps(e)}drawLine(t,e,i,n,s="#a8a8a8",r=0,a=1,o="butt"){const l=this._cmd("line",0);return l.lineCap=o,l.lx1=t,l.ly1=e,l.lx2=i,l.ly2=n,l.stroke=s,l.strokeDash=r,l.strokeWidth=a,new ps(l)}drawRect(t=0,e=0,i=0,n=0,s=0,r="#fefefe",a=1,o=null,l=null,c=0){const h=this._cmd("rect",0);return h.x1=t,h.y1=e,h.rw=i>0?i:0,h.rh=n>0?n:0,h.radius=s,h.fill=r,h.fillOpacity=a,null!=l&&(h.stroke=l,h.strokeWidth=null==o?1:o,h.strokeDash=c),new ps(h)}drawCircle(t,e=null){const i=this._cmd("circle",0);i.r=t<0?0:t;const n=new ps(i);return e&&(i.cx=e.cx,i.cy=e.cy,n.attr(e)),n}drawText(t){const e=this._cmd("text",0);e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start";const i=this.w.config.chart;return e.fontSize=t.fontSize,e.fontFamily=t.fontFamily||i.fontFamily,e.fontWeight=t.fontWeight,e.fill=t.foreColor||i.foreColor,new ps(e)}markerPath(t,e,i,n){return this._g.getMarkerPath(t,e,as[i]||"circle",n)}}const gs=m.__apex_SVGElement,ms=m.__apex_math_SVGNS,ys=m.__apex_axes_Grid;const xs=2*Math.PI;class _s{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),i=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),n=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,s=Math.ceil(n+8),r=ys.maskRects(this.w),a={left:s,top:s,right:s,bottom:s},o=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(r).forEach(t=>{a.left=Math.max(a.left,o(-t.x)),a.top=Math.max(a.top,o(-t.y)),a.right=Math.max(a.right,o(t.x+t.width-e)),a.bottom=Math.max(a.bottom,o(t.y+t.height-i))}),{gw:e,gh:i,pad:a,clips:r}}createHost(){const t=M.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:i,pad:n,clips:s}=this._plotDims();this._pad=n,this._clips=s;const r=e+n.left+n.right,a=i+n.top+n.bottom,o=M.createElementNS(ms,"foreignObject");o.setAttribute("x",String(-n.left)),o.setAttribute("y",String(-n.top)),o.setAttribute("width",String(r)),o.setAttribute("height",String(a)),o.setAttribute("class","apexcharts-canvas-series"),o.style.overflow="visible";const l=M.createElement("canvas");return l.setAttribute("class","apexcharts-series-canvas"),l.width=Math.max(1,Math.round(r*this._dpr)),l.height=Math.max(1,Math.round(a*this._dpr)),l.style.width=r+"px",l.style.height=a+"px",l.style.pointerEvents="none",o.appendChild(l),this._canvas=l,this._c2d=l.getContext("2d"),this._host=new gs(o),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const i=this.clipRect(e);if(i!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=i,i)){const e=this._dpr,{left:n,top:s}=this._pad,r=Math.floor((n+i.x)*e),a=Math.floor((s+i.y)*e),o=Math.ceil((n+i.x+i.width)*e),l=Math.ceil((s+i.y+i.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(r,a,o-r,l-a),t.clip(),t.setTransform(e,0,0,e,n*e,s*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=M.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const i=parseFloat(this._canvas.style.width)||0,n=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(i*e)),this._canvas.height=Math.max(1,Math.round(n*e))}paint(t,e,i=null){const n=this._c2d;if(!n)return;this._dim=i||null,this._syncDpr(),this.clear();const s=this._dpr,{left:r,top:a}=this._pad;if(n.setTransform(s,0,0,s,r*s,a*s),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const i=e[t];this._alpha=this._dim?this._seriesAlpha(i.si):1,this._clipTo(n,i.clip),this._paintOne(n,i)}this._clipTo(n,null)}this._paintRects(n,e),this._clipTo(n,"marker"),this._paintMarkers(n,e),this._clipTo(n,null),this._alpha=1}_paintRects(t,e){const i=e.rectCount?e.rectCount():0;if(!i)return;const n=e._crx,s=e._cry,r=e._crw,a=e._crh,o=e._crstyle,l=e._cellRadius||0,c=t,h=l>0&&"function"==typeof c.roundRect,d=!!this._dim,u=Math.max(0,this.w.layout.gridWidth||0),p=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,u,p),t.clip();let f=0;for(;f<i;){const u=o[f],p=e.rectStyle(f);if(!p){f++;continue}const g=p.fill,m=g&&"none"!==g&&!("string"==typeof g&&0===g.indexOf("url(")),y=p.stroke,x=null==p.strokeWidth?0:Number(p.strokeWidth),_=y&&"none"!==y&&x>0&&!("string"==typeof y&&0===y.indexOf("url("));m&&(t.fillStyle=g),_&&(t.strokeStyle=y,t.lineWidth=x,t.setLineDash([]));const b=null==p.fillOpacity?1:Number(p.fillOpacity),v=null==p.strokeOpacity?1:Number(p.strokeOpacity);let w=f;for(;w<i&&o[w]===u;){const i=r[w],o=a[w];if(i>0&&o>0){const r=d?this._seriesAlpha(e.rectSeries(w)):1;h?(t.beginPath(),c.roundRect(n[w],s[w],i,o,l),m&&(t.globalAlpha=b*r,t.fill()),_&&(t.globalAlpha=v*r,t.stroke())):(m&&(t.globalAlpha=b*r,t.fillRect(n[w],s[w],i,o)),_&&(t.globalAlpha=v*r,t.strokeRect(n[w],s[w],i,o)))}w++}f=w}t.globalAlpha=1,t.restore()}_unitPath(t,e,i){const n=e+"|"+i;let s=this._unitPaths.get(n);if(void 0===s){try{s=new Path2D(t.markerPath(0,0,e,i))}catch(t){s=null}this._unitPaths.set(n,s)}return s}_paintMarkers(t,e){this._markerBatches=0;const i=e.markerCount();if(!i)return;const n=e._mx,s=e._my,r=e._msize,a=e._mshape,o=e._mstyle,l=!!this._dim;l||(this._alpha=1);let c=0;for(;c<i;){const h=o[c],d=a[c],u=e.markerStyle(c);if(!u){c++;continue}const p=this._applyFill(t,u),f=this._applyStroke(t,u);this._markerBatches++;const g=null==u.fillOpacity?1:Number(u.fillOpacity),m=null==u.strokeOpacity?1:Number(u.strokeOpacity);if(0===d){let d=c;for(;d<i&&0===a[d]&&o[d]===h;){const i=r[d]||0,a=s[d];if(i>0&&a==a)if(t.beginPath(),t.arc(n[d],a,i,0,xs),l){const i=this._seriesAlpha(e.markerSeries(d));p&&(t.globalAlpha=g*i,t.fill()),f&&(t.globalAlpha=m*i,t.stroke())}else p&&t.fill(),f&&t.stroke();d++}t.globalAlpha=1,c=d}else{const u=this._dpr,y=this._pad.left,x=this._pad.top;let _=c;for(;_<i&&a[_]===d&&o[_]===h;){const i=s[_],a=r[_];if(i==i&&a>0){const s=this._unitPath(e,d,a);if(s){t.setTransform(u,0,0,u,(y+n[_])*u,(x+i)*u);const r=l?this._seriesAlpha(e.markerSeries(_)):1;p&&(t.globalAlpha=g*r,t.fill(s)),f&&(t.globalAlpha=m*r,t.stroke(s))}}_++}t.setTransform(u,0,0,u,y*u,x*u),t.globalAlpha=1,c=_}}}_paintNumericPath(t,e){const i=e.nxs,n=e.nys,s=i.length;if(s){t.beginPath(),t.moveTo(i[0],n[0]);for(let e=1;e<s;e++)t.lineTo(i[e],n[e]);null!=e.ncloseY&&(t.lineTo(i[s-1],e.ncloseY),t.lineTo(i[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const i=new Path2D;e.radius&&"function"==typeof i.roundRect?i.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):i.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,i);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,xs),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const i=e.fontSize||"11px",n=e.fontWeight;t.font=`${n&&"regular"!==n?n+" ":""}${"number"==typeof i?i+"px":i} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,i){this._applyFill(t,e)&&t.fill(i,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(i),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const i=e.fill;return!(!i||"none"===i)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=i,!0))}_applyStroke(t,e){const i=e.stroke,n=null==e.strokeWidth?1:Number(e.strokeWidth);return!!(i&&"none"!==i&&n>0)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=i,t.lineWidth=n,t.lineCap=e.lineCap||"butt",t.setLineDash(function(t){if(null==t||""===t)return[];let e;if(Array.isArray(t))e=t;else if("number"==typeof t)e=[t];else{const i=String(t).trim();if(""===i||"none"===i)return[];e=i.split(/[\s,]+/)}const i=[];let n=!1;for(const t of e){const e="number"==typeof t?t:Number(String(t).replace(/px$/i,""));if(!isFinite(e)||e<0)return[];e>0&&(n=!0),i.push(e)}return n?i:[]}(e.strokeDash)),!0))}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class bs{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new fs(t),this._compositor=new _s(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,i,n,s){return this._g.drawRectCell(t,e,i,n,s)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,i){return this._g.drawMarker(t,e,i)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const i=this._g,n=i.rectCount?i.rectCount():0,s=i._crx,r=i._cry,a=i._crw,o=i._crh;for(let l=n-1;l>=0;l--){const n=a[l],c=o[l];if(!(n<=0||c<=0)&&(t>=s[l]&&t<s[l]+n&&e>=r[l]&&e<r[l]+c))return{seriesIndex:i._crsi[l],dataPointIndex:i._crdi[l],x:s[l],y:r[l],width:n,height:c}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const i=this._g.displayList();for(let n=i.length-1;n>=0;n--){const s=i[n];if("path"!==s.tag||null==s.dj||!s.d)continue;const r=!!s.fill&&"none"!==s.fill,a=!!s.stroke&&"none"!==s.stroke&&s.strokeWidth>0;if(!r&&!a)continue;const o=this._compositor.clipRect(s.clip);if(o&&(t<o.x||t>o.x+o.width||e<o.y||e>o.y+o.height))continue;const c=os(s);if(!c)continue;const h=a?5*s.strokeWidth:0;if(t<c.x-h||t>c.x+c.width+h||e<c.y-h||e>c.y+c.height+h)continue;const d=this._hitContext();if(!d)return null;if(!s.path2d)try{s.path2d=new Path2D(s.d)}catch(t){continue}const u="evenodd"===s.fillRule?"evenodd":"nonzero";let p=r&&d.isPointInPath(s.path2d,t,e,u);if(!p&&a&&(d.lineWidth=s.strokeWidth,d.lineCap=s.lineCap||"butt",p=d.isPointInStroke(s.path2d,t,e)),p)return l({seriesIndex:s.si,dataPointIndex:s.dj},c)}return null}hitTestMarker(t,e){const i=this._g,n=i.markerCount();if(!n)return null;const s=this._compositor.clipRect("marker");if(s&&(t<s.x||t>s.x+s.width||e<s.y||e>s.y+s.height))return null;for(let s=n-1;s>=0;s--){const n=i._msize[s],r=i._mx[s],a=i._my[s],o=i._mdi[s];if(!(n>0)||a!=a||o<0)continue;const l=i.markerStyle(s),c=!!(null==l?void 0:l.stroke)&&"none"!==l.stroke&&l.strokeWidth>0,h=c?l.strokeWidth/2:0,d=1.2*n+h,u=t-r,p=e-a;if(u<-d||u>d||p<-d||p>d)continue;let f;if(f=0===i._mshape[s]?u*u+p*p<=(n+h)*(n+h):this._hitsMarkerShape(s,u,p,n,l,c),f)return{seriesIndex:i._msi[s],dataPointIndex:o,x:r,y:a,size:n}}return null}_hitsMarkerShape(t,e,i,n,s,r){const a=this._hitContext();if(!a)return!1;let o;try{o=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],n))}catch(t){return!1}return!(!(null==s?void 0:s.fill)||"none"===s.fill||!a.isPointInPath(o,e,i))||!!r&&(a.lineWidth=s.strokeWidth,a.lineCap="butt",a.isPointInStroke(o,e,i))}findMark(t,e){const i=this._g.displayList();for(let n=0;n<i.length;n++){const s=i[n];if("path"!==s.tag||!s.d)continue;if(s.si!==t||s.dj!==e)continue;const r=os(s);if(r)return c(l({seriesIndex:t,dataPointIndex:e},r),{d:s.d})}return null}findMarker(t,e){const i=this._g;for(let n=i.markerCount()-1;n>=0;n--){if(i._msi[n]!==t||i._mdi[n]!==e)continue;const s=i._msize[n],r=i._my[n];if(!(s>0)||r!=r)continue;const a=i._mx[n];return{seriesIndex:t,dataPointIndex:e,x:a,y:r,size:s,d:i.markerPath(a,r,i._mshape[n],s)}}return null}findCell(t,e){const i=this._g,n=i.rectCount?i.rectCount():0,s=i._crsi,r=i._crdi;for(let a=n-1;a>=0;a--)if(s[a]===t&&r[a]===e)return{seriesIndex:t,dataPointIndex:e,x:i._crx[a],y:i._cry[a],width:i._crw[a],height:i._crh[a],radius:i._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=M.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,i=this.w.config.chart,n=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(i.offsetX||0)-n.left,y:(e.translateY||0)+(i.offsetY||0)-n.top,w:(this.w.layout.gridWidth||0)+n.left+n.right,h:(this.w.layout.gridHeight||0)+n.top+n.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}m.default.registerRenderer("canvas",(t,e)=>new bs(t,e));m.default.registerFeatures({contextMenu:class{constructor(t,e){this.w=t,this.ctx=e,this.menu=null,this._items=[],this._focusIndex=-1,this._trigger=null,this._onContext=this._onContext.bind(this),this._onDocDown=this._onDocDown.bind(this),this._onKey=this._onKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.contextMenu||{}}_enabled(){return!0===this._cfg().enabled}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_afterRender(){if(this._detachTrigger(),this.close(),!this._enabled()||!k.isBrowser())return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.addEventListener("contextmenu",this._onContext),this._trigger=t)}_detachTrigger(){this._trigger&&(this._trigger.removeEventListener("contextmenu",this._onContext),this._trigger=null)}_onContext(t){this._enabled()&&(t.preventDefault(),this.open(t.clientX,t.clientY))}_clientToData(t,e){const i=this.w;if(!i.globals.axisCharts||!i.dom.baseEl||!i.dom.baseEl.querySelector(".apexcharts-svg"))return null;const n=en.plotRect(i);if(!n.width||!n.height)return null;const s=t=>t<0?0:t>1?1:t,r=s((t-n.left)/n.width),a=s((e-n.top)/n.height),o=i.globals.minX+r*(i.globals.maxX-i.globals.minX),l=i.globals.yAxisScale&&i.globals.yAxisScale[0],c=l&&isFinite(l.niceMin)?l.niceMin:i.globals.minY,h=l&&isFinite(l.niceMax)?l.niceMax:i.globals.maxY;return{x:o,y:h-a*(h-c)}}_resolveItems(t){const e=this._cfg(),i=Array.isArray(e.items)&&e.items.length?e.items:["annotate","xline","yline","measure"],n=e.labels||{},s=[];return i.forEach(e=>{if("string"==typeof e){if("annotate"===e)s.push({id:"annotate",label:n.annotate||"Add note here",run:()=>this._annotate(t)});else if("xline"===e)s.push({id:"xline",label:n.xline||"Annotate here",run:()=>this._line(t,"x")});else if("yline"===e)s.push({id:"yline",label:n.yline||"Mark this level",run:()=>this._line(t,"y")});else if("measure"===e){const e=this.ctx.measure;e&&this.w.config.chart.measure&&this.w.config.chart.measure.enabled&&s.push({id:"measure",label:n.measure||"Measure from here",run:()=>e.seedFromClient(t.clientX,t.clientY)})}}else e&&"object"==typeof e&&"function"==typeof e.onClick&&s.push({id:e.id||"custom",label:e.label||"Action",run:()=>e.onClick(this.ctx,t)})}),s}_annotate(t){if(null==t.x||null==t.y)return;const e=this._cfg(),i=this.ctx.ink;i&&"function"==typeof i.createAt?i.createAt(t.x,t.y,{text:e.noteText||"Note"}):this.ctx.addPointAnnotation({x:t.x,y:t.y,marker:{size:5},label:{text:e.noteText||"Note",style:{background:"#fff",color:"#334155"}}},!0)}_line(t,e){const i=this._cfg().line||{},n="x"===e?t.x:t.y;if(null==n)return;const s=this.ctx.ink;if(s&&"function"==typeof s.createLineAt)return void s.createLineAt(e,n,{text:i.text,strokeDashArray:i.strokeDashArray,color:i.color});const r={strokeDashArray:null!=i.strokeDashArray?i.strokeDashArray:4};i.text&&(r.label={text:i.text}),i.color&&(r.borderColor=i.color,r.label=B.extend(r.label||{},{borderColor:i.color})),"x"===e?this.ctx.addXaxisAnnotation(B.extend(r,{x:n}),!0):this.ctx.addYaxisAnnotation(B.extend(r,{y:n}),!0)}open(t,e){this.close();const i=this.w,n=i.dom.elWrap,s=this._doc();if(!n||!s)return;const r=this._clientToData(t,e),a=i.globals,o={x:r?r.x:null,y:r?r.y:null,seriesIndex:a.capturedSeriesIndex>=0?a.capturedSeriesIndex:null,dataPointIndex:a.capturedDataPointIndex>=0?a.capturedDataPointIndex:null,clientX:t,clientY:e},l=this._resolveItems(o);if(!l.length)return;this._items=l;const c=s.createElement("div");c.className="apexcharts-context-menu",c.setAttribute("role","menu"),c.style.position="absolute",c.style.visibility="hidden",l.forEach((t,e)=>{const i=s.createElement("button");i.type="button",i.className="apexcharts-context-menu-item",i.setAttribute("role","menuitem"),i.tabIndex=-1,i.textContent=t.label,i.addEventListener("click",t=>{t.stopPropagation(),this._activate(e)}),i.addEventListener("mouseenter",()=>this._focus(e)),c.appendChild(i)}),n.appendChild(c),this.menu=c;const h=n.getBoundingClientRect(),d=en.plotRect(i).zoom;let u=(t-h.left)/d,p=(e-h.top)/d;const f=c.offsetWidth,g=c.offsetHeight,m=Math.max(0,n.clientWidth-f),y=Math.max(0,n.clientHeight-g);u>m&&(u=m),p>y&&(p=y),c.style.left=Math.max(0,u)+"px",c.style.top=Math.max(0,p)+"px",c.style.visibility="visible",s.addEventListener("mousedown",this._onDocDown,!0),s.addEventListener("keydown",this._onKey,!0),this._focus(0)}_focus(t){if(!this.menu)return;const e=this.menu.querySelectorAll(".apexcharts-context-menu-item");this._focusIndex>=0&&e[this._focusIndex]&&e[this._focusIndex].classList.remove("apexcharts-context-menu-item--active"),this._focusIndex=t,e[t]&&(e[t].classList.add("apexcharts-context-menu-item--active"),"function"==typeof e[t].focus&&e[t].focus())}_activate(t){const e=this._items[t];this.close(),e&&e.run()}_onDocDown(t){this.menu&&this.menu.contains(At(t))||this.close()}_onKey(t){this.menu&&this._items.length&&("Escape"===t.key?(t.preventDefault(),this.close()):"ArrowDown"===t.key?(t.preventDefault(),this._focus((this._focusIndex+1)%this._items.length)):"ArrowUp"===t.key?(t.preventDefault(),this._focus((this._focusIndex-1+this._items.length)%this._items.length)):"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this._activate(this._focusIndex<0?0:this._focusIndex)))}close(){const t=this._doc();t&&(t.removeEventListener("mousedown",this._onDocDown,!0),t.removeEventListener("keydown",this._onKey,!0)),this.menu&&this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu),this.menu=null,this._items=[],this._focusIndex=-1}teardown(){this.close(),this._detachTrigger()}}});m.default.registerFeatures({history:class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){const t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=null!=e.coalesceMs?e.coalesceMs:250,this.keyboard=!1!==e.keyboard}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}_wireKeyboard(){if(this._keydownTarget)return;const t=this.ctx.el,e=t&&t.ownerDocument;k.isBrowser()&&e&&(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&0===this.stack.length&&this._commit("initial",!0)}_onUpdated(){this._syncConfig(),this.enabled&&(this.applying?this._refreshSettle():this._schedule("update"))}_onSelection(){this.enabled&&!this.applying&&this._schedule("selection")}_onPointerDown(t){const e=this.ctx.el,i=At(t);this._engaged=!!(e&&i&&e.contains(i))}_onKeyDown(t){if(!t.metaKey&&!t.ctrlKey)return;const e=(t.key||"").toLowerCase();if("z"!==e&&"y"!==e)return;const i=this.ctx.el;if(!i)return;const n=function(t){var e;const i=t.ownerDocument||t;let n=i&&"activeElement"in i?i.activeElement:null;for(;null==(e=null==n?void 0:n.shadowRoot)?void 0:e.activeElement;)n=n.shadowRoot.activeElement;return n}(i);if(function(t){if(!t)return!1;const e=t.tagName;return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e||!0===t.isContentEditable}(n))return;if(!i.contains(n)&&!this._engaged)return;const s="y"===e||t.shiftKey;t.preventDefault(),s?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&k.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;const i=this._capture(t),n=this.stack[this.pointer];if(!n||n.sig!==i.sig){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(i),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){const e=gn(this.w,this.ctx),{config:i,seriesSig:n}=this._cloneConfigCOW();return{id:"hist-"+ ++this._counter,view:e,config:i,seriesSig:n,label:t||"change",at:k.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,i)}}_cloneConfigCOW(){const t=this.w,e=this.stack[this.pointer];let i=null;try{i=JSON.stringify(t.config.series)}catch(t){i=null}const n=this.ctx.responsive?this.ctx.responsive.withoutBreakpoints(t.config):t.config;let s;if(e&&null!==i&&e.seriesSig===i){const t=n,{series:i}=t,r=h(t,["series"]);s=B.clone(r),s.series=e.config.series}else s=B.clone(n);return{config:s,seriesSig:i}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch(t){return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;let i;this.applying=!0;try{this.ctx.clearAnnotations(),i=this.ctx.updateOptions(B.clone(t.config),!1,e,!1,!1),mn(this.w,t.view&&t.view.theme)}catch(t){throw this.applying=!1,t}Promise.resolve(i).then(()=>{this.w.globals.isDestroyed?this.applying=!1:(yn(this.ctx,t.view),this._refreshSettle(),this._emitChange())}).catch(()=>{this.applying=!1})}_refreshSettle(){k.isBrowser()?(clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)):this.applying=!1}snapshot(t){this.enabled&&!this.applying&&this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){const i=this.stack.findIndex(e=>e.id===t);-1!==i&&i!==this.pointer&&(this.pointer=i,this._restore(this.stack[i],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;const t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if("function"!=typeof t)return Promise.resolve();const i=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=i,i||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,i,n,s,r,a,o;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onMounted),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onUpdated),null==(r=(s=this.ctx).removeEventListener)||r.call(s,"scrolled",this._onUpdated),null==(o=(a=this.ctx).removeEventListener)||o.call(a,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}}});const vs=m.__apex_DataLabels,ws=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,As=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Ms(t,e){return function(t,e,i,n,s,r=1){const a=[],o=t=>e*t+i,l=t=>n*t+s;let c;for(ws.lastIndex=0;null!==(c=ws.exec(t));){const t=c[1].toUpperCase(),e=(c[2].match(As)||[]).map(parseFloat);if("Z"===t)a.push("Z");else if("H"===t)for(const t of e)a.push(`H ${o(t)}`);else if("V"===t)for(const t of e)a.push(`V ${l(t)}`);else if("A"===t)for(let t=0;t+6<e.length;t+=7)a.push(`A ${e[t]*r} ${e[t+1]*r} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${o(e[t+5])} ${l(e[t+6])}`);else{const i=[];for(let t=0;t+1<e.length;t+=2)i.push(`${o(e[t])} ${l(e[t+1])}`);i.length&&a.push(`${t} ${i.join(" ")}`)}}return a.join(" ")}(t,e.ax,e.bx,e.ay,e.by)}const ks="apexcharts-highlight-part",Ls={f:1,o:0},Ss={f:0,o:0},Cs=t=>({f:t,o:t<1?1:0}),Es=Number.isFinite,Fs=(t,e,i)=>i>=1?e:t+(e-t)*i,Ps=t=>t&&"object"==typeof t&&!Array.isArray(t),Ds=(t,e="fill-opacity")=>{var i;const n=null==(i=t.instance)?void 0:i._cmd,s=parseFloat(n?n[e.replace("-o","O")]:t.getAttribute(e));return isFinite(s)?s:1};function Rs(t){const e="string"==typeof t?t.trim():"";let i,n=null;return(i=/^rgba\(([^,]+,[^,]+,[^,]+),([^)]+)\)$/i.exec(e))?n=[`rgb(${i[1]})`,parseFloat(i[2])]:(i=/^color-mix\(in srgb, (.+) ([\d.]+)%, transparent\)$/.exec(e))?n=[i[1],parseFloat(i[2])/100]:(i=/^(#[\da-f]{6})([\da-f]{2})$/i.exec(e))&&(n=[i[1],parseInt(i[2],16)/255]),n&&n[1]>0&&n[1]<1?n:[t,1]}function Ts(t,e){const i=null!=t&&e?t/e:null;return{value:null!=t?t:null,total:null!=e?e:null,share:i,overflow:null!=i&&(i<0?"sign":i>1)}}function Ns(t){let e=parseFloat(t.getAttribute("x")),i=parseFloat(t.getAttribute("y"));return String(t.getAttribute("transform")||"").replace(/translate\(\s*([^\s,)]+)[\s,]*([^\s,)]*)\s*\)/g,(t,n,s)=>(e+=parseFloat(n)||0,i+=parseFloat(s)||0,"")),[e,i]}const Os=["mousemove","mousedown","mouseup","mouseover","mouseout","click","touchstart","touchmove","touchend"];function $s(t,e){const i=t._apxHits||(t._apxHits=new Set);if(!t._apxHitStop){t._apxHitStop=!0;const e=t=>{i.has(t.relatedTarget)&&t.stopImmediatePropagation()};["mouseout","mouseleave","mouseover","mouseenter"].forEach(i=>t.addEventListener(i,e,!0))}i.add(e),Os.forEach(i=>e.addEventListener(i,e=>{e.stopPropagation();const n="mouseover"===i,s="mouseout"===i;(n||s)&&e.relatedTarget===t||(Bs(t,i,e),n&&Bs(t,"mouseenter",e),s&&Bs(t,"mouseleave",e))},{passive:!0}))}function Is(t,e){let i;const n=()=>{var n;let s=t.getAttribute("filter");const r=null==(n=t.instance)?void 0:n._filter,a=null==r?void 0:r.node;if(null==i||i.remove(),!s||(null==r?void 0:r.shared))return e.removeAttribute("filter");(null==a?void 0:a.querySelector("feGaussianBlur"))&&(i=a.cloneNode(),i.append(a.firstElementChild.cloneNode()),i.id+="p",a.after(i),s=`url(#${i.id})`),e.setAttribute("filter",s)};n(),k.isBrowser()&&"undefined"!=typeof MutationObserver&&new MutationObserver(n).observe(t,{attributes:!0,attributeFilter:["filter"]})}function zs(t,e){const i=t.parentNode,n=Array.from(i.childNodes);i.insertBefore(e,n[n.indexOf(t)+1]||null)}const Ws=(t,e)=>t.setAttribute("class",`${t.getAttribute("class")||""} ${e}`.trim());function Bs(t,e,i){try{const n=i.touches?{bubbles:!0,cancelable:!0,touches:Array.from(i.touches),targetTouches:Array.from(i.targetTouches),changedTouches:Array.from(i.changedTouches)}:"mouseenter"===e||"mouseleave"===e?{clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,relatedTarget:i.relatedTarget,buttons:i.buttons}:i;t.dispatchEvent(new i.constructor(e,n))}catch(t){}}function js(t){if(!Ps(t))return t;const e=t,{highlightData:i,highlight:n}=e,s=h(e,["highlightData","highlight"]);return["data","children"].forEach(t=>{Array.isArray(s[t])&&(s[t]=s[t].map(qs))}),s}function Hs(t){const e=[];return(t||[]).forEach(t=>(Ps(t)&&Array.isArray(t.data)?t.data:[]).forEach(t=>{Ps(t)&&void 0!==t.x&&(void 0!==t.y||Array.isArray(t.children))&&e.push(t)})),e}const Ys=t=>Ps(t)&&("highlight"in t||"highlightData"in t||[t.data,t.children].some(t=>Array.isArray(t)&&t.some(Ys))),qs=t=>Ps(t)&&("highlight"in t||Array.isArray(t.children))?js(t):t;function Xs(t,e){if("number"==typeof e)return e;const i=t.config&&t.config.series||[];for(let t=0;t<i.length;t++)if(i[t]&&i[t].name===e)return t;return-1}function Gs(t){return!!(t&&t.weaveHighlights&&t.weaveHighlights.records.length)}function Us(t,e){if(!Gs(t))return null;let i=null;for(const n of t.weaveHighlights.records)for(const s of n.entries)Xs(t,s.series)===e&&(i=s.values);return i}const Ks="p:",Vs=["pie","donut","polarArea"];function Zs(t,e){var i;const n=t.w.highlightData;if(!n)return;if(t._render!==e&&t._beginRender(e,"p:"),!n.active&&!(null==(i=t._prev())?void 0:i.size))return;n.active&&"polarArea"===e.chartType&&"clamp"!==t.cfg.axis&&n.parts.forEach(t=>{Es(t[0])&&(e.maxY=Math.max(e.maxY,t[0]))});const s=e.animatePaths,r=e.drawArcs,a=e.getSliceMovers,o=e.getHoverOutlinePath,h={arcs:[],movers:[],reach:[],ap:s};e.animatePaths=(t,i)=>{const n=l({},i);s.call(e,t,i),n.run=i.dur,h.arcs[i.i]={a:n,el:t}},e.drawArcs=(...i)=>{const n=r.apply(e,i);return function(t,e,i,n){var s,r,a,o,h,d,u,p,f,g;const m=t.w,y=m.globals,x=t.cfg,_=m.highlightData,v=_.active,w=t._prev(),A=e.chartType,M="polarArea"===A,L=y.radialSize,S="donut"===A?e.donutSize:0,C=v?null!=(s=x.fadeOpacity)?s:.2:1,E=!0===(null==(r=t.ctx.morphTypeChange)?void 0:r.isActive()),F=!y.dataChanged||!y.shouldAnimate,P="area"===(null==(a=x.pie)?void 0:a.encoding),D=m.seriesData.series,R="part"===(null!=(h=null==(o=x.dataLabels)?void 0:o.value)?h:"part"),T=e.strokeWidth>0&&(null!=(u=null==(d=x.outline)?void 0:d.width)?u:1)>0?{opacity:null!=(f=null==(p=x.outline)?void 0:p.opacity)?f:1}:null,N=null==(g=y.prevHighlightLabels)?void 0:g.get(-1),O=[],$=(t,e)=>{var i,n;return(null==(i=t.classList)?void 0:i.contains(e))||` ${null==(n=t.getAttribute)?void 0:n.call(t,"class")} `.indexOf(` ${e} `)>-1};Array.from(i.node.childNodes).filter(t=>$(t,"apexcharts-pie-series")).forEach(i=>{var s,r,a,o,h,d;const u=Array.from(i.childNodes).find(t=>$(t,"apexcharts-pie-area"));if(!u)return;const p=Number(u.getAttribute("j")),f=Ks+p,g=F||null==w?void 0:w.get(f);if(!v&&!g)return;const A=n.arcs[p],I=D[p],z=v?null==(s=_.parts[p])?void 0:s[0]:null,W=e.sliceSizes[p],j=M?W:L,H=k.isBrowser()&&!!A&&A.a.run>0&&!E,Y=+(null==A?void 0:A.a.animBeginArr[p])||0,q=null!=z&&I>0?z/I:null;let X=null,G=!1;if(null!=q&&q>0)if(G=q>1,M)X=Math.min(L,W*q);else{const t=Math.min(q,1);X=P?Math.sqrt(S*S+t*(L*L-S*S)):S+(L-S)*t}const U=null!=(r=null==g?void 0:g.lr)?r:null==g?void 0:g.fr;let K=X;const V=null==X&&null!=U&&H;V&&(K=y.collapsedSeriesIndices.indexOf(p)>-1?U*L:v?S:j);const Z=V&&!v;let J=K,Q=!1;null!=K&&H&&!F&&(null!=U?J=U*L:g||"baseline"===x.enter?J=S:(Q=!0,J=M?null!=(a=A.a.prevSize)?a:W:L),V||Math.abs(A.a.prevEndAngle-A.a.prevStartAngle)>.01||(J=K,Q=!1));let tt=null,et=null;const it=t=>{const e=u.getAttribute("transform");e&&(t.setAttribute("transform",e),t.classList.add("apexcharts-slice-mover"),t.style.transition=u.style.transition),(n.movers[p]=n.movers[p]||[]).push(t)},nt=(t,e,i,s)=>{A&&!E?n.ap.call(t,e,c(l({},A.a),{size:i,prevSize:F?void 0:s,isTrack:!0})):e.attr({d:t.getPiePath({me:t,startAngle:Number(u.getAttribute("data:startAngle")),angle:Number(u.getAttribute("data:angle")),size:i}),"stroke-width":t.strokeWidth})},st=u.getAttribute("fill"),[rt,at]=Rs(st),ot=Ds(u),lt=!!st&&"none"!==st&&!/^url\(/i.test(st),ct=lt?at*ot:ot,ht=lt?Q?ct:null!=U&&null!=(o=g.al)?o:1:ot,dt=lt?Z?ct:1:ot;if(null!=K){const s=er(e,j);tt=new b(m).drawPath({d:"",fill:rt,stroke:u.getAttribute("stroke"),strokeWidth:0,fillOpacity:ht,classes:`${ks} apexcharts-pie-highlight-part`});const r=tt.node;if(r.setAttribute("pointer-events","none"),null!=q&&r.setAttribute("data:hl-share",String(q)),i.appendChild(r),it(r),H&&!F&&r.setAttribute("d",s.getChangedPath(A.a.prevStartAngle,A.a.prevEndAngle,J)),nt(s,tt,K,J),G&&!V&&Ws(r,"apexcharts-highlight-overflow"),Is(u,r),G&&!V||V&&(null==g?void 0:g.edge)){et=new b(m).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${ks} apexcharts-highlight-edge`}),et.node.setAttribute("pointer-events","none"),et.node.setAttribute("stroke-opacity","0"),i.appendChild(et.node),it(et.node);nt(er(e,j,{strokeWidth:{value:1}}),et,M?W:L-2,M?null==A?void 0:A.a.prevSize:L-2)}if(M&&G&&!V&&(r.removeAttribute("pointer-events"),$s(u,r),n.reach[p]=K),E){const e=[r,null==et?void 0:et.node].filter(Boolean),i=t=>e.forEach(e=>e.setAttribute("opacity",t));i(0),t._tween(t.ctx.morphTypeChange.getSpeed(),m.config.chart.animations.dynamicAnimation.speed,i,()=>e.forEach(t=>t.removeAttribute("opacity")))}}const ut={d:null,fr:null,f:C,edge:!1,c:!v,al:dt};t._targets.set(f,ut);const pt=G&&null!=X?.75:0,ft=F?pt:(null==g?void 0:g.edge)?.75:0,gt=null!=J?J:0,mt=null!=K?K:0;t._fade(u,F?Cs(C):Q?Ss:g?{f:g.f,o:null!=(h=g.o)?h:Cs(g.f).o}:Ls,Z?Ss:Cs(C),{delayMs:Y,speed:null==A?void 0:A.a.run,el:null==A?void 0:A.el},{anim:H,force:!!tt&&(gt!==mt||ft!==pt||ht!==dt),outline:T&&c(l({},T),{color:y.colors[p]}),also:t=>{tt&&(ut.lr=Fs(gt,mt,t)/L,ut.la=Fs(ht,dt,t),tt.node.setAttribute("fill-opacity",String(ut.la))),null==et||et.node.setAttribute("stroke-opacity",String(Fs(ft,pt,t)))},land:Z?Ls:void 0,done:V?()=>{null==tt||tt.remove(),null==et||et.remove(),ut.lr=null}:void 0,rec:ut}),null!=X&&Object.assign(ut,{fr:X/L,edge:G,n:tt.node});const yt=e.sliceLabelGroups[p],xt=yt&&Array.from(yt.childNodes).find(t=>$(t,"apexcharts-pie-label"));if(xt&&v){if(null==z&&R)return e.sliceLabels=e.sliceLabels.filter(t=>t.node!==yt),null==(d=yt.parentNode)||d.removeChild(yt),void delete e.sliceLabelGroups[p];!function(t,e,i,n,s,r,a,o,l){var c,h;const d=t.config.dataLabels.formatter;if(null!=r){const e=null!=(h=null==(c=t.globals.seriesPercent[s])?void 0:c[0])?h:0,i=a?e*r/a:0;n.textContent=String(d?d(i,{seriesIndex:s,dataPointIndex:s,series:t.seriesData.series,w:t,highlight:Ts(r,a)}):i+"%")}const u=parseFloat(n.getAttribute("font-size"))||12,p=Number(i.getAttribute("data:startAngle")),f=Number(i.getAttribute("data:angle"));if(null!=r&&null!=o&&o-l>=1.2*u){const i=t.config.plotOptions.pie.dataLabels.offset,s=B.polarToCartesian(e.centerX,e.centerY,"donut"===e.chartType?(l+o)/2+i:o/1.25+i,(p+f/2)%e.fullAngle);n.setAttribute("x",s.x),n.setAttribute("y",s.y)}const g=new b(t).getTextRects(n.textContent,n.getAttribute("font-size"),n.getAttribute("font-family"),void 0,!0,n.getAttribute("font-weight")),m=parseFloat(n.getAttribute("x")),y=parseFloat(n.getAttribute("y")),x=null!=o&&[[m-g.width/2,y-.75*g.height],[m+g.width/2,y-.75*g.height],[m-g.width/2,y+.25*g.height],[m+g.width/2,y+.25*g.height]].every(([t,i])=>{const n=t-e.centerX,s=i-e.centerY,r=Math.hypot(n,s),a=((180*Math.atan2(s,n)/Math.PI+90-p)%360+360)%360;return r>=l&&r<=o&&a<=f});x||(n.setAttribute("fill",t.config.chart.foreColor),n.removeAttribute("filter"))}(m,e,u,xt,p,R?z:null,I,X,S)}xt&&H&&!F&&N&&O.push({t:xt,src:N.get(p),el:A.el,delayMs:Y,arc:A})}),O.length&&(t._ride=()=>function(t,e){e.forEach(({t:e,src:i,el:n,delayMs:s,arc:r})=>{if(!e.isConnected)return;const[a,o]=Ns(e),l=i?i.x-a:0,c=i?i.y-o:0;i&&Math.abs(l)<.5&&Math.abs(c)<.5||t._tween(s,r.a.run,t=>{const n=1-t;n>0&&i?e.setAttribute("transform",`translate(${l*n} ${c*n})`):e.removeAttribute("transform"),i||(t<1?e.setAttribute("opacity",String(t)):e.removeAttribute("opacity"))},void 0,void 0,n)})}(t,O))}(t,e,n,h),n},e.getSliceMovers=t=>a.call(e,t).concat(h.movers[t]||[]),e.getHoverOutlinePath=t=>{const i=e.sliceSizes;if(!(h.reach[t]>i[t]))return o.call(e,t);e.sliceSizes=i.slice(),e.sliceSizes[t]=h.reach[t];try{return o.call(e,t)}finally{e.sliceSizes=i}},Js(t,e)}function Js(t,e){const i=e.renderInnerDataLabels,n=e.printInnerLabels;e.renderInnerDataLabels=(n,s,r)=>Qs(t,()=>i.call(e,n,tr(t,s,0),r)),e.printInnerLabels=(i,s,r,a)=>Qs(t,()=>n.call(e,tr(t,i,a?+a.parentNode.getAttribute("rel")-1:-1),s,r,a))}function Qs(t,e){var i,n;const s=t.w.globals,r=t.w.highlightData;if(!(null==r?void 0:r.active)||"part"!==(null!=(n=null==(i=t.cfg.dataLabels)?void 0:i.total)?n:"part"))return e();const a=s.seriesTotals;s.seriesTotals=r.parts.map(t=>{var e;return null!=(e=t[0])?e:0});try{return e()}finally{s.seriesTotals=a}}function tr(t,e,i){var n,s;const r=t.w,a=r.highlightData;if(!(null==a?void 0:a.active))return e;const o=r.seriesData.series,h=a.parts.map(t=>t[0]),d=i>-1&&"part"===(null!=(s=null==(n=t.cfg.dataLabels)?void 0:n.value)?s:"part")?h[i]:null,u=t=>t.reduce((t,e)=>t+(Es(e)?e:0),0),p=e.total.formatter,f=e.value.formatter;return c(l({},e),{total:c(l({},e.total),{formatter:p&&(t=>p(t,{highlight:Ts(u(h),u(o))}))}),value:c(l({},e.value),{formatter:(t,e)=>f(null!=d?d:t,e,{highlight:i>-1?Ts(h[i],o[i]):void 0})})})}const er=(t,e,i)=>Object.create(t,l({getSliceExtent:{value:i=>t.getSliceExtent(c(l({},i),{size:e}))}},i));const ir="r:",nr="r:o",sr=["length","baseWidth","tipWidth","offsetY"],rr=.45,ar=`${ks} apexcharts-radialbar-highlight-lane`;function or(t,e){var i,n,s,r,a,o;const c=t.w,h=c.highlightData,d=null==(n=null==(i=t.ctx.lastUpdateOptions)?void 0:i.tooltip)?void 0:n.enabled;if(null!=d?t._tipUser=d:t._tipOn&&(c.config.tooltip.enabled=!1),t._tipOn=!1,!h)return;t._render!==e&&t._beginRender(e,ir),function(t){const e=t.ctx.morphTypeChange;if(!e||e._hfOut)return;e._hfOut=!0;const i=e.captureBeforeDestroy;e.captureBeforeDestroy=n=>{const s=function(t,e){var i,n,s,r,a;const o=t.w,l=o.globals,c=null==(i=o.dom.baseEl)?void 0:i.querySelector(".apexcharts-radialbar");if("radialBar"!==e&&"gauge"!==e||!c)return null;const h=t.ctx.morphTypeChange,d=null!=(s=null==(n=l.circleGeometry)?void 0:n.cx)?s:0,u=null!=(a=null==(r=l.circleGeometry)?void 0:r.cy)?a:0,p=new Map,f=new Set,g=new Set;c.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(e=>{var i,n,s,r;const a=e.parentNode,o=+a.getAttribute("data:realIndex"),l=ir+e.getAttribute("j"),c=null!=(n=t._targets.get(l))?n:null==(i=t._prev())?void 0:i.get(l),m=a.querySelector(".apexcharts-radialbar-highlight-part");if(!(m||(null==c?void 0:c.s)>0||(null!=(r=null!=(s=null==c?void 0:c.lf)?s:null==c?void 0:c.f)?r:1)<1))return;f.add(e);const y=null==m?void 0:m.getAttribute("d"),x=+(null==m?void 0:m.getAttribute("stroke-width"));let _=null;if(y&&x>0&&"0"!==m.getAttribute("opacity"))_=h._radialArcToFilledSegment(y,x,d,u)||y,g.add(m);else{const t=/M\s*(-?[\d.e]+)\s+(-?[\d.e]+)/.exec(e.getAttribute("d")||"");t&&(_=`M ${t[1]} ${t[2]} L ${t[1]} ${t[2]} Z`)}_&&p.set(o,_)});const m=[...c.getElementsByClassName(ks)];return p.size||m.length?(m.forEach(t=>g.has(t)||t.closest(".apexcharts-tracks")||f.add(t)),{marks:p,ghost:()=>{const t="data-hf-ghost";f.forEach(e=>e.setAttribute(t,""));const e=o.dom.Paper.node.cloneNode(!0);f.forEach(e=>e.removeAttribute(t));const i=new Set(e.querySelectorAll(`[${t}]`)),n=new Set;i.forEach(i=>{i.removeAttribute(t);for(let t=i.parentNode;t&&t!==e;t=t.parentNode)n.add(t)});const s=t=>[...t.children].forEach(t=>{i.has(t)||(n.has(t)?s(t):"defs"!==t.tagName.toLowerCase()&&t.remove())});return s(e),e.removeAttribute("id"),[e,...e.querySelectorAll("*")].forEach(t=>{t.id&&(t.id+="-hf"),[...t.attributes].forEach(e=>{e.value.includes("url(#")&&t.setAttribute(e.name,e.value.replace(/url\(#([^)]+)\)/g,"url(#$1-hf)"))})}),e}}):null}(t,null==n?void 0:n.fromType);if(!s)return i.call(e,n);const r=e._captureFromDOM;let a;e._captureFromDOM=t=>{const i=r.call(e,t);return i.marks.forEach(t=>{var e;t.d=null!=(e=s.marks.get(t.realIndex))?e:t.d}),i};try{a=i.call(e,n)}finally{e._captureFromDOM=r}const o=e._snapshot;return!a||!o||e._ghost||o.pieceOut||o.pieceIn||(e._ghost=s.ghost()),a}}(t);const u=c.config.plotOptions.radialBar,p=null==(s=t.cfg.radialBar)?void 0:s.indicator;if(t._ind=null!=p?p:"needle"===u.shape?"needle":"arc","needle"!==u.shape||(null==(r=u.needle)?void 0:r.showValueArc)||("lanes"===t._ind&&(t._ind="needle"),"arc"!==p&&"lanes"!==p||t._warn("needleNoArc",`indicator '${p}' is drawn as a needle: a needle gauge without plotOptions.radialBar.needle.showValueArc has no arc to split.`)),!h.active&&!(null==(a=t._prev())?void 0:a.size))return;const f=c.config.tooltip;h.active&&!f.enabled&&null==t._tipUser&&k.isBrowser()&&(f.enabled=!0,t._tipOn=!0),Js(t,e),function(t,e){const i=e.renderInnerDataLabels,n=e.printInnerLabels;e.renderInnerDataLabels=(n,s,r)=>{const a=i(n||e.dataLabelsGroup,s,r);return ur(t,e,s,-1,a),a},e.printInnerLabels=(i,s,r,a)=>{n(i,s,r,a),ur(t,e,i,a?+a.parentNode.getAttribute("rel")-1:-1)}}(t,e);const g=e.drawNeedle;e.drawNeedle=i=>{const n=g.call(e,i);return function(t,e,i){var n,s;const r=t.w,a=r.globals,o=r.highlightData.active,l=!a.dataChanged||!a.shouldAnimate,c=l||null==(n=t._prev())?void 0:n.get(nr);if(!o&&!c)return;const h=o?null!=(s=t.cfg.fadeOpacity)?s:.2:1,d=l?h:c?c.f:1,u={d:null,f:h,c:!o};t._targets.set(nr,u);const p=t=>{u.lf=t,t<1?i.node.setAttribute("opacity",String(t)):i.node.removeAttribute("opacity")},f=t.ctx.morphTypeChange,g=(null==f?void 0:f.isActive())?{delay:f.getSpeed(),speed:r.config.chart.animations.dynamicAnimation.speed}:e.needleMotion();g&&d!==h?(u.run=!0,t._tween(g.delay||0,g.speed,t=>p(Fs(d,h,t)),()=>u.run=!1,g.ease)):p(h);o&&k.isBrowser()&&Promise.resolve().then(()=>{var t;const e=r.dom.baseEl,n=null==e?void 0:e.querySelector(".apexcharts-radialbar-slice-0");n&&i.node.isConnected&&($s(n,i.node),null==(t=e.querySelector(".apexcharts-radialbar-hollow"))||t.setAttribute("pointer-events","none"))})}(t,e,n),n};const m=e.animatePaths,y=new Set;e.animatePaths=(i,n)=>{const s=l({},n);m.call(e,i,n),n.isTrack||(s.run=n.dur,y.add(s.i),lr(t,e,i,s,m))},!0===(null==(o=t.ctx.morphTypeChange)?void 0:o.isActive())&&Promise.resolve().then(()=>{var i;t._render!==e||c.globals.isDestroyed||null==(i=c.dom.baseEl)||i.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(i=>y.has(+i.getAttribute("j"))||lr(t,e,i.instance,null,m))})}function lr(t,e,i,n,s){var r,a,o,h,d,u;const p=t.w,f=p.globals,g=t.cfg,m=p.highlightData,y=m.active,x=i.node,_=n?n.i:Number(x.getAttribute("j")),v=ir+_,w=!n,A=!f.dataChanged||!f.shouldAnimate,L=t._prev(),S=A||null==L?void 0:L.get(v),C=p.config.plotOptions.radialBar,E=t._ind,F=x.getAttribute("stroke"),P=x.getAttribute("fill"),D=F&&"transparent"!==F?F:w&&P&&"none"!==P?P:null,R=0===_&&("needle"===E||!D),T=p.seriesData.series[_],N=y&&f.collapsedSeriesIndices.indexOf(_)<0&&null!=(a=null==(r=m.parts[_])?void 0:r[0])?a:null,O=e.startAngle,$=n?n.endAngle:e._arcEnd(T),I=n?n.run:0,z=k.isBrowser()&&I>0,W=n&&+n.animBeginArr[_]||0,j=null!=(o=g.fadeOpacity)?o:.2,H=y&&!R&&!!D,Y={f:j,o:0},q=n?n.size:Math.hypot(x.getAttribute("data:cx")-f.circleGeometry.cx,x.getAttribute("data:cy")-f.circleGeometry.cy);if("lanes"===E&&D)return function(t,e,i,n){var s,r,a,o,h,d,u;const{i:p,c:f,prev:g,mount:m,pv:y,whole:x,wholeEnd:_,run:v,anim:w,delayMs:A,size:L}=n,S=t.w,C=S.globals,E=t.cfg,F=S.config.plotOptions.radialBar,P=S.highlightData.active,D=i.node,R=!f,T=e.startAngle,N=P&&C.collapsedSeriesIndices.indexOf(p)<0?1:0,O=R?k.isBrowser()&&!!N:w&&!m,$=!R&&w&&m,I=R?0:O?null!=(s=null==g?void 0:g.s)?s:0:N,z=R?{delayMs:t.ctx.morphTypeChange.getSpeed(),speed:S.config.chart.animations.dynamicAnimation.speed}:{delayMs:A,speed:v};0===p&&function(t,e){var i;const n=null==(i=t._render)?void 0:i._hfLine,s=null==n?void 0:n.rec;if(!s||s.run||s.lf===s.f)return;const r=s.lf,a=()=>{var t,e;if(s.run=!1,s.f)return;s.done=!0;const i=null==(t=n.node)?void 0:t.previousSibling;null!=s.hold&&i&&i.textContent===s.pv&&(i.textContent=s.vt=s.hold),null==(e=n.node)||e.remove(),n.node=null};if(!e)return s.lf=s.f,fr(n),void a();s.run=!0,t._tween(e.delayMs,e.speed,t=>{s.lf=Fs(r,s.f,t),fr(n)},a,void 0,e.el)}(t,O?c(l({},z),{el:i}):null);if(!N&&!I)return;const W=null!=y?e._arcEnd(y):T,B=_,j=N?W:B;let H=B,Y=j;R?Y="baseline"===E.enter?T:B:O?(H=null!=(r=null==g?void 0:g.we)?r:Es(f.prevEndAngle)?f.prevEndAngle:B,Y=null!=(a=null==g?void 0:g.e)?a:"baseline"===E.enter?T:H):$&&(H=Y=T);const q=N?null!=(d=null==(h=null==(o=E.radialBar)?void 0:o.lanes)?void 0:h.opacity)?d:rr:1,X=R?1:O?g?g.f:1:q,G=R?e.getStrokeWidth({size:C.circleGeometry.r,series:S.seriesData.series}):Number(D.getAttribute("stroke-width")),U=D.getAttribute("stroke-opacity"),K=t=>{var e;const i=new b(S).drawPath({d:"",stroke:n.paint,strokeWidth:G,fill:"none",strokeOpacity:Ds(D,"stroke-opacity"),strokeDashArray:null!=(e=D.getAttribute("stroke-dasharray"))?e:0,classes:`${ar} ${t}`});return i.node.setAttribute("aria-hidden","true"),Is(D,i.node),i},V=K("apexcharts-radialbar-highlight-whole"),Z=K("apexcharts-radialbar-highlight-part");zs(D,V.node),zs(V.node,Z.node),V.node.setAttribute("pointer-events","none"),N&&W-B>.01?$s(D,Z.node):Z.node.setAttribute("pointer-events","none");null!=y&&(y>(null!=x?x:0)||y>("number"==typeof F.max?F.max:100))&&Ws(Z.node,"apexcharts-highlight-overflow");const J=S.seriesData.series.length,Q=function(t){var e,i;if(t._hfTracks)return t._hfTracks;const n=(t,e)=>{var i;return` ${null==(i=t.getAttribute)?void 0:i.call(t,"class")} `.includes(` ${e} `)},s=[...(null==(i=null==(e=t.w.dom.Paper)?void 0:e.node)?void 0:i.childNodes)||[]];let r=[];for(let t=s.length-1;t>=0&&!r.length;t--){const e=[...s[t].childNodes||[]].find(t=>n(t,"apexcharts-tracks"));e&&(r=[...e.childNodes].map(t=>[...t.childNodes].find(t=>n(t,"apexcharts-radialbar-area"))))}return t._hfTracks=r}(e)[F.inverseOrder?J-1-p:p],tt=Q&&[Q.getAttribute("d"),Q.getAttribute("stroke-width")],et=tt?(parseFloat(tt[1])||0)/(G||1):0;let it=null;if(Q){it=new b(S).drawPath({d:"",stroke:Q.getAttribute("stroke"),strokeWidth:0,fill:"none",strokeOpacity:null!=(u=Q.getAttribute("stroke-opacity"))?u:1,classes:`${ks} apexcharts-radialbar-highlight-track`});const t=Q.getAttribute("filter");t&&it.node.setAttribute("filter",t),it.node.setAttribute("pointer-events","none"),it.node.setAttribute("aria-hidden","true"),zs(Q,it.node)}const nt=L-G/2,st=L+G/2,rt=J<2,at=rt?Math.max(2,.12*G):Math.max(1,Math.min(.08*G,e.margin/3)),ot=rt?0:Math.max(0,(3*at-e.margin)/2),lt=Math.max(.5,(G-at)/2-ot),ct=(t,i)=>{const n=t-T;return n>.01?e.getPiePath({me:e,startAngle:T,angle:n===e.fullAngle?e.fullAngle-.01:n,size:i}):""},ht=t=>{const i=e.trackStartAngle;let n=e.trackEndAngle;Math.abs(n)+Math.abs(i)>=360&&(n=360-Math.abs(e.startAngle)-.1);const s=n<i?e.fullAngle+n-i:n-i;return e.getPiePath({me:e,startAngle:i,angle:s===e.fullAngle?s-.01:s,size:t})},dt=(t,e,i)=>{t.setAttribute("d",e),t.setAttribute("stroke-width",String(i))},ut={d:null,c:!P,f:q,cx:f?f.centerX:C.circleGeometry.cx,cy:f?f.centerY:C.circleGeometry.cy};t._targets.set(ir+p,ut);const pt=(t,e,i)=>{ut.s=t,ut.we=e,ut.e=i;const n=st-ot*t,s=nt+t*(st-ot-lt-nt),r=nt+ot*t,a=r+t*lt;ut.mid=(s+a)/2,dt(V.node,ct(e,(s+n)/2),n-s),dt(Z.node,a>r?ct(i,(r+a)/2):"",a-r),Q&&(t?(dt(Q,ht((s+n)/2),(n-s)*et),dt(it.node,ht((r+a)/2),(a-r)*et)):(dt(Q,tt[0],tt[1]),dt(it.node,"",0)))},ft=[V.node,Z.node,null==it?void 0:it.node].filter(Boolean);let gt=!R;const mt=()=>{gt=!0,D.setAttribute("stroke-opacity","0"),ft.forEach(t=>t.removeAttribute("opacity"))};gt?mt():ft.forEach(t=>t.setAttribute("opacity","0"));pt(I,H,Y);let yt=!1;(O||$)&&V.animate(z.speed,z.delayMs).during(t=>{yt||(gt||mt(),pt(Fs(I,N,t),Fs(H,B,t),Fs(Y,j,t)))});if(t._fade(V.node,{f:X,o:0},{f:q,o:0},c(l({},z),{el:V}),{attr:"stroke-opacity",anim:O,force:O,done:N?void 0:()=>{yt=!0,ft.forEach(t=>t.remove()),Q&&dt(Q,tt[0],tt[1]),null==U?D.removeAttribute("stroke-opacity"):D.setAttribute("stroke-opacity",U),ut.s=0},rec:ut}),k.isBrowser()){let e=null,i=-1;const n=n=>{var s;(i!==cr||/over|start/.test(n.type))&&(e=null==(s=D.getScreenCTM)?void 0:s.call(D),i=cr,function(){if(hr)return;hr=!0,["scroll","resize"].forEach(t=>M.addWindowEventListener(t,()=>cr++,{capture:!0,passive:!0}))}()),t._lane=[p,dr(e,n,ut)]};["mouseover","mousemove","mousedown","touchstart","touchmove"].forEach(t=>D.addEventListener(t,n,!0))}}(t,e,i,{i:_,c:n,prev:S,mount:A,pv:N,whole:T,wholeEnd:$,run:I,anim:z,delayMs:W,size:q,paint:D}),void(0===_&&mr(t,e,i,!1,N,A,w,n));const X=H&&null!=N?e._arcEnd(N):null,G=null!=X&&X-O>.01,U=null!=(h=null==S?void 0:S.e)?h:null,K=!G&&null!=U&&z,V=K&&!H,Z=G?X:K?V?$:O:null;let J=Z,Q=!1;null!=Z&&z&&!A&&(null!=U?J=U:S||"baseline"===g.enter?J=O:(Q=!0,J=Es(n.prevEndAngle)?n.prevEndAngle:$));const tt=t=>{const i=t-O;return e.getPiePath({me:e,startAngle:O,angle:i===e.fullAngle?e.fullAngle-.01:i,size:q})};let et=null;if(null!=Z&&D){et=new b(p).drawPath({d:"",stroke:D,strokeWidth:w?e.getStrokeWidth({size:f.circleGeometry.r,series:p.seriesData.series}):Number(x.getAttribute("stroke-width")),fill:"none",strokeOpacity:Ds(x,"stroke-opacity"),strokeDashArray:null!=(d=x.getAttribute("stroke-dasharray"))?d:0,classes:`${ks} apexcharts-radialbar-highlight-part`});const t=et.node;t.setAttribute("aria-hidden","true"),zs(x,t),G&&N>("number"==typeof C.max?C.max:100)&&Ws(t,"apexcharts-highlight-overflow"),Is(x,t),G&&X-$>.01?$s(x,t):t.setAttribute("pointer-events","none"),n&&z&&!A?(t.setAttribute("d",tt(J)),s.call(e,et,c(l({},n),{endAngle:Z,prevStartAngle:O,prevEndAngle:J,isTrack:!0}))):n?s.call(e,et,c(l({},n),{endAngle:Z,dur:I,isTrack:!0})):t.setAttribute("d",tt(Z))}const it=G&&X-$>.01?.75:0,nt=A?it:null!=(u=null==S?void 0:S.tk)?u:0;let st=null;if(et&&(it||nt&&z)){const t=Number(et.node.getAttribute("stroke-width"))||0,e=n?n.centerX:f.circleGeometry.cx,i=n?n.centerY:f.circleGeometry.cy;st=new b(p).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${ks} apexcharts-highlight-edge apexcharts-radialbar-highlight-edge`});const s=st.node;s.setAttribute("pointer-events","none"),s.setAttribute("aria-hidden","true"),s.setAttribute("stroke-opacity",String(nt)),zs(et.node,s);const r=n=>{const r=B.polarToCartesian(e,i,q-t/2,n),a=B.polarToCartesian(e,i,q+t/2,n);s.setAttribute("d",`M ${r.x} ${r.y} L ${a.x} ${a.y}`)},a=z?Es(n.prevEndAngle)&&!A?n.prevEndAngle:O:$;r(a),a!==$&&st.animate(I,W).during(t=>r(Fs(a,$,t)))}const rt=[];et&&w&&rt.push(et.node),st&&w&&rt.push(st.node);const at={d:null,e:null,f:H?j:1,c:!y};if(D&&(y||S)){t._targets.set(v,at);const e=null!=J?J:0,s=null!=Z?Z:0;et&&(at.e=s),et&&n&&z&&!A&&e!==s&&(at.e=e,et.animate(I,W).during(t=>null!=at.e&&(at.e=Fs(e,s,t))));const r=p.config.chart.animations.dynamicAnimation.speed;t._fade(x,A&&!w?H?Y:Ls:Q?Ss:S?{f:S.f,o:0}:Ls,V?Ss:H?Y:Ls,w?{delayMs:t.ctx.morphTypeChange.getSpeed(),speed:r}:{delayMs:W,speed:I,el:i},{attr:"stroke-opacity",anim:w?k.isBrowser():z,force:!!et&&(w||e!==s||nt!==it),also:t=>{st&&(at.tk=Fs(nt,it,t),st.node.setAttribute("stroke-opacity",String(at.tk))),rt.forEach(e=>t<1?e.setAttribute("opacity",t):e.removeAttribute("opacity"))},land:V?Ls:void 0,done:K||st&&!it?()=>{K&&(null==et||et.remove(),at.e=null),null==st||st.remove(),at.tk=0}:void 0,rec:at}),et&&(at.n=et.node)}0===_&&mr(t,e,i,R,N,A,w,n)}let cr=0,hr=!1;function dr(t,e,i){var n;const s=(null==(n=e.touches)?void 0:n[0])||e;if(!(t&&i.s>0))return"part";const r=s.clientX-t.e,a=s.clientY-t.f,o=t.a*t.d-t.b*t.c||1,l=(t.d*r-t.c*a)/o,c=(t.a*a-t.b*r)/o;return Math.hypot(l-i.cx,c-i.cy)>i.mid?"whole":"part"}function ur(t,e,i,n,s){var r,a,o;const l=t.w,c=l.globals;if("lanes"!==t._ind)return;const h=l.highlightData.active;let d=e._hfLine;if(!d){const n=!c.dataChanged||!c.shouldAnimate,s=n||null==(r=t._prev())?void 0:r.get("r:w"),o=h?gr(t,i,-1):"",l=o?1:0,u=n||!k.isBrowser()?l:null!=(a=null==s?void 0:s.f)?a:0;if(d=e._hfLine={node:null,rec:null},!l&&!u)return;d.rec={d:null,c:!h,t:o||(null==s?void 0:s.t)||"",f:l,lf:u,o0:u,pv:l?null:null==s?void 0:s.vt},t._targets.set("r:w",d.rec)}const u=d.rec;if(s){if(d.node=null,!u||!u.lf&&u.done)return;const e=s.node.childNodes,n=i.value.show?e[e.length-1]:null;if(!n)return;null==u.pv||u.done||(u.hold=n.textContent,n.textContent=u.pv),u.vt=n.textContent;const r=pr(l,i,n,(h?gr(t,i,-1):"")||u.t);s.add(r),d.node=r.node}else if(h){const e=gr(t,i,n),s=null==(o=l.dom.baseEl)?void 0:o.querySelector(".apexcharts-datalabel-value");!d.node&&e&&n>-1&&s&&(d.node=pr(l,i,s,e).node,s.parentNode.appendChild(d.node)),d.node&&(d.node.textContent=e),u&&s&&(u.vt=s.textContent)}fr(d)}function pr(t,e,i,n){const s=parseFloat(e.value.fontSize)||14,r=Math.max(11,Math.round(s/2)),a=new b(t).drawText({x:+i.getAttribute("x"),y:+i.getAttribute("y")+s/4+4+.8*r,text:n,textAnchor:"middle",fontSize:r+"px",fontFamily:e.value.fontFamily,fontWeight:400,foreColor:i.getAttribute("fill"),cssClass:"apexcharts-datalabel-whole"});return a.node.setAttribute("aria-hidden","true"),a}function fr(t){var e,i,n;null==(n=t.node)||n.setAttribute("fill-opacity",String(.6*(null!=(i=null==(e=t.rec)?void 0:e.lf)?i:1)))}function gr(t,e,i){var n,s;const r=t.w,a=t.cfg.dataLabels||{},o=r.seriesData.series,h=r.highlightData.parts.map(t=>t[0]),d=i>-1?i:o.length<2?0:-1,u=(t,e)=>{const i=String(t(e)),n=String(t(c(l({},e),{lane:"whole"})));return n!==i?n:"/ "+i};if(d>-1)return"part"===(null!=(n=a.value)?n:"part")&&Es(h[d])?u(t=>e.value.formatter(o[d],r,t),{highlight:Ts(h[d],o[d])}):"";if(!e.total.show||"part"!==(null!=(s=a.total)?s:"part")||!e.total.formatter||!h.some(Es))return"";const p=t=>t.reduce((t,e)=>t+(Es(e)?e:0),0);return u(t=>e.total.formatter(r,t),{highlight:Ts(p(h),p(o))})}function mr(t,e,i,n,s,r,a,o){var l,c,h;const d=t.w,u=d.globals,p=t.cfg,f=d.highlightData.active,g=r||null==(l=t._prev())?void 0:l.get("r:n"),m=n&&null!=s?e._angleAtValue(s):null;if(null==m&&!g)return;const y=d.config.plotOptions.radialBar,x=a?null:"needle"===y.shape?e.needleMotion():o&&o.run>0&&k.isBrowser()?{speed:o.run,delay:+o.animBeginArr[0]||0}:null;let _,v=1,w=m,A=1;const L=null==m;if(L){if(!x)return;_=g.ang,v=g.op,w=f&&n?e.startAngle:e._angleAtValue(d.seriesData.series[0]),A=0}else x?r?_=e.startAngle:g?(_=g.ang,v=g.op):(_=e._angleAtValue(u.dataChanged?u.previousPaths[0]:d.seriesData.series[0]),v=0):_=w;const S=u.circleGeometry,C=(null==(c=p.radialBar)?void 0:c.needle)||{},E=y.needle||{},F={},P=t=>null!=t&&!(parseFloat(t)>0),D=P(E.baseWidth)&&P(E.tipWidth);sr.forEach(t=>{var e;const i="length"===t?P(E.length):D&&("baseWidth"===t||"tipWidth"===t);F[t]=null!=(e=C[t])?e:i?void 0:E[t]});const R=null!=(h=C.color)?h:u.colors[0],{path:T,cx:N,cy:O}=e.needlePath({size:S.r,centerX:S.cx,centerY:S.cy,series:d.seriesData.series},F),$=new b(d),I=$.group({class:"apexcharts-gauge-needle-highlight"});L||!k.isBrowser()?I.node.setAttribute("pointer-events","none"):$s(i.node,I.node),I.node.setAttribute("aria-hidden","true"),I.node.setAttribute("transform-origin",`${N} ${O}`),I.add($.drawPath({d:T,stroke:R,strokeWidth:0,fill:R,classes:`${ks} apexcharts-gauge-needle-highlight-shape`})),null!=s&&s>("number"==typeof y.max?y.max:100)&&Ws(I.node,"apexcharts-highlight-overflow");const z=i.node.parentNode.parentNode;z.insertBefore(I.node,z.childNodes[0]||null);const W=()=>{const t=[...z.childNodes].filter(t=>t!==I.node),e=t.findIndex(t=>{var e;return` ${null==(e=t.getAttribute)?void 0:e.call(t,"class")} `.includes(" apexcharts-radialbar-hollow ")});return!(e<0||I.node.parentNode!==z)&&(z.insertBefore(I.node,t[e+1]||null),!0)};W()||Promise.resolve().then(W);const B={d:null,ang:_,op:v,c:!f};t._targets.set("r:n",B);const j=(t,e)=>{B.ang=t,B.op=e,I.node.setAttribute("transform",`rotate(${t})`),e<1?I.node.setAttribute("opacity",String(e)):I.node.removeAttribute("opacity")},H=t=>j(_+(w-_)*t,Fs(v,A,t)),Y=()=>{B.run=!1,L?I.remove():j(w,A)};if(a)return j(w,0),void t._tween(t.ctx.morphTypeChange.getSpeed(),d.config.chart.animations.dynamicAnimation.speed,t=>j(w,t),Y);if(!x||_===w&&v===A)return H(1),void Y();B.run=!0,H(0);const q=x;if(q.ease){const i=performance.now(),n=s=>{if(u.isDestroyed||t._render!==e)return;const r=Math.max(0,Math.min(1,(s-i)/q.speed));H(q.ease(r)),r<1?M.requestAnimationFrame(n):Y()};M.requestAnimationFrame(n)}else I.animate(q.speed,q.delay||0).during(t=>H(t)).after(Y)}function yr(t){var e,i,n,s;return!!(null==(s=null==(n=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:n.nested)?void 0:s.drilldownAsLevels)}const xr="apexcharts-highlight-tile",_r="apexcharts-highlight-overflow",br=/^url\(/i;function vr(t,e,i){if(!Ps(e))return null;if(Array.isArray(e.children)&&e.children.length)return[e.children,i];const n=e.drilldown,s=null!=n&&yr(t)&&!i.includes(n)&&Jt(t,n);return s&&Array.isArray(s.data)&&s.data.length?[s.data,[...i,n]]:null}function wr(t,e){var i,n,s;const r=t.w,a=r.globals,o=r.highlightData;if(!o)return;t._beginRender(e,"t:"),t._tmDefs.forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),t._tmDefs=[];const c=t._tiles=new Map,h=o.active,d=r.seriesData.series;!function(t,e,i){const n=s=>{var r,a;const o=s.children;if(!o||!o.length){const t=null==(r=null==e?void 0:e[s._si])?void 0:r[s._di];return s.highlight=e?Ts(Es(t)?t:null,null==(a=i[s._si])?void 0:a[s._di]):void 0,s.highlight}let l=null;if(o.forEach(t=>{const e=n(t);!e||null==e.value||e.value*(e.total||0)<0||(l=(l||0)+Math.abs(e.value))}),!e)return s.highlight=void 0;const c=t._subtreeArea(s),h=null!=l&&c?l/c:null;return s.highlight={value:l,total:c,share:h,overflow:null!=h&&h>1},s.highlight};(t.roots||[]).forEach(n)}(e,h?o.parts:null,d);const u=t._prev();if(!h&&!(null==u?void 0:u.size))return;const p=new Map;null==u||u.forEach(t=>p.set(t.ij,t)),null==(i=a.prevTreemapView)||i.querySelectorAll(`.${xr}`).forEach(t=>{t.classList.remove(xr,_r),t.removeAttribute("data:hl-share")});const f=t.cfg,g=h?null!=(n=f.fadeOpacity)?n:.2:1,m=!0===(null==(s=t.ctx.morphTypeChange)?void 0:s.isActive()),y=e.dynamicAnim,x=m||!!(a.dataChanged&&y.enabled&&a.shouldAnimate),_=m?t.ctx.morphTypeChange.getSpeed():y.speed,v=r.config.chart.foreColor;let w=!1;h&&function(t,e){const i=e._showParentTooltip;e._showParentTooltip=(n,s)=>{var r,a,o;i.call(e,n,s);const l=s.highlight,c=t.cfg.tooltip||{};if(null==(null==l?void 0:l.value)||!1===c.show||"function"==typeof(null==(a=null==(r=t.w.config.plotOptions.treemap.parents)?void 0:r.tooltip)?void 0:a.formatter))return;const h=null==(o=e._tip())?void 0:o.querySelector(".apexcharts-tooltip-text-y-value");if(!h)return;let d=`/ ${e._formatValue(l.total,s._si)}`;c.share&&l.total&&(d+=` \xb7 ${Math.round(100*l.share)}%`),h.innerHTML=`${e._formatValue(l.value,s._si)} <span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">${d}</span>`}}(t,e);let A=null;const M=e.helpers.calculateDataLabels;e.helpers.calculateDataLabels=t=>{const i=M.call(e.helpers,t),n=A=c.get(t.i+"|"+t.j);if(i&&n){const t=function(t){const e=[];return function t(i){"text"===String(i.tagName||i.nodeName).toLowerCase()&&e.push(i),Array.from(i.childNodes||[]).forEach(t)}(t),e}(i.node);n.lb=t.filter(t=>/^(#fff|#ffffff|white)$/i.test(t.getAttribute("fill")||""));const e=t[0],[,s,,r]=n.r;if(e&&r>s){const t=parseFloat(e.getAttribute("font-size"))||12;n.need=(r-parseFloat(e.getAttribute("y"))+.9*t)/(r-s)}Ar(n,v)}return i};const k=e.rotateToFitLabel;return e.rotateToFitLabel=(...t)=>{k.apply(e,t);const i=A;if(A=null,(null==i?void 0:i.lb)&&/rotate/.test(t[0].node.getAttribute("transform")||"")){const e=new b(r).getTextRects(t[2],String(t[1])).width;i.need=.5+e/2/(t[6]-t[4]),i.tone=null,Ar(i,v)}},(e,i,n,s,y)=>{var b,A,M,k;const L="t:"+y._key,S=i+"|"+n,C=null==(b=d[i])?void 0:b[n],E=x?(null==u?void 0:u.get(L))||(C?void 0:p.get(S)):void 0;if(!h&&!E)return;if(br.test(s))return void(h&&!w&&(w=!0,t._warn("fill","treemap tiles with a gradient, pattern or image fill are drawn without their parts.")));const F=h?null==(A=o.parts[i])?void 0:A[n]:null;if(!C&&!E)return;const P=Es(F)&&C?F/C:null;let D=h?{s:null==P||P<0?0:Math.min(P,1),f:g,c:s}:{s:1,f:0,c:s},R=D;if(E)R={s:E.s,f:E.f,c:E.col},!C&&h&&(D=l({},R));else if(x){const t=null==(M=a.previousPaths[i])?void 0:M[n];(m||(null==(k=null==t?void 0:t.rect)?void 0:k.width)>0)&&(R="baseline"===f.enter?{s:0,f:1,c:D.c}:{s:1,f:0,c:D.c},m||!t.fill||br.test(t.fill)||(R.c=t.fill))}const T=R.s!==D.s||R.f!==D.f||R.c!==D.c;if(!h&&!T)return;const N=r.dom.Paper.gradient("linear",t=>{for(let e=0;e<4;e++)t.stop(0,s,1)});N.from(0,1).to(0,0),t._tmDefs.push(N.node);const O=Array.from(N.node.childNodes),$=e.node;h&&($.setAttribute("class",`${$.getAttribute("class")||""} ${xr}${null!=P&&P>1?" "+_r:""}`.trim()),$.setAttribute("data:hl-share",null==P?"":String(P)));const I={s:D.s,f:D.f,col:D.c,c:!h,ij:S,run:!1,base:s,r:y.rect,lb:null,need:.5,tone:null};t._targets.set(L,I),c.set(S,I);const z=function(t,e){const i=B.parseColor(String(t).trim()),n=B.parseColor(String(e).trim());if(t===e||!(null==i?void 0:i.every(Es))||!(null==n?void 0:n.every(Es)))return i=>i>=1?e:t;return t=>t>=1?e:`rgba(${[0,1,2].map(e=>Math.round(Fs(i[e],n[e],t))).join(",")},${+Fs(i[3],n[3],t).toFixed(3)})`}(R.c,D.c),W=t=>{I.ls=t.s,I.lf=t.f,I.lc=t.c,O.forEach((e,i)=>{e.setAttribute("offset",String(0===i?0:3===i?1:t.s)),e.setAttribute("stop-color",t.c),e.setAttribute("stop-opacity",String(i<2?1:t.f))}),Ar(I,v)},j=()=>{var t;I.run=!1,W(D),!h&&$.isConnected&&($.setAttribute("fill",s),null==(t=N.node.parentNode)||t.removeChild(N.node))};if(x&&T){I.run=!0,W(R);let e=null,i=!1;const n={finish(){t._live.delete(n),h?W({s:I.ls,f:e=D.f,c:I.lc}):(i=!0,j())}};t._hold(n),N.animate(_,0).during(t=>i||W({s:Fs(R.s,D.s,t),f:null!=e?e:Fs(R.f,D.f,t),c:z(t)})).after(()=>{t._live.delete(n),i||j()})}else W(D);return N.url()}}function Ar(t,e){var i;const n=(null!=(i=t.ls)?i:t.s)>=t.need-1e-9;t.lb&&t.tone!==n&&(t.tone=n,t.lb.forEach(t=>{null==t._apxFill&&(t._apxFill=t.getAttribute("fill")),t.setAttribute("fill",n?t._apxFill:e)}))}["prevHighlightParts","prevHighlightLabels"].forEach(t=>{-1===v.HELD.indexOf(t)&&v.HELD.push(t)});const Mr="apexcharts-flip-x",kr="apexcharts-flip-y",Lr="apexcharts-flip-held",Sr="apexcharts-highlight-label-exit",Cr="b:",Er={f:1,o:0},Fr={f:1,o:1},Pr={f:0,o:1};function Dr(t){if(!t)return!1;if(Array.isArray(t.highlightData))return!0;const e=t.data;if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++){const i=e[t];if(Ps(i)){if("highlight"in i)return!0}else if(null!=i)return!1}return!1}function Rr(t,e,i){return Ps(t)&&"highlight"in t?t.highlight:e?e[i]:null}function Tr(t,e){let i=1/0,n=-1/0;return String(t).replace(/([MLQCT])([^MLQCTZz]*)/g,(t,s,r)=>{const a=r.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let t=e;t<a.length;t+=2)a[t]<i&&(i=a[t]),a[t]>n&&(n=a[t]);return""}),[i,n]}function Nr(t){const e=new Map;return t.forEach((t,i)=>isFinite(null!=t?t:NaN)&&!e.has(+t)&&e.set(+t,i)),i=>{var n;return null!=(n=e.get(i))?n:function(t,e){let i=-1,n=1/0;return t.forEach((t,s)=>{null!=t&&Math.abs(t-e)<n&&(n=Math.abs(t-e),i=s)}),i}(t,i)}}function Or(t){const e=t.previousElementSibling;return e&&"rect"===e.tagName.toLowerCase()?[e,t]:[t]}function $r(t,e){return null!=e&&0!==e&&t/e>1}function Ir(t,e){const i=Ps(t)?t.y:Array.isArray(t)?t[1]:t;return"number"==typeof i?i:null!=e?e:null}function zr(t,e,i){return t?t.replace(/([MLQCT])([^MLQCTZz]*)/g,(t,i,n)=>{const s=n.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let t=0;t+1<s.length;t+=2)s[t]=e(s[t]);return`${i} ${s.join(" ")} `}):t}m.default.registerFeatures({highlightFilter:class{constructor(t,e){var i,n,s,r;this.w=t,this.ctx=e,this._targets=new Map,this._render=null,this._seen=new Set,this._cu=null,this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,this._warned=new Set,this._rows=[],this._level=null,this._live=new Set,this._sig="",this._drawnSig="",this._ride=null,this._tiles=null,this._tmDefs=[],this._tipUser=null==(n=null==(i=e.opts)?void 0:i.tooltip)?void 0:n.enabled,this._tipOn=!1,this._ind=void 0,this._lane=null,this._onRender=()=>this.afterRender(),null==(s=e.events)||s.addEventListener("mounted",this._onRender),null==(r=e.events)||r.addEventListener("updated",this._onRender)}get cfg(){return this.w.config.highlightFilter||{}}isActive(){var t;return!!(null==(t=this.w.highlightData)?void 0:t.active)}canDrawParts(){const t=this.w,e=t.config,i=e.chart.type;if(!t.globals.axisCharts)return Vs.indexOf(i)>-1||"radialBar"===i;const n=e.plotOptions.treemap.nested||{};return!(t.globals.comboCharts||"treemap"===i&&(t.globals.treemapRoots||!this._parsed&&!1!==n.enabled&&(e.series||[]).some(t=>(t&&Array.isArray(t.data)?t.data:[]).some(t=>t&&(t.children&&t.children.length||n.drilldownAsLevels&&null!=t.drilldown))))||"bar"!==i&&"line"!==i&&"area"!==i&&"treemap"!==i||t.rangeData.seriesRange.length||"histogram"===e.chart.requestedType)}callerCarriesParts(){return(this.w.config.series||[]).some(Dr)}valueAt(t,e){var i,n,s;const r=null==(s=null==(n=null==(i=this.w.highlightData)?void 0:i.parts)?void 0:n[t])?void 0:s[this.w.globals.axisCharts?e:0];return null==r?null:r}_warn(t,e){this._warned.has(t)||(this._warned.add(t),console.warn("ApexCharts highlightFilter: "+e))}parse(){var t,e,i;const n=this.w,s=n.config,r=this.cfg,a=s.series||[],o=n.seriesData.series||[];if(this._parsed=!0,!n.globals.axisCharts)return this._parseCircle();const l=!!s.chart.stacked,c=s.chart.type,h="bar"===c,d=function(t,e){const i=t.w.globals;if("treemap"!==e||!i.treemapRoots)return!1;const n=i.treemapRawSeries||[];n.some(t=>Array.isArray(null==t?void 0:t.highlightData))&&t._warn("nested","on a nested treemap put the part on each leaf as { x, y, highlight }; highlightData is ignored.");const s=(e,i)=>{const n=vr(t.w,e,i);return!!n&&("highlight"in e||n[0].some(t=>s(t,n[1])))};return n.some(t=>((null==t?void 0:t.data)||[]).some(t=>s(t,[])))&&t._warn("parent","a parent's highlight is ignored: parents add up their leaves' parts."),!0}(this,c),u=Gs(n);let p=!1;for(let e=0;e<a.length;e++)if(d?Ys({data:null==(t=a[e])?void 0:t.data}):Dr(a[e])||u&&Us(n,e)){p=!0;break}let f=d||this.canDrawParts();p&&!f&&this._unsupported();const g=(n.globals.seriesYAxisMap||[]).map((t,e)=>t&&t.length?e:-1).filter(t=>t>-1);p&&f&&l&&(g.length>1||g.some(t=>{var e;return null==(e=s.yaxis[t])?void 0:e.logarithmic}))&&(f=!1,this._warn("stack","parts are not drawn on a stacked chart with more than one y axis or a logarithmic y axis."));const m=!(!1===r.enabled||!p||!f);if(!m)return void this._inactive(f);const x=[];let _=!1,b=!1;const v=n.globals;for(let t=0;t<o.length;t++){const e=a[t]||{},i=Array.isArray(e.data)?e.data:[],s=!d&&Array.isArray(e.highlightData),r=d?null:s?e.highlightData:u?Us(n,t):null,l=v.collapsedSeriesIndices.indexOf(t)>-1||v.ancillaryCollapsedSeriesIndices.indexOf(t)>-1;r&&!l&&r.length!==i.length&&(s?_=!0:b=!0);const c=[],h=o[t]?o[t].length:0;for(let t=0;t<h;t++){const e=Rr(i[t],r,t);c.push(Es(e)?l?0:e:null)}x.push(c)}m&&_&&this._warn("length","highlightData and data differ in length; the extra entries are ignored and the missing ones read as null."),m&&b&&this._warn("plugged-length","a plugin registered highlight parts that do not line up with the series data; the extra entries are ignored and the missing ones read as null.");const w=a.some(t=>Array.isArray(null==t?void 0:t.highlightData));w&&(null==(e=s.chart.dataReducer)?void 0:e.enabled)&&this._warn("reducer","highlightData cannot follow chart.dataReducer; put the part on each point as { x, y, highlight } instead."),w&&(null==(i=s.chart.streaming)?void 0:i.enabled)&&this._warn("stream","highlightData cannot follow chart.streaming; put the part on each point as { x, y, highlight } instead.");let A=null;l&&h?A=(t,e)=>this._barKey(t,e):l&&(A=(t,e)=>String(y.stackKey(n,t,e)));const M=m&&"clamp"!==r.axis&&"treemap"!==c&&!s.plotOptions.bar.isFunnel&&!(l&&"100%"===s.chart.stackType)?this._runningExt(x,A,h):null;this._publish(x,M)}_unsupported(){const t=this.w.config.chart;this._warn("type",`parts are not drawn on this chart (type "${t.requestedType||t.type}"). Supported: column, bar, line and area (stacked too), funnel, pie, donut, polarArea, radialBar, gauge and treemap.`)}_inactive(t){t||(this._targets=new Map),this.w.highlightData={active:!1,parts:[],ext:null,capture:()=>this.capture()},this._sig="",this._rows=[]}_parseCircle(){const t=this.w,e=t.config,i=this.cfg,n=t.globals,s=(t.seriesData.series||[]).length,r=Hs(e.series);let a=r.some(t=>"highlight"in t);a&&r.length!==s&&(this._warn("points","per-point highlight values do not line up with the slices; use highlightFilter.data instead."),a=!1);let o=Array.isArray(i.data)?i.data:null;o&&o.length!==s&&(this._warn("length",`highlightFilter.data has ${o.length} values for ${s} slices; it is ignored until they match.`),o=null),o&&o.some(t=>Array.isArray(t))&&(o.some(t=>Array.isArray(t)&&1!==t.length)?(this._warn("rows","highlightFilter.data takes one value per slice (or ring); a row of several values is ignored."),o=null):o=o.map(t=>Array.isArray(t)?t[0]:t));const l=this.canDrawParts(),c=a||!!o;if(c&&!l&&this._unsupported(),!1===i.enabled||!c||!l)return void this._inactive(l);const h=[];for(let t=0;t<s;t++){const e=a?r[t]:null,i=e&&"highlight"in e?e.highlight:o?o[t]:null;h.push([Es(i)?n.collapsedSeriesIndices.indexOf(t)>-1?0:i:null])}this._publish(h,null)}_publish(t,e){const i=this.w.globals;this.w.highlightData={active:!0,parts:t,ext:e,capture:()=>this.capture()};const n=this._rows,s=[];for(let e=0;e<t.length;e++){const r=i.collapsedSeriesIndices.indexOf(e)>-1||i.ancillaryCollapsedSeriesIndices.indexOf(e)>-1;s.push(r&&e<n.length?n[e]:t[e].join(","))}this._rows=s,this._sig="#"+s.join("|")}capture(){const t=this.w.globals,e=new Map;this._targets.forEach((t,i)=>{var n,s,r,a,o,h,d;if(t.c&&!t.run)return;const u=t.n,p=!!(null==u?void 0:u.isConnected);e.set(i,c(l({},t),{d:p&&u.getAttribute("d")||t.d,a:(null==(n=t.m)?void 0:n.isConnected)&&t.m.getAttribute("d")||t.a,flip:p?u.classList.contains(kr)||u.classList.contains(Mr):t.flip,f:null!=(s=t.lf)?s:t.f,o:null!=(r=t.lo)?r:t.o,s:null!=(a=t.ls)?a:t.s,col:null!=(o=t.lc)?o:t.col,al:null!=(h=t.la)?h:t.al,k:null!=(d=t.lk)?d:t.k,n:null,m:null,g:null,lb:null}))}),t.prevHighlightParts=e,t.prevHighlightLabels=this._captureLabels(),this._targets=new Map}_prev(){return this.w.globals.prevHighlightParts}_animates(){const t=this.ctx.renderer;return(!t||!t.kind||"svg"===t.kind)&&this._animatesUpdate()&&!!this.w.globals.shouldAnimate}_animatesUpdate(){const t=this.w,e=t.config.chart.animations;return!(!(k.isBrowser()&&e.enabled&&e.dynamicAnimation.enabled&&t.globals.dataChanged)||A())}_tween(t,e,i,n,s,r){const a=this.w,o=s||function(t){var e,i;const n=t.config.chart.animations;return L(null!=(i=null==(e=n.dynamicAnimation)?void 0:e.easing)?i:n.easing)}(a),l=this._live;let c=!1;const h={finish(){c||(c=!0,l.delete(h),i(1),n&&n())}};this._hold(h);const d=performance.now()+t,u=t=>{if(c)return;if(a.globals.isDestroyed)return c=!0,void l.delete(h);const n=Math.max(0,Math.min(1,(t-d)/e));i(o(n)),n<1?M.requestAnimationFrame(u):h.finish()};i(0),r?r.animate(e,t).during(t=>c||i(t)).after(()=>h.finish()):M.requestAnimationFrame(u)}_hold(t){const e=this._live,i=this.w.globals;e.add(t),i.highlightTween={finish:()=>Array.from(e).forEach(t=>t.finish())}}bar(t,e){var i,n,s,r,a,o,c,h;const d=this.w,u=d.highlightData;if(!u)return;this._render!==t&&this._beginRender(t,Cr);const p=this._prev(),f=u.active;if(!f&&!(null==p?void 0:p.size))return;const{j:g,realIndex:m}=e,y=Cr+`${m}::${t._keys(m)[g]}`;this._seen.add(y);const x=null==p?void 0:p.get(y),_=f?null==(i=u.parts[m])?void 0:i[g]:null;if(!f&&!x)return;const b=this.cfg,v=f?null!=(n=b.fadeOpacity)?n:.2:1,w=null==(s=d.seriesData.series[m])?void 0:s[g],A=!!d.config.chart.stacked,M=f&&A?this._stackGeometry(t,e,_,w,x):null==_?null:this._barGeometry(t,e,_,w),k={paint:(i,n)=>this._paintBar(e,i,n,{key:y,prev:x,geo:M,fadeTo:v,active:f,whole:w,bar:A?t:null})};if(f){const t={};"part"===(null!=(a=null==(r=b.dataLabels)?void 0:r.value)?a:"part")&&Object.assign(t,null==_?{hide:!0}:l({val:null!=(o=null==M?void 0:M.val)?o:_},null==M?void 0:M.label)),A&&"part"===(null!=(h=null==(c=b.dataLabels)?void 0:c.total)?h:"part")&&(t.total=M.total(null!=t.val?t.val<0:w<0)),k.label=t}return k}_beginRender(t,e){var i;this._render=t,this._targets=new Map,this._seen=new Set,this._cu=new y(this.w),this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,e===Cr&&!this.w.config.chart.stacked&&(null==(i=this._prev())?void 0:i.size)&&Promise.resolve().then(()=>this._orphans())}_orphans(){const t=this.w,e=this._prev();if(!e||t.globals.isDestroyed||!this._animates())return;let i=null;e.forEach((e,n)=>{var s,r;if(this._seen.has(n)||0!==n.indexOf(Cr))return;if(!i){const e=i=new Map;null==(s=t.dom.elGraphical)||s.node.querySelectorAll(".apexcharts-bar-ghost").forEach(t=>{const i=t.getAttribute("data:ghostKey");e.has(i)||e.set(i,t)})}const a=i.get(n.slice(2));if(!a)return;if(a.setAttribute("fill-opacity",String(e.f)),!e.d)return;const o=new b(t,this.ctx).drawPath({d:e.d,stroke:"none",strokeWidth:0,fill:Rs(a.getAttribute("fill"))[0],fillOpacity:null!=(r=e.al)?r:1,classes:`${ks} apexcharts-highlight-ghost`}).node;o.setAttribute("pointer-events","none"),o.setAttribute("clip-path",a.getAttribute("clip-path")||""),a.after(o);const l=a.style.transformOrigin||"",c=/^(left|right)/.test(l),h=parseFloat(a.getAttribute("data:ghostEdge")||""),[d]=Tr(e.d,c?0:1),u=o.style;u.transformBox="fill-box",u.transformOrigin=isFinite(h)?c?h-d+"px 50%":`50% ${h-d}px`:l;const p=()=>{a.parentNode&&!t.globals.isDestroyed?(u.transform=a.style.transform,u.opacity=a.style.opacity,M.requestAnimationFrame(p)):o.remove()};p()})}_barGeometry(t,e,i,n){const s=this.w,{j:r,realIndex:a,translationsIndex:o,paths:l}=e,c=t.barHelpers,h=c.getStrokeWidth(e.i,r,a);if(t.isFunnel){const t=n?Math.min(Math.abs(i/n),1):0,e=s.layout.gridWidth/2;return{pathTo:zr(l.pathTo,i=>e+(i-e)*t),base:zr(l.pathTo,()=>e),overflow:!1}}const d=s.config.yaxis[s.globals.seriesYAxisReverseMap[a]],u=(null==d?void 0:d.logarithmic)&&!s.globals.invalidLogScale&&this._cu?Math.max(0,this._cu.getLogValAtSeriesIndex(i,a)):i;if(t.isHorizontal){const t=e.zeroW,s=c.getXForValue(u,e.zeroW),o=this._rect(c,{a:l.barYPosition,len:l.barHeight,v1:t,v2:s,strokeWidth:h,realIndex:a,j:r,dir:u>=0?1:-1,horizontal:!0});return{pathTo:o.pathTo,base:o.base,overflow:$r(i,n),label:{x:s,barWidth:Math.abs(s-t)}}}const p=e.zeroH,f=c.getYForValue(u,e.zeroH,o),g=this._rect(c,{a:l.barXPosition,len:l.barWidth,v1:p,v2:f,strokeWidth:h,realIndex:a,j:r,dir:u>=0?1:-1,horizontal:!1});return{pathTo:g.pathTo,base:g.base,overflow:$r(i,n),label:{y:f,barHeight:Math.abs(f-p)}}}_rect(t,e){const i=((Array.isArray(e.strokeWidth)?e.strokeWidth[e.realIndex]:e.strokeWidth)||0)/2,n=e.v2-e.v1;if(Math.abs(n)<2*i){const s=e.v1+n/2,r=i*e.dir*(t.barCtx.isReversed?-1:1)*(e.horizontal?-1:1);e=c(l({},e),{v1:s+r,v2:s-r})}return t.barRect(e)}_stackGeometry(t,e,i,n,s){var r,a;const o=this.w,{j:l,realIndex:c,translationsIndex:h,paths:d}=e,u=t.barHelpers,p=t.isHorizontal,f=p?e.zeroW:e.zeroH;this._br||(this._br=u.createBorderRadiusArr(((null==(r=o.highlightData)?void 0:r.parts)||[]).map(t=>t.map(t=>null!=t?t:0))),B.isSafari()&&(this._br=this._br.map(t=>t.map(()=>"none"))));const g=this._br,m=this._barKey(c,l);let y=this._stk.get(m);y||(y={p:f,n:f,raw:0,any:!1},this._stk.set(m,y));const x="100%"===o.config.chart.stackType;let _=this._stk.get("%");x&&!_&&(this._stk.set("%",_=new Map),o.seriesData.series.forEach((t,e)=>t.forEach((t,i)=>{const n=this._barKey(e,i);_.set(n,(_.get(n)||0)+(+t||0))})));const b=x&&_.get(m),v=null==i?null:x?b?100*i/b:0:i,w=null!=v?v:0,A=null!=v?v<0:null!=(null==s?void 0:s.s)?s.s<0:n<0,M=(t,e)=>p?u.getXForValue(t,e):u.getYForValue(t,e,h);let k=A?y.n:y.p,L=M(w,k);A?y.n=L:y.p=L,null!=i&&(y.raw+=i,y.any=!0);const S=y.raw,C=y.any,E={p:y.p,n:y.n};let F=!1;if(x){const t=M(100,f),e=M(-100,f),i=Math.min(t,e),n=Math.max(t,e),s=t=>Math.min(n,Math.max(i,t));F=s(L)!==L,k=s(k),L=s(L),E.p=s(E.p),E.n=s(E.n)}const P=u.arrBorderRadius;let D;u.arrBorderRadius=g;try{D=this._rect(u,{a:p?d.barYPosition:d.barXPosition,len:p?o.globals.barHeight:o.globals.barWidth,v1:k,v2:L,strokeWidth:p?u.getStrokeWidth(e.i,l,c):t.strokeWidth,realIndex:c,j:l,dir:A?-1:1,horizontal:p})}finally{u.arrBorderRadius=P}return{pathTo:null==i?null:D.pathTo,square:D.squarePathTo,base:D.base,flip:null!=i&&t.cornerFlip(null==(a=g[c])?void 0:a[l],w),s:A?-1:1,overflow:F,val:v,label:p?{x:L,barWidth:Math.abs(L-k),keep:0===v}:{y:L,barHeight:Math.abs(L-k),keep:0===v},total:t=>!!C&&{val:S,edge:t?E.n:E.p}}}_barKey(t,e){const i=this.w;return i.labelData.seriesGroupIndex[t]+"|"+y.stackKey(i,t,e)}line(t,e,i,n,s,r,a){var o,h,d;const u=this.w,p=u.highlightData;if(!p||"line"!==e&&"area"!==e)return;this._render!==t&&this._beginRender(t,"l:");const f=this._prev(),g=p.active;if(!g&&!(null==f?void 0:f.size))return;const m="l:"+s,y=null==f?void 0:f.get(m);if(!g&&!y)return;const x=u.globals,_=this._animates(),b="area"===e,v=g&&p.parts[s]||[],w=v.some(t=>null!=t),A=g&&t._shapeOnly,M=(t,e)=>t&&(t._cmd?t._cmd[e]:t.node.getAttribute(e)),k=t.marks||[],S=b?k.find(t=>"none"!==M(t,"fill")):null,C=k.find(t=>t!==S),[E,F]=S&&u.config.chart.stacked?Rs(M(S,"fill")):[S&&M(S,"fill"),1],P=k.concat(b?k.filter(t=>t!==S&&!t._cmd).map(t=>t.node.nextElementSibling).filter(t=>/#forecastMask/.test((null==t?void 0:t.getAttribute("clip-path"))||"")).map(t=>({node:t})):[]),D=g&&!A&&(w||u.config.chart.stacked)?this._lineBuild(t,e,i,n,s,r,this._partRow(v,n,s,null==(o=t.percentRows)?void 0:o[s])):null;let R=A?{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")}:w?{d:D.linePaths.join(" "),a:D.areaPaths.join(" "),num:D.numericXY}:null;const T=!R&&!!(null==y?void 0:y.d)&&_,N=g&&_&&(T||R&&!(null==y?void 0:y.d)&&(y||"baseline"===this.cfg.enter))?this._lineBase(t,e,i,n,s,r,w?v:null):null;D&&u.config.chart.stacked&&(this._swap(t,()=>t._recordStackTops(s,D.yArrj,D.S[n])),this._stkPrev.push(D.yArrj)),T&&(R=g?N:{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")});const O=T&&!g;let $=R;const I={};let z=null,B=!1;if(R&&_)if(null==y?void 0:y.d){if($={d:y.d,a:y.a||R.a},!T)if(z=function(t,e,i,n){var s;const r=t.globals,a=r.prevStreamFrame;if(!a||!r.dataChanged||!(null==(s=t.axisFlags)?void 0:s.isXNumeric))return null;const o=a.seriesX[e],l=a.seriesY[e],c=t.seriesData.seriesX[e],h=t.seriesData.series[e];if(!(o&&l&&c&&h))return null;if(o.length<3||c.length<3)return null;let d=-1;for(let t=0;t<o.length;t++)if(o[t]===c[0]){d=t;break}if(-1===d)return null;const u=Math.min(o.length-d,c.length);if(u<2)return null;const p=c.length-u;if(0===d&&0===p)return null;for(let t=0;t<u;t++){if(o[d+t]!==c[t])return null;const e=l[d+t],i=h[t];if(e!==i&&(null!=e||null!=i))return null}const f=a.xPixels[e],g=a.yPixels[e];if(!f||!g)return null;let m=-1,y=-1;for(let t=0;t<u;t++)null!=f[d+t]&&null!=g[d+t]&&null!=i[t]&&null!=n[t]&&(-1===m&&(m=t),y=t);if(-1===m||y<=m)return null;const x=i[m],_=i[y],b=f[d+m],v=f[d+y];if(Math.abs(_-x)<1e-6)return null;const w=(v-b)/(_-x),A=b-w*x;if(!isFinite(w)||!isFinite(A))return null;if(Math.abs(w-1)>.02)return null;if(Math.abs(A)<.5)return null;let M=m,k=m;for(let t=m;t<=y;t++){const e=n[t];null!=e&&null!=g[d+t]&&(e<n[M]&&(M=t),e>n[k]&&(k=t))}let L=1,S=0;const C=n[M],E=n[k];if(Math.abs(E-C)>1e-6?(L=(g[d+k]-g[d+M])/(E-C),S=g[d+M]-L*C):S=g[d+M]-C,!isFinite(L)||!isFinite(S)||L<.2||L>5)return null;const F=Math.floor((m+y)/2);if(F!==m&&F!==y&&null!=i[F]&&null!=f[d+F]){const t=w*i[F]+A;if(Math.abs(t-f[d+F])>1.5)return null;if(null!=n[F]&&null!=g[d+F]){const t=L*n[F]+S;if(Math.abs(t-g[d+F])>1.5)return null}}return r.streamScrolled=!0,{ax:w,bx:A,ay:L,by:S}}(u,s,a.xArrj,a.yArrj),z)$={d:Ms(R.d,z),a:Ms(R.a,z)};else{const t=D||a,i=W(u,{type:e,realIndex:s,pathFromLine:y.d,pathFromArea:y.a||"",linePaths:t.linePaths,areaPaths:t.areaPaths});(null==i?void 0:i.line)&&([$.d,I.d]=[i.line.from,i.line.toInterp]),(null==i?void 0:i.area)&&([$.a,I.a]=[i.area.from,i.area.toInterp])}}else N?$=N:(B=!0,$={d:(null==C?void 0:C.node.getAttribute("pathFrom"))||R.d,a:(null==S?void 0:S.node.getAttribute("pathFrom"))||R.a});let j=null,H=null,Y=null;if(R){const i=this._partGroup(t.elSeries,"apexcharts-line-highlight"),r=R.num,a={i:n,j:"h",realIndex:s,delay:n,speed:u.config.chart.animations.dynamicAnimation.speed,cls:`apexcharts-${e} apexcharts-line-highlight-part`,chartType:e,clip:`url(#gridRectMask${x.cuid})`,scroll:!!z};if(S&&(j=this._emitPart(i,c(l({},a),{from:$.a,to:R.a,interp:I.a,paint:E,num:r&&{xs:r.xs,ys:r.ys,closeY:r.areaCloseY}}))),C){const e=c(l({},a),{from:$.d,to:R.d,interp:I.d,paint:"none",stroke:M(C,"stroke"),width:t.strokeWidth,num:r&&{xs:r.xs,ys:r.ys}});H=this._emitPart(i,e),null==H||H.attr("fill-rule","evenodd");const n=!C._cmd&&C.node.getAttribute("clip-path");if(H&&n&&n.indexOf("nonForecast")>-1){const t=u.config.forecastDataPoints;H.attr("clip-path",n),Y=this._emitPart(i,c(l({},e),{j:"hf",clip:`url(#forecastMask${x.cuid})`})),null==Y||Y.attr({"fill-rule":"evenodd","stroke-dasharray":t.dashArray,"stroke-width":t.strokeWidth||void 0})}}const o=this.ctx.renderer;o&&o.kind&&"svg"!==o.kind||!u.config.chart.animations.enabled||x.resized||x.dataChanged||[H,b&&C].forEach(t=>{const e=t&&t.node.getAttribute("stroke-dasharray");!t||e&&"0"!==e||t.node.setAttribute("stroke-dasharray","none")})}const q={d:null,a:null,f:1,o:g?1:0,n:T?null==H?void 0:H.node:null,m:T?null==j?void 0:j.node:null,c:!g};this._targets.set(m,q);const X=B?F:(null==y?void 0:y.d)&&null!=(h=y.al)?h:1,G=O?F:1;q.al=G,this._fadeLine(e,P,B?Pr:y?{f:y.f,o:null!=(d=y.o)?d:0}:Er,O?Pr:g?Fr:Er,{width:t.strokeWidth,also:j&&(X<1||G<1)?t=>{const e=Fs(X,G,t);q.la=e,j.node.setAttribute("fill-opacity",String(e))}:void 0,force:!!j&&X!==G,land:O?Er:void 0,done:T?()=>{null==H||H.remove(),null==Y||Y.remove(),null==j||j.remove()}:void 0,rec:q,ease:z?L("linear"):void 0}),R&&!T&&Object.assign(q,{d:R.d,a:R.a,n:null==H?void 0:H.node,m:null==j?void 0:j.node}),this._lineLabels(t,e,n,s,v,D,a)}_partRow(t,e,i,n){const s=this.w,r=this._cu,a=s.config.yaxis[s.globals.seriesYAxisReverseMap[i]],o=s.seriesData.series[i]||[],l=n?t.map((t,e)=>null==t?t:o[e]?t*n[e]/o[e]:0):(null==a?void 0:a.logarithmic)&&!s.globals.invalidLogScale?t.map(t=>r.getLogValAtSeriesIndex(t,i)):t.slice(),c=s.config.fill.type,h=l.length-1;return"gradient"!==c&&"gradient"!==c[e]||null==l[h]||!l.every(t=>t===l[0])||(l[h]+=1e-6),l}_lineBuild(t,e,i,n,s,r,a){const o=this.w.globals.pointsArray,l=o[s],c=l?l.length:0,h=[t._shapeOnly,t.appendPathFrom],d=i.slice();d[n]=a,t._shapeOnly=!0;try{const i=this._swap(t,()=>t._buildSeriesPaths(e,d,n,s,r));return i.S=d,i}finally{[t._shapeOnly,t.appendPathFrom]=h,l?l.length=c:delete o[s]}}_swap(t,e){if(!this.w.config.chart.stacked)return e();const i=[t.prevSeriesYByX,t.prevSeriesY];t.prevSeriesYByX=this._stk,t.prevSeriesY=this._stkPrev;try{return e()}finally{[t.prevSeriesYByX,t.prevSeriesY]=i}}_lineBase(t,e,i,n,s,r,a){const o=(a||i[n]).map(t=>null==t?null:0),l=this._lineBuild(t,e,i,n,s,r,o);return{d:l.linePaths.join(" "),a:l.areaPaths.join(" "),num:l.numericXY}}_fadeLine(t,e,i,n,s){var r,a,o,l,c,h,d;const u=this.cfg,p=null!=(r=u.fadeOpacity)?r:.2,f=null!=(o=null==(a=u.outline)?void 0:a.width)?o:1,g=null!=(c=null==(l=u.outline)?void 0:l.opacity)?c:1,m=null!=(d=null==(h=u.line)?void 0:h.dashArray)?d:4,y=s.rec,x=["fill-opacity","stroke-opacity","stroke-width","stroke-dasharray"],_=e.map(e=>{var i;const n=e.node,s=x.map(t=>n.getAttribute(t)),r=parseFloat(null!=(i=s[0])?i:"1");return{node:n,own:s,k:isFinite(r)?r:1,fill:"area"===t&&"none"!==(e._cmd?e._cmd.fill:n.getAttribute("fill"))}}),b=(e,i)=>{y.lf=e,y.lo=i,_.forEach(({node:n,own:r,k:a,fill:o})=>{e>=1&&i<=0?x.forEach((t,e)=>null==r[e]?n.removeAttribute(t):n.setAttribute(t,r[e])):o?n.setAttribute("fill-opacity",String(a*e*Fs(1,p,i))):"area"===t?(n.setAttribute("stroke-opacity",String(e*Fs(1,g,i))),n.setAttribute("stroke-width",String(Fs(s.width,f,i)))):(n.setAttribute("stroke-opacity",String(e)),n.setAttribute("stroke-dasharray",i<1?`${m} ${m*i}`:String(m)))})},v=t=>{b(Fs(i.f,n.f,t),Fs(i.o,n.o,t)),s.also&&s.also(t)},w=()=>{y.run=!1,s.land&&b(s.land.f,s.land.o),s.done&&s.done()};this._animates()&&(i.f!==n.f||i.o!==n.o||s.done||s.force)?(y.run=!0,this._tween(0,this.w.config.chart.animations.dynamicAnimation.speed,v,w,s.ease)):(v(1),w())}_lineLabels(t,e,i,n,s,r,a){var o,l,c,h;const d=this.w,u=d.globals,p=t.elDataLabelsWrap;if(!d.config.dataLabels.enabled||!(null==p?void 0:p.node)||t._shapeOnly)return;const f=(null==(o=d.highlightData)?void 0:o.active)&&"part"===(null!=(c=null==(l=this.cfg.dataLabels)?void 0:l.value)?c:"part");if(f){const a=p.node;for(;a.firstChild;)a.removeChild(a.firstChild);const o=u.dataLabelsRects;if(o[n]=[],u.lastDrawnDataLabelsIndexes[n]=[],r&&s.some(t=>null!=t)){const a=new vs(d,this.ctx);for(let l=0;l<r.xArrj.length-1;l++){const c=t.lineHelpers.calculatePoints({series:r.S,x:r.xArrj[l+1],y:r.yArrj[l+1],realIndex:n,i:i,j:l,prevY:r.yArrj[0]});c.x.forEach((t,i)=>{if(null==s[l?l+1:i])return void o[n].push({x:NaN,y:NaN,width:0,height:0});const r=a.drawDataLabel({type:e,pos:{x:l?[t]:i?[NaN,t]:[t,NaN],y:c.y},i:n,j:l?l+1:1,row:s});r&&p.add(r)})}}}const g=f?null==r?void 0:r.xArrj:a.xArrj,m=f?null==r?void 0:r.yArrj:a.yArrj;if(!this._animates()||!g||z(d,n))return;const y=u.riseLabels;if(null==y?void 0:y.has(n)){const t=new Map(y);t.delete(n),u.riseLabels=t.size?t:null}const x=u.prevStreamFrame,_=null==(h=u.prevHighlightLabels)?void 0:h.get(n);Promise.resolve().then(()=>{var t,e;return this._rideLabels(p.node,g,m,_,[null==(t=null==x?void 0:x.xPixels)?void 0:t[n],null==(e=null==x?void 0:x.yPixels)?void 0:e[n]])})}_captureLabels(){const t=this.w,e=t.config.chart.type,i=t.dom.baseEl,n=Vs.indexOf(e)>-1;if(!t.config.dataLabels.enabled||"line"!==e&&"area"!==e&&!n||!i||!k.isBrowser())return null;const s=new Map;if(n){const t=new Map;return i.querySelectorAll(".apexcharts-pie-label").forEach(e=>{const[i,n]=Ns(e);t.set(Number(e.parentNode.getAttribute("data:slice")),{x:i,y:n})}),s.set(-1,t),s}return i.querySelectorAll(".apexcharts-datalabels[data\\:realIndex]").forEach(e=>{const i=Number(e.getAttribute("data:realIndex")),n=Nr(t.globals.seriesXvalues[i]||[]),r=new Map;e.querySelectorAll(`text.apexcharts-datalabel, text.${Sr}`).forEach(t=>{var e;const i=n(parseFloat(t.getAttribute("cx")));if(i<0)return;const[s,a]=Ns(t);r.set(i,{x:s,y:a,o:parseFloat(null!=(e=t.getAttribute("opacity"))?e:"1"),els:Or(t)})}),s.set(i,r)}),s}_rideLabels(t,e,i,n,s){const r=this.w;if(r.globals.isDestroyed||!t.isConnected)return;const[a,o]=s,l=[],c=new Set,h=t=>"number"==typeof t&&isFinite(t),d=Nr(e);if(t.querySelectorAll("text.apexcharts-datalabel").forEach(t=>{const s=d(parseFloat(t.getAttribute("cx")));if(s<0)return;const[r,u]=Ns(t),p=null==n?void 0:n.get(s);let f=0,g=0,m=0;p?(c.add(s),f=p.x-r,g=p.y-u,m=p.o):!(null==n?void 0:n.size)&&[null==a?void 0:a[s],null==o?void 0:o[s],e[s],i[s]].every(h)&&(f=a[s]-e[s],g=o[s]-i[s]),(m<1||Math.abs(f)>.01||Math.abs(g)>.01)&&l.push({els:Or(t),dx:f,dy:g,o:m,to:1})}),null==n||n.forEach((e,i)=>{if(c.has(i))return;const n=e.els.map(e=>{const i=e.cloneNode(!0);return i.setAttribute("class",Sr),i.setAttribute("pointer-events","none"),i.removeAttribute("transform"),t.appendChild(i),i}),[s,r]=Ns(n[n.length-1]);l.push({els:n,dx:e.x-s,dy:e.y-r,o:e.o,to:0,out:!0})}),!l.length)return;l.forEach(t=>{t.bases=t.els.map(t=>t.getAttribute("transform")||""),t.ops=t.els.map(e=>{var i;return parseFloat(null!=(i=e.getAttribute("opacity"))?i:"1")/(t.out&&t.o>0?t.o:1)})});this._tween(0,r.config.chart.animations.dynamicAnimation.speed,t=>l.forEach(({els:e,dx:i,dy:n,o:s,to:r,out:a,bases:o,ops:l})=>e.forEach((e,c)=>{const h=o[c],d=a?1:1-t;d?e.setAttribute("transform",`translate(${i*d} ${n*d}) ${h}`.trim()):h?e.setAttribute("transform",h):e.removeAttribute("transform");const u=Fs(s,r,t),p=l[c];u>=1&&p>=1?e.removeAttribute("opacity"):e.setAttribute("opacity",String(p*u))})),()=>l.forEach(t=>t.out&&t.els.forEach(t=>t.remove())))}_paintBar(t,e,i,n){var s,r,a,o,l,c,h,d,u,p;const f=this.w,g=this.cfg,m=this._animates(),{key:y,prev:x,geo:_,fadeTo:v,active:w,bar:A}=n,M=i.elSeries;let k=(null==_?void 0:_.pathTo)||null;const L=!k&&!!(null==x?void 0:x.d)&&m;L&&(k=this._exitTo(x,w,i.pathTo,null==_?void 0:_.base));const S=k&&!L?this._from(x,null==_?void 0:_.base,i.pathFrom,!!A):null;let C=S?S.d:(null==x?void 0:x.d)||null;const E=L&&!w;let F="apexcharts-bar-highlight-part",P=!1,D=null;if(A&&k){if(C&&C!==k){const t=A._pathToInterp;A._pathToInterp=null;const e=A.cornerMorph(C,k,L?void 0:_.square);e!==k&&(C=e,D=A._pathToInterp),A._pathToInterp=t}const t=A.isHorizontal?Mr:kr,i=e.node.classList.contains(t);P=L?w?!!x.flip:i:_.flip;const n=(null==x?void 0:x.d)?!!x.flip:!!(null==S?void 0:S.cover)&&i;(P||m&&n)&&(F+=" "+t),!P&&m&&n&&(F+=" "+Lr,this._settleHeld(A))}const R="string"==typeof i.fill&&"none"!==i.fill&&i.fill.indexOf("url")<0?i.fill:f.globals.colors[f.config.plotOptions.bar.distributed?t.j:t.realIndex],[T,N]=Rs(i.fill&&"none"!==i.fill?i.fill:R),O=t.j>0&&i.elBarShadows?i.elBarShadows.node.lastElementChild:null,$=x?x.f:1,I=this._partGroup(M,"apexcharts-bar-highlight"),z=k?this._emitPart(I,{i:t.i,j:t.j,realIndex:t.realIndex,from:C||k,to:k,interp:D,paint:T,delay:i.delay,speed:i.speed,cls:F,chartType:"bar",clip:`url(#gridRectBarMask${f.globals.cuid})`}):null,W=Ds(e.node),B=(null==S?void 0:S.cover)&&m?N:(null==x?void 0:x.d)&&null!=(s=x.al)?s:1,j=E?N:1,H=null!=(a=null==(r=g.outline)?void 0:r.width)?a:1,Y=n.whole||(null==x?void 0:x.o)?H:0,q=e.node,X=q.getAttribute("stroke"),G=(null==S?void 0:S.cover)&&m?1:(null==x?void 0:x.d)&&null!=(o=x.k)?o:0,U=E?1:0,K=!!z&&(Y>0||!(H>0)&&!!n.whole)&&(G>0||U>0)&&parseFloat(q.getAttribute("stroke-width"))>0&&!!X&&"none"!==X&&"transparent"!==X,V=Ds(q,"stroke-opacity"),Z={};K&&(["stroke","stroke-width","stroke-opacity","stroke-dasharray"].forEach(t=>{var e;Z[t]=z.node.getAttribute(t),z.node.setAttribute(t,null!=(e=q.getAttribute(t))?e:"")}),q.hasAttribute("stroke-dasharray")||z.node.removeAttribute("stroke-dasharray"));const J={d:null,f:v,base:null!=(l=null==_?void 0:_.base)?l:null==x?void 0:x.base,edge:!1,s:null!=(c=null==_?void 0:_.s)?c:null==x?void 0:x.s,n:L?null==z?void 0:z.node:null,c:!w,al:j,k:K?U:0};this._targets.set(y,J);const Q=E?Ss:Cs(v);if(this._fade(e.node,(null==S?void 0:S.cover)&&m?Ss:x?{f:x.f,o:null!=(h=x.o)?h:Cs(x.f).o}:Ls,n.whole?Q:{f:Q.f,o:0},i,{outline:Y>0?{color:R,width:Y,opacity:null!=(u=null==(d=g.outline)?void 0:d.opacity)?u:1}:null,stroke:!(H>0),also:t=>{null==O||O.setAttribute("fill-opacity",String(Fs($,v,t))),(t=>{const e=Fs(B,j,t);if(J.la=e,z&&(W<1||B<1||j<1)&&z.node.setAttribute("fill-opacity",String(W*e)),!K)return;const i=Fs(G,U,t);J.lk=i,i>0||t<1?(z.node.setAttribute("stroke-opacity",String(V*i)),Y>0&&!(J.lo>0)&&i>0&&q.setAttribute("stroke-opacity","0")):z.attr(Z)})(t)},force:!!z&&(B!==j||K),land:E?Ls:void 0,done:L?()=>null==z?void 0:z.remove():void 0,rec:J}),!z||!k||L)return;if((null==_?void 0:_.overflow)&&z.node.classList.add("apexcharts-highlight-overflow"),(null==_?void 0:_.overflow)&&!A){const t=new b(f,this.ctx).drawPath({d:i.pathTo,stroke:"#fff",strokeWidth:1,fill:"none",strokeDashArray:3,classes:`${ks} apexcharts-highlight-edge`});t.attr("clip-path",`url(#gridRectBarMask${f.globals.cuid})`),t.node.setAttribute("pointer-events","none"),I.add(t);const e=e=>t.node.setAttribute("stroke-opacity",String(.75*e));m&&!(null==x?void 0:x.edge)?this._tween(i.delayMs,i.speed,e):e(1)}const tt=null==(p=this.ctx.renderer)?void 0:p.kind;tt&&"svg"!==tt||f.config.plotOptions.bar.isFunnel||this._hitProxy(I,k,i.pathTo,e.node,!!f.globals.isBarHorizontal),i.labels&&this._contrastLabels(i.labels,k),Object.assign(J,{d:k,base:null==_?void 0:_.base,edge:!!(null==_?void 0:_.overflow)&&!A,s:null==_?void 0:_.s,flip:P,n:z.node})}_hitProxy(t,e,i,n,s){const r=s?0:1,[a,o]=Tr(e,r),[l,c]=Tr(i,r),[h,d]=Tr(e,r?0:1);if(!(o-a>.5&&d-h>.5))return;const u=[];c-l>.5?(a<l&&u.push([a,Math.min(o,l)]),o>c&&u.push([Math.max(a,c),o])):u.push([a,o]);const p=new b(this.w,this.ctx);for(const[e,i]of u){if(i-e<.5)continue;const r=p.drawPath({d:s?`M ${e} ${h} L ${i} ${h} L ${i} ${d} L ${e} ${d} Z`:`M ${h} ${e} L ${d} ${e} L ${d} ${i} L ${h} ${i} Z`,stroke:"none",strokeWidth:0,fill:"none",classes:"apexcharts-highlight-hit"}).node;r.setAttribute("pointer-events","all"),r.setAttribute("clip-path",`url(#gridRectBarMask${this.w.globals.cuid})`),$s(n,r),t.add(r)}}_settleHeld(t){if(this._held)return;this._held=!0;const e=this.w;Promise.resolve().then(()=>{var i;e.globals.isDestroyed||(null==(i=e.dom.baseEl)?void 0:i.querySelector(`.apexcharts-series > .${Lr}`))||t.settleHeldMirrors()})}_from(t,e,i,n){var s;return(null==t?void 0:t.d)?{d:t.d,cover:!1}:e&&(t||"baseline"===this.cfg.enter||n&&(!this.w.globals.dataChanged||(null==(s=this._prev())?void 0:s.size)))?{d:e,cover:!1}:i?{d:i,cover:!0}:null}_exitTo(t,e,i,n){return e?n||t.base||t.d:i}_partGroup(t,e){let i=t.node._apxHighlight;return i&&i.node.parentNode===t.node||(i=new b(this.w,this.ctx).group({class:e}),t.node._apxHighlight=i),t.add(i),i}_emitPart(t,e){const i=this.w,n=function(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}(this.ctx,new b(i,this.ctx)).renderPaths({i:e.i,j:e.j,realIndex:e.realIndex,pathFrom:e.from,pathTo:e.to,pathToInterp:e.interp||void 0,pathToNumeric:e.num,scrollMorph:!!e.scroll,stroke:e.stroke||"none",strokeWidth:e.width||0,fill:e.paint,animationDelay:e.delay,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:e.speed,className:`${ks} ${e.cls}`,chartType:e.chartType,bindEventsOnPaths:!1});return n&&n.node?(n.attr("clip-path",e.clip),n.node.setAttribute("pointer-events","none"),n.node.setAttribute("index",String(e.realIndex)),n.node.setAttribute("j",String(e.j)),t.add(n),n):null}_fade(t,e,i,n,s){var r;const a=s.attr||"fill-opacity",o=Ds(t,a),l=s.outline,c=s.rec||{},h=!l&&!!s.stroke&&"stroke-opacity"!==a,d=h?Ds(t,"stroke-opacity"):1,u=h?t.getAttribute("stroke-opacity"):null,p=l&&null==l.width?["stroke","stroke-opacity"]:["stroke","stroke-width","stroke-opacity"],f=p.map(e=>t.getAttribute(e)),g=(e,i)=>{if(c.lf=e,c.lo=l?i:0,t.setAttribute(a,String(o*e)),l)i<=0?p.forEach((e,i)=>null==f[i]?t.removeAttribute(e):t.setAttribute(e,f[i])):(t.setAttribute("stroke",l.color),null!=l.width&&t.setAttribute("stroke-width",String(l.width)),t.setAttribute("stroke-opacity",String(l.opacity*Math.min(1,i))));else{if(!h)return;e<1?t.setAttribute("stroke-opacity",String(d*e)):null==u?t.removeAttribute("stroke-opacity"):t.setAttribute("stroke-opacity",u)}},m=t=>{g(Fs(e.f,i.f,t),Fs(e.o,i.o,t)),s.also&&s.also(t)},y=()=>{c.run=!1,s.land&&g(s.land.f,s.land.o),s.done&&s.done()};(null!=(r=s.anim)?r:this._animates())&&(e.f!==i.f||e.o!==i.o||s.done||s.force)?(c.run=!0,this._tween(n.delayMs,n.speed,m,y,s.curve,n.el)):(m(1),y())}_runningExt(t,e,i){if(!e)return t;const n=new Map;return t.map((t,s)=>t.map((t,r)=>{if(null==t)return null;const a=e(s,r)+(i&&t<0?"-":"+"),o=(n.get(a)||0)+t;return n.set(a,o),o}))}_contrastLabels(t,e){const i=this.w,n=t.node;if(!n||/rotate\((?!0\))/.test(n.getAttribute("transform")||""))return;const[s,r]=Tr(e,0),[a,o]=Tr(e,1),l=new b(i);n.querySelectorAll("text").forEach(t=>{const e=(t.getAttribute("fill")||"").toLowerCase();if("#fff"!==e&&"#ffffff"!==e&&"white"!==e)return;const n=l.getTextRects(t.textContent,t.getAttribute("font-size"),t.getAttribute("font-family"),void 0,!0,t.getAttribute("font-weight")),c=parseFloat(t.getAttribute("x")),h=parseFloat(t.getAttribute("y")),d=t.getAttribute("text-anchor"),u="middle"===d?c-n.width/2:"end"===d?c-n.width:c;u>=s-1&&u+n.width<=r+1&&h-.75*n.height>=a-1&&h+.25*n.height<=o+1||t.setAttribute("fill",i.config.chart.foreColor)})}tooltipRow(t,e,i,n){var s,r,a,o,h,d,u,p,f,g,m;const y=this.w,x=this.cfg,_=x.tooltip||{},b=y.globals.axisCharts,v=this.isActive()&&!1!==_.show&&(null!=i||!b)&&!!t.yValue,w=b||"lanes"!==this._ind||"radialBar"!==y.config.chart.type?void 0:(null==(s=this._lane)?void 0:s[0])===e?this._lane[1]:"part";if(t.marker&&function(t,e,i=.2,n){const s=t.style,r=t.firstElementChild;if(!e){if(!t._apxHl)return;return t._apxHl=!1,s.background=s.boxShadow=s.borderRadius="",void(r&&(r.style.display=""))}t._apxHl=!0;const a="#"===e.charAt(0)?B.hexToRgba(e,i):`color-mix(in srgb, ${e} ${100*i}%, transparent)`;s.background="part"===n?e:n?a:`linear-gradient(90deg, ${e} 50%, ${a} 50%)`,s.boxShadow=`inset 0 0 0 1px ${e}`,s.borderRadius="3px",r&&(r.style.display="none")}(t.marker,v&&!y.config.tooltip.fillSeriesColor?(null==(a=null==(r=this._tiles)?void 0:r.get(e+"|"+i))?void 0:a.base)||y.globals.colors[e]:null,w?null!=(d=null==(h=null==(o=x.radialBar)?void 0:o.lanes)?void 0:h.opacity)?d:rr:x.fadeOpacity,w),!v)return;const A=this.valueAt(e,i),M=y.seriesData.series,k=b?null==(u=M[e])?void 0:u[i]:M[e],L=b?{series:M,seriesIndex:e,dataPointIndex:i,w:y}:c(l({},y),{w:y,series:M,seriesIndex:e,dataPointIndex:e,highlight:Ts(A,k),lane:w});if("function"==typeof _.formatter)return void(t.yValue.innerHTML=String(null!=(p=_.formatter(A,null!=k?k:null,L))?p:""));const S='<span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">';if("whole"===w){if(null!=A){const e=null!=(m=null==(g=null==(f=y.globals.locale)?void 0:f.highlightFilter)?void 0:g.part)?m:"part";t.yValue.innerHTML+=` ${S}(${e} ${n.yLbFormatter(A,L)})</span>`}return}let C=t.yValue.innerHTML;null!=A&&(C=`/ ${C}`,_.share&&k&&(C+=` \xb7 ${Math.round(A/k*100)}%`)),t.yValue.innerHTML=(null==A?"":`${n.yLbFormatter(A,L)} `)+`${S}${C}</span>`}drillView(t){Array.isArray(null==t?void 0:t.series)&&(t.series=t.series.map(js),this._level={series:t.series,base:this.w.globals._initialSeriesPeek}),t&&null!=this.cfg.data&&(t.highlightFilter=c(l({},t.highlightFilter),{data:null}))}_drilled(){var t;const e=this._level;return!!(e&&((null==(t=this.ctx.drilldown)?void 0:t.depth)||0)>0&&this.w.globals._initialSeriesPeek===e.base)}_fire(t){var e;const i=null==(e=this.w.config.chart.events)?void 0:e.highlightFilterChanged;"function"==typeof i&&i(this.ctx,{active:"clear"!==t,phase:t})}pie(t){"radialBar"===t.chartType?or(this,t):Zs(this,t)}treemap(t){return wr(this,t)}afterRender(){this._tipOn&&(this._tipOn=!1,this.w.config.tooltip.enabled=!1);const t=this._ride;this._ride=null;const e=this.w.globals.circleTween;!t||e&&!e.done||t();const i=this._drawnSig,n=this._sig;i!==n&&(this._drawnSig=n,this._fire(i?n?"update":"clear":"enter"))}set(t,e={}){var i;const n=this.w,s=n.globals;if(!s.axisCharts)return this._setCircle(t,e);const r=e.series||this._rawSeries();if("treemap"===n.config.chart.type&&s.treemapRoots)return this._apply(function(t,e,i){const n=t.w;return e.map((t,e)=>{const s=js(t),r=Array.isArray(null==i?void 0:i[e])?i[e]:null;if("function"!=typeof i&&!r)return s;let a=0;const o=(s,c)=>{var h,d,u;const p=vr(n,s,c);if(p){const t=p[0].map(t=>o(js(t),p[1])),e=l({},s),i=p[0];return p[1]===c?e.children=t:Object.defineProperty(e,"children",{get:()=>{var e;return yr(n)&&(null==(e=Jt(n,s.drilldown))?void 0:e.data)===i?t:void 0}}),e}const f=a++,g=Ps(s)?l({},s):{x:"",y:s};return c.includes(g.drilldown)&&delete g.drilldown,g.highlight="function"==typeof i?i({seriesIndex:e,dataPointIndex:f,seriesName:t.name,x:null!=(h=g.x)?h:g.name,value:"number"==typeof(null!=(d=g.y)?d:g.value)?null!=(u=g.y)?u:g.value:null,datum:s,w:n}):null==r?void 0:r[f],g};return Array.isArray(s.data)&&(s.data=s.data.map(t=>o(t,[]))),s})}(this,r,t),e);const a=!e.series&&!!s.dataReducerRawSeries&&!!(null==(i=n.config.chart.dataReducer)?void 0:i.enabled),o=r.map((i,s)=>{const r=Array.isArray(i.data)?i.data:[],o="function"==typeof t?r.map((r,o)=>{var l;return t({seriesIndex:s,dataPointIndex:o,seriesName:i.name,x:Ps(r)?r.x:Array.isArray(r)?r[0]:n.labelData.labels[o],value:Ir(r,e.series||a?null:null==(l=n.seriesData.series[s])?void 0:l[o]),datum:r,w:n})}):Array.isArray(null==t?void 0:t[s])?t[s]:null,h=js(i);return o&&(a&&h.data.every(t=>"number"!=typeof t)?h.data=h.data.map((t,e)=>null==t?t:Array.isArray(t)?{x:t[0],y:t[1],highlight:o[e]}:c(l({},t),{highlight:o[e]})):h.highlightData=o),h});return this._apply(o,e)}clear(t={}){return this.w.globals.axisCharts?this._apply(this._rawSeries().map(js),t):this._setCircle(null,t)}_setCircle(t,e){const i=this.w,n=e.series||this._rawSeries(),s={};if((e.series||n.some(Ys))&&(s.series=n.map(js)),"function"==typeof t){const s=Hs(n),r=e.series?[]:i.seriesData.series,a=i.seriesData.seriesNames,o=s.length||n.length,l=[];for(let e=0;e<o;e++){const o=s.length?s[e]:n[e];l.push(t({seriesIndex:e,dataPointIndex:e,seriesName:s.length?String(o.x):a[e],x:s.length?o.x:a[e],value:Ir(o,r[e]),datum:o,w:i}))}t=l}return s.highlightFilter={data:Array.isArray(t)?t:null},this.ctx.updateOptions(s,!1,!1!==e.animate,!0,!this._drilled())}_apply(t,e){const i=this._drilled();return i&&this._level&&(this._level.series=t.map(js)),this.ctx._replaceSeries(t,!1!==e.animate,!i,{keepView:!0})}_rawSeries(){var t;const e=this.w.globals;return(this._drilled()&&(null==(t=this._level)?void 0:t.series)||e.treemapRawSeries||e._initialSeriesPeek||this.w.config.series).map(t=>Ps(t)?l({},t):t)}teardown(){var t,e;Array.from(this._live).forEach(t=>t.finish()),this._live.clear(),this._targets=new Map,this._render=null,this._cu=null,this._level=null,this._tiles=null,this._tmDefs=[],null==(t=this.ctx.events)||t.removeEventListener("mounted",this._onRender),null==(e=this.ctx.events)||e.removeEventListener("updated",this._onRender)}}});m.default.registerFeatures({radialTargets:class{constructor(t,e){this.w=t,this.ctx=e,this.angles=new Map}stop(){const t=this.w.globals;null!=t.radialTargetRAF&&(M.cancelAnimationFrame(t.radialTargetRAF),t.radialTargetRAF=null)}draw(t,e){var i;const n=this.w,s=n.globals,r=new b(this.w),a=n.config.plotOptions.radialBar;if(!Array.isArray(a.targets)||!a.targets.length)return this.stop(),this.angles=new Map,null;const o=e.geometry,{cx:l,cy:c}=o,h=r.group({class:"apexcharts-radial-targets"});h.node.setAttribute("pointer-events","none");const d="needle"===a.shape&&!(null==(i=a.needle)?void 0:i.showValueArc),u=n.config.chart.animations,p=t.initialAnim&&!s.dataChanged&&!s.resized,f=k.isBrowser()&&s.shouldAnimate,g=L(u.easing),m=this.angles,y=new Map,x=[];if(a.targets.forEach((i,a)=>{var g,_,b,v,w,A;if(!i)return;const M=null!=(g=i.seriesIndex)?g:0,k=o.rings[M];if(!k||(L=M,[...s.collapsedSeries||[],...s.ancillaryCollapsedSeries||[]].some(t=>t.index===L)))return;var L;const S="series"===i.value?e.series[M]:i.value;if(null==S||""===S)return;const C=Number(S);if(!Number.isFinite(C))return;const E="triangle"===i.shape||"circle"===i.shape?i.shape:"line",F="outside"===i.position||"inside"===i.position||"across"===i.position?i.position:"triangle"===E?"outside":"across",P=(0===M&&d&&o.bands?o.bands.thickness:k.thickness)/2,D=null!=(_=i.length)?_:"line"===E?"130%":10,R="string"==typeof D&&D.trim().endsWith("%")?k.thickness*parseFloat(D)/100:Math.max(0,Number(D)||0),T=Math.max(0,Number(null!=(b=i.width)?b:"line"===E?3:12)||0),N=k.radius,[O,$]="outside"===F?[N+P,N+P+R]:"inside"===F?[N-P,N-P-R]:[N-R/2,N+R/2],I=i.color||n.config.chart.foreColor,z=i.strokeColor||"none",W=null!=(v=i.strokeWidth)?v:0,j=["apexcharts-radial-target"];i.cssClass&&j.push(i.cssClass);const H=r.group({class:j.join(" ")});let Y;if(H.node.setAttribute("rel",String(M+1)),H.node.setAttribute("data-target-index",String(a)),null!=i.id&&H.node.setAttribute("data-target-id",String(i.id)),h.add(H),"line"===E)Y=r.drawLine(l,c-O,l,c-$,I,0,T);else if("triangle"===E)Y=r.drawPath({d:`M ${l} ${c-O} L ${l-T/2} ${c-$} L ${l+T/2} ${c-$} Z`,stroke:z,strokeWidth:W,fill:I,strokeLinecap:"butt"});else{const t=(O+$)/2;Y=r.drawCircle(R/2,{cx:l,cy:c-t,r:R/2,fill:I,stroke:z,"stroke-width":W})}Y.node.classList.add("apexcharts-radial-target-shape");const q=r.group({class:"apexcharts-radial-target-mark"});q.add(Y),H.add(q);const X=i.label;let G=null,U=()=>{};if(X&&null!=X.text&&""!==X.text){const t=X.style||{},e=t.fontSize||"11px",i=parseFloat(e)||11,n="inside"===F?-1:1,s="inside"===F?Math.min(O,$):Math.max(O,$),a=Number(null!=(w=X.offset)?w:4);G=r.drawText({x:l,y:c,text:String(X.text),textAnchor:"middle",dominantBaseline:"middle",fontSize:e,fontFamily:t.fontFamily,fontWeight:null!=(A=t.fontWeight)?A:600,foreColor:t.color||I,cssClass:"apexcharts-radial-target-label"}),U=t=>{const e=t*Math.PI/180,r=Math.sin(e)*n,o=-Math.cos(e)*n,h=s+n*(a+Math.abs(o)*i/2),d=B.polarToCartesian(l,c,h,t);G.node.setAttribute("x",String(d.x)),G.node.setAttribute("y",String(d.y)),G.node.setAttribute("text-anchor",r>.3?"start":r<-.3?"end":"middle")},H.add(G)}const K=o.angle(C),V=null!=i.id?`id:${i.id}`:`i:${a}`;y.set(V,K);const Z=m.get(V);let J=K,Q=0,tt=0;f&&p?(J=o.startAngle,Q=u.speed,tt=t.animBeginArr[M]||0):f&&t.dynamicAnim&&s.dataChanged&&void 0!==Z&&(J=Z,Q=u.dynamicAnimation.speed);const et=q.node,it=t=>{et.setAttribute("transform",`rotate(${t} ${l} ${c})`),U(t)};it(J),Q>0&&J!==K?x.push({node:et,label:G,from:J,to:K,delay:tt,dur:Q,place:it}):J!==K&&it(K)}),this.angles=y,this.stop(),x.length){const t=performance.now(),e=i=>{if(this.w.globals.isDestroyed)return void(s.radialTargetRAF=null);let n=!0;x.forEach(e=>{const s=Math.max(0,Math.min(1,(i-t-e.delay)/e.dur));s<1&&(n=!1),e.place(e.from+(e.to-e.from)*g(s))}),s.radialTargetRAF=n?null:M.requestAnimationFrame(e)};s.radialTargetRAF=M.requestAnimationFrame(e)}return h}}});const Wr=/[MmLlHhVvCcSsQqTtAaZz]/;function Br(t,e=.6,i=!1){const n=e>0?e:.6,s=t.length;let r=0;const a=[];let o=[],l=0,c=0,h=0,d=0,u=0,p=0,f="";const g=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function m(){for(;r<s&&g(t[r]);)r++}function y(){m();const e=r;for("+"!==t[r]&&"-"!==t[r]||r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if("."===t[r])for(r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if("e"===t[r]||"E"===t[r])for(r++,"+"!==t[r]&&"-"!==t[r]||r++;r<s&&t[r]>="0"&&t[r]<="9";)r++;if(r===e)return null;const i=parseFloat(t.slice(e,r));return isFinite(i)?i:null}function x(){m();const e=t[r];return"0"===e||"1"===e?(r++,"1"===e):null}function _(){o.length>(i?1:2)&&a.push(o),o=[]}function b(t,e){_(),l=h=t,c=d=e,o=[{x:t,y:e}]}function v(t,e){o.push({x:t,y:e}),l=t,c=e}function w(t,e,i,s,r,a){const h=Math.hypot(t-l,e-c)+Math.hypot(i-t,s-e)+Math.hypot(r-i,a-s),d=Math.max(2,Math.min(160,Math.ceil(h/n))),f=l,g=c;for(let n=1;n<=d;n++){const l=n/d,c=1-l,h=c*c*c,u=3*c*c*l,p=3*c*l*l,m=l*l*l;o.push({x:h*f+u*t+p*i+m*r,y:h*g+u*e+p*s+m*a})}u=i,p=s,l=r,c=a}function A(t,e,i,n){const s=t,r=e;w(l+2/3*(t-l),c+2/3*(e-c),i+2/3*(t-i),n+2/3*(e-n),i,n),u=s,p=r}function M(t,e,i,s,r,a,h){if(!t||!e)return void v(a,h);const d=l,f=c;t=Math.abs(t),e=Math.abs(e);const g=i*Math.PI/180,m=Math.cos(g),y=Math.sin(g),x=(d-a)/2,_=(f-h)/2,b=m*x+y*_,w=-y*x+m*_,A=b*b/(t*t)+w*w/(e*e);if(A>1){const i=Math.sqrt(A);t*=i,e*=i}const M=t*t*e*e-t*t*w*w-e*e*b*b,k=t*t*w*w+e*e*b*b,L=(s===r?-1:1)*Math.sqrt(Math.max(0,M/(k||1))),S=L*t*w/e,C=-L*e*b/t,E=m*S-y*C+(d+a)/2,F=y*S+m*C+(f+h)/2,P=(b-S)/t,D=(w-C)/e,R=(-b-S)/t,T=(-w-C)/e,N=Math.atan2(D,P);let O=Math.atan2(T,R)-N;!r&&O>0&&(O-=2*Math.PI),r&&O<0&&(O+=2*Math.PI);const $=Math.max(2,Math.min(320,Math.ceil(Math.abs(O)*Math.max(t,e)/n)));for(let i=1;i<=$;i++){const n=N+O*i/$,s=Math.cos(n),r=Math.sin(n);o.push({x:E+t*s*m-e*r*y,y:F+t*s*y+e*r*m})}u=a,p=h,l=a,c=h}for(;r<s&&(m(),!(r>=s));){let e=t[r];if(Wr.test(e))r++;else{if(!f)break;e="M"===f?"L":"m"===f?"l":f}const i=e>="a"&&e<="z",n=e.toUpperCase();if("Z"===n){o.length&&o.push({x:h,y:d}),_(),l=h,c=d,f=e;continue}const s=t=>null==t?NaN:t,g=s(y());if(isNaN(g))break;switch(n){case"M":{const t=s(y());if(isNaN(t))return a;b(i?l+g:g,i?c+t:t);break}case"L":{const t=s(y());if(isNaN(t))return a;v(i?l+g:g,i?c+t:t);break}case"H":v(i?l+g:g,c);break;case"V":v(l,i?c+g:g);break;case"C":{const t=[g,y(),y(),y(),y(),y()];if(t.some(t=>null==t))return a;const e=t;w(i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3],i?l+e[4]:e[4],i?c+e[5]:e[5]);break}case"S":{const t=[g,y(),y(),y()];if(t.some(t=>null==t))return a;const e=t,n=f&&"CcSs".indexOf(f)>=0;w(n?2*l-u:l,n?2*c-p:c,i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3]);break}case"Q":{const t=[g,y(),y(),y()];if(t.some(t=>null==t))return a;const e=t;A(i?l+e[0]:e[0],i?c+e[1]:e[1],i?l+e[2]:e[2],i?c+e[3]:e[3]);break}case"T":{const t=s(y());if(isNaN(t))return a;const e=f&&"QqTt".indexOf(f)>=0;A(e?2*l-u:l,e?2*c-p:c,i?l+g:g,i?c+t:t);break}case"A":{const t=g,e=y(),n=y(),s=x(),r=x(),o=y(),h=y();if(null==e||null==n||null==s||null==r||null==o||null==h)return a;M(t,e,n,s,r,i?l+o:o,i?c+h:h);break}default:return a}"C"!==n&&"S"!==n&&"Q"!==n&&"T"!==n&&(u=l,p=c),f=e}return _(),a}function jr(t){const e={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<e.x0&&(e.x0=t.x),t.y<e.y0&&(e.y0=t.y),t.x>e.x1&&(e.x1=t.x),t.y>e.y1&&(e.y1=t.y)})}),e}const Hr=128;function Yr(t,e,i){const n=Math.max(1e-6,t.x1-t.x0),s=Math.max(1e-6,t.y1-t.y0),r=Math.min(e.width*i/n,e.height*i/s);return{scale:r,offX:e.x+e.width/2-(t.x0+n/2)*r,offY:e.y+e.height/2-(t.y0+s/2)*r}}function qr(t,e,i){const n=.42*e,s=.45*e,r=t.maxY-t.minY,a=Math.max(1,Math.floor(r/i)),o=t.minY+(r-a*i)/2,l=[];let c=0;for(let r=0;r<a;r++){const a=o+(r+.5)*i,h=t.spansAt(a);for(let t=0;t<h.length;t++){const i=h[t].x1-h[t].x0;let o;o=i>=2*n?Math.floor((i-2*n)/e)+1:i>=s?1:0,o&&(l.push({y:a,x0:h[t].x0,x1:h[t].x1,cap:o,row:r}),c+=o)}}return{cells:l,capacity:c,inset:n}}function Xr(t,e){const i=new Array(t.length).fill(0);let n=0;for(let e=0;e<t.length;e++)n+=t[e];if(!n||e<=0)return i;let s=0;const r=[];for(let a=0;a<t.length;a++){const o=e*t[a]/n;i[a]=Math.floor(o),s+=i[a],r.push({i:a,frac:o-i[a]})}r.sort((t,e)=>e.frac-t.frac);for(let t=0;s<e;t++,s++)i[r[t%r.length].i]++;return i}function Gr(t,e,i){let n=1,s=Math.max(t.maxY-t.minY,8);for(let r=0;r<34;r++){const r=(n+s)/2;qr(t,r,r*i).capacity>=e?n=r:s=r}return n}function Ur(t,e){return Math.min(Math.max(t,e/3.2),e/2.3)}const Kr={rows:null,rowsUp:(t,e)=>e.y-t.y||t.x-e.x,cols:(t,e)=>(t.qx||0)-(e.qx||0)||t.y-e.y,colsRev:(t,e)=>(e.qx||0)-(t.qx||0)||t.y-e.y,centerOut:(t,e)=>(t.qd||0)-(e.qd||0)||t.y-e.y,centerIn:(t,e)=>(e.qd||0)-(t.qd||0)||t.y-e.y};function Vr(t,e,i,n){const s=void 0!==Kr[i]?Kr[i]:null;let r=e;if(s){let t=0,i=0;e.forEach(e=>{t+=e.x,i+=e.y}),t/=e.length||1,i/=e.length||1;const a=n>0?n:1;e.forEach(e=>{e.qx=Math.round(e.x/a),e.qd=Math.round(Math.hypot(e.x-t,e.y-i)/a)}),r=e.slice().sort(s)}const a=[];for(let e=0;e<t.length&&e<r.length;e++)a.push({id:t[e].id,x:r[e].x,y:r[e].y,r:r[e].r});return a}function Zr(t,e,i,n,s,r){if(e<=0)return;if(1===e)return void r.push({x:(t.x0+t.x1)/2,y:t.y,r:s,row:t.row});let a=t.x0+n;let o=(t.x1-n-a)/(e-1);o>1.5*i&&(o=i,a=(t.x0+t.x1)/2-o*(e-1)/2);for(let i=0;i<e;i++)r.push({x:a+i*o,y:t.y,r:s,row:t.row})}const Jr=new Set;function Qr(t,e){const i=e(t),n=t.minUnits||0,s=(e,s)=>{if(n&&e.length&&e.length<n&&!Jr.has(t.name)){Jr.add(t.name);const i="stroke"===t.kind?"A stroke thins to a dotted line below that, which may well be fine.":"Fine detail closes up below that.";console.warn(`[ApexCharts] unit shape "${t.name}" reads best from about ${n} units; this chart has ${e.length}. ${i} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return i(e,s)};return s.shape=Object.freeze(l({},t)),s.with=i=>Qr(l(l({},t),i),e),s}const ta=new Map;function ea(t){const e=t.path||"",i=t.order||"rows",n=null==t.padding?.94:t.padding,s=null==t.rowRatio?.88:t.rowRatio,r="evenodd"===t.fillRule,a=null==t.sampling?.6:t.sampling;return(t,o)=>{if(!t.length||!e)return[];const{polys:l,bounds:c}=function(t,e){const i=`${e}|${t}`;let n=ta.get(i);if(!n){const s=Br(t,e);n={polys:s,bounds:jr(s)},ta.set(i,n)}return n}(e,a);if(!l.length)return[];const h=function(t,e,i={}){const n=!!i.evenOdd,s=[];let r=1/0,a=-1/0,o=1/0,l=-1/0;if(t.forEach(t=>{for(let i=0;i<t.length;i++){const n=t[i],c=t[(i+1)%t.length],h=e.offX+n.x*e.scale,d=e.offY+n.y*e.scale,u=e.offX+c.x*e.scale,p=e.offY+c.y*e.scale;h<o&&(o=h),u<o&&(o=u),h>l&&(l=h),u>l&&(l=u),d<r&&(r=d),p<r&&(r=p),d>a&&(a=d),p>a&&(a=p),d!==p&&s.push({x0:h,y0:d,x1:u,y1:p})}}),!s.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const c=Math.max(1e-6,a-r),h=[];for(let t=0;t<Hr;t++)h.push([]);return s.forEach(t=>{const e=Math.min(t.y0,t.y1),i=Math.max(t.y0,t.y1);let n=Math.floor((e-r)/c*Hr),s=Math.floor((i-r)/c*Hr);n=Math.max(0,Math.min(127,n)),s=Math.max(0,Math.min(127,s));for(let e=n;e<=s;e++)h[e].push(t)}),{minY:r,maxY:a,minX:o,maxX:l,spansAt:t=>{const e=Math.floor((t-r)/c*Hr);if(e<0||e>127)return[];const i=h[e],s=[];for(let e=0;e<i.length;e++){const n=i[e],r=n.y1>n.y0,a=r?n.y0:n.y1,o=r?n.y1:n.y0;t<a||t>=o||s.push({x:n.x0+(t-n.y0)/(n.y1-n.y0)*(n.x1-n.x0),dir:r?1:-1})}if(s.length<2)return[];s.sort((t,e)=>t.x-e.x);const a=[];if(n){for(let t=0;t+1<s.length;t+=2)a.push({x0:s[t].x,x1:s[t+1].x});return a}let o=0,l=0;for(let t=0;t<s.length;t++){const e=o;o+=s[t].dir,0===e&&0!==o?l=s[t].x:0!==e&&0===o&&a.push({x0:l,x1:s[t].x})}return a}}}(l,Yr(c,o,n),{evenOdd:r}),d=Gr(h,t.length,s),u=qr(h,d,d*s);if(!u.cells.length)return[];const p=Xr(u.cells.map(t=>t.cap),t.length),f=Ur(t[0].r>0?t[0].r:3,d),g=[];return u.cells.forEach((t,e)=>{Zr(t,p[e],d,u.inset,f,g)}),Vr(t,g,i,d)}}function ia(t){return Qr(c(l({},t),{kind:"silhouette"}),ea)}const na=ia({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),sa=ia({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),ra=ia({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),aa=ia({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),oa=ia({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),la=ia({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),ca=ia({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),ha=ia({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),da=t=>t.reduce((t,e)=>t+e,0);function ua(t){const e=null==t.padding?.94:t.padding,i="centerIn"===t.order,n=null==t.twist?2.399963:t.twist;return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.min(s.width,s.height)/2*e,o=s.x+s.width/2,l=s.y+s.height/2,c=t=>{const e=[];for(let i=0;i<t;i++)e.push(Math.max(1,Math.round(2*Math.PI*(i+.5))));return e};let h=1;for(;h<400&&da(c(h))<r;)h++;const d=a/h,u=Xr(c(h),r),p=Ur(t[0].r>0?t[0].r:3,d),f=[];for(let t=0;t<h;t++){const e=i?h-1-t:t,s=(e+.5)*d,r=u[e],a=n*e;for(let e=0;e<r;e++){const i=a+e/r*2*Math.PI;f.push({x:o+s*Math.cos(i),y:l+s*Math.sin(i),r:p,row:t})}}return Vr(t,f,"rows",d)}}function pa(t){const e=null==t.padding?.94:t.padding,i=(null==t.tilt?15:t.tilt)*Math.PI/180,n=t.order||"rows";return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.min(s.width,s.height)/2*e,o=s.x+s.width/2,l=s.y+s.height/2,c=Math.cos(i),h=Math.sin(i),d=(t,e,i)=>{const n=e*Math.cos(i);return{x:a*e*Math.sin(i),y:a*(t*c+n*h),depth:n*c-t*h}},u=t=>{const e=Math.max(3,Math.ceil(Math.PI*a/t)),i=Math.PI/e,n=.95*t,s=n,r=new Map,u=[];let p=0;const f=t=>{const e=Math.floor(t.x/s),i=Math.floor(t.y/s);for(let s=-1;s<=1;s++)for(let a=-1;a<=1;a++){const o=r.get(`${e+s},${i+a}`);if(o)for(let e=0;e<o.length;e++)if(Math.hypot(o[e].x-t.x,o[e].y-t.y)<n)return!1}const a=`${e},${i}`,o=r.get(a);return o?o.push(t):r.set(a,[t]),!0};for(let n=0;n<e;n++){const e=-Math.PI/2+(n+.5)*i,s=Math.cos(e),r=Math.sin(e),a=r*h/(s*c||1e-9);if(a>=1)continue;const g=a<=-1?Math.PI:Math.acos(a),m=g>=Math.PI-1e-9,y=[],x=[0];for(let t=0;t<=40;t++){const e=d(r,s,2*g*t/40-g);if(y.push(e),t>0){const i=y[t-1];x.push(x[t-1]+Math.hypot(e.x-i.x,e.y-i.y))}}const _=x[x.length-1],b=m?0:Math.min(.42*t,_/2),v=_-2*b;let w;if(w=m?Math.max(1,Math.round(_/t)):v>0?Math.floor(v/t)+1:_>=.45*t?1:0,!w)continue;const A=m?_/w:w>1?v/(w-1):0,M=[];let k=0;for(let t=0;t<w;t++){const e=m?t*A:w>1?b+t*A:_/2;for(;k<x.length-2&&x[k+1]<e;)k++;const i=x[k],n=x[k+1],s=n>i?(e-i)/(n-i):0,r=y[k],a=y[k+1],c={x:o+r.x+(a.x-r.x)*s,y:l+r.y+(a.y-r.y)*s,depth:r.depth+(a.depth-r.depth)*s};f(c)&&M.push(c)}M.length&&(u.push(M),p+=M.length)}return{rows:u,total:p}};let p=1,f=2*a;for(let t=0;t<30;t++){const t=(p+f)/2;u(t).total>=r?p=t:f=t}const g=p,{rows:m}=u(g),y=Xr(m.map(t=>t.length),r),x=Ur(t[0].r>0?t[0].r:3,g),_=[];return m.forEach((t,e)=>{const i=y[e];if(i)for(let n=0;n<i;n++){const s=t[Math.min(t.length-1,Math.floor(n*t.length/i))];_.push({x:s.x,y:s.y,r:x*(.62+.38*Math.sqrt(Math.max(0,s.depth))),row:e})}}),_.sort((t,e)=>t.y-e.y||t.x-e.x),Vr(t,_,n,g)}}function fa(t){const e=null==t.padding?.94:t.padding,i=null==t.rowRatio?.9:t.rowRatio,n=t.order||"rowsUp";return(t,s)=>{const r=t.length;if(!r)return[];const a=Math.max(1,Math.round((Math.sqrt(8*r+1)-1)/2)),o=[];for(let t=0;t<a;t++)o.push(t+1);const l=Xr(o,r),c=Math.max(...l),h=Math.min(s.width*e/Math.max(1,c-1+1.6),s.height*e/(a*i)),d=h*i,u=s.x+s.width/2,p=s.y+(s.height-a*d)/2,f=Ur(t[0].r>0?t[0].r:3,h),g=[];for(let t=0;t<a;t++)for(let e=0;e<l[t];e++)g.push({x:u+(e-(l[t]-1)/2)*h,y:p+(t+.5)*d,r:f,row:t});return Vr(t,g,n,h)}}function ga(t){return Qr(c(l({},t),{kind:"rings"}),ua)}function ma(t){return Qr(c(l({},t),{kind:"globe"}),pa)}function ya(t){return Qr(c(l({},t),{kind:"tiers"}),fa)}const xa=ga({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),_a=ma({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),ba=ya({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),va=ia({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),wa=ia({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),Aa=ia({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),Ma=ia({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),ka=ia({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),La=ia({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),Sa=ia({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),Ca=ia({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),Ea=ia({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),Fa=ia({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),Pa=ia({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),Da=ia({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),Ra=ia({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),Ta=ia({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),Na=ia({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),Oa=ia({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),$a=ia({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),Ia=ia({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),za=ia({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),Wa=ia({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),Ba=ia({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),ja=new Map;function Ha(t){const e=t.path||"",i=t.order||"rows",n=null==t.padding?.94:t.padding,s=null==t.rowRatio?.88:t.rowRatio,r=null==t.sampling?.6:t.sampling,a=Math.max(.5,(null==t.width?16:t.width)/2);return(t,o)=>{if(!t.length||!e)return[];const{polys:l,bounds:c}=function(t,e){const i=`${e}|${t}`;let n=ja.get(i);if(!n){const s=Br(t,e,!0);n={polys:s,bounds:jr(s)},ja.set(i,n)}return n}(e,r);if(!l.length)return[];const h=function(t,e,i){const n=Math.max(1e-6,i*e.scale),s=[];let r=1/0,a=-1/0,o=1/0,l=-1/0;if(t.forEach(t=>{for(let i=0;i+1<t.length;i++){const c=e.offX+t[i].x*e.scale,h=e.offY+t[i].y*e.scale,d=e.offX+t[i+1].x*e.scale,u=e.offY+t[i+1].y*e.scale,p=Math.hypot(d-c,u-h),f=p>1e-9?-(u-h)/p*n:n,g=p>1e-9?(d-c)/p*n:0;s.push({ax:c,ay:h,bx:d,by:u,nx:f,ny:g}),Math.min(c,d)-n<o&&(o=Math.min(c,d)-n),Math.max(c,d)+n>l&&(l=Math.max(c,d)+n),Math.min(h,u)-n<r&&(r=Math.min(h,u)-n),Math.max(h,u)+n>a&&(a=Math.max(h,u)+n)}}),!s.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const c=Math.max(1e-6,a-r),h=[];for(let t=0;t<Hr;t++)h.push([]);s.forEach(t=>{const e=Math.min(t.ay,t.by)-n,i=Math.max(t.ay,t.by)+n;let s=Math.floor((e-r)/c*Hr),a=Math.floor((i-r)/c*Hr);s=Math.max(0,Math.min(127,s)),a=Math.max(0,Math.min(127,a));for(let e=s;e<=a;e++)h[e].push(t)});const d=(t,e,i)=>{const s=i-e;if(s<=-n||s>=n)return null;const r=Math.sqrt(n*n-s*s);return{x0:t-r,x1:t+r}};return{minY:r,maxY:a,minX:o,maxX:l,spansAt:t=>{const e=Math.floor((t-r)/c*Hr);if(e<0||e>127)return[];const i=h[e],n=[];for(let e=0;e<i.length;e++){const s=i[e],r=[s.ax+s.nx,s.bx+s.nx,s.bx-s.nx,s.ax-s.nx],a=[s.ay+s.ny,s.by+s.ny,s.by-s.ny,s.ay-s.ny];let o=1/0,l=-1/0;for(let e=0;e<4;e++){const i=(e+1)%4,n=a[e],s=a[i];if(n===s)continue;const c=Math.min(n,s),h=Math.max(n,s);if(t<c||t>=h)continue;const d=r[e]+(t-n)/(s-n)*(r[i]-r[e]);d<o&&(o=d),d>l&&(l=d)}l>o&&n.push({x0:o,x1:l});const c=d(s.ax,s.ay,t);c&&n.push(c);const h=d(s.bx,s.by,t);h&&n.push(h)}if(!n.length)return[];n.sort((t,e)=>t.x0-e.x0);const s=[n[0]];for(let t=1;t<n.length;t++){const e=s[s.length-1];n[t].x0<=e.x1?n[t].x1>e.x1&&(e.x1=n[t].x1):s.push(n[t])}return s}}}(l,Yr({x0:c.x0-a,y0:c.y0-a,x1:c.x1+a,y1:c.y1+a},o,n),a),d=Gr(h,t.length,s),u=qr(h,d,d*s);if(!u.cells.length)return[];const p=Xr(u.cells.map(t=>t.cap),t.length),f=Ur(t[0].r>0?t[0].r:3,d),g=[];return u.cells.forEach((t,e)=>{Zr(t,p[e],d,u.inset,f,g)}),Vr(t,g,i,d)}}function Ya(t){return Qr(c(l({},t),{kind:"stroke"}),Ha)}const qa=[na,sa,ra,aa,oa,la,ca,ha,xa,_a,ba,va,wa,Aa,Ma,ka,La,Sa,Ca,Ea,Fa,Pa,Da,Ra,Ta,Na,Oa,$a,Ia,za,Wa,Ba,Ya({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),Ya({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),Ya({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),Ya({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),Ya({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),Ya({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),Ya({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"})],Xa="__apexcharts_unit_layouts__";function Ga(t){const e=c(l({},t),{viewBox:t.viewBox||[0,0,100,100]});return e.with=e=>Ga(l(l({},t),e)),Object.freeze(e)}const Ua=[Ga({name:"person",category:"people",source:"original",path:"M 37 18 A 13 13 0 0 1 63 18 A 13 13 0 0 1 37 18 Z M 50 34 C 61 34 69 40 70 50 L 73 72 L 65 72 L 63 58 L 61 96 L 53 96 L 51 66 L 49 66 L 47 96 L 39 96 L 37 58 L 35 72 L 27 72 L 30 50 C 31 40 39 34 50 34 Z"}),Ga({name:"house",category:"objects",source:"original",path:"M 50 8 L 94 46 L 82 46 L 82 92 L 58 92 L 58 64 L 42 64 L 42 92 L 18 92 L 18 46 L 6 46 Z"}),Ga({name:"heart",category:"symbols",source:"original",path:"M 50 90 C 22 70 6 54 6 36 C 6 21 17 11 30 11 C 39 11 46 16 50 24 C 54 16 61 11 70 11 C 83 11 94 21 94 36 C 94 54 78 70 50 90 Z"}),Ga({name:"tree",category:"nature",source:"original",path:"M 50 6 C 66 6 78 18 78 33 C 78 38 77 42 75 46 C 82 50 86 57 86 65 C 86 77 76 86 64 86 L 55 86 L 55 96 L 45 96 L 45 86 L 36 86 C 24 86 14 77 14 65 C 14 57 18 50 25 46 C 23 42 22 38 22 33 C 22 18 34 6 50 6 Z"}),Ga({name:"droplet",category:"nature",source:"original",path:"M 50 4 C 50 4 84 42 84 64 C 84 82 69 96 50 96 C 31 96 16 82 16 64 C 16 42 50 4 50 4 Z"}),Ga({name:"star",category:"symbols",source:"original",path:"M 50 6 L 61.2 36.6 L 93.8 37.8 L 68.1 57.9 L 77 89.2 L 50 71 L 23 89.2 L 31.9 57.9 L 6.2 37.8 L 38.8 36.6 Z"}),Ga({name:"car",category:"transport",source:"original",path:"M 6 72 L 9 53 C 10 46 15 41 22 40 L 32 23 C 35 19 39 17 44 17 L 60 17 C 65 17 69 19 71 23 L 81 40 C 88 41 93 46 94 53 L 97 72 L 97 80 L 6 80 Z M 13 88 A 11 11 0 1 1 35 88 A 11 11 0 1 1 13 88 Z M 65 88 A 11 11 0 1 1 87 88 A 11 11 0 1 1 65 88 Z"}),Ga({name:"bag",category:"objects",source:"original",path:"M 10 30 L 90 30 L 95 96 L 5 96 Z M 32 30 C 32 14 40 4 50 4 C 60 4 68 14 68 30 L 59 30 C 59 19 55 13 50 13 C 45 13 41 19 41 30 Z"}),Ga({name:"book",category:"objects",source:"original",path:"M 8 14 C 8 14 26 6 50 16 C 74 6 92 14 92 14 L 92 88 C 92 88 74 80 50 90 C 26 80 8 88 8 88 Z"}),Ga({name:"cup",category:"objects",source:"original",path:"M 14 22 L 70 22 L 70 34 L 80 34 C 90 34 96 41 96 51 C 96 63 87 71 75 71 L 69 71 C 65 84 55 92 42 92 C 26 92 14 79 14 61 Z"}),Ga({name:"bulb",category:"objects",source:"original",path:"M 50 4 C 32 4 18 18 18 36 C 18 48 25 56 31 63 C 35 68 37 72 37 78 L 63 78 C 63 72 65 68 69 63 C 75 56 82 48 82 36 C 82 18 68 4 50 4 Z M 38 84 L 38 90 L 62 90 L 62 84 Z M 42 94 L 45 99 L 55 99 L 58 94 Z"}),Ga({name:"plane",category:"transport",source:"original",path:"M 50 4 C 55 4 58 12 58 24 L 58 38 L 94 62 L 94 72 L 58 60 L 58 82 L 70 90 L 70 97 L 50 92 L 30 97 L 30 90 L 42 82 L 42 60 L 6 72 L 6 62 L 42 38 L 42 24 C 42 12 45 4 50 4 Z"})],Ka="__apexcharts_unit_marks__";!function(t){const e=function(){const t=globalThis;return t[Xa]||(t[Xa]=Object.create(null)),t[Xa]}(),i=[];(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,n])=>{const s=String(t),r=n;s&&"function"==typeof r&&(e[s]=r,i.push(s))})}(qa),function(t){const e=function(){const t=globalThis;return t[Ka]||(t[Ka]=Object.create(null)),t[Ka]}(),i=[];(Array.isArray(t)?t.map(t=>[t?t.name:"",t]):Object.entries(t)).forEach(([t,n])=>{const s=String(t);s&&n&&"string"==typeof n.path&&(e[s]=n,i.push(s))})}(Ua);const Va=g.default;Va.unitShapes=qa,Va.pictograms=Ua,Object.defineProperty(exports,"default",{enumerable:!0,get:()=>g.default});
|