apexcharts 8.2.0 → 8.3.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/README.md +7 -7
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +271 -173
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.css +35 -0
- package/dist/apexcharts.esm.js +1722 -1527
- package/dist/apexcharts.full.js +1459 -1075
- package/dist/apexcharts.full.min.js +2 -2
- package/dist/apexcharts.js +994 -715
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +994 -715
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +91 -40
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +433 -394
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +364 -322
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +91 -40
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +364 -322
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +433 -394
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +271 -173
- 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 +433 -394
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +250 -187
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- 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 +2 -2
- package/dist/features/drilldown.esm.js +4 -2
- package/dist/features/drilldown.js +2 -2
- 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 +1 -1
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/exports.js +1 -1
- 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 +14 -9
- package/dist/features/highlight-filter.js +2 -2
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- 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 +97 -145
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +63 -43
- package/dist/features/legend.js +2 -2
- 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 +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +1 -1
- package/dist/features/perspectives.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 +2 -2
- package/dist/features/renderer-canvas.esm.js +2 -1
- package/dist/features/renderer-canvas.js +2 -2
- 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 +1 -1
- package/dist/features/storyboard.esm.js +1 -1
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +2 -2
- package/dist/features/streamgraph.esm.js +3 -2
- package/dist/features/streamgraph.js +2 -2
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +92 -2
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +83 -47
- 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 +950 -795
- package/dist/heatmap.common.js +2 -2
- package/dist/heatmap.esm.js +3 -17
- package/dist/heatmap.js +2 -2
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +433 -394
- package/dist/icicle.common.js +2 -2
- package/dist/icicle.esm.js +54 -38
- package/dist/icicle.js +2 -2
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +91 -40
- package/dist/line.js +2 -2
- package/dist/locales/en.json +2 -1
- package/dist/locales/ro.json +3 -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 +2 -2
- package/dist/radar.esm.js +5 -4
- package/dist/radar.js +2 -2
- 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 +2 -2
- package/dist/raincloud.esm.js +72 -26
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +91 -40
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +433 -394
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +91 -40
- package/dist/streamgraph.common.js +2 -2
- package/dist/streamgraph.esm.js +93 -41
- package/dist/sunburst.common.js +2 -2
- package/dist/sunburst.esm.js +103 -93
- package/dist/sunburst.js +2 -2
- package/dist/treemap.common.js +2 -2
- package/dist/treemap.esm.js +105 -86
- package/dist/treemap.js +2 -2
- 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 +280 -202
- package/dist/unit.js +2 -2
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +72 -26
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +432 -393
- package/package.json +1 -1
- package/src/apexcharts.js +13 -6
- package/src/assets/apexcharts.css +35 -0
- package/src/charts/Bar.js +62 -55
- package/src/charts/BarStacked.js +80 -88
- package/src/charts/BoxCandleStick.js +28 -31
- package/src/charts/Icicle.js +37 -37
- package/src/charts/Line.js +118 -42
- package/src/charts/Radar.js +5 -7
- package/src/charts/RangeBar.js +47 -43
- package/src/charts/Sunburst.js +101 -98
- package/src/charts/Treemap.js +108 -66
- package/src/charts/Unit.js +368 -250
- package/src/charts/Violin.js +48 -30
- package/src/charts/common/Breadcrumb.js +2 -2
- package/src/charts/common/Hierarchy.js +32 -11
- package/src/charts/common/Jitter.js +32 -7
- package/src/charts/common/bar/DataLabels.js +76 -81
- package/src/charts/common/bar/Helpers.js +43 -7
- package/src/charts/common/line/Helpers.js +12 -15
- package/src/charts/common/partition/NodeTooltip.js +8 -1
- package/src/charts/common/partition/Partition.js +33 -1
- package/src/charts/common/treemap/Helpers.js +3 -11
- package/src/locales/en.json +2 -1
- package/src/locales/ro.json +3 -2
- package/src/modules/Core.js +4 -0
- package/src/modules/CoreUtils.js +18 -42
- package/src/modules/Data.js +23 -24
- package/src/modules/DataLabels.js +6 -6
- package/src/modules/Graphics.js +62 -49
- package/src/modules/Markers.js +3 -1
- package/src/modules/Range.js +44 -29
- package/src/modules/RendererController.js +17 -3
- package/src/modules/Scales.js +32 -9
- package/src/modules/Series.js +39 -18
- package/src/modules/Theme.js +1 -1
- package/src/modules/ZoomPanSelection.js +119 -2
- package/src/modules/accessibility/KeyboardNavigation.js +114 -186
- package/src/modules/animations/LengthTransition.js +22 -2
- package/src/modules/drilldown/Breadcrumb.js +5 -2
- package/src/modules/helpers/Destroy.js +1 -1
- package/src/modules/highlightFilter/HighlightFilter.js +8 -9
- package/src/modules/highlightFilter/TreemapPart.js +2 -2
- package/src/modules/legend/HeatmapGradientLegend.js +76 -45
- package/src/modules/legend/Helpers.js +2 -0
- package/src/modules/legend/Legend.js +11 -12
- package/src/modules/settings/Options.js +7 -0
- package/src/modules/streamgraph/StreamLabels.js +1 -0
- package/src/modules/tooltip/Tooltip.js +20 -4
- package/src/modules/tooltip/Utils.js +8 -0
- package/src/modules/trellis/Trellis.js +6 -0
- package/src/modules/trellis/TrellisChrome.js +18 -7
- package/src/modules/trellis/TrellisSync.js +2 -0
- package/src/renderers/canvas/CanvasGraphics.js +1 -0
- package/src/ssr/DOMShim.js +10 -0
- package/src/types/internal.d.ts +9 -3
- package/types/apexcharts.d.ts +31 -12
package/dist/treemap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
!function(e){var t="undefined"!=typeof globalThis?globalThis:self,r=t.ApexCharts;if(r&&r.__internals)return e.call(t);if(r)throw new Error("ApexCharts: dist/treemap.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/treemap.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var a={file:"dist/treemap.js",run:e,done:!1},n=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);n.push(a),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!a.done){var r=t.ApexCharts;if(r)if(r.__internals){a.done=!0;var i=n.indexOf(a);-1!==i&&n.splice(i,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/treemap.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/treemap.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/treemap.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/treemap.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,r=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(e,r,a)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,l=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&s(e,r,t[r]);if(n)for(var r of n(t))o.call(t,r)&&s(e,r,t[r]);return e},h=(e,t)=>r(e,a(t));const c=globalThis.ApexCharts;function d(e,t,r,a){const n=a*a,i=r*r;return Math.max(n*t/i,i/(n*e))}function p(e,t,r,a,n,i){return 0===e||d(t,r,a,i)>=d(Math.min(t,n),Math.max(r,n),a+n,i)}function u(e,t,r,a,n,i,o,s){if(o>=s){const o=a/s;let l=i;for(let a=0;a<r;a++){const r=t[a]/o;e.push([n,l,n+o,l+r]),l+=r}}else{const s=a/o;let l=n;for(let a=0;a<r;a++){const r=t[a]/s;e.push([l,i,l+r,i+s]),l+=r}}}function f(e){const t=e.children;if(t&&t.length){let r=0;for(let e=0;e<t.length;e++)r+=f(t[e]);return e._area=r,r}const r=Number(e.value),a=isNaN(r)?0:Math.abs(r);return e._area=a,a}function m(e,t,r,a,n,i,o,s){const l=e.length;if(0===l||a<=0||n<=0)return;const h=new Array(l);let c=0;for(let t=0;t<l;t++)h[t]=e[t]._area,c+=h[t];if(c<=0)return;const d=function(e,t,r,a,n){const i=[],o=e.length;if(0===o)return i;const s=new Array(o);let l=0,h=0,c=1/0,d=-1/0,f=0;for(;f<o;){const o=Math.min(a,n),m=e[f];if(p(l,c,d,h,m,o))s[l]=m,l++,h+=m,m<c&&(c=m),m>d&&(d=m),f++;else{if(u(i,s,l,h,t,r,a,n),a>=n){const e=h/n;t+=e,a-=e}else{const e=h/a;r+=e,n-=e}l=0,h=0,c=1/0,d=-1/0}}return l>0&&u(i,s,l,h,t,r,a,n),i}(function(e,t){let r=0;for(let t=0;t<e.length;t++)r+=e[t];const a=t/r,n=new Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]*a;return n}(h,a*n),t,r,a,n);for(let t=0;t<l;t++){const r=e[t],a=d[t];if(!a)continue;r.rect=a,r.depth=i;const n=r.children;if(!n||!n.length)continue;const l=a[2]-a[0],h=a[3]-a[1];let c=Math.max(0,o(r,i,l,h)||0);(2*c>=l||2*c>=h)&&(c=0);let p=Math.max(0,s(r,i,l,h)||0);p>0&&h-2*c-p<p&&(p=0),r.headerHeight=p,m(n,a[0]+c,a[1]+p+c,l-2*c,h-p-2*c,i+1,o,s)}}const g={generateNested:function(e,t,r,a={}){if(!Array.isArray(e)||0===e.length)return e||[];const n=a.padding||(()=>0),i=a.header||(()=>0);for(let t=0;t<e.length;t++)f(e[t]);return m(e,0,0,t,r,0,n,i),e}},b=globalThis.ApexCharts.__internals.__apex_Graphics,x=globalThis.ApexCharts.__internals,y=x.__apex_Animations;x.__apex_Animations_computeStagger,x.__apex_Animations_applyAnimationPolicy,x.__apex_Animations_prefersReducedMotion,x.__apex_Animations_applyProgressiveReveal;const _=globalThis.ApexCharts.__internals.__apex_Fill,w=globalThis.ApexCharts.__internals.__apex_Utils,v=globalThis.ApexCharts.__internals.__apex_DataLabels,A=(e,t,r,a)=>{if("function"!=typeof e)return e;const n=e({series:t.seriesData.series,seriesIndex:r,dataPointIndex:a,w:t});return Number.isFinite(n)?n:0};class C{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const r=e.config.plotOptions[e.config.chart.type];return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,r,a){const n=this.w;let i=1;const o=n.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,r);n.globals.hasNegs||a?i=n.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*o):(1-s.percent/100)*(1.25*o):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(i=1-s.percent/100,"treemap"===e&&(i=(1-s.percent/100)*(1.25*o)));let l=s.color;const h=new w;if(n.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){const e=h.shadeColor(-1*i,s.color);l=w.hexToRgba(w.isColorHex(e)?e:w.rgb2hex(e),n.config.fill.opacity)}else{const e=h.shadeColor(i,s.color);l=w.hexToRgba(w.isColorHex(e)?e:w.rgb2hex(e),n.config.fill.opacity)}return{color:l,colorProps:s}}determineColor(e,t,r){const a=this.w,n=a.seriesData.series[t][r],i=a.config.plotOptions[e];let o=i.colorScale.inverse?r:t;i.distributed&&"treemap"===a.config.chart.type&&(o=r);let s,l,h=a.globals.colors[o],c=null;if(i.distributed||"heatmap"!==e){const e=a.seriesData.series[t];s=e.length?e[0]:0,l=s;for(let t=1;t<e.length;t++)e[t]<s&&(s=e[t]),e[t]>l&&(l=e[t])}else s=a.globals.minY,l=a.globals.maxY;const d=i.colorScale.min,p=i.colorScale.max;void 0!==d&&void 0!==p&&p>d?(s=d,l=p):void 0!==d&&(s=d<a.globals.minY?d:a.globals.minY,l=p>a.globals.maxY?p:a.globals.maxY);const u=Math.abs(l)+Math.abs(s),f=Math.min(Math.max(n,s),l);let m=0===u?0:100*f/u;return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(e=>{if(n>=e.from&&n<=e.to){h=e.color,c=e.foreColor?e.foreColor:null,s=e.from,l=e.to;const t=Math.abs(l)+Math.abs(s);m=0===t?0:100*n/t}}),{color:h,foreColor:c,percent:m}}calculateDataLabels({text:e,x:t,y:r,i:a,j:n,colorProps:i,fontSize:o}){const s=this.w,l=s.config.dataLabels,h=new b(this.w),c=new v(this.w,this.ctx);let d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});const p=A(l.offsetX,s,a,n),u=A(l.offsetY,s,a,n),f=t+p,m=r+parseFloat(l.style.fontSize)/3+u;c.plotDataLabelsText({x:f,y:m,text:e,i:a,j:n,color:i.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}}const S=globalThis.ApexCharts.__internals.__apex_Filters,E=globalThis.ApexCharts.__internals.__apex_Series,M=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function k(e,t,r,a,n,i=null,o={}){var s,l,h;const c=t&&"object"==typeof t,d=c&&null!=(l=null!=(s=t.x)?s:t.name)?l:"",p=Number(c?null!=(h=t.y)?h:t.value:t),u={name:String(d),value:isNaN(p)?null:p,color:c&&t.color?t.color:void 0,_key:`${n}/${r}:${d}`};if(a&&!u.color&&(u.color=a[r%a.length]),o.keepDatum&&(u._datum=t),c&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((t,r)=>k(e,t,r,null,u._key,i,o));else if(c&&null!=t.drilldown&&!1!==o.expandDrilldown){const r=i||new Set;if(!r.has(t.drilldown)){const a=function(e,t){const r=e.config.drilldown;return(r&&Array.isArray(r.series)?r.series:[]).find(e=>e&&e.id===t)}(e,t.drilldown);if(a&&Array.isArray(a.data)&&a.data.length){const n=new Set(r);n.add(t.drilldown);const i=Array.isArray(a.colors)?a.colors:null;u.children=a.data.map((t,r)=>k(e,t,r,i,u._key,n,o))}}}return u}function L(e){e.children&&e.children.length&&(e.children.forEach(e=>L(e)),(null==e.value||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(null==e.value||isNaN(e.value))&&(e.value=0)}function N(e){if("string"!=typeof e)return"";const t=e.indexOf("/");return-1===t?"":e.slice(t)}function T(e){const t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};const r=function(e,t,r={}){const a=t||e.config.series;return Array.isArray(a)?a.map((t,a)=>{var n,i;const o=t&&Array.isArray(t.data)?t.data:[],s=`${a}:${null!=(n=null==t?void 0:t.name)?n:""}`;return{name:String(null!=(i=null==t?void 0:t.name)?i:""),value:null,color:(null==t?void 0:t.color)||void 0,_key:s,_seriesIndex:a,children:o.map((t,a)=>k(e,t,a,null,s,null,r))}}):[]}(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});r.forEach(L);const{maxDepth:a}=function(e){const t=[];let r=0;return e.forEach((e,a)=>{const n=[],i=(e,t,o)=>{e._parent=o,e._depth=t,e._si=a,e._leaf=!(e.children&&e.children.length),t>r&&(r=t),e._leaf?(e._di=n.length,n.push(e)):(e._di=-1,e.children.forEach(r=>i(r,t+1,e)))};i(e,0,null),t.push(n)}),{leaves:t,maxDepth:r}}(r);return{roots:r,maxDepth:a,nested:!1}}const F=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,P=globalThis.ApexCharts.__internals;P.__apex_Easing_easeInOutSine,P.__apex_Easing_DEFAULT_EASING_NAME,P.__apex_Easing_cubicBezier,P.__apex_Easing_registerEasing;const $=P.__apex_Easing_resolveEasing,z=["#cf4d3f","#8f9499","#26a75b"],O=(e,t,r)=>e+(t-e)*r;function W(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0")}function R(e,t,r){const a=w.parseHex(j(e)),n=w.parseHex(j(t));return a&&n?"#"+W(O(a[0],n[0],r))+W(O(a[1],n[1],r))+W(O(a[2],n[2],r)):e}function j(e){return"string"!=typeof e?"#000000":w.isColorHex(e)?e:w.rgb2hex(e)||"#000000"}function B(e,t,r,a){var n,i,o;if(!t||"object"!=typeof t)return null;const s=null==(o=null==(i=null==(n=e.config.plotOptions)?void 0:n.treemap)?void 0:i.colorScale)?void 0:o.colorValue;let l;if(l="function"==typeof s?s(t,{seriesIndex:r,dataPointIndex:a,w:e}):"string"==typeof s?t[s]:t.colorValue,null==l)return null;const h=Number(l);return Number.isFinite(h)?h:null}function I(e){var t,r,a;const n=null==(a=null==(r=null==(t=e.config)?void 0:t.plotOptions)?void 0:r.treemap)?void 0:a.colorScale,i=n&&n.gradient;if(!i)return null;if(!1===i.enabled)return null;const o=e.config.series||[];let s=1/0,l=-1/0,h=!1;for(let t=0;t<o.length;t++){const r=o[t]&&o[t].data;if(Array.isArray(r))for(let a=0;a<r.length;a++){const n=B(e,r[a],t,a);null!=n&&(h=!0,n<s&&(s=n),n>l&&(l=n))}}if(!h&&!0!==i.enabled)return null;Number.isFinite(s)||(s=0,l=0);let c=Number.isFinite(Number(i.min))?Number(i.min):s,d=Number.isFinite(Number(i.max))?Number(i.max):l,p=null;if(null===i.midpoint?p=null:Number.isFinite(Number(i.midpoint))?p=Number(i.midpoint):c<0&&d>0&&(p=0),null!=p&&!1!==i.symmetric&&!Number.isFinite(Number(i.min))&&!Number.isFinite(Number(i.max))){const e=Math.max(Math.abs(c-p),Math.abs(d-p));c=p-e,d=p+e}d===c&&(c-=.5,d+=.5);const u=function(e,t,r,a){if(Array.isArray(e.stops)&&e.stops.length>=2)return e.stops.filter(e=>e&&Number.isFinite(Number(e.value))).map(e=>({value:Number(e.value),color:j(e.color)})).sort((e,t)=>e.value-t.value);const n=(Array.isArray(e.colors)&&e.colors.length>=2?e.colors:z).map(j),i=n.length;if(null!=a&&i>=3){const e=Math.floor((i-1)/2),o=[];for(let r=0;r<=e;r++)o.push({value:O(t,a,r/e),color:n[r]});for(let t=e+1;t<i;t++)o.push({value:O(a,r,(t-e)/(i-1-e)),color:n[t]});return o}return n.map((e,a)=>({value:O(t,r,a/(i-1)),color:e}))}(i,c,d,p);if(u.length<2)return null;const f=d-c,m=u.map(e=>({percent:0===f?0:(e.value-c)/f,color:e.color}));return{min:c,max:d,midpoint:p,stops:u,at:e=>{if(!Number.isFinite(e))return u[Math.floor(u.length/2)].color;if(e<=u[0].value)return u[0].color;const t=u[u.length-1];if(e>=t.value)return t.color;for(let t=1;t<u.length;t++){const r=u[t];if(e<=r.value){const a=u[t-1],n=r.value-a.value,i=0===n?0:(e-a.value)/n;return R(a.color,r.color,i)}}return t.color},legendStops:m}}function D(e){const t=j(e);return w.getContrastRatio(t,"#ffffff")>=w.getContrastRatio(t,"#000000")?"#ffffff":"#000000"}const q="http://www.w3.org/1999/xhtml";function H(e,t){const r=e.config.drilldown&&e.config.drilldown.breadcrumb||{};return l(l({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},r),t||{})}function Y(e){const t=e.dom.elWrap;if(!t)return;const r=t.querySelector(".apexcharts-breadcrumb");r&&r.parentNode&&r.parentNode.removeChild(r)}const K=e=>"string"==typeof e&&/^(#|rgb)/i.test(e);function V(e,t,r,a){return K(r)&&K(a)&&r!==a?[h(l({},e),{fill:r}),h(l({},t),{fill:a})]:[e,t]}const Z=e=>E.treemapHeaderLook(e);c.use({treemap:class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new C(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._morphLeafIndex=0,this.camera=null}draw(){var e,t;const r=this.w,a=new b(this.w,this.ctx),n=new _(this.w),i=a.group({class:"apexcharts-treemap"});if(r.globals.noData)return i;this.negRange=this.helpers.checkColorRange(),r.config.series.forEach((e,t)=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),e.data.forEach(e=>{this.labels[t].push(e.x)})});const o=T(r);this.nested=o.nested,this.roots=o.roots,this.scale=I(r);const s=1===o.roots.length?o.roots[0].children||[]:o.roots;this.drawn=s;const h=r.config.plotOptions.treemap.parents;this.showParents=!0===h.show||!1!==h.show&&this.nested;const c=this._resolveFocus(s),d=c?[c]:s;g.generateNested(d,r.layout.gridWidth,r.layout.gridHeight,{padding:(e,t,r,a)=>this.showParents?this._levelPadding(t,r,a):0,header:(e,t,r,a)=>this.showParents?this._levelHeader(e,t,r,a):0}),this.camera=this._zoomCamera();const p=null==(e=this.ctx.highlightFilter)?void 0:e.treemap(this),u=null==(t=this.ctx)?void 0:t.morphTypeChange,f=!!u&&"function"==typeof u.isActive&&u.isActive()&&"function"==typeof u.getInitialPathAt;this._morphLeafIndex=0;const m=this._leavesBySeries(d,r.config.series.length),x=this.showParents?this._parentsBySeries(d,r.config.series.length):[];return m.forEach((e,t)=>{var o;const s=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:w.escapeString(r.seriesData.seriesNames[t]),rel:t+1,"data:realIndex":t});if(E.addCollapsedClassToSeries(this.w,s,t),a.setupEventDelegation(s,".apexcharts-treemap-rect"),r.config.chart.dropShadow.enabled){const e=r.config.chart.dropShadow;new S(this.w).dropShadow(i,e,t)}const h=a.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},d={xMin:1/0,yMin:1/0};this.showParents&&(x[t]||[]).forEach(e=>{this._drawParent(s,e,t)});const u=r.config.chart.animations,m=u.animateGradually,g=m&&!1!==m.enabled,b=new Array(e.length).fill(0);if(g){const t=e.length||1,r=Math.min(m.delay||0,.5*u.speed/t);e.map((e,t)=>{return{j:t,area:e.rect?(r=e.rect,(r[2]-r[0])*(r[3]-r[1])):0};var r}).sort((e,t)=>t.area-e.area).forEach((e,t)=>{b[e.j]=t*r})}e.forEach((e,i)=>{var o;const h=e.rect;if(!h)return;const u=e._di,m=h[0],g=h[1],x=h[2],y=h[3];x>m&&y>g&&(c.xMin=Math.min(c.xMin,m),c.yMin=Math.min(c.yMin,g),c.xMax=Math.max(c.xMax,x),c.yMax=Math.max(c.yMax,y));const _=this._leafColor(t,u),w=_.color;let v=n.fillPath({color:w,seriesNumber:t,dataPointIndex:u});const A=f?this._morphSourceForLeaf(e):null,C=A?a.drawPath({d:this._tilePath(m,g,x,y),fill:"#fff",stroke:r.config.plotOptions.treemap.useFillColorAsStroke?w:r.globals.stroke.colors[t],strokeWidth:this.strokeWidth,fillOpacity:1}):a.drawRect(m,g,x-m,y-g,r.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,r.config.plotOptions.treemap.useFillColorAsStroke?w:r.globals.stroke.colors[t]);v=(null==p?void 0:p(C,t,u,v,e))||v,C.attr({cx:m,cy:g,index:t,i:t,j:u,width:x-m,height:y-g,fill:v}),C.node.classList.add("apexcharts-treemap-rect"),C.node.setAttribute("data:key",N(e._key));let S={x:m+(x-m)/2,y:g+(y-g)/2,width:0,height:0};const M={x:m,y:g,width:x-m,height:y-g};A?this._morphTile(C,A,this._tilePath(m,g,x,y),this.ctx.morphTypeChange.getSpeed(),t,u):r.config.chart.animations.enabled&&!r.globals.dataChanged&&(r.globals.resized?r.globals.animationEnded=!0:this.animateTreemap(C,S,M,r.config.chart.animations.speed,b[i]||0));let k=null,L=null,T=null;if(r.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&r.globals.shouldAnimate){e=this.dynamicAnim.speed;const a=null==(o=r.globals.previousPaths[t])?void 0:o[u],n=l({},M);if(!(null==a?void 0:a.rect)&&this.camera&&(S=this.camera.back(M),L={x:S.x+S.width/2,y:S.y+S.height/2}),null==a?void 0:a.rect){S=l({},a.rect),S.width>0&&S.height>0&&(d.xMin=Math.min(d.xMin,S.x),d.yMin=Math.min(d.yMin,S.y),L={x:S.x+S.width/2,y:S.y+S.height/2},T="string"==typeof a.label?a.label:null,a.labelFading&&this.camera&&(T=""));const e=e=>"string"==typeof e&&/^(#|rgb)/i.test(e);e(a.fill)&&e(v)&&a.fill!==v&&(S.fill=a.fill,n.fill=v)}k=this.animateTreemap(C,S,n,e)}}let F=this.getFontSize(h);"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(F=parseInt(String(r.config.dataLabels.style.fontSize),10));let P=null;if(r.config.dataLabels.enabled&&this._labelCanShow(F,x-m,y-g)){let a=r.config.dataLabels.formatter(this.labels[t][u],{value:r.seriesData.series[t][u],seriesIndex:t,dataPointIndex:u,w:r,highlight:e.highlight});"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(a=this.truncateLabels(String(a),F,m,g,x,y)),r.seriesData.series[t][u]&&(P=this.helpers.calculateDataLabels({text:a,x:(m+x)/2,y:(g+y)/2+this.strokeWidth/2+F/3,i:t,j:u,colorProps:_,fontSize:F})),r.config.dataLabels.enabled&&P&&this.rotateToFitLabel(P,F,a,m,g,x,y)}if(s.add(C),null!==P&&(P.node.setAttribute("data:key",N(e._key)),s.add(P),k)){const e=!L||""===T||!!this.camera&&null!==T&&T!==E.treemapLabelLook(P.node);this._rideTile(P.node,L,m,g,x,y,k,e)}});const y=r.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&r.config.series.length>1&&y&&y.show){const e=r.config.series[t].name||"";if(e&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:t,offsetY:n,borderColor:i,borderWidth:l,borderRadius:h,style:p}=y,u=p.color||r.config.chart.foreColor,f={left:p.padding.left,right:p.padding.right,top:p.padding.top,bottom:p.padding.bottom},m=a.getTextRects(e,p.fontSize,p.fontFamily),g=m.width+f.left+f.right,b=m.height+f.top+f.bottom,x=c.xMin+(t||0),_=c.yMin+(n||0),w=a.drawRect(x,_,g,b,h,p.background,1,l,i),v=x+f.left,A=_+f.top+.75*(null!=(o=null==m?void 0:m.height)?o:0),C=a.drawText({x:v,y:A,text:e,fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,foreColor:u,cssClass:p.cssClass||""}),S=d.xMin-c.xMin,E=d.yMin-c.yMin;if(Number.isFinite(S)&&Number.isFinite(E)&&(S||E)){const e=this.dynamicAnim.speed;this.animateTreemap(w,{x:x+S,y:_+E},{x:x,y:_},e),this.animateTreemap(C,{x:v+S,y:A+E},{x:v,y:A},e)}s.add(w),s.add(C)}}s.add(h),i.add(s)}),this.camera&&this._playZoomExit(i),this._renderBreadcrumb(),i}_levelCfg(e){if(this._levelCache||(this._levelCache=[]),this._levelCache[e])return this._levelCache[e];const t=this.w.config.plotOptions.treemap,r=t.parents||{},a=(t.levels||[])[e]||{},n=h(l(l({},r),a),{header:h(l(l({},r.header||{}),a.header||{}),{style:l(l({},(r.header||{}).style||{}),(a.header||{}).style||{})}),hover:l(l({},r.hover||{}),a.hover||{})});return this._levelCache[e]=n,n}_levelPadding(e,t,r){const a=this._levelCfg(e);return Number(a.padding)||0}_levelHeader(e,t,r,a){const n=this._levelCfg(t).header||{};if(!1===n.show)return 0;const i=Number(n.height);return!Number.isFinite(i)||i<=0||r<(Number(n.minWidth)||40)||a<2*i?0:i}_leavesBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const a=e=>{if(e.children&&e.children.length)e.children.forEach(a);else{const t=e._si||0;r[t]&&r[t].push(e)}};return e.forEach(a),r}_parentsBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const a=e=>{if(!e.children||!e.children.length)return;const t=e._si||0;r[t]&&r[t].push(e),e.children.forEach(a)};return e.forEach(a),r.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),r}_leafColor(e,t){const r=this.w;if(this.scale){const a=function(e,t,r){const a=e.config.series[t];return B(e,a&&Array.isArray(a.data)?a.data[r]:null,t,r)}(r,e,t);if(null!=a){const e=this.scale.at(a);return{color:e,foreColor:D(e),colorProps:{color:e,foreColor:D(e),percent:0}}}}return this.helpers.getShadeColor(r.config.chart.type,e,t,this.negRange)}_parentChrome(e){const t=this.w,r=this._levelCfg(e),a="dark"===t.config.theme.mode,n=(r.header||{}).style||{},i=Math.min(e,3),o=a?255:0,s=`${o},${o},${o}`;return{fill:r.fill||`rgba(${s},${(a?.04:.03)+.02*i})`,fillOpacity:null==r.fillOpacity?1:r.fillOpacity,borderColor:r.borderColor||`rgba(${s},${a?.18:.14})`,borderWidth:null==r.borderWidth?1:r.borderWidth,borderRadius:null==r.borderRadius?t.config.plotOptions.treemap.borderRadius:r.borderRadius,headerBg:n.background||`rgba(${s},${a?.1:.07})`,headerColor:n.color||(a?"#e8e8e8":t.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||t.config.chart.fontFamily,headerFontWeight:null==n.fontWeight?600:n.fontWeight,hoverColor:r.hover&&r.hover.color||(a?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:r.hover&&r.hover.width||2,hoverShow:!(r.hover&&!1===r.hover.show)}}_drawParent(e,t,r){var a,n,i,o;const s=t.rect;if(!s)return;const l=this.w,h=new b(this.w,this.ctx),c=t.depth||0,d=this._levelCfg(c),p=this._parentChrome(c),u=s[0],f=s[1],m=s[2]-s[0],g=s[3]-s[1];if(m<=0||g<=0)return;const x=h.group({class:"apexcharts-treemap-parent","data:depth":c,"data:name":w.escapeString(t.name)}),_=N(t._key),v=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(_):null,A=v?h.drawPath({d:this._tilePath(u,f,u+m,f+g),fill:p.fill,stroke:p.borderColor,strokeWidth:p.borderWidth,fillOpacity:p.fillOpacity}):h.drawRect(u,f,m,g,p.borderRadius,p.fill,p.fillOpacity,p.borderWidth,p.borderColor);A.node.classList.add("apexcharts-treemap-parent-rect"),A.node.setAttribute("data:key",_),A.node.setAttribute("data:depth",String(c)),v&&this._morphTile(A,v,this._tilePath(u,f,u+m,f+g),this.ctx.morphTypeChange.getSpeed(),r,c);let C=null,S=null,E=!1;const M=l.config.chart.animations.dynamicAnimation;if(!v&&l.globals.dataChanged&&M.enabled&&l.globals.shouldAnimate){const e=M.speed;if(C=null!=(n=null==(a=l.globals.prevTreemapParents)?void 0:a.get(`${r}|${_}`))?n:null,!C&&this.camera){C=this.camera.back({x:u,y:f,width:m,height:g}),E=!0;const t=l.layout;C.x<t.gridWidth&&C.y<t.gridHeight&&C.x+C.width>0&&C.y+C.height>0&&x.attr({opacity:0}).animate(e).attr({opacity:1})}C?S=new y(l).animateRect(A,...V({x:C.x,y:C.y,width:C.width,height:C.height},{x:u,y:f,width:m,height:g},C.fill,A.node.getAttribute("fill")),e,()=>{}):x.attr({opacity:0}).animate(e).attr({opacity:1})}x.add(A);const k=t.headerHeight||0;let L="";if(k>0){const e=d.header||{},a=h.drawRect(u,f,m,k,0,p.headerBg,1,0,"transparent");if(a.node.classList.add("apexcharts-treemap-parent-header"),x.add(a),C){const e=C.header,t={x:u,y:f,width:m,height:k};new y(l).animateRect(a,...V(e?{x:e.x,y:e.y,width:e.width,height:e.height}:E&&this.camera?this.camera.back(t):{x:C.x,y:C.y,width:C.width,height:0},t,null==e?void 0:e.fill,a.node.getAttribute("fill")),l.config.chart.animations.dynamicAnimation.speed,()=>{})}let n=String(null!=(i=t.name)?i:"");"function"==typeof e.formatter?n=String(e.formatter(t.name,{value:t.value,depth:c,seriesIndex:r,node:t,w:l})):e.showValue&&(n=`${n} ${this._formatValue(t.value)}`),L=n;const s=Number(e.offsetX)||0,b=e.align||"left",_=6,w=Math.max(0,m-2*_-Math.abs(s)),v=parseFloat(String(p.headerFontSize))||12,M=h.getTextBasedOnMaxWidth({text:n,maxWidth:w,fontSize:v});if(M){let t=u+_+s,r="start";"center"===b?(t=u+m/2+s,r="middle"):"right"===b&&(t=u+m-_+s,r="end");const a=h.drawText({x:t,y:f+k/2+v/3+(Number(e.offsetY)||0),text:M,textAnchor:r,fontSize:p.headerFontSize,fontFamily:p.headerFontFamily,fontWeight:p.headerFontWeight,foreColor:p.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||""}`});if(a.node.setAttribute("pointer-events","none"),x.add(a),S&&C){const e=e=>"center"===b?e.x+e.width/2:"right"===b?e.x+e.width:e.x,t={x:e(C)-e({x:u,width:m})+(u+m/2),y:C.y-f+(f+g/2)},r=!!this.camera&&!E&&(null==(o=C.header)?void 0:o.look)!==Z(a.node);this._rideTile(a.node,t,u,f,u+m,f+g,S,r)}}this._attachParentEvents(a.node,t,p,A),this._makeParentAccessible(a.node,t,p,A,L)}this._attachParentEvents(A.node,t,p,A),x.node.setAttribute("role","group"),x.node.setAttribute("aria-label",this._parentLabel(t,L)),e.add(x)}_parentLabel(e,t){const r=this._drawnTotal(),a=r>0?(e._area/r*100).toFixed(1):"0",n=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g," ").trim():`${e.name}, ${this._formatValue(e._area)}`}, ${n} ${1===n?"item":"items"}, ${a}% of total`}_makeParentAccessible(e,t,r,a,n){e&&e.setAttribute&&this._zoomEnabled()&&(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`${this._parentLabel(t,n)}. Zoom in`),e.setAttribute("aria-expanded","false"),M.isBrowser()&&e.addEventListener&&(e.addEventListener("focus",()=>{a.node.setAttribute("stroke",r.hoverColor),a.node.setAttribute("stroke-width",String(r.hoverWidth+1))}),e.addEventListener("blur",()=>{a.node.setAttribute("stroke",r.borderColor),a.node.setAttribute("stroke-width",String(r.borderWidth))}),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this._zoomTo(t,!0))})))}_attachParentEvents(e,t,r,a){if(!M.isBrowser()||!e||!e.addEventListener)return;const n=this.w;r.hoverShow&&(e.addEventListener("mouseenter",()=>{a.node.setAttribute("stroke",r.hoverColor),a.node.setAttribute("stroke-width",String(r.hoverWidth))}),e.addEventListener("mouseleave",()=>{a.node.setAttribute("stroke",r.borderColor),a.node.setAttribute("stroke-width",String(r.borderWidth))})),n.config.tooltip.enabled&&(e.addEventListener("mouseenter",e=>this._showParentTooltip(e,t)),e.addEventListener("mousemove",e=>this._positionTooltip(e)),e.addEventListener("mouseleave",()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor="pointer",e.addEventListener("click",()=>this._zoomTo(t)))}_zoomEnabled(){const e=this.w,t=e.config.plotOptions.treemap.zoom;if(!t||!t.enabled||!this.showParents)return!1;const r=e.config.drilldown;return!(this.ctx.drilldown&&r&&r.enabled&&Array.isArray(r.series)&&r.series.length&&(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),1))}_resolveFocus(e){const t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let r=null;const a=e=>{r||(e._key!==t?e.children&&e.children.forEach(a):r=e)};return e.forEach(a),r&&r.children&&r.children.length?r:null}_zoomTo(e,t=!1){const r=this.w;if(!e||!e.children||!e.children.length)return;const a=r.globals.treemapFocusKey===e._key?null:e._key,n=this._refocus(a);t&&n&&"function"==typeof n.then&&n.then(()=>{if(!M.isBrowser())return;const e=r.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(e&&e.focus)return void e.focus();const t=r.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");t&&t.focus&&t.focus()})}_refocus(e){var t;const r=this.w,a=r.globals,n=r.config.chart.animations,i=!(!n.enabled||!n.dynamicAnimation.enabled);return a.treemapZoom=i&&M.isBrowser()?{from:null!=(t=a.treemapFocusKey)?t:null,to:e}:null,a.treemapFocusKey=e,this._hideParentTooltip(),a.shouldAnimate=i,a.resized=!0,a.dataChanged=!0,a.treemapZoom&&this.ctx.series.getPreviousPaths(),this.ctx.update()}_zoomCamera(){var e;const t=this.w,r=t.globals.treemapZoom;t.globals.treemapZoom=null;const a=t.globals.prevTreemapParents;if(!(r&&a&&t.globals.dataChanged&&t.globals.shouldAnimate))return null;const n=new Map,i=e=>{n.set(e._key,e),e.children&&e.children.forEach(i)};this.drawn.forEach(i);const o=(e,t)=>{for(let r=n.get(e);r;r=r._parent)if(r._key===t)return!0;return!1},{from:s,to:l}=r,h=l&&(null==s||o(l,s))?l:s&&(null==l||o(s,l))?s:null,c=h?n.get(h):null;if(!h||!c||!c.rect)return null;let d=c;for(;d._parent;)d=d._parent;const p=Math.max(0,this.roots.indexOf(d)),u=null!=(e=a.get(`${p}|${N(h)}`))?e:null,f=c.rect,m=f[0],g=f[1],b=f[2]-f[0],x=f[3]-f[1];if(!u||!(u.width>0&&u.height>0&&b>0&&x>0))return null;const y=u,_=b/y.width,w=x/y.height;return{fwd:e=>({x:m+(e.x-y.x)*_,y:g+(e.y-y.y)*w,width:e.width*_,height:e.height*w}),back:e=>({x:y.x+(e.x-m)/_,y:y.y+(e.y-g)/w,width:e.width/_,height:e.height/w})}}_playZoomExit(e){const t=this.w,r=this.camera,a=t.globals.prevTreemapView;if(t.globals.prevTreemapView=null,!r||!M.isBrowser())return;const n=e.node,i=new b(this.w,this.ctx),o=[["apexcharts-treemap-rect","T"],["apexcharts-treemap-parent-rect","P"],["apexcharts-data-labels","L"]],s=e=>{var t;const r=o.find(([t])=>e.classList.contains(t)),a=null==(t=e.closest(".apexcharts-series"))?void 0:t.getAttribute("data:realIndex");return r?`${r[1]}${a}|${e.getAttribute("data:key")}`:""},l=(e,t)=>{var r;return parseFloat(null!=(r=e.getAttribute(t))?r:"")},h=e=>({x:l(e,"x"),y:l(e,"y"),width:l(e,"width"),height:l(e,"height")}),c=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),d=new Map;n.querySelectorAll("[data\\:key]").forEach(e=>{const t=s(e);t&&d.set(t,e)});const p=[],u=(e,t)=>{const r=h(e);[r.x,r.y,r.width,r.height].every(Number.isFinite)&&p.push(a=>{e.setAttribute("x",String(r.x+(t.x-r.x)*a)),e.setAttribute("y",String(r.y+(t.y-r.y)*a)),e.setAttribute("width",String(r.width+(t.width-r.width)*a)),e.setAttribute("height",String(r.height+(t.height-r.height)*a))})},f=(e,t,r=!1)=>{var a;const n=e.getAttribute("transform")||"",i=parseFloat(null!=(a=e.getAttribute("opacity"))?a:"1"),o=Number.isFinite(i)?i:1;p.push(a=>{e.setAttribute("transform",`translate(${t.x*a} ${t.y*a}) ${n}`.trim()),r&&e.setAttribute("opacity",String(o*(1-a)))})},m=e=>{[e,...e.querySelectorAll("*")].forEach(e=>{e.removeAttribute("data:key"),["role","tabindex","aria-label","aria-expanded"].forEach(t=>e.removeAttribute(t)),e.classList.remove("apexcharts-treemap-rect","apexcharts-treemap-parent","apexcharts-treemap-parent-rect","apexcharts-treemap-parent-header","apexcharts-treemap-parent-label","apexcharts-data-labels")})},g=i.group({class:"apexcharts-treemap-ghosts"}).node,x=i.group({class:"apexcharts-treemap-ghosts"}).node;if(a){const e=[...a.querySelectorAll(":scope > .apexcharts-treemap-ghosts")];e.forEach((t,a)=>{t.querySelectorAll("rect").forEach(e=>u(e,r.fwd(h(e)))),t.querySelectorAll("text").forEach(e=>{const t=e=>{const t=/^translate\(\s*([-+.\deE]+)[\s,]+([-+.\deE]+)\s*\)/.exec(((null==e?void 0:e.getAttribute("transform"))||"").trim());return t?[parseFloat(t[1]),parseFloat(t[2])]:[0,0]},[a,n]=t(e.parentElement),[i,o]=t(e),s={x:l(e,"x")+a+i,y:l(e,"y")+n+o,width:0,height:0};if(!Number.isFinite(s.x)||!Number.isFinite(s.y))return;const h=r.fwd(s);f(e,{x:h.x-s.x,y:h.y-s.y})}),[...t.childNodes].forEach(t=>(a===e.length-1&&e.length>1?x:g).appendChild(t)),t.remove()});const n=new Map;a.querySelectorAll(".apexcharts-treemap-rect[data\\:key]").forEach(e=>n.set(s(e),e)),a.querySelectorAll(".apexcharts-data-labels[data\\:key]").forEach(e=>{const t=s(e),a=d.get(t);if(a&&!(e=>{var t;return parseFloat(null!=(t=e.getAttribute("opacity"))?t:"1")<.999})(e)&&E.treemapLabelLook(a)===E.treemapLabelLook(e))return;const i=n.get(`T${t.slice(1)}`);if(!i)return;const o=c(h(i)),l=d.get(`T${t.slice(1)}`),p=c(l?h(l):r.fwd(h(i)));f(e,{x:p.x-o.x,y:p.y-o.y},!!l),m(e),x.appendChild(e)}),a.querySelectorAll(".apexcharts-treemap-parent").forEach(e=>{var a;const n=e.querySelector(".apexcharts-treemap-parent-rect[data\\:key]");if(!n||"rect"!==n.tagName.toLowerCase())return;const i=d.get(s(n));if(i){const t=e.querySelector(".apexcharts-treemap-parent-label"),r=null==(a=i.parentElement)?void 0:a.querySelector(".apexcharts-treemap-parent-label");if(t&&Z(t)!==Z(r)){const e=h(n),r=h(i),a=t.getAttribute("text-anchor"),o=e=>"middle"===a?e.x+e.width/2:"end"===a?e.x+e.width:e.x;f(t,{x:o(r)-o(e),y:r.y-e.y},!0),m(t),x.appendChild(t)}return}e.querySelectorAll("rect").forEach(e=>u(e,r.fwd(h(e)))),e.querySelectorAll("text").forEach(e=>{const t={x:l(e,"x"),y:l(e,"y"),width:0,height:0};if(!Number.isFinite(t.x)||!Number.isFinite(t.y))return;const a=r.fwd(t);f(e,{x:a.x-t.x,y:a.y-t.y})});const o=r.fwd(h(n)),c=t.layout;o.x<c.gridWidth&&o.y<c.gridHeight&&o.x+o.width>0&&o.y+o.height>0&&p.push(t=>e.setAttribute("opacity",String(1-t))),m(e),g.appendChild(e)}),n.forEach((e,t)=>{d.has(t)||"rect"!==e.tagName.toLowerCase()||(u(e,r.fwd(h(e))),m(e),g.appendChild(e))});const i=a.querySelector(":scope > defs.apexcharts-treemap-ghost-defs");i&&g.insertBefore(i,g.firstChild)}[g,x].forEach(e=>{e.setAttribute("pointer-events","none"),e.setAttribute("aria-hidden","true")}),n.insertBefore(g,n.firstChild),n.appendChild(x),n.setAttribute("clip-path",`url(#gridRectMask${t.globals.cuid})`),function(e,t,r,a,n){const i=performance.now(),o=s=>{if(e.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(s-i)/t));a(r(l),l),l<1?F.requestAnimationFrame(o):n&&n()};F.requestAnimationFrame(o)}(t,Math.max(1,this.dynamicAnim.speed||1),$(t.config.chart.animations.easing),e=>p.forEach(t=>t(e)),()=>{g.remove(),x.remove(),n.removeAttribute("clip-path")})}_focusChain(){const e=[],t=new Set(this.drawn||[]);let r=this._resolveFocus(this.drawn||[]);for(;r&&(e.unshift(r),!t.has(r));)r=r._parent;return e}_breadcrumbCfg(){const e=this.w.config.plotOptions.treemap.zoom;return H(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!M.isBrowser())return;const e=this.w;if(!e.dom.elWrap)return;if(Y(e),!this._zoomEnabled())return;const t=this._focusChain();if(!t.length)return;const r=function(e,t){if(!M.isBrowser())return null;const r=e.dom.elWrap;if(!r)return null;Y(e);const a=t.config||H(e);if(!1===a.show)return null;const n=t.crumbs||[];if(n.length<2)return null;const i=F.createElementNS(q,"nav");i.setAttribute("class","apexcharts-breadcrumb"),i.setAttribute("aria-label",t.ariaLabel||"Breadcrumb"),function(e,t){const r=t.offsetX||0,a=t.offsetY||0;e.style.position="absolute",e.style.top=a+"px","top-right"===t.position?e.style.right=3-r+"px":e.style.left=r+"px"}(i,a),t.compact&&(i.style.fontSize="11px",i.style.padding="0 2px");const o=null!=a.separator?a.separator:" / ";return n.forEach((e,r)=>{var s;if(r>0){const e=F.createElementNS(q,"span");e.setAttribute("class","apexcharts-breadcrumb-separator"),e.setAttribute("aria-hidden","true"),e.textContent=o,i.appendChild(e)}let l=0===r?null!=(s=a.rootLabel)?s:"All":e.label;if("function"==typeof a.formatter&&(l=a.formatter(l,{index:r,depth:n.length-1,data:e.data})),r===n.length-1){const e=F.createElementNS(q,"span");return e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.setAttribute("aria-current","page"),e.textContent=String(l),void i.appendChild(e)}const h=F.createElementNS(q,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),0===r){const e=F.createElementNS(q,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",h.appendChild(e)}const c=F.createElementNS(q,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=String(l),h.appendChild(c),h.addEventListener("click",()=>t.onNavigate(r,e)),i.appendChild(h)}),r.appendChild(i),i}(e,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(e,t)=>{this._refocus(t.data?t.data._key:null)}});r&&(this._placeBreadcrumb(r),function(e,t){const r=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>null!==e);if(!r.length)return;const a=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<r.length+1;e++){const e=t.getBoundingClientRect(),n=r.find(t=>{const r=t.getBoundingClientRect();return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top});if(!n)break;t.style.top=n.getBoundingClientRect().bottom-a+4+"px"}}(e,r))}_placeBreadcrumb(e){var t,r;const a=this.w,n=a.layout.translateY||0,i=null==(r=null==(t=this.ctx)?void 0:t.dimensions)?void 0:r.dimHelpers,o=i?i.getTitleSubtitleCoords("title").height+i.getTitleSubtitleCoords("subtitle").height:0,s=e.getBoundingClientRect().height||18;if(n-o>=s+1)return void(e.style.top=n-s-1+"px");e.style.top=`${o}px`;const l="dark"===a.config.theme.mode;e.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",e.style.borderRadius="4px"}_showParentTooltip(e,t){const r=this.w,a=this._tip();if(!a)return;const n=this._drawnTotal(),i=t._parent?t._parent._area:n,o=n>0?(t._area/n*100).toFixed(1):"0.0",s=i>0?(t._area/i*100).toFixed(1):o,l=this.w.config.plotOptions.treemap.parents,h=l&&l.tooltip&&l.tooltip.formatter,c=this._countLeaves(t);let d;if("function"==typeof h)d=h({name:t.name,value:t._area,depth:t.depth||0,leafCount:c,percentOfParent:Number(s),percentOfTotal:Number(o),node:t,w:r});else{const e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${e};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${w.escapeString(t.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${c} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${o}% of total</span></div></div></div>`}a.innerHTML=d,a.classList.add("apexcharts-active"),a.removeAttribute("aria-hidden"),this._positionTooltip(e)}_tip(){const e=this.w.dom.elWrap;let t=this._tooltipEl;if(!(null==t?void 0:t.isConnected)){t=e.querySelector(".apexcharts-treemap-tooltip");const r=!t&&e.querySelector(".apexcharts-tooltip");r&&(t=r.cloneNode(!1),t.classList.add("apexcharts-treemap-tooltip"),e.appendChild(t)),this._tooltipEl=t}return t}_positionTooltip(e){const t=this._tip();if(!t)return;const r=this.w.dom.elWrap.getBoundingClientRect(),a=t.offsetWidth,n=t.offsetHeight;let i=e.clientX-r.left+12;i+a>r.width&&(i=e.clientX-r.left-a-12),i=Math.max(0,Math.min(i,r.width-a));let o=e.clientY-r.top+12;o+n>r.height&&(o=e.clientY-r.top-n-12),o=Math.max(0,Math.min(o,r.height-n)),t.style.left=i+"px",t.style.top=o+"px"}_hideParentTooltip(){const e=this._tooltipEl;null==e||e.classList.remove("apexcharts-active"),null==e||e.setAttribute("aria-hidden","true")}_drawnTotal(){return null==this._total&&(this._total=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0)),this._total||0}_subtreeArea(e){if(null!=e._area)return e._area;const t=e.children;if(t&&t.length){let e=0;for(let r=0;r<t.length;r++)e+=this._subtreeArea(t[r]);return e}const r=Number(e.value);return isNaN(r)?0:Math.abs(r)}_countLeaves(e){return e.children&&e.children.length?e.children.reduce((e,t)=>e+this._countLeaves(t),0):1}_formatValue(e){var t,r,a,n,i;const o=this.w,s=(null==(r=null==(t=o.config.tooltip)?void 0:t.y)?void 0:r.formatter)||(null==(i=null==(n=null==(a=o.config.yaxis)?void 0:a[0])?void 0:n.labels)?void 0:i.formatter);if("function"==typeof s)try{return String(s(e,{seriesIndex:0,dataPointIndex:0,w:o}))}catch(e){}return String(e)}_labelCanShow(e,t,r){if(!Number.isFinite(e)||e<=0)return!1;const a=this.w.config.plotOptions.treemap.dataLabels;return!(e<(a&&null!=a.minFontSize?Number(a.minFontSize):0))&&Math.max(t,r)>=e}_averageLabelSize(){if(null!=this._avgLabelSize)return this._avgLabelSize;const e=this.labels.flat();let t=0;for(const r of e)t+=String(null!=r?r:"").length;return this._avgLabelSize=t/(e.length||1),this._avgLabelSize}getFontSize(e){const t=this.w,r=this._averageLabelSize();return function(e,a){const n=e*a,i=Math.pow(n,.5);return Math.min(i/r,parseInt(t.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,r,a,n,i,o){const s=new b(this.w),l=s.getTextRects(r,String(t));if(l.width+this.w.config.stroke.width+5>i-a&&l.width<=o-n){const t=s.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(-90 ${t.x} ${t.y}) translate(${l.height/3})`)}}truncateLabels(e,t,r,a,n,i){const o=new b(this.w),s=o.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>n-r&&i-a>n-r?i-a:n-r,l=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==l.length&&s/t<5?"":l}_morphKeyed(){var e;const t=null==(e=this.ctx)?void 0:e.morphTypeChange;return!(!t||"function"!=typeof t.hasKeyedMarks||!t.hasKeyedMarks()||"function"!=typeof t.getInitialPathForKey)}_morphSourceForLeaf(e){var t;const r=null==(t=this.ctx)?void 0:t.morphTypeChange;if(!r||"function"!=typeof r.getInitialPathAt)return null;if(this._morphKeyed()){const t=r.getInitialPathForKey(N(e._key));if(t)return t}return r.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,r,a){return`M ${e} ${t} L ${r} ${t} L ${r} ${a} L ${e} ${a} Z`}_morphTile(e,t,r,a,n,i){new y(this.w,this.ctx).morphSVG(e,n,i,"none",t,r,a,0)}_rideTile(e,t,r,a,n,i,o,s=!t){const l=e.getAttribute("transform")||"",h=t?t.x-(r+n)/2:0,c=t?t.y-(a+i)/2:0,d=t=>{if(t>=1)return l?e.setAttribute("transform",l):e.removeAttribute("transform"),void e.removeAttribute("opacity");const r=1-t;e.setAttribute("transform",`translate(${h*r} ${c*r}) ${l}`.trim()),s&&e.setAttribute("opacity",String(t))};d(0),o.during(d)}animateTreemap(e,t,r,a,n=0){const i=new y(this.w);return i.animateRect(e,t,r,a,()=>{i.animationCompleted(e)},n)}}}),e.default=c,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexTreemap={})});
|
|
5
|
+
!function(e){var t="undefined"!=typeof globalThis?globalThis:self,r=t.ApexCharts;if(r&&r.__internals)return e.call(t);if(r)throw new Error("ApexCharts: dist/treemap.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/treemap.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var a={file:"dist/treemap.js",run:e,done:!1},n=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);n.push(a),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!a.done){var r=t.ApexCharts;if(r)if(r.__internals){a.done=!0;var i=n.indexOf(a);-1!==i&&n.splice(i,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/treemap.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/treemap.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/treemap.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/treemap.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,r=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(e,r,a)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,l=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&s(e,r,t[r]);if(n)for(var r of n(t))o.call(t,r)&&s(e,r,t[r]);return e},h=(e,t)=>r(e,a(t));const c=globalThis.ApexCharts;function d(e,t,r,a){const n=a*a,i=r*r;return Math.max(n*t/i,i/(n*e))}function p(e,t,r,a,n,i){return 0===e||d(t,r,a,i)>=d(Math.min(t,n),Math.max(r,n),a+n,i)}function u(e,t,r,a,n,i,o,s){if(o>=s){const o=a/s;let l=i;for(let a=0;a<r;a++){const r=t[a]/o;e.push([n,l,n+o,l+r]),l+=r}}else{const s=a/o;let l=n;for(let a=0;a<r;a++){const r=t[a]/s;e.push([l,i,l+r,i+s]),l+=r}}}function f(e){const t=e.children;if(t&&t.length){let r=0;for(let e=0;e<t.length;e++)r+=f(t[e]);return e._area=r,r}const r=Number(e.value),a=isNaN(r)?0:Math.abs(r);return e._area=a,a}function m(e,t,r,a,n,i,o,s){const l=e.length;if(0===l||a<=0||n<=0)return;const h=new Array(l);let c=0;for(let t=0;t<l;t++)h[t]=e[t]._area,c+=h[t];if(c<=0)return;const d=function(e,t,r,a,n){const i=[],o=e.length;if(0===o)return i;const s=new Array(o);let l=0,h=0,c=1/0,d=-1/0,f=0;for(;f<o;){const o=Math.min(a,n),m=e[f];if(p(l,c,d,h,m,o))s[l]=m,l++,h+=m,m<c&&(c=m),m>d&&(d=m),f++;else{if(u(i,s,l,h,t,r,a,n),a>=n){const e=h/n;t+=e,a-=e}else{const e=h/a;r+=e,n-=e}l=0,h=0,c=1/0,d=-1/0}}return l>0&&u(i,s,l,h,t,r,a,n),i}(function(e,t){let r=0;for(let t=0;t<e.length;t++)r+=e[t];const a=t/r,n=new Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]*a;return n}(h,a*n),t,r,a,n);for(let t=0;t<l;t++){const r=e[t],a=d[t];if(!a)continue;r.rect=a,r.depth=i;const n=r.children;if(!n||!n.length)continue;const l=a[2]-a[0],h=a[3]-a[1];let c=Math.max(0,o(r,i,l,h)||0);(2*c>=l||2*c>=h)&&(c=0);let p=Math.max(0,s(r,i,l,h)||0);p>0&&h-2*c-p<p&&(p=0),r.headerHeight=p,m(n,a[0]+c,a[1]+p+c,l-2*c,h-p-2*c,i+1,o,s)}}const g={generateNested:function(e,t,r,a={}){if(!Array.isArray(e)||0===e.length)return e||[];const n=a.padding||(()=>0),i=a.header||(()=>0);for(let t=0;t<e.length;t++)f(e[t]);return m(e,0,0,t,r,0,n,i),e}},b=globalThis.ApexCharts.__internals.__apex_Graphics,x=globalThis.ApexCharts.__internals,y=x.__apex_Animations;x.__apex_Animations_computeStagger,x.__apex_Animations_applyAnimationPolicy,x.__apex_Animations_prefersReducedMotion,x.__apex_Animations_applyProgressiveReveal;const _=globalThis.ApexCharts.__internals.__apex_Fill,w=globalThis.ApexCharts.__internals.__apex_Utils,v=globalThis.ApexCharts.__internals.__apex_DataLabels;class A{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const r=e.config.plotOptions[e.config.chart.type];return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,r,a){const n=this.w;let i=1;const o=n.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,r);n.globals.hasNegs||a?i=n.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*o):(1-s.percent/100)*(1.25*o):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(i=1-s.percent/100,"treemap"===e&&(i=(1-s.percent/100)*(1.25*o)));let l=s.color;const h=new w;if(n.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){const e=h.shadeColor(-1*i,s.color);l=w.hexToRgba(w.isColorHex(e)?e:w.rgb2hex(e),n.config.fill.opacity)}else{const e=h.shadeColor(i,s.color);l=w.hexToRgba(w.isColorHex(e)?e:w.rgb2hex(e),n.config.fill.opacity)}return{color:l,colorProps:s}}determineColor(e,t,r){const a=this.w,n=a.seriesData.series[t][r],i=a.config.plotOptions[e];let o=i.colorScale.inverse?r:t;i.distributed&&"treemap"===a.config.chart.type&&(o=r);let s,l,h=a.globals.colors[o],c=null;if(i.distributed||"heatmap"!==e){const e=a.seriesData.series[t];s=e.length?e[0]:0,l=s;for(let t=1;t<e.length;t++)e[t]<s&&(s=e[t]),e[t]>l&&(l=e[t])}else s=a.globals.minY,l=a.globals.maxY;const d=i.colorScale.min,p=i.colorScale.max;void 0!==d&&void 0!==p&&p>d?(s=d,l=p):void 0!==d&&(s=d<a.globals.minY?d:a.globals.minY,l=p>a.globals.maxY?p:a.globals.maxY);const u=Math.abs(l)+Math.abs(s),f=Math.min(Math.max(n,s),l);let m=0===u?0:100*f/u;return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(e=>{if(n>=e.from&&n<=e.to){h=e.color,c=e.foreColor?e.foreColor:null,s=e.from,l=e.to;const t=Math.abs(l)+Math.abs(s);m=0===t?0:100*n/t}}),{color:h,foreColor:c,percent:m}}calculateDataLabels({text:e,x:t,y:r,i:a,j:n,colorProps:i,fontSize:o}){const s=this.w.config.dataLabels,l=new b(this.w),h=new v(this.w,this.ctx);let c=null;return s.enabled&&(c=l.group({class:"apexcharts-data-labels"}),h.plotDataLabelsText({x:t,y:r+parseFloat(s.style.fontSize)/3,text:e,i:a,j:n,color:i.foreColor,parent:c,fontSize:o,dataLabelsConfig:s})),c}}const C=globalThis.ApexCharts.__internals.__apex_Filters,S=globalThis.ApexCharts.__internals.__apex_Series,E=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function M(e,t){var r;const a=String(e).replace(/\//g,"%2F"),n=(null!=(r=t.get(a))?r:-1)+1;return t.set(a,n),`${n}:${a}`}function k(e,t,r,a,n,i=null,o={},s=new Map){var l,h,c;const d=t&&"object"==typeof t,p=d&&null!=(h=null!=(l=t.x)?l:t.name)?h:"",u=d?null!=(c=t.y)?c:t.value:t,f=null==u||""===u?NaN:Number(u),m={name:String(p),value:isNaN(f)?null:f,color:d&&t.color?t.color:void 0,_key:`${n}/${M(p,s)}`};a&&!m.color&&(m.color=a[r%a.length]),o.keepDatum&&(m._datum=t);const g=new Map;if(d&&Array.isArray(t.children)&&t.children.length)m.children=t.children.map((t,r)=>k(e,t,r,null,m._key,i,o,g));else if(d&&null!=t.drilldown&&!1!==o.expandDrilldown){const r=i||new Set;if(!r.has(t.drilldown)){const a=function(e,t){const r=e.config.drilldown;return(r&&Array.isArray(r.series)?r.series:[]).find(e=>e&&e.id===t)}(e,t.drilldown);if(a&&Array.isArray(a.data)&&a.data.length){const n=new Set(r);n.add(t.drilldown);const i=Array.isArray(a.colors)?a.colors:null;m.children=a.data.map((t,r)=>k(e,t,r,i,m._key,n,o,g))}}}return m}function L(e){e.children&&e.children.length&&(e.children.forEach(e=>L(e)),(null==e.value||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(null==e.value||isNaN(e.value))&&(e.value=0)}function F(e){if("string"!=typeof e)return"";const t=e.indexOf("/");return-1===t?"":e.slice(t)}function N(e){const t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};const r=function(e,t,r={}){const a=t||e.config.series;if(!Array.isArray(a))return[];const n=new Map;return a.map((t,a)=>{var i,o;const s=t&&Array.isArray(t.data)?t.data:[],l=M(null!=(i=null==t?void 0:t.name)?i:"",n),h=new Map;return{name:String(null!=(o=null==t?void 0:t.name)?o:""),value:null,color:(null==t?void 0:t.color)||void 0,_key:l,_seriesIndex:a,children:s.map((t,a)=>k(e,t,a,null,l,null,r,h))}})}(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});r.forEach(L);const{maxDepth:a}=function(e){const t=[];let r=0;return e.forEach((e,a)=>{const n=[],i=(e,t,o)=>{e._parent=o,e._depth=t,e._si=a,e._leaf=!(e.children&&e.children.length),t>r&&(r=t),e._leaf?(e._di=n.length,n.push(e)):(e._di=-1,e.children.forEach(r=>i(r,t+1,e)))};i(e,0,null),t.push(n)}),{leaves:t,maxDepth:r}}(r);return{roots:r,maxDepth:a,nested:!1}}const T=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,P=globalThis.ApexCharts.__internals;P.__apex_Easing_easeInOutSine,P.__apex_Easing_DEFAULT_EASING_NAME,P.__apex_Easing_cubicBezier,P.__apex_Easing_registerEasing;const $=P.__apex_Easing_resolveEasing,z=["#cf4d3f","#8f9499","#26a75b"],O=(e,t,r)=>e+(t-e)*r;function W(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0")}function R(e,t,r){const a=w.parseHex(j(e)),n=w.parseHex(j(t));return a&&n?"#"+W(O(a[0],n[0],r))+W(O(a[1],n[1],r))+W(O(a[2],n[2],r)):e}function j(e){return"string"!=typeof e?"#000000":w.isColorHex(e)?e:w.rgb2hex(e)||"#000000"}function B(e,t,r,a){var n,i,o;if(!t||"object"!=typeof t)return null;const s=null==(o=null==(i=null==(n=e.config.plotOptions)?void 0:n.treemap)?void 0:i.colorScale)?void 0:o.colorValue;let l;if(l="function"==typeof s?s(t,{seriesIndex:r,dataPointIndex:a,w:e}):"string"==typeof s?t[s]:t.colorValue,null==l)return null;const h=Number(l);return Number.isFinite(h)?h:null}function I(e){var t,r,a;const n=null==(a=null==(r=null==(t=e.config)?void 0:t.plotOptions)?void 0:r.treemap)?void 0:a.colorScale,i=n&&n.gradient;if(!i)return null;if(!1===i.enabled)return null;const o=e.config.series||[];let s=1/0,l=-1/0,h=!1;for(let t=0;t<o.length;t++){const r=o[t]&&o[t].data;if(Array.isArray(r))for(let a=0;a<r.length;a++){const n=B(e,r[a],t,a);null!=n&&(h=!0,n<s&&(s=n),n>l&&(l=n))}}if(!h&&!0!==i.enabled)return null;Number.isFinite(s)||(s=0,l=0);let c=Number.isFinite(Number(i.min))?Number(i.min):s,d=Number.isFinite(Number(i.max))?Number(i.max):l,p=null;if(null===i.midpoint?p=null:Number.isFinite(Number(i.midpoint))?p=Number(i.midpoint):c<0&&d>0&&(p=0),null!=p&&!1!==i.symmetric&&!Number.isFinite(Number(i.min))&&!Number.isFinite(Number(i.max))){const e=Math.max(Math.abs(c-p),Math.abs(d-p));c=p-e,d=p+e}d===c&&(c-=.5,d+=.5);const u=function(e,t,r,a){if(Array.isArray(e.stops)&&e.stops.length>=2)return e.stops.filter(e=>e&&Number.isFinite(Number(e.value))).map(e=>({value:Number(e.value),color:j(e.color)})).sort((e,t)=>e.value-t.value);const n=(Array.isArray(e.colors)&&e.colors.length>=2?e.colors:z).map(j),i=n.length;if(null!=a&&i>=3){const e=Math.floor((i-1)/2),o=[];for(let r=0;r<=e;r++)o.push({value:O(t,a,r/e),color:n[r]});for(let t=e+1;t<i;t++)o.push({value:O(a,r,(t-e)/(i-1-e)),color:n[t]});return o}return n.map((e,a)=>({value:O(t,r,a/(i-1)),color:e}))}(i,c,d,p);if(u.length<2)return null;const f=d-c,m=u.map(e=>({percent:0===f?0:(e.value-c)/f,color:e.color}));return{min:c,max:d,midpoint:p,stops:u,at:e=>{if(!Number.isFinite(e))return u[Math.floor(u.length/2)].color;if(e<=u[0].value)return u[0].color;const t=u[u.length-1];if(e>=t.value)return t.color;for(let t=1;t<u.length;t++){const r=u[t];if(e<=r.value){const a=u[t-1],n=r.value-a.value,i=0===n?0:(e-a.value)/n;return R(a.color,r.color,i)}}return t.color},legendStops:m}}function D(e){const t=j(e);return w.getContrastRatio(t,"#ffffff")>=w.getContrastRatio(t,"#000000")?"#ffffff":"#000000"}const q="http://www.w3.org/1999/xhtml";function H(e,t){const r=e.config.drilldown&&e.config.drilldown.breadcrumb||{};return l(l({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},r),t||{})}function K(e){const t=e.dom.elWrap;if(!t)return;const r=t.querySelector(".apexcharts-breadcrumb");r&&r.parentNode&&r.parentNode.removeChild(r)}const Y=e=>"string"==typeof e&&/^(#|rgb)/i.test(e);function V(e,t,r,a){return Y(r)&&Y(a)&&r!==a?[h(l({},e),{fill:r}),h(l({},t),{fill:a})]:[e,t]}const Z=e=>S.treemapHeaderLook(e);c.use({treemap:class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new A(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._morphLeafIndex=0,this.camera=null}draw(){var e,t;const r=this.w,a=new b(this.w,this.ctx),n=new _(this.w),i=a.group({class:"apexcharts-treemap"});if(r.globals.noData)return i;this.negRange=this.helpers.checkColorRange(),r.config.series.forEach((e,t)=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),e.data.forEach(e=>{this.labels[t].push(e.x)})});const o=N(r);this.nested=o.nested,this.roots=o.roots,this.scale=I(r);const s=1===o.roots.length?o.roots[0].children||[]:o.roots;this.drawn=s;const h=r.config.plotOptions.treemap.parents;this.showParents=!0===h.show||!1!==h.show&&this.nested;const c=this._resolveFocus(s),d=c?[c]:s;g.generateNested(d,r.layout.gridWidth,r.layout.gridHeight,{padding:(e,t,r,a)=>this.showParents?this._levelPadding(t,r,a):0,header:(e,t,r,a)=>this.showParents?this._levelHeader(e,t,r,a):0}),this.camera=this._zoomCamera();const p=null==(e=this.ctx.highlightFilter)?void 0:e.treemap(this),u=null==(t=this.ctx)?void 0:t.morphTypeChange,f=!!u&&"function"==typeof u.isActive&&u.isActive()&&"function"==typeof u.getInitialPathAt;this._morphLeafIndex=0;const m=this._leavesBySeries(d,r.config.series.length),x=this.showParents?this._parentsBySeries(d,r.config.series.length):[];return m.forEach((e,t)=>{var o;const s=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:w.escapeString(r.seriesData.seriesNames[t]),rel:t+1,"data:realIndex":t});if(S.addCollapsedClassToSeries(this.w,s,t),a.setupEventDelegation(s,".apexcharts-treemap-rect"),r.config.chart.dropShadow.enabled){const e=r.config.chart.dropShadow;new C(this.w).dropShadow(s,e,t)}const h=a.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},d={xMin:1/0,yMin:1/0};this.showParents&&(x[t]||[]).forEach(e=>{this._drawParent(s,e,t)});const u=r.config.chart.animations,m=u.animateGradually,g=m&&!1!==m.enabled,b=new Array(e.length).fill(0);if(g){const t=e.length||1,r=Math.min(m.delay||0,.5*u.speed/t);e.map((e,t)=>{return{j:t,area:e.rect?(r=e.rect,(r[2]-r[0])*(r[3]-r[1])):0};var r}).sort((e,t)=>t.area-e.area).forEach((e,t)=>{b[e.j]=t*r})}e.forEach((e,i)=>{var o;const h=e.rect;if(!h)return;const u=e._di,m=h[0],g=h[1],x=h[2],y=h[3];x>m&&y>g&&(c.xMin=Math.min(c.xMin,m),c.yMin=Math.min(c.yMin,g),c.xMax=Math.max(c.xMax,x),c.yMax=Math.max(c.yMax,y));const _=this._leafColor(t,u),w=_.color;let v=n.fillPath({color:w,seriesNumber:t,dataPointIndex:u});const A=f?this._morphSourceForLeaf(e):null,C=A?a.drawPath({d:this._tilePath(m,g,x,y),fill:"#fff",stroke:r.config.plotOptions.treemap.useFillColorAsStroke?w:r.globals.stroke.colors[t],strokeWidth:this.strokeWidth,fillOpacity:1}):a.drawRect(m,g,x-m,y-g,r.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,r.config.plotOptions.treemap.useFillColorAsStroke?w:r.globals.stroke.colors[t]);v=(null==p?void 0:p(C,t,u,v,e))||v,C.attr({cx:m,cy:g,index:t,i:t,j:u,width:x-m,height:y-g,fill:v}),C.node.classList.add("apexcharts-treemap-rect"),C.node.setAttribute("data:key",F(e._key));let E=null,M={x:m+(x-m)/2,y:g+(y-g)/2,width:0,height:0};const k={x:m,y:g,width:x-m,height:y-g};A?this._morphTile(C,A,this._tilePath(m,g,x,y),this.ctx.morphTypeChange.getSpeed(),t,u):r.config.chart.animations.enabled&&!r.globals.dataChanged&&(r.globals.resized?r.globals.animationEnded=!0:E=this.animateTreemap(C,M,k,r.config.chart.animations.speed,b[i]||0));let L=null,N=null;if(r.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&r.globals.shouldAnimate){e=this.dynamicAnim.speed;const a=null==(o=r.globals.previousPaths[t])?void 0:o[u],n=l({},k);if(!(null==a?void 0:a.rect)&&this.camera&&(M=this.camera.back(k),L={x:M.x+M.width/2,y:M.y+M.height/2}),null==a?void 0:a.rect){M=l({},a.rect),M.width>0&&M.height>0&&(d.xMin=Math.min(d.xMin,M.x),d.yMin=Math.min(d.yMin,M.y),L={x:M.x+M.width/2,y:M.y+M.height/2},N="string"==typeof a.label?a.label:null,a.labelFading&&this.camera&&(N=""));const e=e=>"string"==typeof e&&/^(#|rgb)/i.test(e);e(a.fill)&&e(v)&&a.fill!==v&&(M.fill=a.fill,n.fill=v)}E=this.animateTreemap(C,M,n,e)}}let T=this.getFontSize(h);"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(T=parseInt(String(r.config.dataLabels.style.fontSize),10));let P=null;if(r.config.dataLabels.enabled&&this._labelCanShow(T,x-m,y-g)){let a=r.config.dataLabels.formatter(this.labels[t][u],{value:r.seriesData.series[t][u],seriesIndex:t,dataPointIndex:u,w:r,highlight:e.highlight});"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(a=this.truncateLabels(String(a),T,m,g,x,y)),r.seriesData.series[t][u]&&(P=this.helpers.calculateDataLabels({text:a,x:(m+x)/2,y:(g+y)/2+this.strokeWidth/2+T/3,i:t,j:u,colorProps:_,fontSize:T})),r.config.dataLabels.enabled&&P&&this.rotateToFitLabel(P,T,a,m,g,x,y)}if(s.add(C),null!==P&&(P.node.setAttribute("data:key",F(e._key)),s.add(P),E)){const e=!L||""===N||!!this.camera&&null!==N&&N!==S.treemapLabelLook(P.node);this._rideTile(P.node,L,m,g,x,y,E,e)}});const y=r.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&r.config.series.length>1&&y&&y.show){const e=r.config.series[t].name||"";if(e&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:t,offsetY:n,borderColor:i,borderWidth:l,borderRadius:h,style:p}=y,u=p.color||r.config.chart.foreColor,f={left:p.padding.left,right:p.padding.right,top:p.padding.top,bottom:p.padding.bottom},m=a.getTextRects(e,p.fontSize,p.fontFamily),g=m.width+f.left+f.right,b=m.height+f.top+f.bottom,x=c.xMin+(t||0),_=c.yMin+(n||0),w=a.drawRect(x,_,g,b,h,p.background,1,l,i),v=x+f.left,A=_+f.top+.75*(null!=(o=null==m?void 0:m.height)?o:0),C=a.drawText({x:v,y:A,text:e,fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,foreColor:u,cssClass:p.cssClass||""}),S=d.xMin-c.xMin,E=d.yMin-c.yMin;if(Number.isFinite(S)&&Number.isFinite(E)&&(S||E)){const e=this.dynamicAnim.speed;this.animateTreemap(w,{x:x+S,y:_+E},{x:x,y:_},e),this.animateTreemap(C,{x:v+S,y:A+E},{x:v,y:A},e)}s.add(w),s.add(C)}}s.add(h),i.add(s)}),this.camera&&this._playZoomExit(i),this._renderBreadcrumb(),i}_levelCfg(e){if(this._levelCache||(this._levelCache=[]),this._levelCache[e])return this._levelCache[e];const t=this.w.config.plotOptions.treemap,r=t.parents||{},a=(t.levels||[])[e]||{},n=h(l(l({},r),a),{header:h(l(l({},r.header||{}),a.header||{}),{style:l(l({},(r.header||{}).style||{}),(a.header||{}).style||{})}),hover:l(l({},r.hover||{}),a.hover||{})});return this._levelCache[e]=n,n}_levelPadding(e,t,r){const a=this._levelCfg(e);return Number(a.padding)||0}_levelHeader(e,t,r,a){const n=this._levelCfg(t).header||{};if(!1===n.show)return 0;const i=Number(n.height);return!Number.isFinite(i)||i<=0||r<(Number(n.minWidth)||40)||a<2*i?0:i}_leavesBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const a=e=>{if(e.children&&e.children.length)e.children.forEach(a);else{const t=e._si||0;r[t]&&r[t].push(e)}};return e.forEach(a),r}_parentsBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const a=e=>{if(!e.children||!e.children.length)return;const t=e._si||0;r[t]&&r[t].push(e),e.children.forEach(a)};return e.forEach(a),r.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),r}_leafColor(e,t){const r=this.w;if(this.scale){const a=function(e,t,r){const a=e.config.series[t];return B(e,a&&Array.isArray(a.data)?a.data[r]:null,t,r)}(r,e,t);if(null!=a){const e=this.scale.at(a);return{color:e,foreColor:D(e),colorProps:{color:e,foreColor:D(e),percent:0}}}}return this.helpers.getShadeColor(r.config.chart.type,e,t,this.negRange)}_parentChrome(e){const t=this.w,r=this._levelCfg(e),a="dark"===t.config.theme.mode,n=(r.header||{}).style||{},i=Math.min(e,3),o=a?255:0,s=`${o},${o},${o}`;return{fill:r.fill||`rgba(${s},${(a?.04:.03)+.02*i})`,fillOpacity:null==r.fillOpacity?1:r.fillOpacity,borderColor:r.borderColor||`rgba(${s},${a?.18:.14})`,borderWidth:null==r.borderWidth?1:r.borderWidth,borderRadius:null==r.borderRadius?t.config.plotOptions.treemap.borderRadius:r.borderRadius,headerBg:n.background||`rgba(${s},${a?.1:.07})`,headerColor:n.color||(a?"#e8e8e8":t.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||t.config.chart.fontFamily,headerFontWeight:null==n.fontWeight?600:n.fontWeight,hoverColor:r.hover&&r.hover.color||(a?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:r.hover&&r.hover.width||2,hoverShow:!(r.hover&&!1===r.hover.show)}}_drawParent(e,t,r){var a,n,i,o;const s=t.rect;if(!s)return;const l=this.w,h=new b(this.w,this.ctx),c=t.depth||0,d=this._levelCfg(c),p=this._parentChrome(c),u=s[0],f=s[1],m=s[2]-s[0],g=s[3]-s[1];if(m<=0||g<=0)return;const x=h.group({class:"apexcharts-treemap-parent","data:depth":c,"data:name":t.name}),_=F(t._key),w=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(_):null,v=w?h.drawPath({d:this._tilePath(u,f,u+m,f+g),fill:p.fill,stroke:p.borderColor,strokeWidth:p.borderWidth,fillOpacity:p.fillOpacity}):h.drawRect(u,f,m,g,p.borderRadius,p.fill,p.fillOpacity,p.borderWidth,p.borderColor);v.node.classList.add("apexcharts-treemap-parent-rect"),v.node.setAttribute("data:key",_),v.node.setAttribute("data:depth",String(c)),w&&this._morphTile(v,w,this._tilePath(u,f,u+m,f+g),this.ctx.morphTypeChange.getSpeed(),r,c);let A=null,C=null,S=!1;const E=l.config.chart.animations.dynamicAnimation;if(!w&&l.globals.dataChanged&&E.enabled&&l.globals.shouldAnimate){const e=E.speed;if(A=null!=(n=null==(a=l.globals.prevTreemapParents)?void 0:a.get(`${r}|${_}`))?n:null,!A&&this.camera){A=this.camera.back({x:u,y:f,width:m,height:g}),S=!0;const t=l.layout;A.x<t.gridWidth&&A.y<t.gridHeight&&A.x+A.width>0&&A.y+A.height>0&&x.attr({opacity:0}).animate(e).attr({opacity:1})}A?C=new y(l).animateRect(v,...V({x:A.x,y:A.y,width:A.width,height:A.height},{x:u,y:f,width:m,height:g},A.fill,v.node.getAttribute("fill")),e,()=>{}):x.attr({opacity:0}).animate(e).attr({opacity:1})}x.add(v);const M=t.headerHeight||0;let k="";if(M>0){const e=d.header||{},a=h.drawRect(u,f,m,M,0,p.headerBg,1,0,"transparent");if(a.node.classList.add("apexcharts-treemap-parent-header"),x.add(a),A){const e=A.header,t={x:u,y:f,width:m,height:M};new y(l).animateRect(a,...V(e?{x:e.x,y:e.y,width:e.width,height:e.height}:S&&this.camera?this.camera.back(t):{x:A.x,y:A.y,width:A.width,height:0},t,null==e?void 0:e.fill,a.node.getAttribute("fill")),l.config.chart.animations.dynamicAnimation.speed,()=>{})}let n=String(null!=(i=t.name)?i:"");"function"==typeof e.formatter?n=String(e.formatter(t.name,{value:t._area,depth:c,seriesIndex:r,node:t,w:l})):e.showValue&&(n=`${n} ${this._formatValue(t._area,t._si)}`),k=n;const s=Number(e.offsetX)||0,b=e.align||"left",_=6,w=Math.max(0,m-2*_-Math.abs(s)),E=parseFloat(String(p.headerFontSize))||12,L=h.getTextBasedOnMaxWidth({text:n,maxWidth:w,fontSize:E,fontFamily:p.headerFontFamily,fontWeight:p.headerFontWeight});if(L){let t=u+_+s,r="start";"center"===b?(t=u+m/2+s,r="middle"):"right"===b&&(t=u+m-_+s,r="end");const a=h.drawText({x:t,y:f+M/2+E/3+(Number(e.offsetY)||0),text:L,textAnchor:r,fontSize:p.headerFontSize,fontFamily:p.headerFontFamily,fontWeight:p.headerFontWeight,foreColor:p.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||""}`});if(a.node.setAttribute("pointer-events","none"),x.add(a),C&&A){const e=e=>"center"===b?e.x+e.width/2:"right"===b?e.x+e.width:e.x,t={x:e(A)-e({x:u,width:m})+(u+m/2),y:A.y-f+(f+g/2)},r=!!this.camera&&!S&&(null==(o=A.header)?void 0:o.look)!==Z(a.node);this._rideTile(a.node,t,u,f,u+m,f+g,C,r)}}this._attachParentEvents(a.node,t,p,v),this._makeParentAccessible(a.node,t,p,v,k)}this._attachParentEvents(v.node,t,p,v),x.node.setAttribute("role","group"),x.node.setAttribute("aria-label",this._parentLabel(t,k)),e.add(x)}_parentLabel(e,t){const r=this._drawnTotal(),a=r>0?(e._area/r*100).toFixed(1):"0",n=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g," ").trim():`${e.name}, ${this._formatValue(e._area,e._si)}`}, ${n} ${1===n?"item":"items"}, ${a}% of total`}_makeParentAccessible(e,t,r,a,n){const i=this.w.config.chart.accessibility;if(!e||!e.setAttribute)return;if(!i.enabled||!i.keyboard.enabled||!this._zoomEnabled())return;const o=this.w.globals.treemapFocusKey===t._key;e.tmKey=t._key,e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`${this._parentLabel(t,n)}. Zoom ${o?"out":"in"}`),e.setAttribute("aria-expanded",o),E.isBrowser()&&e.addEventListener&&(e.addEventListener("focus",()=>{a.node.setAttribute("stroke",r.hoverColor),a.node.setAttribute("stroke-width",String(r.hoverWidth+1))}),e.addEventListener("blur",()=>{a.node.setAttribute("stroke",r.borderColor),a.node.setAttribute("stroke-width",String(r.borderWidth))}),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this._zoomTo(t,!0))}))}_attachParentEvents(e,t,r,a){if(!E.isBrowser()||!e||!e.addEventListener)return;const n=this.w;r.hoverShow&&(e.addEventListener("mouseenter",()=>{a.node.setAttribute("stroke",r.hoverColor),a.node.setAttribute("stroke-width",String(r.hoverWidth))}),e.addEventListener("mouseleave",()=>{a.node.setAttribute("stroke",r.borderColor),a.node.setAttribute("stroke-width",String(r.borderWidth))})),n.config.tooltip.enabled&&(e.addEventListener("mouseenter",e=>this._showParentTooltip(e,t)),e.addEventListener("mousemove",e=>this._positionTooltip(e)),e.addEventListener("mouseleave",()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor="pointer",e.addEventListener("click",()=>this._zoomTo(t)))}_zoomEnabled(){var e;const t=this.w,r=t.config.plotOptions.treemap.zoom;if(!r||!r.enabled||!this.showParents)return!1;const a=t.config.drilldown,n=this.ctx.drilldown;return!(n&&a&&a.enabled&&((null==(e=a.series)?void 0:e.length)||a.onDrillDown)&&(n.zoomWarned||(n.zoomWarned=!0,console.warn("ApexCharts treemap: zoom is ignored while drilldown is active (plotOptions.treemap.zoom vs drilldown series or onDrillDown).")),1))}_resolveFocus(e){const t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let r=null;const a=e=>{r||(e._key!==t?e.children&&e.children.forEach(a):r=e)};return e.forEach(a),r&&r.children&&r.children.length&&this._subtreeArea(r)>0?r:(this.w.globals.treemapFocusKey=null,null)}_zoomTo(e,t=!1){const r=this.w;if(!e||!e.children||!e.children.length)return;const a=r.globals.treemapFocusKey===e._key?null:e._key;this._refocus(a,t)}_refocus(e,t){const r=this.w,a=r.globals,n=a.treemapFocusKey,i=r.config.chart.animations,o=!(!i.enabled||!i.dynamicAnimation.enabled);a.treemapZoom=o&&E.isBrowser()?{from:null!=n?n:null,to:e}:null,a.treemapFocusKey=e,this._hideParentTooltip(),a.shouldAnimate=o,a.resized=!0,a.dataChanged=!0,a.treemapZoom&&this.ctx.series.getPreviousPaths();const s=this.ctx.update();t&&s.then(()=>{const e=r.dom.baseEl,t=Array.from(e.querySelectorAll(".apexcharts-treemap-parent-header[tabindex]"));(e.querySelector(".apexcharts-breadcrumb-item")||t.find(e=>e.tmKey===n)||t[0]||e).focus()})}_zoomCamera(){var e;const t=this.w,r=t.globals.treemapZoom;t.globals.treemapZoom=null;const a=t.globals.prevTreemapParents;if(!(r&&a&&t.globals.dataChanged&&t.globals.shouldAnimate))return null;const n=new Map,i=e=>{n.set(e._key,e),e.children&&e.children.forEach(i)};this.drawn.forEach(i);const o=(e,t)=>{for(let r=n.get(e);r;r=r._parent)if(r._key===t)return!0;return!1},{from:s,to:l}=r,h=l&&(null==s||o(l,s))?l:s&&(null==l||o(s,l))?s:null,c=h?n.get(h):null;if(!h||!c||!c.rect)return null;let d=c;for(;d._parent;)d=d._parent;const p=Math.max(0,this.roots.indexOf(d)),u=null!=(e=a.get(`${p}|${F(h)}`))?e:null,f=c.rect,m=f[0],g=f[1],b=f[2]-f[0],x=f[3]-f[1];if(!u||!(u.width>0&&u.height>0&&b>0&&x>0))return null;const y=u,_=b/y.width,w=x/y.height;return{fwd:e=>({x:m+(e.x-y.x)*_,y:g+(e.y-y.y)*w,width:e.width*_,height:e.height*w}),back:e=>({x:y.x+(e.x-m)/_,y:y.y+(e.y-g)/w,width:e.width/_,height:e.height/w})}}_playZoomExit(e){const t=this.w,r=this.camera,a=t.globals.prevTreemapView;if(t.globals.prevTreemapView=null,!r||!E.isBrowser())return;const n=e.node,i=new b(this.w,this.ctx),o=[["apexcharts-treemap-rect","T"],["apexcharts-treemap-parent-rect","P"],["apexcharts-data-labels","L"]],s=e=>{var t;const r=o.find(([t])=>e.classList.contains(t)),a=null==(t=e.closest(".apexcharts-series"))?void 0:t.getAttribute("data:realIndex");return r?`${r[1]}${a}|${e.getAttribute("data:key")}`:""},l=(e,t)=>{var r;return parseFloat(null!=(r=e.getAttribute(t))?r:"")},h=e=>({x:l(e,"x"),y:l(e,"y"),width:l(e,"width"),height:l(e,"height")}),c=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),d=new Map;n.querySelectorAll("[data\\:key]").forEach(e=>{const t=s(e);t&&d.set(t,e)});const p=[],u=(e,t)=>{const r=h(e);[r.x,r.y,r.width,r.height].every(Number.isFinite)&&p.push(a=>{e.setAttribute("x",String(r.x+(t.x-r.x)*a)),e.setAttribute("y",String(r.y+(t.y-r.y)*a)),e.setAttribute("width",String(r.width+(t.width-r.width)*a)),e.setAttribute("height",String(r.height+(t.height-r.height)*a))})},f=(e,t,r=!1)=>{var a;const n=e.getAttribute("transform")||"",i=parseFloat(null!=(a=e.getAttribute("opacity"))?a:"1"),o=Number.isFinite(i)?i:1;p.push(a=>{e.setAttribute("transform",`translate(${t.x*a} ${t.y*a}) ${n}`.trim()),r&&e.setAttribute("opacity",String(o*(1-a)))})},m=e=>{[e,...e.querySelectorAll("*")].forEach(e=>{e.removeAttribute("data:key"),["role","tabindex","aria-label","aria-expanded"].forEach(t=>e.removeAttribute(t)),e.classList.remove("apexcharts-treemap-rect","apexcharts-treemap-parent","apexcharts-treemap-parent-rect","apexcharts-treemap-parent-header","apexcharts-treemap-parent-label","apexcharts-data-labels")})},g=i.group({class:"apexcharts-treemap-ghosts"}).node,x=i.group({class:"apexcharts-treemap-ghosts"}).node;if(a){const e=[...a.querySelectorAll(":scope > .apexcharts-treemap-ghosts")];e.forEach((t,a)=>{t.querySelectorAll("rect").forEach(e=>u(e,r.fwd(h(e)))),t.querySelectorAll("text").forEach(e=>{const t=e=>{const t=/^translate\(\s*([-+.\deE]+)[\s,]+([-+.\deE]+)\s*\)/.exec(((null==e?void 0:e.getAttribute("transform"))||"").trim());return t?[parseFloat(t[1]),parseFloat(t[2])]:[0,0]},[a,n]=t(e.parentElement),[i,o]=t(e),s={x:l(e,"x")+a+i,y:l(e,"y")+n+o,width:0,height:0};if(!Number.isFinite(s.x)||!Number.isFinite(s.y))return;const h=r.fwd(s);f(e,{x:h.x-s.x,y:h.y-s.y})}),[...t.childNodes].forEach(t=>(a===e.length-1&&e.length>1?x:g).appendChild(t)),t.remove()});const n=new Map;a.querySelectorAll(".apexcharts-treemap-rect[data\\:key]").forEach(e=>n.set(s(e),e)),a.querySelectorAll(".apexcharts-data-labels[data\\:key]").forEach(e=>{const t=s(e),a=d.get(t);if(a&&!(e=>{var t;return parseFloat(null!=(t=e.getAttribute("opacity"))?t:"1")<.999})(e)&&S.treemapLabelLook(a)===S.treemapLabelLook(e))return;const i=n.get(`T${t.slice(1)}`);if(!i)return;const o=c(h(i)),l=d.get(`T${t.slice(1)}`),p=c(l?h(l):r.fwd(h(i)));f(e,{x:p.x-o.x,y:p.y-o.y},!!l),m(e),x.appendChild(e)}),a.querySelectorAll(".apexcharts-treemap-parent").forEach(e=>{var a;const n=e.querySelector(".apexcharts-treemap-parent-rect[data\\:key]");if(!n||"rect"!==n.tagName.toLowerCase())return;const i=d.get(s(n));if(i){const t=e.querySelector(".apexcharts-treemap-parent-label"),r=null==(a=i.parentElement)?void 0:a.querySelector(".apexcharts-treemap-parent-label");if(t&&Z(t)!==Z(r)){const e=h(n),r=h(i),a=t.getAttribute("text-anchor"),o=e=>"middle"===a?e.x+e.width/2:"end"===a?e.x+e.width:e.x;f(t,{x:o(r)-o(e),y:r.y-e.y},!0),m(t),x.appendChild(t)}return}e.querySelectorAll("rect").forEach(e=>u(e,r.fwd(h(e)))),e.querySelectorAll("text").forEach(e=>{const t={x:l(e,"x"),y:l(e,"y"),width:0,height:0};if(!Number.isFinite(t.x)||!Number.isFinite(t.y))return;const a=r.fwd(t);f(e,{x:a.x-t.x,y:a.y-t.y})});const o=r.fwd(h(n)),c=t.layout;o.x<c.gridWidth&&o.y<c.gridHeight&&o.x+o.width>0&&o.y+o.height>0&&p.push(t=>e.setAttribute("opacity",String(1-t))),m(e),g.appendChild(e)}),n.forEach((e,t)=>{d.has(t)||"rect"!==e.tagName.toLowerCase()||(u(e,r.fwd(h(e))),m(e),g.appendChild(e))});const i=a.querySelector(":scope > defs.apexcharts-treemap-ghost-defs");i&&g.insertBefore(i,g.firstChild)}[g,x].forEach(e=>{e.setAttribute("pointer-events","none"),e.setAttribute("aria-hidden","true")}),n.insertBefore(g,n.firstChild),n.appendChild(x),n.setAttribute("clip-path",`url(#gridRectMask${t.globals.cuid})`),function(e,t,r,a,n){const i=performance.now(),o=s=>{if(e.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(s-i)/t));a(r(l),l),l<1?T.requestAnimationFrame(o):n&&n()};T.requestAnimationFrame(o)}(t,Math.max(1,this.dynamicAnim.speed||1),$(t.config.chart.animations.easing),e=>p.forEach(t=>t(e)),()=>{g.remove(),x.remove(),n.removeAttribute("clip-path")})}_focusChain(){const e=[],t=new Set(this.drawn||[]);let r=this._resolveFocus(this.drawn||[]);for(;r&&(e.unshift(r),!t.has(r));)r=r._parent;return e}_breadcrumbCfg(){const e=this.w.config.plotOptions.treemap.zoom;return H(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!E.isBrowser())return;const e=this.w;if(!e.dom.elWrap)return;if(K(e),!this._zoomEnabled())return;const t=this._focusChain();if(!t.length)return;const r=function(e,t){if(!E.isBrowser())return null;const r=e.dom.elWrap;if(!r)return null;K(e);const a=t.config||H(e);if(!1===a.show)return null;const n=t.crumbs||[];if(n.length<2)return null;const i=T.createElementNS(q,"nav");i.setAttribute("class","apexcharts-breadcrumb"),i.setAttribute("aria-label",t.ariaLabel||"Breadcrumb"),function(e,t){const r=t.offsetX||0,a=t.offsetY||0;e.style.position="absolute",e.style.top=a+"px","top-right"===t.position?e.style.right=3-r+"px":e.style.left=r+"px"}(i,a),t.compact&&(i.style.fontSize="11px",i.style.padding="0 2px");const o=null!=a.separator?a.separator:" / ";return n.forEach((e,r)=>{var s;if(r>0){const e=T.createElementNS(q,"span");e.setAttribute("class","apexcharts-breadcrumb-separator"),e.setAttribute("aria-hidden","true"),e.textContent=o,i.appendChild(e)}let l=0===r?null!=(s=a.rootLabel)?s:"All":e.label;if("function"==typeof a.formatter&&(l=a.formatter(l,{index:r,depth:n.length-1,data:e.data})),r===n.length-1){const e=T.createElementNS(q,"span");return e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.setAttribute("aria-current","page"),e.textContent=String(l),void i.appendChild(e)}const h=T.createElementNS(q,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),0===r){const e=T.createElementNS(q,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",h.appendChild(e)}const c=T.createElementNS(q,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=String(l),h.appendChild(c),h.addEventListener("click",a=>t.onNavigate(r,e,a)),i.appendChild(h)}),r.appendChild(i),i}(e,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(e,t,r)=>{this._refocus(t.data?t.data._key:null,!r.detail)}});r&&(this._placeBreadcrumb(r),function(e,t){const r=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>null!==e);if(!r.length)return;const a=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<r.length+1;e++){const e=t.getBoundingClientRect(),n=r.find(t=>{const r=t.getBoundingClientRect();return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top});if(!n)break;t.style.top=n.getBoundingClientRect().bottom-a+4+"px"}}(e,r))}_placeBreadcrumb(e){var t,r;const a=this.w,n=a.layout.translateY||0,i=null==(r=null==(t=this.ctx)?void 0:t.dimensions)?void 0:r.dimHelpers,o=i?i.getTitleSubtitleCoords("title").height+i.getTitleSubtitleCoords("subtitle").height:0,s=e.getBoundingClientRect().height||18;if(n-o>=s+1)return void(e.style.top=n-s-1+"px");e.style.top=`${o}px`;const l="dark"===a.config.theme.mode;e.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",e.style.borderRadius="4px"}_showParentTooltip(e,t){const r=this.w,a=this._tip();if(!a)return;const n=this._drawnTotal(),i=t._parent?this._subtreeArea(t._parent):n,o=n>0?(t._area/n*100).toFixed(1):"0.0",s=i>0?(t._area/i*100).toFixed(1):o,l=this.w.config.plotOptions.treemap.parents,h=l&&l.tooltip&&l.tooltip.formatter,c=this._countLeaves(t);let d;if("function"==typeof h)d=h({name:t.name,value:t._area,depth:t.depth||0,leafCount:c,percentOfParent:Number(s),percentOfTotal:Number(o),node:t,w:r});else{const e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${e};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${String(t.name).replace(/&/g,"&").replace(/</g,"<")}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._area,t._si)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${c} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${o}% of total</span></div></div></div>`}a.innerHTML=d,a.classList.add("apexcharts-active"),a.removeAttribute("aria-hidden"),this._positionTooltip(e)}_tip(){const e=this.w.dom.elWrap;let t=this._tooltipEl;if(!(null==t?void 0:t.isConnected)){t=e.querySelector(".apexcharts-treemap-tooltip");const r=!t&&e.querySelector(".apexcharts-tooltip");r&&(t=r.cloneNode(!1),t.classList.add("apexcharts-treemap-tooltip"),e.appendChild(t)),this._tooltipEl=t}return t}_positionTooltip(e){const t=this._tip();if(!t)return;const r=this.w.dom.elWrap.getBoundingClientRect(),a=t.offsetWidth,n=t.offsetHeight;let i=e.clientX-r.left+12;i+a>r.width&&(i=e.clientX-r.left-a-12),i=Math.max(0,Math.min(i,r.width-a));let o=e.clientY-r.top+12;o+n>r.height&&(o=e.clientY-r.top-n-12),o=Math.max(0,Math.min(o,r.height-n)),t.style.left=i+"px",t.style.top=o+"px"}_hideParentTooltip(){const e=this._tooltipEl;null==e||e.classList.remove("apexcharts-active"),null==e||e.setAttribute("aria-hidden","true")}_drawnTotal(){return null==this._total&&(this._total=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0)),this._total||0}_subtreeArea(e){if(null!=e._area)return e._area;const t=e.children;if(t&&t.length){let e=0;for(let r=0;r<t.length;r++)e+=this._subtreeArea(t[r]);return e}const r=Number(e.value);return isNaN(r)?0:Math.abs(r)}_countLeaves(e){return e.children&&e.children.length?e.children.reduce((e,t)=>e+this._countLeaves(t),0):1}_formatValue(e,t){var r,a,n,i,o;const s=this.w,l=(null==(a=null==(r=s.config.tooltip)?void 0:r.y)?void 0:a.formatter)||(null==(o=null==(i=null==(n=s.config.yaxis)?void 0:n[0])?void 0:i.labels)?void 0:o.formatter);if("function"==typeof l)try{return String(l(e,{seriesIndex:t||0,dataPointIndex:-1,w:s}))}catch(e){}return String(e)}_labelCanShow(e,t,r){if(!Number.isFinite(e)||e<=0)return!1;const a=this.w.config.plotOptions.treemap.dataLabels;return!(e<(a&&null!=a.minFontSize?Number(a.minFontSize):0))&&Math.max(t,r)>=e}_averageLabelSize(){if(null!=this._avgLabelSize)return this._avgLabelSize;const e=this.labels.flat();let t=0;for(const r of e)t+=String(null!=r?r:"").length;return this._avgLabelSize=t/(e.length||1),this._avgLabelSize}getFontSize(e){const t=this.w,r=this._averageLabelSize();return function(e,a){const n=e*a,i=Math.pow(n,.5);return Math.min(i/r,parseInt(t.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,r,a,n,i,o){const s=new b(this.w),l=this._labelRect(s,r,t);if(l.width+this.w.config.stroke.width+5>i-a&&l.width<=o-n){const t=s.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(-90 ${t.x} ${t.y}) translate(${l.height/3})`)}}_labelRect(e,t,r){const a=this.w.config.dataLabels.style;return e.getTextRects(t,String(r),a.fontFamily,"",!0,a.fontWeight)}truncateLabels(e,t,r,a,n,i){const o=new b(this.w),s=this._labelRect(o,e,t).width+this.w.config.stroke.width+5>n-r&&i-a>n-r?i-a:n-r,c=o.getTextBasedOnMaxWidth(h(l({},this.w.config.dataLabels.style),{text:e,maxWidth:s,fontSize:t}));return e.length!==c.length&&s/t<5?"":c}_morphKeyed(){var e;const t=null==(e=this.ctx)?void 0:e.morphTypeChange;return!(!t||"function"!=typeof t.hasKeyedMarks||!t.hasKeyedMarks()||"function"!=typeof t.getInitialPathForKey)}_morphSourceForLeaf(e){var t;const r=null==(t=this.ctx)?void 0:t.morphTypeChange;if(!r||"function"!=typeof r.getInitialPathAt)return null;if(this._morphKeyed()){const t=r.getInitialPathForKey(F(e._key));if(t)return t}return r.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,r,a){return`M ${e} ${t} L ${r} ${t} L ${r} ${a} L ${e} ${a} Z`}_morphTile(e,t,r,a,n,i){new y(this.w,this.ctx).morphSVG(e,n,i,"none",t,r,a,0)}_rideTile(e,t,r,a,n,i,o,s=!t){const l=e.getAttribute("transform")||"",h=t?t.x-(r+n)/2:0,c=t?t.y-(a+i)/2:0,d=t=>{if(t>=1)return l?e.setAttribute("transform",l):e.removeAttribute("transform"),void e.removeAttribute("opacity");const r=1-t;e.setAttribute("transform",`translate(${h*r} ${c*r}) ${l}`.trim()),s&&e.setAttribute("opacity",String(t))};d(0),o.during(d)}animateTreemap(e,t,r,a,n=0){const i=new y(this.w);return i.animateRect(e,t,r,a,()=>{i.animationCompleted(e)},n)}}}),e.default=c,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexTreemap={})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(n,e,o)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,i=(t,n)=>{for(var e in n||(n={}))r.call(n,e)&&s(t,e,n[e]);if(o)for(var e of o(n))a.call(n,e)&&s(t,e,n[e]);return t},c=(t,o)=>n(t,e(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=/[MmLlHhVvCcSsQqTtAaZz]/;function h(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,h=0,L=0,u=0,p=0,f=0,g="";const x=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function m(){for(;a<r&&x(t[a]);)a++}function M(){m();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function y(){m();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=L=t,h=u=n,i=[{x:t,y:n}]}function w(t,n){i.push({x:t,y:n}),c=t,h=n}function C(t,n,e,r,a,s){const l=Math.hypot(t-c,n-h)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),L=Math.max(2,Math.min(160,Math.ceil(l/o))),u=c,g=h;for(let o=1;o<=L;o++){const c=o/L,l=1-c,h=l*l*l,p=3*l*l*c,f=3*l*c*c,x=c*c*c;i.push({x:h*u+p*t+f*e+x*a,y:h*g+p*n+f*r+x*s})}p=e,f=r,c=a,h=s}function Z(t,n,e,o){const r=t,a=n;C(c+2/3*(t-c),h+2/3*(n-h),e+2/3*(t-e),o+2/3*(n-o),e,o),p=r,f=a}function A(t,n,e,r,a,s,l){if(!t||!n)return void w(s,l);const L=c,u=h;t=Math.abs(t),n=Math.abs(n);const g=e*Math.PI/180,x=Math.cos(g),m=Math.sin(g),M=(L-s)/2,y=(u-l)/2,d=x*M+m*y,b=-m*M+x*y,C=d*d/(t*t)+b*b/(n*n);if(C>1){const e=Math.sqrt(C);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=x*$-m*k+(L+s)/2,O=m*$+x*k+(u+l)/2,q=(d-$)/t,E=(b-k)/n,P=(-d-$)/t,j=(-b-k)/n,Y=Math.atan2(E,q);let I=Math.atan2(j,P)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*x-n*a*m,y:O+t*r*m+n*a*x})}p=s,f=l,c=s,h=l}for(;a<r&&(m(),!(a>=r));){let n=t[a];if(l.test(n))a++;else{if(!g)break;n="M"===g?"L":"m"===g?"l":g}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:L,y:u}),d(),c=L,h=u,g=n;continue}const r=t=>null==t?NaN:t,x=r(M());if(isNaN(x))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+x:x,e?h+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;w(e?c+x:x,e?h+t:t);break}case"H":w(e?c+x:x,h);break;case"V":w(c,e?h+x:x);break;case"C":{const t=[x,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;C(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3],e?c+n[4]:n[4],e?h+n[5]:n[5]);break}case"S":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=g&&"CcSs".indexOf(g)>=0;C(o?2*c-p:c,o?2*h-f:h,e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"Q":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=g&&"QqTt".indexOf(g)>=0;Z(n?2*c-p:c,n?2*h-f:h,e?c+x:x,e?h+t:t);break}case"A":{const t=x,n=M(),o=M(),r=y(),a=y(),i=M(),l=M();if(null==n||null==o||null==r||null==a||null==i||null==l)return s;A(t,n,o,r,a,e?c+i:i,e?h+l:l);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(p=c,f=h),g=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const u=128;function p(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function f(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function g(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function x(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;f(t,a,a*e).capacity>=n?o=a:r=a}return o}function m(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const M={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function y(t,n,e,o){const r=void 0!==M[e]?M[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function d(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const b=new Set;function w(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!b.has(t.name)){b.add(t.name);const e="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 ${o} units; this chart has ${n.length}. ${e} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return e(n,r)};return r.shape=Object.freeze(i({},t)),r.with=e=>w(i(i({},t),e),n),r}const C=new Map;function Z(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=C.get(e);if(!o){const r=h(t,n);o={polys:r,bounds:L(r)},C.set(e,o)}return o}(n,s);if(!c.length)return[];const M=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,L=n.offY+o.y*n.scale,u=n.offX+l.x*n.scale,p=n.offY+l.y*n.scale;h<i&&(i=h),u<i&&(i=u),h>c&&(c=h),u>c&&(c=u),L<a&&(a=L),p<a&&(a=p),L>s&&(s=L),p>s&&(s=p),L!==p&&r.push({x0:h,y0:L,x1:u,y1:p})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*u),r=Math.floor((e-a)/l*u);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,p(l,i,o),{evenOdd:a}),b=x(M,t.length,r),w=f(M,b,b*r);if(!w.cells.length)return[];const Z=g(w.cells.map(t=>t.cap),t.length),A=m(t[0].r>0?t[0].r:3,b),U=[];return w.cells.forEach((t,n)=>{d(t,Z[n],b,w.inset,A,U)}),y(t,U,e,b)}}function A(t){return w(c(i({},t),{kind:"silhouette"}),Z)}const U=A({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"}),$=A({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"}),k=A({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"}),v=A({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"}),O=A({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"}),q=A({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"}),E=A({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"}),P=A({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"}),j=t=>t.reduce((t,n)=>t+n,0);function Y(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&j(l(h))<a;)h++;const L=s/h,u=g(l(h),a),p=m(t[0].r>0?t[0].r:3,L),f=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*L,a=u[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;f.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:p,row:t})}}return y(t,f,"rows",L)}}function I(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),L=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},u=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,u=[];let p=0;const f=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const g=s<=-1?Math.PI:Math.acos(s),x=g>=Math.PI-1e-9,m=[],M=[0];for(let t=0;t<=40;t++){const n=L(a,r,2*g*t/40-g);if(m.push(n),t>0){const e=m[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const y=M[M.length-1],d=x?0:Math.min(.42*t,y/2),b=y-2*d;let w;if(w=x?Math.max(1,Math.round(y/t)):b>0?Math.floor(b/t)+1:y>=.45*t?1:0,!w)continue;const C=x?y/w:w>1?b/(w-1):0,Z=[];let A=0;for(let t=0;t<w;t++){const n=x?t*C:w>1?d+t*C:y/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=m[A],s=m[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};f(l)&&Z.push(l)}Z.length&&(u.push(Z),p+=Z.length)}return{rows:u,total:p}};let p=1,f=2*s;for(let t=0;t<30;t++){const t=(p+f)/2;u(t).total>=a?p=t:f=t}const x=p,{rows:M}=u(x),d=g(M.map(t=>t.length),a),b=m(t[0].r>0?t[0].r:3,x),w=[];return M.forEach((t,n)=>{const e=d[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];w.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),w.sort((t,n)=>t.y-n.y||t.x-n.x),y(t,w,o,x)}}function S(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=g(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),L=h*e,u=r.x+r.width/2,p=r.y+(r.height-s*L)/2,f=m(t[0].r>0?t[0].r:3,h),x=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)x.push({x:u+(n-(c[t]-1)/2)*h,y:p+(t+.5)*L,r:f,row:t});return y(t,x,o,h)}}function X(t){return w(c(i({},t),{kind:"rings"}),Y)}function F(t){return w(c(i({},t),{kind:"globe"}),I)}function N(t){return w(c(i({},t),{kind:"tiers"}),S)}const R=X({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),T=F({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),_=N({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),D=A({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"}),Q=A({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"}),z=A({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"}),B=A({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"}),V=A({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"}),H=A({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"}),G=A({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"}),J=A({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"}),K=A({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"}),W=A({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"}),tt=A({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"}),nt=A({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"}),et=A({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"}),ot=A({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"}),rt=A({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"}),at=A({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"}),st=A({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"}),it=A({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"}),ct=A({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"}),lt=A({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"}),ht=A({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"}),Lt=new Map;function ut(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=h(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const M=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,L=n.offX+t[e+1].x*n.scale,u=n.offY+t[e+1].y*n.scale,p=Math.hypot(L-l,u-h),f=p>1e-9?-(u-h)/p*o:o,g=p>1e-9?(L-l)/p*o:0;r.push({ax:l,ay:h,bx:L,by:u,nx:f,ny:g}),Math.min(l,L)-o<i&&(i=Math.min(l,L)-o),Math.max(l,L)+o>c&&(c=Math.max(l,L)+o),Math.min(h,u)-o<a&&(a=Math.min(h,u)-o),Math.max(h,u)+o>s&&(s=Math.max(h,u)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*u),s=Math.floor((e-a)/l*u);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const L=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const L=a[n]+(t-o)/(r-o)*(a[e]-a[n]);L<i&&(i=L),L>c&&(c=L)}c>i&&o.push({x0:i,x1:c});const l=L(r.ax,r.ay,t);l&&o.push(l);const h=L(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,p({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),b=x(M,t.length,r),w=f(M,b,b*r);if(!w.cells.length)return[];const C=g(w.cells.map(t=>t.cap),t.length),Z=m(t[0].r>0?t[0].r:3,b),A=[];return w.cells.forEach((t,n)=>{d(t,C[n],b,w.inset,Z,A)}),y(t,A,e,b)}}function pt(t){return w(c(i({},t),{kind:"stroke"}),ut)}const ft=pt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),gt=pt({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"}),xt=pt({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"}),mt=pt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),Mt=pt({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"}),yt=pt({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"}),dt=pt({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"}),bt=[U,$,k,v,O,q,E,P,R,T,_,D,Q,z,B,V,H,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ft,gt,xt,mt,Mt,yt,dt],wt="__apexcharts_unit_layouts__";function Ct(){const t=globalThis;return t[wt]||(t[wt]={}),t[wt]}const Zt=46,At=48,Ut=88,$t={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,Ut,38,Ut],e:[6,51,6,85],f:[6,11,6,45],g:[8,At,38,At]},kt={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},vt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},Ot={1:23,".":19.32,",":19.32,":":19.32," ":23};function qt(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=Ot[" "]+n;continue}const t=vt[r];if(t){e+=t(o),o+=(Ot[r]||Zt)+n;continue}const a=kt[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=$t[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(Ot[r]||Zt)+n}return e.trim()}const Et=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Pt(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function jt(t){return Math.round(10*t)/10}exports.arrow=H,exports.battery=q,exports.bolt=K,exports.bulb=W,exports.car=nt,exports.catalog=bt,exports.check=ft,exports.cross=J,exports.crown=G,exports.digitsPath=qt,exports.droplet=$,exports.fish=B,exports.flame=z,exports.flask=tt,exports.funnel=st,exports.gear=it,exports.globe=T,exports.glyphs=function(t,n={}){const e=String(t),s=n,{gap:l}=s,h=((t,n)=>{var e={};for(var s in t)r.call(t,s)&&n.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&o)for(var s of o(t))n.indexOf(s)<0&&a.call(t,s)&&(e[s]=t[s]);return e})(s,["gap"]);return pt(c(i({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:qt(e,l)}))},exports.group=ot,exports.heart=U,exports.house=O,exports.human=k,exports.leaf=D,exports.moneybag=at,exports.mountain=ht,exports.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return pt(c(i({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},exports.percent=Mt,exports.pin=lt,exports.plane=et,exports.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?Et:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=g(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],L=[],u=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Pt(l,t):0;L.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:u})}const p=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),f=new Map;p.forEach((t,n)=>{const e=l?L[n]%c.length:Math.floor(n/p.length*c.length),o=c[e]||c[0],r=`<circle cx="${jt(t.x)}" cy="${jt(t.y)}" r="${jt(t.r||3)}"/>`,a=f.get(o);a?a.push(r):f.set(o,[r])});let x="";return f.forEach((t,n)=>{x+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?x:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${p.length} dots">${x}</svg>`},exports.pulse=xt,exports.pyramid=_,exports.question=yt,exports.registerShapes=function(t){const n=Ct(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e},exports.registeredShapeNames=function(){return Object.keys(Ct())},exports.rings=X,exports.robot=ct,exports.rocket=P,exports.shapeFrom=function(t,n={}){return A(c(i({name:"custom"},n),{path:t}))},exports.shield=E,exports.silhouette=A,exports.sphere=F,exports.spiral=dt,exports.star=V,exports.stroke=pt,exports.strokeFrom=function(t,n={}){return pt(c(i({name:"custom-stroke"},n),{path:t}))},exports.sun=Q,exports.target=R,exports.tiers=N,exports.tree=v,exports.trophy=rt,exports.unregisterShapes=function(t){const n=Ct();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},exports.wifi=gt,exports.xmark=mt;
|
package/dist/unit-shapes.esm.js
CHANGED
package/dist/unit-shapes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).ApexUnitShapes={})}(this,function(t){"use strict";var n=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,e,o)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,c=(t,n)=>{for(var e in n||(n={}))a.call(n,e)&&i(t,e,n[e]);if(r)for(var e of r(n))s.call(n,e)&&i(t,e,n[e]);return t},l=(t,n)=>e(t,o(n));const h=/[MmLlHhVvCcSsQqTtAaZz]/;function u(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,l=0,u=0,L=0,f=0,g=0,m="";const p=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function y(){for(;a<r&&p(t[a]);)a++}function M(){y();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function x(){y();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=u=t,l=L=n,i=[{x:t,y:n}]}function w(t,n){i.push({x:t,y:n}),c=t,l=n}function C(t,n,e,r,a,s){const h=Math.hypot(t-c,n-l)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),u=Math.max(2,Math.min(160,Math.ceil(h/o))),L=c,m=l;for(let o=1;o<=u;o++){const c=o/u,l=1-c,h=l*l*l,f=3*l*l*c,g=3*l*c*c,p=c*c*c;i.push({x:h*L+f*t+g*e+p*a,y:h*m+f*n+g*r+p*s})}f=e,g=r,c=a,l=s}function Z(t,n,e,o){const r=t,a=n;C(c+2/3*(t-c),l+2/3*(n-l),e+2/3*(t-e),o+2/3*(n-o),e,o),f=r,g=a}function A(t,n,e,r,a,s,h){if(!t||!n)return void w(s,h);const u=c,L=l;t=Math.abs(t),n=Math.abs(n);const m=e*Math.PI/180,p=Math.cos(m),y=Math.sin(m),M=(u-s)/2,x=(L-h)/2,d=p*M+y*x,b=-y*M+p*x,C=d*d/(t*t)+b*b/(n*n);if(C>1){const e=Math.sqrt(C);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=p*$-y*k+(u+s)/2,O=y*$+p*k+(L+h)/2,q=(d-$)/t,j=(b-k)/n,E=(-d-$)/t,P=(-b-k)/n,Y=Math.atan2(j,q);let I=Math.atan2(P,E)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*p-n*a*y,y:O+t*r*y+n*a*p})}f=s,g=h,c=s,l=h}for(;a<r&&(y(),!(a>=r));){let n=t[a];if(h.test(n))a++;else{if(!m)break;n="M"===m?"L":"m"===m?"l":m}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:u,y:L}),d(),c=u,l=L,m=n;continue}const r=t=>null==t?NaN:t,p=r(M());if(isNaN(p))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+p:p,e?l+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;w(e?c+p:p,e?l+t:t);break}case"H":w(e?c+p:p,l);break;case"V":w(c,e?l+p:p);break;case"C":{const t=[p,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;C(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3],e?c+n[4]:n[4],e?l+n[5]:n[5]);break}case"S":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=m&&"CcSs".indexOf(m)>=0;C(o?2*c-f:c,o?2*l-g:l,e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"Q":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=m&&"QqTt".indexOf(m)>=0;Z(n?2*c-f:c,n?2*l-g:l,e?c+p:p,e?l+t:t);break}case"A":{const t=p,n=M(),o=M(),r=x(),a=x(),i=M(),h=M();if(null==n||null==o||null==r||null==a||null==i||null==h)return s;A(t,n,o,r,a,e?c+i:i,e?l+h:h);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(f=c,g=l),m=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const f=128;function g(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function m(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function p(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function y(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;m(t,a,a*e).capacity>=n?o=a:r=a}return o}function M(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const x={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function d(t,n,e,o){const r=void 0!==x[e]?x[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function b(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const w=new Set;function C(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!w.has(t.name)){w.add(t.name);const e="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 ${o} units; this chart has ${n.length}. ${e} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return e(n,r)};return r.shape=Object.freeze(c({},t)),r.with=e=>C(c(c({},t),e),n),r}const Z=new Map;function A(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Z.get(e);if(!o){const r=u(t,n);o={polys:r,bounds:L(r)},Z.set(e,o)}return o}(n,s);if(!c.length)return[];const h=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,u=n.offY+o.y*n.scale,L=n.offX+l.x*n.scale,f=n.offY+l.y*n.scale;h<i&&(i=h),L<i&&(i=L),h>c&&(c=h),L>c&&(c=L),u<a&&(a=u),f<a&&(a=f),u>s&&(s=u),f>s&&(s=f),u!==f&&r.push({x0:h,y0:u,x1:L,y1:f})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*f),r=Math.floor((e-a)/l*f);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,g(l,i,o),{evenOdd:a}),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),A=M(t[0].r>0?t[0].r:3,x),U=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,A,U)}),d(t,U,e,x)}}function U(t){return C(l(c({},t),{kind:"silhouette"}),A)}const $=U({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"}),k=U({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"}),v=U({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"}),O=U({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"}),q=U({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"}),j=U({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"}),E=U({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"}),P=U({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"}),Y=t=>t.reduce((t,n)=>t+n,0);function I(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&Y(l(h))<a;)h++;const u=s/h,L=p(l(h),a),f=M(t[0].r>0?t[0].r:3,u),g=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*u,a=L[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;g.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:f,row:t})}}return d(t,g,"rows",u)}}function S(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),u=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},L=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,L=[];let f=0;const g=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const m=s<=-1?Math.PI:Math.acos(s),p=m>=Math.PI-1e-9,y=[],M=[0];for(let t=0;t<=40;t++){const n=u(a,r,2*m*t/40-m);if(y.push(n),t>0){const e=y[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const x=M[M.length-1],d=p?0:Math.min(.42*t,x/2),b=x-2*d;let w;if(w=p?Math.max(1,Math.round(x/t)):b>0?Math.floor(b/t)+1:x>=.45*t?1:0,!w)continue;const C=p?x/w:w>1?b/(w-1):0,Z=[];let A=0;for(let t=0;t<w;t++){const n=p?t*C:w>1?d+t*C:x/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=y[A],s=y[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};g(l)&&Z.push(l)}Z.length&&(L.push(Z),f+=Z.length)}return{rows:L,total:f}};let f=1,g=2*s;for(let t=0;t<30;t++){const t=(f+g)/2;L(t).total>=a?f=t:g=t}const m=f,{rows:y}=L(m),x=p(y.map(t=>t.length),a),b=M(t[0].r>0?t[0].r:3,m),w=[];return y.forEach((t,n)=>{const e=x[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];w.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),w.sort((t,n)=>t.y-n.y||t.x-n.x),d(t,w,o,m)}}function X(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=p(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),u=h*e,L=r.x+r.width/2,f=r.y+(r.height-s*u)/2,g=M(t[0].r>0?t[0].r:3,h),m=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)m.push({x:L+(n-(c[t]-1)/2)*h,y:f+(t+.5)*u,r:g,row:t});return d(t,m,o,h)}}function F(t){return C(l(c({},t),{kind:"rings"}),I)}function N(t){return C(l(c({},t),{kind:"globe"}),S)}function T(t){return C(l(c({},t),{kind:"tiers"}),X)}const R=F({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),_=N({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),D=T({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),Q=U({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"}),z=U({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"}),B=U({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"}),V=U({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"}),H=U({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"}),G=U({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"}),J=U({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"}),K=U({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"}),W=U({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"}),tt=U({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"}),nt=U({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"}),et=U({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"}),ot=U({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"}),rt=U({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"}),at=U({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"}),st=U({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"}),it=U({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"}),ct=U({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"}),lt=U({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"}),ht=U({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"}),ut=U({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"}),Lt=new Map;function ft(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=u(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const h=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,u=n.offX+t[e+1].x*n.scale,L=n.offY+t[e+1].y*n.scale,f=Math.hypot(u-l,L-h),g=f>1e-9?-(L-h)/f*o:o,m=f>1e-9?(u-l)/f*o:0;r.push({ax:l,ay:h,bx:u,by:L,nx:g,ny:m}),Math.min(l,u)-o<i&&(i=Math.min(l,u)-o),Math.max(l,u)+o>c&&(c=Math.max(l,u)+o),Math.min(h,L)-o<a&&(a=Math.min(h,L)-o),Math.max(h,L)+o>s&&(s=Math.max(h,L)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*f),s=Math.floor((e-a)/l*f);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const u=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const u=a[n]+(t-o)/(r-o)*(a[e]-a[n]);u<i&&(i=u),u>c&&(c=u)}c>i&&o.push({x0:i,x1:c});const l=u(r.ax,r.ay,t);l&&o.push(l);const h=u(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,g({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),Z=M(t[0].r>0?t[0].r:3,x),A=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,Z,A)}),d(t,A,e,x)}}function gt(t){return C(l(c({},t),{kind:"stroke"}),ft)}const mt=gt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),pt=gt({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"}),yt=gt({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"}),Mt=gt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),xt=gt({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"}),dt=gt({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"}),bt=gt({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"}),wt=[$,k,v,O,q,j,E,P,R,_,D,Q,z,B,V,H,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ut,mt,pt,yt,Mt,xt,dt,bt],Ct="__apexcharts_unit_layouts__";function Zt(){const t=globalThis;return t[Ct]||(t[Ct]={}),t[Ct]}function At(t){const n=Zt(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e}const Ut=46,$t=48,kt=88,vt={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,kt,38,kt],e:[6,51,6,85],f:[6,11,6,45],g:[8,$t,38,$t]},Ot={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},qt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},jt={1:23,".":19.32,",":19.32,":":19.32," ":23};function Et(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=jt[" "]+n;continue}const t=qt[r];if(t){e+=t(o),o+=(jt[r]||Ut)+n;continue}const a=Ot[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=vt[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(jt[r]||Ut)+n}return e.trim()}const Pt=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Yt(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function It(t){return Math.round(10*t)/10}At(wt);const St=globalThis;St.ApexCharts&&(St.ApexCharts.unitShapes=wt),t.arrow=G,t.battery=j,t.bolt=W,t.bulb=tt,t.car=et,t.catalog=wt,t.check=mt,t.cross=K,t.crown=J,t.digitsPath=Et,t.droplet=k,t.fish=V,t.flame=B,t.flask=nt,t.funnel=it,t.gear=ct,t.globe=_,t.glyphs=function(t,n={}){const e=String(t),o=n,{gap:i}=o,h=((t,n)=>{var e={};for(var o in t)a.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&r)for(var o of r(t))n.indexOf(o)<0&&s.call(t,o)&&(e[o]=t[o]);return e})(o,["gap"]);return gt(l(c({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:Et(e,i)}))},t.group=rt,t.heart=$,t.house=q,t.human=v,t.leaf=Q,t.moneybag=st,t.mountain=ut,t.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return gt(l(c({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},t.percent=xt,t.pin=ht,t.plane=ot,t.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?Pt:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=p(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],u=[],L=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Yt(l,t):0;u.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:L})}const f=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),g=new Map;f.forEach((t,n)=>{const e=l?u[n]%c.length:Math.floor(n/f.length*c.length),o=c[e]||c[0],r=`<circle cx="${It(t.x)}" cy="${It(t.y)}" r="${It(t.r||3)}"/>`,a=g.get(o);a?a.push(r):g.set(o,[r])});let m="";return g.forEach((t,n)=>{m+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?m:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${f.length} dots">${m}</svg>`},t.pulse=yt,t.pyramid=D,t.question=dt,t.registerShapes=At,t.registeredShapeNames=function(){return Object.keys(Zt())},t.rings=F,t.robot=lt,t.rocket=P,t.shapeFrom=function(t,n={}){return U(l(c({name:"custom"},n),{path:t}))},t.shield=E,t.silhouette=U,t.sphere=N,t.spiral=bt,t.star=H,t.stroke=gt,t.strokeFrom=function(t,n={}){return gt(l(c({name:"custom-stroke"},n),{path:t}))},t.sun=z,t.target=R,t.tiers=T,t.tree=O,t.trophy=at,t.unregisterShapes=function(t){const n=Zt();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},t.wifi=pt,t.xmark=Mt,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|