apexcharts 7.2.0 → 7.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/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +1 -1
- package/dist/apexcharts.core.min.js +1 -1
- package/dist/apexcharts.esm.js +167 -2
- package/dist/apexcharts.js +167 -2
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +167 -2
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +1 -1
- package/dist/bar.esm.js +1 -1
- package/dist/bar.js +1 -1
- package/dist/boxPlot.common.js +1 -1
- package/dist/boxPlot.esm.js +1 -1
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +1 -1
- package/dist/candlestick.esm.js +1 -1
- package/dist/candlestick.js +1 -1
- package/dist/column.common.js +1 -1
- package/dist/column.esm.js +1 -1
- package/dist/core.common.js +1 -1
- package/dist/core.esm.js +1 -1
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +1 -1
- package/dist/dumbbell.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +167 -2
- 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 +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +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/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 +1 -1
- package/dist/features/keyboard.esm.js +1 -1
- package/dist/features/keyboard.js +1 -1
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +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 +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +1 -1
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +1 -1
- package/dist/features/toolbar.esm.js +1 -1
- package/dist/features/toolbar.js +1 -1
- package/dist/features/trellis.common.js +1 -1
- package/dist/features/trellis.esm.js +1 -1
- package/dist/features/trellis.js +1 -1
- 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 +2 -2
- package/dist/features/weave.esm.js +167 -2
- package/dist/features/weave.js +2 -2
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +1 -1
- package/dist/histogram.esm.js +1 -1
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +1 -1
- package/dist/raincloud.esm.js +1 -1
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +1 -1
- package/dist/rangeBar.esm.js +1 -1
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +1 -1
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +1 -1
- package/dist/violin.esm.js +1 -1
- package/dist/violin.js +1 -1
- package/dist/waterfall.common.js +1 -1
- package/dist/waterfall.esm.js +1 -1
- package/package.json +1 -1
- package/src/modules/weave/PluginAPI.js +37 -1
- package/src/modules/weave/WeaveHost.js +148 -0
package/dist/heatmap.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function e(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const a in e)if("default"!==a){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}return t.default=e,Object.freeze(t)}const t=e(require("apexcharts/core")),a=t.__apex_Animations,i=t.__apex_Animations_computeStagger,s=t.__apex_Graphics,o=t.__apex_Fill,l=t.__apex_Series,r=t.__apex_Utils,n=t.__apex_DataLabels,c=(e,t,a,i)=>{if("function"!=typeof e)return e;const s=e({series:t.seriesData.series,seriesIndex:a,dataPointIndex:i,w:t});return Number.isFinite(s)?s:0};class h{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const a=e.config.plotOptions[e.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,a,i){const s=this.w;let o=1;const l=s.config.plotOptions[e].shadeIntensity,n=this.determineColor(e,t,a);s.globals.hasNegs||i?o=s.config.plotOptions[e].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*l):(1-n.percent/100)*(1.25*l):n.percent<=0?1-(1+n.percent/100)*l:(1-n.percent/100)*l:(o=1-n.percent/100,"treemap"===e&&(o=(1-n.percent/100)*(1.25*l)));let c=n.color;const h=new r;if(s.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){const e=h.shadeColor(-1*o,n.color);c=r.hexToRgba(r.isColorHex(e)?e:r.rgb2hex(e),s.config.fill.opacity)}else{const e=h.shadeColor(o,n.color);c=r.hexToRgba(r.isColorHex(e)?e:r.rgb2hex(e),s.config.fill.opacity)}return{color:c,colorProps:n}}determineColor(e,t,a){const i=this.w,s=i.seriesData.series[t][a],o=i.config.plotOptions[e];let l=o.colorScale.inverse?a:t;o.distributed&&"treemap"===i.config.chart.type&&(l=a);let r,n,c=i.globals.colors[l],h=null;if(o.distributed||"heatmap"!==e){const e=i.seriesData.series[t];r=e.length?e[0]:0,n=r;for(let t=1;t<e.length;t++)e[t]<r&&(r=e[t]),e[t]>n&&(n=e[t])}else r=i.globals.minY,n=i.globals.maxY;const d=o.colorScale.min,g=o.colorScale.max;void 0!==d&&void 0!==g&&g>d?(r=d,n=g):void 0!==d&&(r=d<i.globals.minY?d:i.globals.minY,n=g>i.globals.maxY?g:i.globals.maxY);const p=Math.abs(n)+Math.abs(r),f=Math.min(Math.max(s,r),n);let m=0===p?0:100*f/p;if(o.colorScale.ranges.length>0){o.colorScale.ranges.map(e=>{if(s>=e.from&&s<=e.to){c=e.color,h=e.foreColor?e.foreColor:null,r=e.from,n=e.to;const t=Math.abs(n)+Math.abs(r);m=0===t?0:100*s/t}})}return{color:c,foreColor:h,percent:m}}calculateDataLabels({text:e,x:t,y:a,i:i,j:o,colorProps:l,fontSize:r}){const h=this.w,d=h.config.dataLabels,g=new s(this.w),p=new n(this.w,this.ctx);let f=null;if(d.enabled){f=g.group({class:"apexcharts-data-labels"});const s=c(d.offsetX,h,i,o),n=c(d.offsetY,h,i,o),m=t+s,u=a+parseFloat(d.style.fontSize)/3+n;p.plotDataLabelsText({x:m,y:u,text:e,i:i,j:o,color:l.foreColor,parent:f,fontSize:r,dataLabelsConfig:d})}return f}}const d=t.__apex_Filters;const g=t.__apex_BrowserAPIs_BrowserAPIs,p=t.__apex_math_SVGNS;t.default.use({heatmap:class{constructor(e,t,a){this.ctx=t,this.w=e,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new h(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.shape=this.w.config.plotOptions.heatmap.shape||"rect",this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){var t,i;const n=this.w,c=new s(this.w,this.ctx),h=c.group({class:"apexcharts-heatmap"}),g=n.layout.gridWidth/n.globals.dataPoints,p=n.layout.gridHeight/n.seriesData.series.length,f=("numeric"===n.config.xaxis.type||"datetime"===n.config.xaxis.type)&&n.axisFlags.isXNumeric&&this.xRatio>0;let m=g;if(f){const e=n.globals.minXDiff;m=Number.isFinite(e)&&e>0?e/this.xRatio:g}let u=this.shape;f&&"hexagon"===u&&(u="rect");const x=function(e,t){const a=e&&e.renderer;return a&&a.kind&&"svg"!==a.kind?a:t}(this.ctx,c),b="rect"===u&&x!==c&&"function"==typeof x.drawRectCell;"hexagon"===u?this.applyHexagonClipPath(h,c,g,p):h.attr("clip-path",`url(#gridRectMask${n.globals.cuid})`);const y=Array.isArray(n.config.fill.opacity)?null!=(t=n.config.fill.opacity[0])?t:1:null!=(i=n.config.fill.opacity)?i:1;let w=0,S=!1;this.negRange=this.helpers.checkColorRange();const _=e.slice();n.config.yaxis[0].reversed&&(S=!0,_.reverse());for(let t=S?0:_.length-1;S?t<_.length:t>=0;S?t++:t--){const i=c.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:r.escapeString(n.seriesData.seriesNames[t]),rel:t+1,"data:realIndex":t});if(l.addCollapsedClassToSeries(this.w,i,t),b||c.setupEventDelegation(i,".apexcharts-heatmap-rect"),n.config.chart.dropShadow.enabled){const e=n.config.chart.dropShadow;new d(this.w).dropShadow(i,e,t)}let s=0;const S=n.config.plotOptions.heatmap.shadeIntensity,C=Math.round(w/p),$="hexagon"===u?(C%2==0?-1:1)*g/4:0;let P=0;for(let l=0;l<n.globals.dataPoints;l++){if(!f&&n.seriesData.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*l<n.seriesData.seriesX[t][P]){s+=g;continue}if(P>=_[t].length)break;const h=f?m:g;if(f){const e=n.seriesData.seriesX[t]?n.seriesData.seriesX[t][P]:null;if(null==e||e!=e){P++;continue}s=(e-n.globals.minX)/this.xRatio-m/2}const d=this.helpers.getShadeColor(n.config.chart.type,t,P,this.negRange);let C=d.color;const D=d.colorProps;if("image"===n.config.fill.type){C=new o(this.w).fillPath({seriesNumber:t,dataPointIndex:P,opacity:n.globals.hasNegs?D.percent<0?1-(1+D.percent/100):S+D.percent/100:D.percent/100,patternID:r.randomId(),width:n.config.fill.image.width?n.config.fill.image.width:h,height:n.config.fill.image.height?n.config.fill.image.height:p})}const k=this.rectRadius,v=n.config.plotOptions.heatmap.useFillColorAsStroke?C:n.globals.stroke.colors[0];if(b)x.drawRectCell(s,w,h,p,{fill:C,fillOpacity:y,stroke:v,strokeWidth:this.strokeWidth,radius:k,seriesIndex:t,dataPointIndex:P});else{const o="rect"===u,l=o?c.drawRect(s,w,h,p,k):c.drawPath({d:this.cellShapePath(u,s+$,w,h,p),stroke:v,strokeWidth:this.strokeWidth,fill:C,fillOpacity:1});if(l.attr({cx:s+$,cy:w}),l.node.classList.add("apexcharts-heatmap-rect"),i.add(l),l.attr({fill:C,i:t,index:t,j:P,val:e[t][P],"stroke-width":this.strokeWidth,stroke:v,color:C}),o||l.attr({width:h,height:p}),n.config.chart.animations.enabled&&!n.globals.dataChanged){let e=1;if(n.globals.resized||(e=n.config.chart.animations.speed),o)this.animateHeatMap(l,s,w,h,p,e,t,P);else{const i=new a(this.w);i.animatePop(l,{speed:e,delay:this.enterStaggerDelay(e,t,P),onComplete:()=>{i.animationCompleted(l)}})}}if(n.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&n.globals.shouldAnimate){e=this.dynamicAnim.speed;let a=n.globals.previousPaths[t]&&n.globals.previousPaths[t][P]&&n.globals.previousPaths[t][P].color;a||(a="rgba(255, 255, 255, 0)"),this.animateHeatColor(l,r.isColorHex(a)?a:r.rgb2hex(a),r.isColorHex(C)?C:r.rgb2hex(C),e)}}}const M=(0,n.config.dataLabels.formatter)(n.seriesData.series[t][P],{value:n.seriesData.series[t][P],seriesIndex:t,dataPointIndex:P,w:n}),R=this.helpers.calculateDataLabels({text:M,x:s+$+h/2,y:w+p/2,i:t,j:P,colorProps:D,series:_});null!==R&&i.add(R),f||(s+=g),P++}w+=p,h.add(i)}const C=n.globals.yAxisScale[0].result.slice();return n.config.yaxis[0].reversed?C.unshift(""):C.push(""),n.globals.yAxisScale[0].result=C,h}animateHeatMap(e,t,i,s,o,l,r=0,n=0){const c=new a(this.w),h=this.enterStaggerDelay(l,r,n);c.animateRect(e,{x:t+s/2,y:i+o/2,width:0,height:0},{x:t,y:i,width:s,height:o},l,()=>{c.animationCompleted(e)},h)}enterStaggerDelay(e,t,a){const s=this.w,o=s.config.chart.animations.animateGradually;if(!o||!1===o.enabled)return 0;const l=((s.seriesData.series||[]).length||1)+(s.globals.dataPoints||1)-2,r=Math.min(o.delay||0,.5*e/Math.max(1,l));return i({style:"diagonal",index:a,row:t,col:a,baseDelay:r})}cellShapePath(e,t,a,i,s){const o=t+i/2,l=a+s/2;if("circle"===e){const e=Math.min(i,s)/2;return`M ${o-e} ${l} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${2*-e} 0 Z`}if("diamond"===e)return`M ${o} ${a} L ${t+i} ${l} L ${o} ${a+s} L ${t} ${l} Z`;const r=t+i;return`M ${o} ${a-s/6} L ${r} ${a+s/6} L ${r} ${a+5*s/6} L ${o} ${a+7*s/6} L ${t} ${a+5*s/6} L ${t} ${a+s/6} Z`}applyHexagonClipPath(e,t,a,i){const s=this.w,o=this.strokeWidth/2+2,l=`heatmapHexMask${s.globals.cuid}`,r=s.dom.elDefs.node,n=r.querySelector(`clipPath[id="${l}"]`);n&&n.parentNode&&n.parentNode.removeChild(n);const c=g.createElementNS(p,"clipPath");c.setAttribute("id",l),c.appendChild(t.drawRect(-a/4-o,-i/6-o,s.layout.gridWidth+a/2+2*o,s.layout.gridHeight+i/3+2*o,0,"#fff").node),r.appendChild(c),e.attr("clip-path",`url(#${l})`)}animateHeatColor(e,t,a,i){e.attr({fill:t}).animate(i).attr({fill:a})}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>t.default});
|
package/dist/heatmap.esm.js
CHANGED
package/dist/heatmap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexHeatmap={})}(this,function(e){"use strict";const t=globalThis.ApexCharts,a=globalThis.ApexCharts.__internals,i=a.__apex_Animations,s=a.__apex_Animations_computeStagger;a.__apex_Animations_applyAnimationPolicy,a.__apex_Animations_prefersReducedMotion,a.__apex_Animations_applyProgressiveReveal;const o=globalThis.ApexCharts.__internals.__apex_Graphics,l=globalThis.ApexCharts.__internals.__apex_Fill,n=globalThis.ApexCharts.__internals.__apex_Series,r=globalThis.ApexCharts.__internals.__apex_Utils,c=globalThis.ApexCharts.__internals.__apex_DataLabels,h=(e,t,a,i)=>{if("function"!=typeof e)return e;const s=e({series:t.seriesData.series,seriesIndex:a,dataPointIndex:i,w:t});return Number.isFinite(s)?s:0};class p{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const a=e.config.plotOptions[e.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,a,i){const s=this.w;let o=1;const l=s.config.plotOptions[e].shadeIntensity,n=this.determineColor(e,t,a);s.globals.hasNegs||i?o=s.config.plotOptions[e].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*l):(1-n.percent/100)*(1.25*l):n.percent<=0?1-(1+n.percent/100)*l:(1-n.percent/100)*l:(o=1-n.percent/100,"treemap"===e&&(o=(1-n.percent/100)*(1.25*l)));let c=n.color;const h=new r;if(s.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){const e=h.shadeColor(-1*o,n.color);c=r.hexToRgba(r.isColorHex(e)?e:r.rgb2hex(e),s.config.fill.opacity)}else{const e=h.shadeColor(o,n.color);c=r.hexToRgba(r.isColorHex(e)?e:r.rgb2hex(e),s.config.fill.opacity)}return{color:c,colorProps:n}}determineColor(e,t,a){const i=this.w,s=i.seriesData.series[t][a],o=i.config.plotOptions[e];let l=o.colorScale.inverse?a:t;o.distributed&&"treemap"===i.config.chart.type&&(l=a);let n,r,c=i.globals.colors[l],h=null;if(o.distributed||"heatmap"!==e){const e=i.seriesData.series[t];n=e.length?e[0]:0,r=n;for(let t=1;t<e.length;t++)e[t]<n&&(n=e[t]),e[t]>r&&(r=e[t])}else n=i.globals.minY,r=i.globals.maxY;const p=o.colorScale.min,d=o.colorScale.max;void 0!==p&&void 0!==d&&d>p?(n=p,r=d):void 0!==p&&(n=p<i.globals.minY?p:i.globals.minY,r=d>i.globals.maxY?d:i.globals.maxY);const g=Math.abs(r)+Math.abs(n),f=Math.min(Math.max(s,n),r);let m=0===g?0:100*f/g;if(o.colorScale.ranges.length>0){o.colorScale.ranges.map(e=>{if(s>=e.from&&s<=e.to){c=e.color,h=e.foreColor?e.foreColor:null,n=e.from,r=e.to;const t=Math.abs(r)+Math.abs(n);m=0===t?0:100*s/t}})}return{color:c,foreColor:h,percent:m}}calculateDataLabels({text:e,x:t,y:a,i:i,j:s,colorProps:l,fontSize:n}){const r=this.w,p=r.config.dataLabels,d=new o(this.w),g=new c(this.w,this.ctx);let f=null;if(p.enabled){f=d.group({class:"apexcharts-data-labels"});const o=h(p.offsetX,r,i,s),c=h(p.offsetY,r,i,s),m=t+o,x=a+parseFloat(p.style.fontSize)/3+c;g.plotDataLabelsText({x:m,y:x,text:e,i:i,j:s,color:l.foreColor,parent:f,fontSize:n,dataLabelsConfig:p})}return f}}const d=globalThis.ApexCharts.__internals.__apex_Filters;const g=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,f=globalThis.ApexCharts.__internals,m=f.__apex_math_SVGNS;f.__apex_math_Point,f.__apex_math_Matrix,f.__apex_math_Box;t.use({heatmap:class{constructor(e,t,a){this.ctx=t,this.w=e,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new p(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.shape=this.w.config.plotOptions.heatmap.shape||"rect",this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){var t,a;const s=this.w,c=new o(this.w,this.ctx),h=c.group({class:"apexcharts-heatmap"}),p=s.layout.gridWidth/s.globals.dataPoints,g=s.layout.gridHeight/s.seriesData.series.length,f=("numeric"===s.config.xaxis.type||"datetime"===s.config.xaxis.type)&&s.axisFlags.isXNumeric&&this.xRatio>0;let m=p;if(f){const e=s.globals.minXDiff;m=Number.isFinite(e)&&e>0?e/this.xRatio:p}let x=this.shape;f&&"hexagon"===x&&(x="rect");const u=function(e,t){const a=e&&e.renderer;return a&&a.kind&&"svg"!==a.kind?a:t}(this.ctx,c),b="rect"===x&&u!==c&&"function"==typeof u.drawRectCell;"hexagon"===x?this.applyHexagonClipPath(h,c,p,g):h.attr("clip-path",`url(#gridRectMask${s.globals.cuid})`);const _=Array.isArray(s.config.fill.opacity)?null!=(t=s.config.fill.opacity[0])?t:1:null!=(a=s.config.fill.opacity)?a:1;let y=0,w=!1;this.negRange=this.helpers.checkColorRange();const C=e.slice();s.config.yaxis[0].reversed&&(w=!0,C.reverse());for(let t=w?0:C.length-1;w?t<C.length:t>=0;w?t++:t--){const a=c.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:r.escapeString(s.seriesData.seriesNames[t]),rel:t+1,"data:realIndex":t});if(n.addCollapsedClassToSeries(this.w,a,t),b||c.setupEventDelegation(a,".apexcharts-heatmap-rect"),s.config.chart.dropShadow.enabled){const e=s.config.chart.dropShadow;new d(this.w).dropShadow(a,e,t)}let o=0;const w=s.config.plotOptions.heatmap.shadeIntensity,S=Math.round(y/g),$="hexagon"===x?(S%2==0?-1:1)*p/4:0;let A=0;for(let n=0;n<s.globals.dataPoints;n++){if(!f&&s.seriesData.seriesX.length&&!s.globals.allSeriesHasEqualX&&s.globals.minX+s.globals.minXDiff*n<s.seriesData.seriesX[t][A]){o+=p;continue}if(A>=C[t].length)break;const h=f?m:p;if(f){const e=s.seriesData.seriesX[t]?s.seriesData.seriesX[t][A]:null;if(null==e||e!=e){A++;continue}o=(e-s.globals.minX)/this.xRatio-m/2}const d=this.helpers.getShadeColor(s.config.chart.type,t,A,this.negRange);let S=d.color;const P=d.colorProps;if("image"===s.config.fill.type){S=new l(this.w).fillPath({seriesNumber:t,dataPointIndex:A,opacity:s.globals.hasNegs?P.percent<0?1-(1+P.percent/100):w+P.percent/100:P.percent/100,patternID:r.randomId(),width:s.config.fill.image.width?s.config.fill.image.width:h,height:s.config.fill.image.height?s.config.fill.image.height:g})}const D=this.rectRadius,k=s.config.plotOptions.heatmap.useFillColorAsStroke?S:s.globals.stroke.colors[0];if(b)u.drawRectCell(o,y,h,g,{fill:S,fillOpacity:_,stroke:k,strokeWidth:this.strokeWidth,radius:D,seriesIndex:t,dataPointIndex:A});else{const l="rect"===x,n=l?c.drawRect(o,y,h,g,D):c.drawPath({d:this.cellShapePath(x,o+$,y,h,g),stroke:k,strokeWidth:this.strokeWidth,fill:S,fillOpacity:1});if(n.attr({cx:o+$,cy:y}),n.node.classList.add("apexcharts-heatmap-rect"),a.add(n),n.attr({fill:S,i:t,index:t,j:A,val:e[t][A],"stroke-width":this.strokeWidth,stroke:k,color:S}),l||n.attr({width:h,height:g}),s.config.chart.animations.enabled&&!s.globals.dataChanged){let e=1;if(s.globals.resized||(e=s.config.chart.animations.speed),l)this.animateHeatMap(n,o,y,h,g,e,t,A);else{const a=new i(this.w);a.animatePop(n,{speed:e,delay:this.enterStaggerDelay(e,t,A),onComplete:()=>{a.animationCompleted(n)}})}}if(s.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&s.globals.shouldAnimate){e=this.dynamicAnim.speed;let a=s.globals.previousPaths[t]&&s.globals.previousPaths[t][A]&&s.globals.previousPaths[t][A].color;a||(a="rgba(255, 255, 255, 0)"),this.animateHeatColor(n,r.isColorHex(a)?a:r.rgb2hex(a),r.isColorHex(S)?S:r.rgb2hex(S),e)}}}const R=(0,s.config.dataLabels.formatter)(s.seriesData.series[t][A],{value:s.seriesData.series[t][A],seriesIndex:t,dataPointIndex:A,w:s}),v=this.helpers.calculateDataLabels({text:R,x:o+$+h/2,y:y+g/2,i:t,j:A,colorProps:P,series:C});null!==v&&a.add(v),f||(o+=p),A++}y+=g,h.add(a)}const S=s.globals.yAxisScale[0].result.slice();return s.config.yaxis[0].reversed?S.unshift(""):S.push(""),s.globals.yAxisScale[0].result=S,h}animateHeatMap(e,t,a,s,o,l,n=0,r=0){const c=new i(this.w),h=this.enterStaggerDelay(l,n,r);c.animateRect(e,{x:t+s/2,y:a+o/2,width:0,height:0},{x:t,y:a,width:s,height:o},l,()=>{c.animationCompleted(e)},h)}enterStaggerDelay(e,t,a){const i=this.w,o=i.config.chart.animations.animateGradually;if(!o||!1===o.enabled)return 0;const l=((i.seriesData.series||[]).length||1)+(i.globals.dataPoints||1)-2,n=Math.min(o.delay||0,.5*e/Math.max(1,l));return s({style:"diagonal",index:a,row:t,col:a,baseDelay:n})}cellShapePath(e,t,a,i,s){const o=t+i/2,l=a+s/2;if("circle"===e){const e=Math.min(i,s)/2;return`M ${o-e} ${l} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${2*-e} 0 Z`}if("diamond"===e)return`M ${o} ${a} L ${t+i} ${l} L ${o} ${a+s} L ${t} ${l} Z`;const n=t+i;return`M ${o} ${a-s/6} L ${n} ${a+s/6} L ${n} ${a+5*s/6} L ${o} ${a+7*s/6} L ${t} ${a+5*s/6} L ${t} ${a+s/6} Z`}applyHexagonClipPath(e,t,a,i){const s=this.w,o=this.strokeWidth/2+2,l=`heatmapHexMask${s.globals.cuid}`,n=s.dom.elDefs.node,r=n.querySelector(`clipPath[id="${l}"]`);r&&r.parentNode&&r.parentNode.removeChild(r);const c=g.createElementNS(m,"clipPath");c.setAttribute("id",l),c.appendChild(t.drawRect(-a/4-o,-i/6-o,s.layout.gridWidth+a/2+2*o,s.layout.gridHeight+i/3+2*o,0,"#fff").node),n.appendChild(c),e.attr("clip-path",`url(#${l})`)}animateHeatColor(e,t,a,i){e.attr({fill:t}).animate(i).attr({fill:a})}}}),e.default=t,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/histogram.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))r.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))i.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_Utils,u="__apexcharts_series_transforms__";function b(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[u][t]=e)}globalThis[u]||(globalThis[u]={});const g="__apexcharts_row_sources__";function p(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[g][t]=e)}globalThis[g]||(globalThis[g]={});function x(t,e){const s=t.length;if(0===s)return NaN;if(1===s)return t[0];const a=(s-1)*e,r=Math.floor(a),i=Math.ceil(a);return r===i?t[r]:t[r]+(t[i]-t[r])*(a-r)}function f(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}function y(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e);let a=s[0],r=s[s.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);isFinite(t)&&isFinite(e)&&e>t&&(a=t,r=e)}if(!(r>a)){const t=Math.abs(a)>0?.05*Math.abs(a):.5;return{edges:[a-t,a+t],binWidth:2*t,rule:"single",capped:!1}}const o=r-a;let n,l;if("number"==typeof e.binWidth&&e.binWidth>0)n=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)n=o/Math.floor(e.bins),l="count";else{const t=function(t,e,s){const a=t.length,r=t=>e/Math.max(1,Math.ceil(t));switch(s){case"sqrt":return{width:r(Math.sqrt(a)),rule:"sqrt"};case"rice":return{width:r(2*Math.cbrt(a)),rule:"rice"};case"scott":{const e=f(t);return e>0?{width:3.49*e*Math.pow(a,-1/3),rule:"scott"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"fd":{const e=x(t,.75)-x(t,.25);return e>0?{width:2*e*Math.pow(a,-1/3),rule:"fd"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"auto":{const e=r(Math.log2(a)+1),s=x(t,.75)-x(t,.25);if(s<=0)return{width:e,rule:"sturges"};const i=2*s*Math.pow(a,-1/3);return i<e?{width:i,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:r(Math.log2(a)+1),rule:"sturges"}}}(s,o,"string"==typeof e.bins?e.bins:"auto");n=t.width,l=t.rule}(!isFinite(n)||n<=0)&&(n=o);let h=Math.ceil(o/n);(!isFinite(h)||h<1)&&(h=1);let d=!1;h>1e3&&(h=1e3,n=o/h,d=!0),n=o/h;const c=new Array(h+1);for(let t=0;t<=h;t++)c[t]=a+t*n;return c[h]=Math.max(c[h],r),{edges:c,binWidth:n,rule:l,capped:d}}function m(t,e){const s=e.length-1;if(!(t>=e[0])||t>e[s])return-1;if(t===e[s])return s-1;const a=(e[s]-e[0])/s;if(a>0){let r=Math.floor((t-e[0])/a);return r<0&&(r=0),r>s-1&&(r=s-1),t<e[r]?r--:t>=e[r+1]&&r++,r<0||r>s-1?-1:r}let r=0,i=s-1;for(;r<=i;){const s=r+i>>1;if(t<e[s])i=s-1;else{if(!(t>=e[s+1]))return s;r=s+1}}return-1}function v(t,e){var s;if(!t||"object"!=typeof t||Array.isArray(t))return null;let a=null;if(Array.isArray(t.points)?a=t.points:Array.isArray(null==(s=t.y)?void 0:s.points)?a=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(a=t.y),!a)return null;const r=[];for(let t=0;t<a.length;t++){const e=c.parseNumber(a[t]);null!==e&&isFinite(e)&&r.push(e)}return r.length?r:null}function C(t){const e=[];if(!Array.isArray(t))return e;for(let s=0;s<t.length;s++){const a=t[s];let r=a;Array.isArray(a)?r=1===a.length?a[0]:a[1]:a&&"object"==typeof a&&(r=void 0!==a.y?a.y:a.x);const i=c.parseNumber(r);null!==i&&isFinite(i)&&e.push(i)}return e}const w=new WeakSet;function I(t,e,s){const a=s&&null!=s.maxRows?s.maxRows:3e3,r=function(t,e){let s=0,a=0;for(const e of t)s+=e.length,e.length>a&&(a=e.length);if(s<=e)return{clusters:t,stride:1,total:s,kept:s};const r=e=>{let s=0;for(const a of t)s+=Math.ceil(a.length/e);return s};let i=Math.max(2,Math.ceil(s/e));for(;i<a&&r(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let s=0;s<t.length;s+=i)e.push(t[s]);return o+=e.length,e}),stride:i,total:s,kept:o}}(e.map(t=>t.rows),a);r.stride;const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const s=i[t.realIndex]||i[0];return{name:t.name,data:r.clusters[e].map((a,r)=>n({id:`${t.realIndex}:${e}:${r}`,x:t.name,y:a},s?{fillColor:s}:{}))}})}function P(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function A(t){return(e,s)=>{var a;const r=t(e);if(!Array.isArray(r)||!r.length)return null;const i=e.globals&&e.globals.collapsedSeriesIndices||[],o=e.globals&&((null==(a=e.globals.categoryLabels)?void 0:a.length)?e.globals.categoryLabels:e.globals.labels)||[],n=[];return r.forEach((t,s)=>{var a;if(-1!==i.indexOf(s))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(a=e.seriesData.seriesNames)?void 0:a[s]);t.forEach((t,e)=>{const a=null!=o[e]?String(o[e]):`#${e+1}`;n.push({name:r.length>1&&l?`${l} ${a}`:a,realIndex:s,rows:Array.isArray(t)?t.slice():[]})})}),n.length?I(e,n,s):null}}const S=A(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),L=A(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});b("histogram",function(t,e){var s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.histogramRawSeries||(r.histogramRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const i=r.histogramRawSeries,o=(null==(s=a.plotOptions)?void 0:s.histogram)||{},h=i.map(t=>C(null==t?void 0:t.data));let d=[];if(1===h.length)d=h[0];else for(const t of h)d=d.concat(t);const c=y(d,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!c)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:u,binWidth:b}=c,g=h.map(t=>function(t,e){const s=new Array(Math.max(0,e.length-1)).fill(0);for(let a=0;a<t.length;a++){const r=m(t[a],e);r>=0&&s[r]++}return s}(t,u));e.histogramData={edges:u,binWidth:b,counts:g,rule:c.rule,capped:c.capped};const p=r.collapsedSeriesIndices||[];return i.map((t,e)=>{if(-1!==p.indexOf(e))return l(n({},t),{data:[]});const s=function(t,e={}){let s=t.slice();if(e.cumulative){let t=0;s=s.map(e=>t+=e)}const a=t.reduce((t,e)=>t+e,0);if(a<=0)return s;if("relative"===e.normalize)return s.map(t=>t/a*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return s.map(e=>e/(a*t))}return s}(g[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:b}),a=[];for(let t=0;t<s.length;t++)a.push({x:(u[t]+u[t+1])/2,y:s[t]});return l(n({},t),{data:a})})}),b("boxPlot",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.boxPlot)?void 0:a.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!w.has(t))return t;const s=v(t,!1);if(!s)return t;const a=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=x(s,.25),r=x(s,.5),i=x(s,.75),o=i-a;let n=s[0],l=s[s.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=a-1.5*o,e=i+1.5*o;let r=0;for(;r<s.length&&s[r]<t;)r++;let d=s.length-1;for(;d>=0&&s[d]>e;)d--;r<=d&&(n=s[r],l=s[d],h=s.slice(0,r).concat(s.slice(d+1)))}return{summary:[n,a,r,i,l],outliers:h,iqr:o}}(s,{whiskers:r});if(!a)return t;e=!0;const i=l(n({},t),{y:a.summary,points:s});return w.add(i),i});return e?l(n({},t),{data:s}):t})}),b("violin",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.violin)?void 0:a.kde)||{};return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{var s;if(Array.isArray(null==(s=null==t?void 0:t.y)?void 0:s.density)&&t.y.density.length&&!w.has(t))return t;const a=v(t,!0);if(!a)return t;const i=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=s.length;let r=e.bandwidth;if(!("number"==typeof r&&r>0)){const t=f(s),e=x(s,.75)-x(s,.25);r=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(a,-.2)}if(!isFinite(r)||r<=0){const t=s[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=s[0]-2*r,n=(s[a-1]+2*r-o)/(i-1),l=1/(a*r*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<i;t++){const e=o+t*n;let i=0;for(let t=0;t<a;t++){const a=(e-s[t])/r;i+=Math.exp(-.5*a*a)}h.push([e,i*l])}return{density:h,bandwidth:r}}(a,{bandwidth:r.bandwidth,resolution:r.resolution});if(!i)return t;e=!0;const o=l(n({},t),{y:{density:i.density,points:a}});return w.add(o),o});return e?l(n({},t),{data:s}):t})}),p("histogram",function(t,e){const s=t.globals,a=t.histogramData,r=s&&s.histogramRawSeries;if(!a||!Array.isArray(a.edges)||a.edges.length<2)return null;if(!Array.isArray(r)||!r.length)return null;const i=s&&s.collapsedSeriesIndices||[],o=a.edges,n=[];return r.forEach((e,s)=>{var a;if(-1!==i.indexOf(s))return;const l=function(t,e){const s=Math.max(0,e.length-1),a=new Array(s);for(let t=0;t<s;t++)a[t]=[];for(let s=0;s<t.length;s++){const r=m(t[s],e);r>=0&&a[r].push(t[s])}return a}(C(e&&e.data),o),h=t.seriesData&&(null==(a=t.seriesData.seriesNames)?void 0:a[s])||(null==e?void 0:e.name);l.forEach((t,e)=>{const a=`${P(o[e])}-${P(o[e+1])}`;n.push({name:r.length>1&&h?`${h} ${a}`:a,realIndex:s,rows:t})})}),n.length?I(t,n,e):null}),p("boxPlot",S),p("violin",L);const D=d.__apex_Graphics,H=d.__apex_DataLabels,k=(t,e,s,a)=>{if("function"!=typeof t)return t;const r=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(r)?r:0},R=d.__apex_BrowserAPIs_BrowserAPIs,W=d.__apex_Environment_Environment;function X(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(W.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function F(t,e,s){var a,r,i,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(i=null==(r=t.seriesData)?void 0:r.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}function O(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Y(t,e,s=!1,a=!1){var r,i;if(!X(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(r=o.seriesY)?void 0:r[e],l=null==(i=t.seriesData.series)?void 0:i[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=O(n.map((t,s)=>function(t,e,s){var a,r;if(t.isXNumeric){const r=null==(a=t.seriesX)?void 0:a[e];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const i=null==(r=t.labels)?void 0:r[s];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+s}(o,e,s))),d=O(l.map((s,a)=>F(t,e,a))),c=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),r=new Set;let i=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!r.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(r.add(l),l<i&&(o=!1),i=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)r.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function M({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:r,speed:i}){var o;if(!X(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new D(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(s=>{let a=s.fill||d||"#c8c8c8";0===String(a).indexOf("url(")&&(a=d||"#c8c8c8");const o=h.drawPath({d:s.d,stroke:"none",strokeWidth:0,fill:a,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(s.d);let c=r?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=r?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const u=n.style;u.transformBox="fill-box",u.transformOrigin=c;const b=Math.max(1,i||1),g=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-g)/b)),a=1-Math.pow(1-s,3),i=1-a;u.transform=r?`scaleX(${i})`:`scaleY(${i})`,u.opacity=String(1-a),s<1?R.requestAnimationFrame(p):n.parentNode.removeChild(n)};R.requestAnimationFrame(p)})}class T{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s;const{x:a,y:r,y1:i,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:u,barHeight:b,barWidth:g,barXPosition:p,barYPosition:x,visibleSeries:f}=t,y=this.w,m=new D(this.barCtx.w),v=y.waterfallData&&y.waterfallData.values,C=v&&v[c]&&null!=v[c][d]?v[c][d]:null,w=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let I,P;y.axisFlags.isXNumeric&&!y.globals.isBarHorizontal?(I=a+g*(f+1),P=r+b*(f+1)-w):(I=a+g*f,P=r+b*f);let A=null,S=null,L=a,H=r,R={};const W=y.config.dataLabels,X=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==x&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(P=x,H=x),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(I=p,L=p);const O=k(W.offsetX,y,c,d),Y=k(W.offsetY,y,c,d);let M={width:0,height:0};if(y.config.dataLabels.enabled){const t=null!==C?C:y.seriesData.series[c][d];M=m.getTextRects(y.config.dataLabels.formatter?y.config.dataLabels.formatter(t,l(n({},y),{seriesIndex:c,dataPointIndex:d,w:y})):y.formatters.yLabelFormatters[0](t),parseFloat(W.style.fontSize).toString(),W.style.fontFamily,void 0,!0,W.style.fontWeight)}const T={x:a,y:r,i:h,j:d,realIndex:c,columnGroupIndex:u,bcx:I,bcy:P,barHeight:b,barWidth:g,textRects:M,strokeWidth:w,dataLabelsX:L,dataLabelsY:H,dataLabelsConfig:W,barDataLabelsConfig:X,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(R=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==C&&this.barCtx.isHorizontal&&"center"===X.position){const t=null==(s=null==(e=y.waterfallData.geometry)?void 0:e[c])?void 0:s[d];t&&t.horizontal&&(R.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return A=this.drawCalculatedDataLabels({x:R.dataLabelsX,y:R.dataLabelsY,val:null!==C?C:this.barCtx.isRangeBar?[i,o]:"100%"===y.config.chart.stackType?y.globals.seriesPercent[c][d]:y.seriesData.series[c][d],i:c,j:d,barWidth:g,barHeight:b,textRects:M,dataLabelsConfig:W}),y.config.chart.stacked&&F.enabled&&(S=this.drawTotalDataLabels({x:R.totalDataLabelsX,y:R.totalDataLabelsY,barWidth:g,barHeight:b,realIndex:c,j:d,textAnchor:R.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:W,barTotalDataLabelsConfig:F})),{dataLabelsPos:R,dataLabels:A,totalDataLabels:S}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,a=this.getTotalGroupContext(t),r=s.seriesData.stackedSeriesTotalsByGroups;return a&&r&&r[a.groupIndex]?r[a.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,a,{i:r,j:i,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:b,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,strokeWidth:f,offX:y,offY:m}=t;const v=l;d=Math.abs(d);const C="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});l-=f/2;const I=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+y:l-I+h/2+y,!e.config.chart.stacked&&w>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*w)),C){const t=2;u=u+c.height/2-f/2-t}const P=e.seriesData.series[r][i]<0;let A=n;switch(this.barCtx.isReversed&&(A=n+(P?d:-d)),p.position){case"center":b=C?P?A-d/2+m:A+d/2-m:P?A-d/2+c.height/2+m:A+d/2+c.height/2-m;break;case"bottom":b=C?P?A-d+m:A+d-m:P?A-d+c.height+f+m:A+d-c.height/2+f-m;break;case"top":b=C?P?A+m:A-m:P?A-c.height/2-m:A+c.height+m}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{S=P?Math.max(t[i],S):Math.min(t[i],S)})}),this.drawsStackedTotal(o)&&x.enabled){const t=18,r=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),g.fontSize);s=P?S-r.height/2-m-x.offsetY+t:S+r.height+m+x.offsetY-t;const n=I;a=v+(e.axisFlags.isXNumeric?-h/2:h/2-n)+x.offsetX}return e.config.chart.stacked||(b<0?b=0+f:b+c.height/3>e.layout.gridHeight&&(b=e.layout.gridHeight-f)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:b,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:r,j:i,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:x,offY:f}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});let v,C,w;if(h=Math.abs(h),this.barCtx.isPyramid){v=n+l/2+f-(null!=(e=d.centerOffset)?e:0)}else v=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+f-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=l*m);let I="start";const P=s.seriesData.series[r][i]<0;let A=a;if(this.barCtx.isReversed&&(A=a+(P?-h:h),I=P?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+x;else switch(g.position){case"center":c=P?A+h/2-x:Math.max(d.width/2,A-h/2)+x;break;case"bottom":c=P?A+h-u-x:A-h+u+x;break;case"top":c=P?A-u-x:A-u+x}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{S=P?Math.min(t[i],S):Math.max(t[i],S)})}),this.drawsStackedTotal(o)&&p.enabled){const t=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),b.fontSize);P?(C=S-u-x-p.offsetX,I="end"):C=S+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),w=v-d.height/2+t.height/2+p.offsetY+u,s.globals.barGroups.length>1&&!L&&(w-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=P&&"middle"!==b.textAnchor?"start"===b.textAnchor?"end":"start":b.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===g.orientation?d.height:d.width)-e;c+a>s.layout.gridWidth-u&&(c=s.layout.gridWidth-a-u),c-e<u&&(c=e+u)}return{bcx:a,bcy:n,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:C,totalDataLabelsY:w,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:r,textRects:i,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,u,b;const g=this.w;let p="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(p=`rotate(-90, ${t}, ${e})`);const x=new H(this.barCtx.w,this.barCtx.ctx),f=new D(this.barCtx.w),y=d.formatter;let m=null;const v=g.globals.collapsedSeriesIndices.indexOf(a)>-1,C=(g.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(C){const t=null==(c=g.globals.prevDataLabels)?void 0:c.get(`${a}::${F(g,a,r)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!v||C)){m=f.group({class:"apexcharts-data-labels",transform:p});const c=g.config.dataLabels;((null==(u=c.animate)?void 0:u.enabled)||(null==(b=c.countUp)?void 0:b.enabled))&&(m.node.setAttribute("data:dlKey",`${a}::${F(g,a,r)}`),m.node.setAttribute("data:dlJ",String(r)),"number"==typeof s&&isFinite(s)&&m.node.setAttribute("data:dlVal",String(s)));let v="";void 0!==s&&(v=y(s,l(n({},g),{seriesIndex:a,dataPointIndex:r,w:g}))),!s&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v="");const w=g.seriesData.series[a][r]<0,I=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=w?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=w?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<f.getTextRects(v,parseFloat(d.style.fontSize).toString()).width&&(v="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!C&&(this.barCtx.isHorizontal?i.width/1.6>Math.abs(h)&&(v=""):i.height/1.6>Math.abs(o)&&(v=""));const P=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?P.textAnchor="end":"end"===d.textAnchor&&(P.textAnchor="start")),x.plotDataLabelsText({x:t,y:e,text:v,i:a,j:r,parent:m,dataLabelsConfig:P,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:r,j:i,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new D(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(r)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(r);c.node.setAttribute("data:dlTotalKey",`${t}::${F(this.w,r,i)}`),c.node.setAttribute("data:dlTotalSeries",String(r)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const B=d.__apex_Series,j=d.__apex_Fill;function z(t){var e,s,a,r,i,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(r=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:r.overlap)&&(null!=(n=null==(o=null==(i=t.seriesData)?void 0:i.series)?void 0:o.length)?n:0)>1)}class G{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let a=0;a<t[s].length;a++)e.seriesData.seriesX[s][a]>e.globals.minX&&e.seriesData.seriesX[s][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),c.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let s=0;s<t.length;s++){const a=t[s];Array.isArray(a)&&a.length>0&&e.push(a)}if(!e.length)return 0;const s=new Array(e.length).fill(0);let a=NaN,r=1/0;for(;;){let t=1/0,i=-1;for(let a=0;a<e.length;a++){const r=e[a];for(;s[a]<r.length&&"number"!=typeof r[s[a]];)s[a]++;if(s[a]>=r.length)continue;const o=r[s[a]];o==o?o<t&&(t=o,i=a):(s[a]++,a--)}if(-1===i)break;if(s[i]++,a==a){const e=t-a;e>0&&e<r&&(r=e)}a=t}return isFinite(r)?r:0}initialPositions(t){const e=this.w;let s,a,r,i,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let u=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||z(e))&&(u=1),this.barCtx.isHorizontal)r=e.layout.gridHeight/d,o=r/u,e.axisFlags.isXNumeric&&(r=e.layout.gridHeight/this.barCtx.totalItems,o=r/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(r-o*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(i=e/t),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+c.noExponents(i-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:r,xDivision:i,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,a){var r;const i=this.w,o=new j(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(r=i.config.series[e].data[s])?void 0:r.fill),c=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:u,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(i.config.fill.type)?i.config.fill.type[a]:i.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const r=s.config.plotOptions.bar.dumbbell.connector;if(r.color)return null;const i=a.order[e];if(!i)return null;const o=s.globals.colors[i[0]],n=s.globals.colors[i[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:r.opacity,opacityTo:r.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===r.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,r=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(r);return e.length?[e]:[]}const i=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!r(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?i[t].push(e):o.push(e)}return o.length&&i.push(o),i.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const s=this.w,a=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,r=t.length,i=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:r},()=>Array(i).fill(a?"top":"none"));if(a)return o;const n="bar"===this.w.config.chart.type&&1===i,l=n?"top":"both",h=n?"top":"bottom";for(const e of this.getStackedSeriesIndices(r))for(let s=0;s<i;s++){const a=[],r=[];for(const i of e){const e=t[i][s];e>0?a.push(i):e<0&&r.push(i)}if(a.length>0&&0===r.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const r of a)o[r][s]=r===t?h:r===e?"top":"none"}else if(r.length>0&&0===a.length)if(1===r.length)o[r[0]][s]="both";else{const t=Math.max(...r),e=Math.min(...r);for(const a of r)o[a][s]=a===t?"bottom":a===e?"top":"none"}else if(a.length>0&&r.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...r);for(const t of r)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:r,y2:i,elSeries:o}){const n=this.w,l=new D(this.barCtx.w),h=new B(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==r?r:0,void 0!==a?a:n.layout.gridWidth,void 0!==i?i:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.columnWidthOffset)&&(f=e-c.config.series[l].data[d].columnWidthOffset/2,x=t+c.config.series[l].data[d].columnWidthOffset);const y=r/2,m=f+y,v=f+x-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001-y*C,a+=.001+y*C;const w=p.line(v,s),I="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",P=p.move(m,s)+p.line(m,a)+p.line(v,a)+w+I;let A=P;"none"!==this.arrBorderRadius[l][d]&&(A=p.roundPathCorners(A,c.config.plotOptions.bar.borderRadius));let S=null;const L=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(L?S=L:c.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(l,d,A,P)),null==S&&(S=p.move(m,s)+p.line(m,s)+w+w+w+w+w+p.line(m,s)+I),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*C),t.yArrjF.push(Math.abs(s-a+r*C)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:A,pathFrom:S,drawnBox:{x1:m,x2:v,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:r,realIndex:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,b=u(s[a][r]),g=r===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let x;x=g?"taper"===p?0:b:u(s[a][r+1]);const f=o/2,y=t+f,m=t+e-f,v=c-b,C=c+b,w=c-x,I=c+x,P=d.move(v,y)+d.line(C,y)+d.line(I,m)+d.line(w,m)+" Z";let A=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return S?A=S:n.globals.previousPaths.length>0&&(A=this.barCtx.getPreviousPath(i,r,P)),null==A&&(A=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:P,pathFrom:A,x:C,x1:v,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,r=t.map(t=>Math.abs(Number(t)||0)),i=r.reduce((t,e)=>t+e,0);if(0===i||s<=0)return r.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<r.length;t++){const e=n/i;n+=r[t];const a=n/i,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:r,j:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,b=t+u,g=t+e-u,p=c-s,x=c+s,f=c-a,y=c+a,m=d.move(p,b)+d.line(x,b)+d.line(y,g)+d.line(f,g)+" Z";let v=null;const C=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return C?v=C:n.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(r,i,m)),null==v&&(v=d.move(c,b)+d.line(c,b)+d.line(c,g)+d.line(c,g)+" Z"),{pathTo:m,pathFrom:v,x:x,x1:p,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.barHeightOffset)&&(x=t-c.config.series[l].data[d].barHeightOffset/2,f=e+c.config.series[l].data[d].barHeightOffset);const y=r/2,m=x+y,v=x+f-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001+y*C,a+=.001-y*C;const w=this.barCtx.isFunnel,I=w?(s+a)/2:s,P=p.line(s,v),A="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=p.move(s,m)+p.line(a,m)+p.line(a,v)+P+A;let L=S;"none"!==this.arrBorderRadius[l][d]&&(L=p.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let H=null;const k=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(k?H=k:c.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(l,d,L,S)),null==H){const t=w?p.line(I,v):P;H=p.move(I,m)+p.line(I,m)+t+t+t+t+t+p.line(I,m)+A}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*C),t.xArrjF.push(Math.abs(s-a-r*C)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:H,drawnBox:{x1:s,x2:a,y1:m,y2:v}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let r=a?e:null;return null!=t&&(r=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),r}getGoalValues(t,e,s,a,r,i){const o=this.w,h=[],d=(a,r)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,i,!1),attrs:r})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][r]&&Array.isArray(o.seriesData.seriesGoals[a][r])&&o.seriesData.seriesGoals[a][r].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,r);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let i=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[i].value&&(i=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!c.enabled||e!==i&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,r,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===i&&i!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],r=s.dumbbellData;if(r&&"series"===r.form){const t=r.values[e]||[];for(let e=0;e<t.length;e++){const i=t[e];null!==i&&-1===r.hidden.indexOf(e)&&a.push({value:i,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const i=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(i[t])?i[t][e]:i[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const r=this.w,i=r.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof i.formatter)return i.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:r});const o=this.barCtx.isHorizontal?r.formatters.xLabelFormatter:r.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,r):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:r,barHeight:i}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new D(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:i/2,a=e+s+i/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+s+r/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new D(s),r=s.config.plotOptions.bar.dumbbell.dataLabels,i=e.markerSize/2+r.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?i*o:0),y:e.y-(e.horizontal?0:i*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:r}){const i=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:u}=e,b=l+e.barHeight,g=new D(this.barCtx.w),p=new c,x=g.move(n,b)+g.line(o,b)+g.line(h,u)+g.line(d,u)+g.line(n,b)+("around"===i.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][r]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,c.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let r=0,i=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.globals.seriesPercent[s][e];o&&r++,s<t&&0===o&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),a=this.barCtx.columnGroupIndices;let r=a.indexOf(s);return r<0&&(a.push(s),r=a.length-1),{groupIndex:s,columnGroupIndex:r}}}const _=d.__apex_CoreUtils,N=d.__apex_Filters,V=d.__apex_Animations_computeStagger;class E{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/E.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*E.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const r=a.getBoundingClientRect(),i=t.globals.svgWidth?r.width/t.globals.svgWidth:1;return(e-r.left)/(i||1)-t.layout.translateX}}class ${constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new B(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const r=a.getBarSeriesIndices(),i=new _(this.w);this.stackedSeriesTotals=i.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===r.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new G(this)}draw(t,e){var s,a,r;const i=this.w,o=new D(this.w),h=new _(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,u=0;h<t.length;h++,u++){let b,g;const p=[],x=[],f=i.globals.comboCharts?e[h]:h,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(f),m=o.group({class:"apexcharts-series",rel:h+1,seriesName:c.escapeString(i.seriesData.seriesNames[f]),"data:realIndex":f});B.addCollapsedClassToSeries(this.w,m,f),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f],this.translationsIndex=f);const v=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const C=this.barHelpers.initialPositions(f),{y:w,yDivision:I,zeroW:P,x:A,xDivision:S,zeroH:L}=C;let D=C.barHeight,H=C.barWidth;g=w,b=A,this.isHorizontal||x.push(b+(null!=H?H:0)/2);const k=o.group({class:"apexcharts-datalabels","data:realIndex":f});i.globals.delayedElements.push({el:k.node,holdUntilComplete:!(null==(s=i.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(f)}),k.node.classList.add("apexcharts-element-hidden");const R=o.group({class:"apexcharts-bar-goals-markers"}),W=o.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:W.node}),W.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,f);let o=null;const d={indexes:{i:h,j:e,realIndex:f,translationsIndex:v,bc:u},x:b,y:g,strokeWidth:s,elSeries:m};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:D,zeroW:P,yDivision:I})),H=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:S,barWidth:H,zeroH:L})),D=this.series[h][e]/this.yRatio[v]);const C=this.barHelpers.getPathFillColor(t,h,e,f);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=i.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof C.color&&-1===(null==(r=C.color)?void 0:r.indexOf("url"))?C.color:c.hexToRgba(i.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:f,j:e});if(W.add(t),i.config.chart.dropShadow.enabled){new N(this.w).dropShadow(t,i.config.chart.dropShadow,f)}}this.pathArr.push(o);const w=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:D,barWidth:H});w&&R.add(w),g=o.y,b=o.x,e>0&&x.push(b+(null!=H?H:0)/2),p.push(g),this.renderSeries(l(n({realIndex:f,pathFill:C.color},C.useRangeColor?{lineFill:C.color}:{}),{j:e,i:h,columnGroupIndex:y,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:m,x:b,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:D),barWidth:Math.abs(o.barWidth?o.barWidth:H),elDataLabelsWrap:k,elGoalsMarkers:R,elBarShadows:W,visibleSeries:this.visibleI,type:"bar"}))}if(i.globals.seriesXvalues[f]=x,i.globals.seriesYvalues[f]=p,i.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(F(i,f,s));M({w:i,elSeries:m,record:this._prevRecord(f),newKeys:e,isHorizontal:this.isHorizontal,speed:i.config.chart.animations.dynamicAnimation.speed})}d.add(m)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:r,columnGroupIndex:i,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:u,y2:b,series:g,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,elDataLabelsWrap:m,elGoalsMarkers:v,elBarShadows:C,visibleSeries:w,type:I,classes:P}){var A,S,L,H,k,R,W;const X=this.w,O=new D(this.w,this.ctx),Y=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,O);let M=!1;const B=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,O.setupEventDelegation(h,`.apexcharts-${I}-area`)),!s){let e=function(t){const e=X.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:X.seriesData.series[t][a],dataPointIndex:a,w:X}):s};const r="function"==typeof X.globals.stroke.colors[t]?e(t):X.globals.stroke.colors[t];s=this.barOptions.distributed?X.globals.stroke.colors[a]:r}const j=X.config.chart.animations,z=j.animateGradually;let G=0,_=0;if(z&&!1!==z.enabled&&!(X.globals.dataChanged&&this.isLayoutShift(t))){const t=X.globals.dataPoints||1,e=z.delay||0,s=Math.min(e,.5*j.speed/Math.max(1,t));_=V({style:"sequential",index:a,baseDelay:s}),X.config.chart.stacked&&!X.globals.dataChanged&&(_+=r*s*.5);G=_/(e||1)}const E=new T(this).handleBarDataLabels({x:d,y:c,y1:u,y2:b,i:r,j:a,series:g,realIndex:t,columnGroupIndex:i,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,visibleSeries:w});if(_>0){const t=X.config.dataLabels;if((null==(A=t.animate)?void 0:A.enabled)||(null==(S=t.countUp)?void 0:S.enabled)){const t=String(Math.round(_));null==(H=null==(L=E.dataLabels)?void 0:L.node)||H.setAttribute("data:dlDelay",t),null==(R=null==(k=E.totalDataLabels)?void 0:k.node)||R.setAttribute("data:dlDelay",t)}}if(X.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(x,X.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(x,X.globals.barPadForNumericAxis)>X.layout.gridWidth)&&(M=!0),X.config.series[r].data[a]&&X.config.series[r].data[a].strokeColor&&(s=X.config.series[r].data[a].strokeColor),this.isNullValue&&-1===X.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!M){const i=!0===(null==(W=this.ctx.morphTypeChange)?void 0:W.isActive()),d=i?this.ctx.morphTypeChange.getSpeed():X.config.chart.animations.dynamicAnimation.speed,c=i&&this.ctx.morphTypeChange.claimsTargetMark(t,a);c&&(o=n,G=0);const g=Y.renderPaths({i:r,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:X.config.stroke.lineCap,fill:e,pathToInterp:B,animationDelay:G,initialSpeed:X.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${I}-area${P?` ${P}`:""}`,chartType:I,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${X.globals.cuid})`),c&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const f=X.config.forecastDataPoints;f.count>0&&a>=X.globals.dataPoints-f.count&&(g.node.setAttribute("stroke-dasharray",f.dashArray),g.node.setAttribute("stroke-width",f.strokeWidth),g.node.setAttribute("fill-opacity",f.fillOpacity)),void 0!==u&&void 0!==b&&(g.attr("data-range-y1",u),g.attr("data-range-y2",b));new N(this.w).setSelectionFilter(g,t,a),h.add(g),g.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:X.seriesData.series[r][a],barHeight:p,barWidth:x,"data:pathKey":F(X,t,a)}),"canvas"===Y.kind&&(X.globals.barCanvasCoords||(X.globals.barCanvasCoords={}),X.globals.barCanvasCoords[t]||(X.globals.barCanvasCoords[t]={}),X.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:x}),null!==E.dataLabels&&m.add(E.dataLabels),E.totalDataLabels&&m.add(E.totalDataLabels),h.add(m),v&&h.add(v),C&&h.add(C)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.axisFlags.isXNumeric)c=(i=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),c=i+e*this.visibleI,c-=e*s}else c=i+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return r=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(a=p.x1,r=p.x),l.axisFlags.isXNumeric||g||(i+=o),g&&(i=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:r,y:i,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:r});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:c,j:u});t>0&&(r=this.seriesLen*r/t),g=e+r*this.visibleI,g-=r*s}else g=e+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][u],i,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:i,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,i,h,u,d),barXPosition:g,barWidth:r}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const r=this.w;let i=s;return r.seriesData.seriesX[s].length||(i=r.globals.maxValsInArrayIndex),c.isNumber(r.seriesData.seriesX[i][a])&&(t=E.dataXToPx(r,r.seriesData.seriesX[i][a])-e*this.seriesLen/2),{barXPosition:t+(z(r)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const r=e.globals.previousPaths[a];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&(s=r)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const a=this.w;let r=!1;if(X(a)&&a.globals.previousPaths.length>0){const i=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(i)if(i.paths.length!==o)r=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(F(a,t,s))){r=!0;break}}else r=o>0}return this._ltCache[t]=r,r}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=Y(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const r=this.w;this._pathToInterp=null;const i=this._prevRecord(t);if(!i)return X(r)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(F(r,t,e));s?o=s.d:n=!0}else void 0!==i.paths[e]?o=i.paths[e].d:n=!0;if(o){const t=$.pathCommandCount(o),e=$.pathCommandCount(s);if(t===e)return o;const i=new D(r),n=t=>{const e=$.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(s)>1;if(t<e){const t=i.roundPathCorners(o,0);if($.pathCommandCount(t)===e){if(l&&a){const t=i.roundPathCorners(a,0);$.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=i.roundPathCorners(s,0);if($.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=$.squareLike(o),s=e?i.roundPathCorners(e,0):null;if(s&&$.pathCommandCount(s)===t)return s}return o}}}return n&&X(r)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const r=e.map(t=>t[0]),i=e.map(t=>t[1]);return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...i),maxY:Math.max(...i),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=$.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:r,maxY:i,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,c,u;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[c,u]=l(o[1],r,i)):(c=Math.abs(o[1]-r)<=Math.abs(o[1]-i)?r:i,u=c===r?i:r,[h,d]=l(o[0],s,a));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const r=this._prevKeyedPaths(t),i=r?r.get(F(s,t,e)):a.paths[e];return i?!!i.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}d.default.use({bar:$,column:$,barStacked:class extends ${draw(t,e){const s=this.w;this.graphics=new D(this.w),this.bar=new $(this.w,this.ctx,this.xyRatios);const a=new _(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let i=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let u=!1;for(let a=0,h=0;a<t.length;a++,h++){const b=s.globals.comboCharts?e[a]:a,{groupIndex:g,columnGroupIndex:p}=this.barHelpers.getGroupIndex(b);this.groupCtx=this[s.labelData.seriesGroups[g]];const x=[],f=[];let y=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],y=b),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let m=this.graphics.group({class:"apexcharts-series",seriesName:c.escapeString(s.seriesData.seriesNames[b]),rel:a+1,"data:realIndex":b});B.addCollapsedClassToSeries(this.w,m,b);const v=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":b});B.addCollapsedClassToSeries(this.w,v,b),(s.globals.collapsingSeriesIndices||[]).indexOf(b)>-1&&v.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(i,o,void 0,void 0,void 0,void 0,y),{xDivision:I,yDivision:P,zeroH:A,zeroW:S}=w;let L=w.barHeight,D=w.barWidth;o=w.y,i=w.x,s.globals.barHeight=L,s.globals.barWidth=D,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>A),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const r=this.barHelpers.getStrokeWidth(a,e,b),c={indexes:{i:a,j:e,realIndex:b,translationsIndex:y,bc:h},strokeWidth:r,x:i,y:o,elSeries:m,columnGroupIndex:p,seriesGroup:s.labelData.seriesGroups[g]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},c),{zeroW:S,barHeight:L,yDivision:P})),D=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},c),{xDivision:I,barWidth:D,zeroH:A})),L=this.series[a][e]/this.yRatio[y]);const H=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:L,barWidth:D});H&&C.add(H),o=w.y,i=w.x,x.push(i),f.push(o);const k=this.barHelpers.getPathFillColor(t,a,e,b);let R="";const W=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",X="bottom"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]>0||"top"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]<0,F=d&&!X&&this.getPreviousFlip(b,e);(X||F)&&(R=W),F&&(R+=" apexcharts-flip-held",u=!0),m=this.renderSeries(l(n({realIndex:b,pathFill:k.color},k.useRangeColor?{lineFill:k.color}:{}),{j:e,i:a,columnGroupIndex:p,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:r,elSeries:m,x:i,y:o,series:t,barHeight:L,barWidth:D,elDataLabelsWrap:v,elGoalsMarkers:C,type:"bar",visibleSeries:p,classes:R}))}s.globals.seriesXvalues[b]=x,s.globals.seriesYvalues[b]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),r.add(m)}return u&&this.settleHeldMirrors(),r}settleHeldMirrors(){const t=this.w;if(!W.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&c.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}initialPositions(t,e,s,a,r,i,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,i=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),r=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:r,zeroW:i}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,c,u,b,g;const p=this.w,x=i+o*e;let f;const y=t.i,m=t.j,v=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][m];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][m]<0?t=(null==(d=this.series[y])?void 0:d[m])>=0?this.groupCtx.prevX[I-1][m]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][m]:this.groupCtx.prevXVal[I-1][m]>=0&&(t=(null==(c=this.series[y])?void 0:c[m])>=0?this.groupCtx.prevX[I-1][m]:this.groupCtx.prevX[I-1][m]-w+2*(this.isReversed?w:0)),f=t}else f=a;r=null===(null==(u=this.series[y])?void 0:u[m])?f:f+(null==(b=this.series[y])?void 0:b[m])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[y])?void 0:g[m])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:y,j:m,w:p});return this.barHelpers.barBackground({j:m,i:y,y1:x,y2:e,elSeries:h}),i+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,v,m,C),barXPosition:f,barYPosition:x,x:r,y:i}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,c,u,b,g,p,x,f;const y=this.w,m=t.i,v=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(y.axisFlags.isXNumeric){let t=y.seriesData.seriesX[w][v];t||(t=0),e=(t-y.globals.minX)/this.xRatio-r/2*y.globals.barGroups.length}const P=e+o*r;let A,S=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)S+=isNaN(this.groupCtx.prevYF[t][v])?0:this.groupCtx.prevYF[t][v];const L=this.groupCtx.prevY.length;if(L>0&&!y.axisFlags.isXNumeric||L>0&&y.axisFlags.isXNumeric&&y.seriesData.seriesX[w-1][v]===y.seriesData.seriesX[w][v]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[v])){e=this.groupCtx.prevY[L-t][v];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[L-a])?void 0:d[v])<0){t=(null==(c=this.series[m])?void 0:c[v])>=0?e-S+2*(this.isReversed?S:0):e;break}if((null==(u=this.groupCtx.prevYVal[L-a])?void 0:u[v])>=0){t=(null==(b=this.series[m])?void 0:b[v])>=0?e:e+S-2*(this.isReversed?S:0);break}}void 0===t&&(t=y.layout.gridHeight),A=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?i:t}else A=i;s=(null==(p=this.series[m])?void 0:p[v])?A-(null==(x=this.series[m])?void 0:x[v])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[m])?void 0:f[v])/this.yRatio[I]:0):A;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:r,y1:A,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:m,j:v,w:y});return this.barHelpers.barBackground({bc:C,j:v,i:m,x1:P,x2:r,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,i,w,v,0),barXPosition:P,x:y.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends ${draw(t,e){var s,a,r,i,o,l,h,d,u;const b=this.w,g=new D(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=b.rangeData.seriesRangeStart,this.seriesRangeEnd=b.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let x=0;x<t.length;x++){let f,y;const m=b.globals.comboCharts?e[x]:x,{columnGroupIndex:v}=this.barHelpers.getGroupIndex(m),C=g.group({class:"apexcharts-series",seriesName:c.escapeString(b.seriesData.seriesNames[m]),rel:x+1,"data:realIndex":m});B.addCollapsedClassToSeries(this.w,C,m),t[x].length>0&&(this.visibleI=this.visibleI+1);let w=0;this.yRatio.length>1&&(this.yaxisIndex=b.globals.seriesYAxisReverseMap[m][0],w=m);const I=this.barHelpers.initialPositions(m),{y:P,zeroW:A,x:S,zeroH:L}=I;let D=null!=(s=I.barWidth)?s:0,H=null!=(a=I.barHeight)?a:0;const k=null!=(r=I.yDivision)?r:0,R=null!=(i=I.xDivision)?i:0;y=P,f=S;const W=g.group({class:"apexcharts-datalabels","data:realIndex":m}),X=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<b.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(x,e,m),a=this.seriesRangeStart[x][e],r=this.seriesRangeEnd[x][e];let i=null,c=null,g=null;const p={x:f,y:y,strokeWidth:s,elSeries:C};let P=this.seriesLen;if(b.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=b.config.series[x].data)?void 0:o[e]))break;if(this.isHorizontal){g=y+H*this.visibleI;const t=(k-H*P)/2;if(null==(h=null==(l=b.config.series[x].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:g,srty:t,barHeight:H,yDivision:k,initPositions:I});H=s.barHeight,g=s.barYPosition}i=this.drawRangeBarPaths(n({indexes:{i:x,j:e,realIndex:m},barHeight:H,barYPosition:g,zeroW:A,yDivision:k,y1:a,y2:r},p)),D=i.barWidth}else{b.axisFlags.isXNumeric&&(f=(b.seriesData.seriesX[x][e]-b.globals.minX)/this.xRatio-D/2),c=f+D*this.visibleI;const t=(R-D*P)/2;if(null==(u=null==(d=b.config.series[x].data)?void 0:d[e])?void 0:u.x){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:c,srtx:t,barWidth:D,xDivision:R,initPositions:I});D=s.barWidth,c=s.barXPosition}i=this.drawRangeColumnPaths(n({indexes:{i:x,j:e,realIndex:m,translationsIndex:w},barWidth:D,barXPosition:c,zeroH:L,xDivision:R},p)),H=i.barHeight}const S=this.barHelpers.drawGoalLine({barXPosition:i.barXPosition,barYPosition:g,goalX:i.goalX,goalY:i.goalY,barHeight:H,barWidth:D});S&&X.add(S),y=i.y,f=i.x;const F=this.barHelpers.getPathFillColor(t,x,e,m);this.renderSeries({realIndex:m,pathFill:F.color,lineFill:F.useRangeColor?F.color:b.globals.stroke.colors[m],j:e,i:x,x:f,y:y,y1:a,y2:r,pathFrom:i.pathFrom,pathTo:i.pathTo,strokeWidth:s,elSeries:C,series:t,barHeight:H,barWidth:D,barXPosition:c,barYPosition:g,columnGroupIndex:v,elDataLabelsWrap:W,elGoalsMarkers:X,visibleSeries:this.visibleI,type:"rangebar"})}p.add(C)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:r,srtx:i,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var c,u,b,g;const p=this.w;let x=[];const f=null==(u=null==(c=p.globals.seriesRangeName)?void 0:c[t])?void 0:u[e],y=null==(g=null==(b=p.config.series[t].data)?void 0:b[e])?void 0:g.x,m=Array.isArray(y)?y.join(" "):y,v=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(m),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===m&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?r+l*v:r+o*this.visibleI+l*v,C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(s=(o=d.barHeight/x.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+x.indexOf(f))+l*v))):(v>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?i+h*v:i+n*this.visibleI+h*v),C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(a=(n=d.barWidth/x.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(f))+h*v))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:r,zeroH:i}){var o,n;const l=this.w,{i:h,j:d,realIndex:c,translationsIndex:u}=t,b=this.yRatio[u],g=this.getRangeValue(c,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=i-p/b,x=i-x/b):p=i;const y=Math.abs(x-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:d,w:l});if(f){const t=m.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(c,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:c,barWidth:a});e=t.x,r=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,i,c,d,u),barXPosition:r}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:r,barHeight:i,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,c=this.preventBarOverflow(n+s/this.invertedYRatio),u=this.preventBarOverflow(n+a/this.invertedYRatio),b=this.getRangeValue(h,d),g=Math.abs(u-c),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:i,x1:c,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=b.start&&null!=b.end){const t=p.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=r),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:b.start<0&&b.end<0?c:u,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
package/dist/histogram.esm.js
CHANGED
package/dist/line.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,s,i)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[s]=i,l=(e,t)=>{for(var s in t||(t={}))r.call(t,s)&&a(e,s,t[s]);if(i)for(var s of i(t))n.call(t,s)&&a(e,s,t[s]);return e},o=(e,i)=>t(e,s(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}const u=h(require("apexcharts/core")),c=u.__apex_CoreUtils,p=u.__apex_Graphics,d=u.__apex_Fill,g=u.__apex_DataLabels,f=u.__apex_Markers,m=u.__apex_charts_Scatter,y=u.__apex_Series,x=u.__apex_Utils;class b{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[e]){if(new c(this.lineCtx.w).seriesHaveSameValues(e)){const s=t[e].slice();s[s.length-1]=s[s.length-1]+1e-6,t[e]=s}}return t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:r,j:n,prevY:a}){const l=this.w,o=[],h=[];let u=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(u=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===n&&(o.push(u),h.push(x.isNumber(e[r][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(x.isNumber(e[r][n+1])?i+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const i=this.w;for(let r=0;r<i.globals.previousPaths.length;r++){const n=i.globals.previousPaths[r];("line"===n.type||"area"===n.type)&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(s,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[r].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[r].paths[1]&&(e=i.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:r,translationsIndex:n}){var a,l,o;const h=this.w,u=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(a=this.w.config.series[t])?void 0:a.type)||"column"===(null==(l=this.w.config.series[t])?void 0:l.type));if(void 0!==(null==(o=s[e])?void 0:o[0])){if(u)if(e>0){const e=this.lineCtx.stackTopAt(t,0);r=void 0===e?this.lineCtx.zeroY:e}else r=this.lineCtx.zeroY;else r=this.lineCtx.zeroY;i=r-s[e][0]/this.lineCtx.yRatio[n]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[n]:0)}else if(u&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){i=r=this.lineCtx.prevSeriesY[t][0];break}return{prevY:i,lineYPosition:r}}}function v(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const P=e=>{const t=function(e){const t=[];let s=e[0],i=e[1],r=t[0]=w(s,i),n=1;for(let a=e.length-1;n<a;n++)s=i,i=e[n+1],t[n]=.5*(r+(r=w(s,i)));return t[n]=r,t}(e),s=e.length-1,i=[];let r,n,a,l;for(let i=0;i<s;i++)a=w(e[i],e[i+1]),Math.abs(a)<1e-6?t[i]=t[i+1]=0:(r=t[i]/a,n=t[i+1]/a,l=r*r+n*n,l>9&&(l=3*a/Math.sqrt(l),t[i]=l*r,t[i+1]=l*n));for(let r=0;r<=s;r++)l=(e[Math.min(s,r+1)][0]-e[Math.max(0,r-1)][0])/(6*(1+t[r]*t[r])),i.push([l||0,t[r]*l||0]);return i},A={points(e){const t=P(e),s=e[1],i=e[0],r=[],n=t[1],a=t[0];r.push(i,[i[0]+a[0],i[1]+a[1],s[0]-n[0],s[1]-n[1],s[0],s[1]]);for(let s=2,i=t.length;s<i;s++){const i=e[s],n=t[s];r.push([i[0]-n[0],i[1]-n[1],i[0],i[1]])}return r},slice(e,t,s){const i=e.slice(t,s);if(t){if(s-t>1&&i[1].length<6){const e=i[0].length;i[1]=[2*i[0][e-2]-i[0][e-4],2*i[0][e-1]-i[0][e-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function w(e,t){return(t[1]-e[1])/(t[0]-e[0])}const k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Y(e,t){const{ax:s,bx:i,ay:r,by:n}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(k)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+i}`);continue}if("V"===e){for(const e of t)a.push(`V ${r*e+n}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+i} ${r*t[e+6]+n}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+i} ${r*t[e+1]+n}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const S=u.__apex_BrowserAPIs_BrowserAPIs,F=u.__apex_Environment_Environment;function M(e){return-Math.cos(e*Math.PI)/2+.5}function I(e,t,s,i){e=Math.min(Math.max(e,0),1),s=Math.min(Math.max(s,0),1);const r=3*e,n=3*(s-e)-r,a=1-r-n,l=3*t,o=3*(i-t)-l,h=1-l-o,u=e=>((a*e+n)*e+r)*e;return e=>e<=0?0:e>=1?1:(e=>((h*e+o)*e+l)*e)((e=>{let t=0,s=1,i=e;if(i<t)return t;if(i>s)return s;for(;t<s;){const r=u(i);if(Math.abs(r-e)<1e-4)return i;e>r?t=i:s=i,i=(t+s)/2}return i})(e))}const C=new Map;function _(e){return"function"==typeof e?j(e):(t=e,Array.isArray(t)&&4===t.length&&t.every(e=>"number"==typeof e)?I(e[0],e[1],e[2],e[3]):"string"==typeof e&&C.has(e)?j(C.get(e)):M);var t}function j(e){return t=>{const s=e(t);return"number"==typeof s&&isFinite(s)?s:t}}C.set("linear",e=>e),C.set("easeInOutSine",M),C.set("easeInSine",e=>1-Math.cos(e*Math.PI/2)),C.set("easeOutSine",e=>Math.sin(e*Math.PI/2)),C.set("easeInQuad",e=>e*e),C.set("easeOutQuad",e=>1-(1-e)*(1-e)),C.set("easeInOutQuad",e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2),C.set("easeInCubic",e=>e*e*e),C.set("easeOutCubic",e=>1-Math.pow(1-e,3)),C.set("easeInOutCubic",e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2),C.set("easeOutBack",e=>{const t=1.70158;return 1+2.70158*Math.pow(e-1,3)+t*Math.pow(e-1,2)}),C.set("easeInOutBack",e=>{const t=2.5949095;return e<.5?Math.pow(2*e,2)*(7.189819*e-t)/2:(Math.pow(2*e-2,2)*((t+1)*(2*e-2)+t)+2)/2});const L=u.__apex_PathMorphing_parsePath,X=u.__apex_PathMorphing_arrayToPath;function R(e,t,s){if(!e||"string"!=typeof e)return null;const i=L(e);if(!i.length||"M"!==i[0][0])return null;for(let e=1;e<i.length;e++)if("M"===i[e][0])return null;let r=i,n=null;if(s){if(i.length<5)return null;if(n=i.slice(-3),r=i.slice(0,-3),"Z"!==n[2][0])return null;if("L"!==n[1][0])return null;if("L"!==n[0][0]&&"C"!==n[0][0])return null}else if("Z"===i[i.length-1][0])return null;if(r.length!==t||r.length<2)return null;const a=r[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<r.length;e++)if(r[e][0]!==a)return null;const l=r.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:r,closing:n,segType:a,anchors:l}}function z(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function D(e,t,s){const i=e,r=[t[1],t[2]],n=[t[3],t[4]],a=[t[5],t[6]],l=z(i,r,s),o=z(r,n,s),h=z(n,a,s),u=z(l,o,s),c=z(o,h,s),p=z(u,c,s);return{first:["C",l[0],l[1],u[0],u[1],p[0],p[1]],second:["C",c[0],c[1],h[0],h[1],a[0],a[1]],mid:p}}function N(e,t,s){const i=[t[1],t[2]],r=z(e,i,s);return{first:["L",r[0],r[1]],second:["L",i[0],i[1]],mid:r}}function O(e,t){const{body:s,closing:i,segType:r,anchors:n}=e,a=n.length,l=t.length,o=e=>"C"===r?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",n[0][0],n[0][1]]];let u=0;for(;u<l&&0!==t[u];)u++;for(let e=1;e<=u;e++)h.push(o(n[0]));let c=u+1;for(let e=0;e<a-1;e++){let i=0;for(;c+i<l&&-1===t[c+i];)i++;const a=s[e+1];if(i){const t=i+1;let s=n[e],l=a;for(let e=0;e<i;e++){const i=1/(t-e),n="C"===r?D(s,l,i):N(s,l,i);h.push(n.first),s=n.mid,l=n.second}h.push(l)}else h.push(a.slice());c+=i+1}for(;c<l;)h.push(o(n[a-1])),c++;return i&&i.forEach(e=>h.push(e.slice())),h}function $(e,t,s,i,r,n){const a=R(e,i,n);if(!a)return null;const l=R(t,r,n);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:X(O(a,o)),toInterp:X(O(l,h))}}function B(e){const t=new Map;return e.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),0===s?e:`${e}#${s}`})}function T(e,t,s=!1,i=!1){var r,n;if(!function(e){var t;const s=e.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(t=s.largeDatasetThreshold)?t:0;return!(i>0&&e.globals.dataPoints>i||!(F.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(r=a.seriesY)?void 0:r[t],o=null==(n=e.seriesData.series)?void 0:n[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=B(l.map((e,s)=>function(e,t,s){var i,r;if(e.isXNumeric){const r=null==(i=e.seriesX)?void 0:i[t];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const n=null==(r=e.labels)?void 0:r[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(a,t,s))),u=B(o.map((s,i)=>function(e,t,s){var i,r,n,a;if(null==(i=e.axisFlags)?void 0:i.isXNumeric){const i=null==(n=null==(r=e.seriesData)?void 0:r.seriesX)?void 0:n[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,i))),c=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const i=new Array(t.length),r=new Set;let n=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!r.has(s.get(e))?s.get(e):-1;i[t]=o,-1!==o&&(r.add(o),o<n&&(a=!1),n=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)r.has(t)||o.push(t);return{toOld:i,exits:o,ordered:a,changed:!l}}(h,u);return(c.ordered||i)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:u}:null}function W(e,t,s,i,r){const n=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-n)/t));i(s(o),o),o<1?S.requestAnimationFrame(a):r&&r()};S.requestAnimationFrame(a)}function H(e,{elPointsMain:t,realIndex:s,speed:i}){var r,n,a,l;if(!(null==t?void 0:t.node))return!1;const o=T(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const u=null==(r=h.xPixels)?void 0:r[s],c=null==(n=h.yPixels)?void 0:n[s];if(!u||!c)return!1;const p=t.node.querySelectorAll(".apexcharts-marker");if(!p.length)return!1;const d=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],g=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],f=function(e){var t,s;const i=e.config.chart.animations;return _(null!=(s=null==(t=i.dynamicAnimation)?void 0:t.easing)?s:i.easing)}(e),m=Math.max(1,i||1);return t.node.classList.remove("apexcharts-element-hidden"),p.forEach(t=>{var i,r,n,a,l,p,y,x,b;const v=parseInt(null!=(r=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?r:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=d[v]&&null!=g[v]?[d[v],g[v]]:null;if(-1===P||!A){const s=t.style;return s.opacity="0",void W(e,m,f,e=>{s.opacity=String(e)},()=>{s.opacity=""})}const w=(null!=(n=u[P])?n:NaN)-A[0],k=(null!=(a=c[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(k))return;const Y=null!=(y=null==(p=null==(l=h.rPixels)?void 0:l[s])?void 0:p[P])?y:NaN,S=parseFloat(null!=(b=null!=(x=t.getAttribute("r"))?x:t.getAttribute("default-marker-size"))?b:""),F=isFinite(Y)&&isFinite(S)&&S>0&&Math.abs(Y-S)>.25;if(!(Math.abs(w)>=.5||Math.abs(k)>=.5)&&!F)return;const M=e=>{const s=w*(1-e),i=k*(1-e);if(F){const r=(Y+(S-Y)*e)/S;t.setAttribute("transform",`translate(${s+A[0]*(1-r)}, ${i+A[1]*(1-r)}) scale(${r})`)}else t.setAttribute("transform",`translate(${s}, ${i})`)};M(0),W(e,m,f,M,()=>{t.removeAttribute("transform")})}),!0}function V(e,{type:t,realIndex:s,pathFromLine:i,pathFromArea:r,linePaths:n,areaPaths:a}){var l,o;const h=T(e,s);if(!h)return null;const{join:u,oldKeys:c,newKeys:p}=h,d=e.globals.prevStreamFrame;if(!d)return null;const g=null==(l=d.seriesY)?void 0:l[s],f=null==(o=e.seriesData.series)?void 0:o[s];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),i=[];let r=0;for(let t=0;t<e.toOld.length;t++){const n=e.toOld[t];if(-1!==n){for(;r<n;)s.has(r)&&i.push({oldJ:r,newJ:-1}),r++;i.push({oldJ:n,newJ:t}),r=n+1}else i.push({oldJ:-1,newJ:t})}for(;r<t;)s.has(r)&&i.push({oldJ:r,newJ:-1}),r++;return i}(u,c.length),y={};return Array.isArray(n)&&1===n.length&&i&&(y.line=$(i,n[0],m,c.length,p.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&r&&(y.area=$(r,a[0],m,c.length,p.length,!0)),y.line||y.area?y:null}class E{constructor(e,t,s,i){this.ctx=t,this.w=e,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new m(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new b(this),this.markers=new f(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,s,i){var r;const n=this.w,a=new p(this.w),h=n.globals.comboCharts?t:n.config.chart.type,u=a.group({class:`apexcharts-${h}-series apexcharts-plot-series`}),d=new c(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const g=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);const r=n.globals.comboCharts?s[t]:t,a=this.yRatio.length>1?r:0;this._initSerieVariables(e,t,r);const u=[],c=[],p=[];let d=n.globals.padHorizontal+this.categoryAxisCorrection;const f=1,m=[],x=[];y.addCollapsedClassToSeries(this.w,this.elSeries,r),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(d=(n.seriesData.seriesX[r][0]-n.globals.minX)/this.xRatio),p.push(d);const b=d;let v;const P=b;let A=this.zeroY,w=this.zeroY;const k=0;A=this.lineHelpers.determineFirstPrevY({i:t,realIndex:r,series:e,prevY:A,lineYPosition:k,translationsIndex:a}).prevY,"monotoneCubic"===n.config.stroke.curve&&null===e[t][0]?u.push(null):u.push(A);const Y=A;let S;"rangeArea"===h&&(S=this.lineHelpers.determineFirstPrevY({i:t,realIndex:r,series:i,prevY:w,lineYPosition:k,translationsIndex:a}),w=S.prevY,v=w,c.push(null!==u[0]?w:null));const F=this._calculatePathsFrom({type:h,series:e,i:t,realIndex:r,translationsIndex:a,prevX:P,prevY:A,prevY2:w}),M=[u[0]],I=[c[0]],C={type:h,series:e,realIndex:r,translationsIndex:a,i:t,x:d,y:f,pX:b,pY:Y,pathsFrom:F,linePaths:m,areaPaths:x,seriesIndex:s,lineYPosition:k,xArrj:p,yArrj:u,y2Arrj:c,seriesRangeEnd:i},_=this._iterateOverDataPoints(o(l({},C),{iterations:"rangeArea"===h?e[t].length-1:void 0,isRangeStart:!0}));if("rangeArea"===h){const e=this._calculatePathsFrom({series:i,i:t,realIndex:r,prevX:P,prevY:w}),s=this._iterateOverDataPoints(o(l({},C),{series:i,xArrj:[d],yArrj:M,y2Arrj:I,pY:v,areaPaths:_.areaPaths,pathsFrom:e,iterations:i[t].length-1,isRangeStart:!1})),n=_.linePaths.length/2;for(let e=0;e<n;e++)_.linePaths[e]=s.linePaths[e+n]+_.linePaths[e];_.linePaths.splice(n),_.pathFromLine=s.pathFromLine+_.pathFromLine}else/z\s*$/i.test(_.pathFromArea)||(_.pathFromArea+="z");this._handlePaths({type:h,realIndex:r,i:t,paths:_}),this.markers.flushBatch(this.elPointsMain,r),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),g.push(this.elSeries)}if(void 0!==(null==(r=n.config.series[0])?void 0:r.zIndex)&&g.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),n.config.chart.stacked)for(let e=g.length-1;e>=0;e--)u.add(g[e]);else for(let e=0;e<g.length;e++)u.add(g[e]);return u}_initSerieVariables(e,t,s){const i=this.w,r=new p(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let n=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],n=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[n]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[n]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=i.config.series[s];if(this.elSeries=r.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:x.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:i,translationsIndex:r,prevX:n,prevY:a,prevY2:l}){const o=this.w,h=new p(this.w);let u,c,d,g;if(null===t[s][0]){for(let e=0;e<t[s].length;e++)if(null!==t[s][e]){n=this.xDivision*e,a=this.zeroY-t[s][e]/this.yRatio[r],u=h.move(n,a),c=h.move(n,this.areaBottomY);break}}else u=h.move(n,a),"rangeArea"===e&&(u=h.move(n,l)+h.line(n,a)),c=h.move(n,this.areaBottomY)+h.line(n,a);if(d=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),g=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),o.globals.previousPaths.length>0){const e=this.lineHelpers.checkPreviousPaths({pathFromLine:d,pathFromArea:g,realIndex:i});d=e.pathFromLine,g=e.pathFromArea}return{prevX:n,prevY:a,linePath:u,areaPath:c,pathFromLine:d,pathFromArea:g}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;const s=this.w.seriesData.seriesX[e];return s?s[t]:void 0}stackTopAt(e,t){const s=this._stackKey(e,t);if(null!=s)return this.prevSeriesYByX.get(s)}_recordStackTops(e,t){const s=this.w;if(Array.isArray(t)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e))for(let s=0;s<t.length;s++){const i=this._stackKey(e,s);if(null==i)continue;const r=t[s];x.isNumber(r)&&this.prevSeriesYByX.set(i,r)}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){var r,n,a,h,u,c,g;const f=this.w,m=new p(this.w),y=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,m),x=new d(this.w);this.prevSeriesY.push(i.yArrj),this._recordStackTops(t,i.yArrj);let b=null;"line"!==e&&"area"!==e||!f.globals.dataChanged||(b=function(e,t,s,i){var r;const n=e.globals,a=n.prevStreamFrame;if(!a||!n.dataChanged||!(null==(r=e.axisFlags)?void 0:r.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],u=e.seriesData.series[t];if(!(l&&o&&h&&u))return null;if(l.length<3||h.length<3)return null;let c=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){c=e;break}if(-1===c)return null;const p=Math.min(l.length-c,h.length);if(p<2)return null;const d=h.length-p;if(0===c&&0===d)return null;for(let e=0;e<p;e++){if(l[c+e]!==h[e])return null;const t=o[c+e],s=u[e];if(t!==s&&(null!=t||null!=s))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let m=-1,y=-1;for(let e=0;e<p;e++)null!=g[c+e]&&null!=f[c+e]&&null!=s[e]&&null!=i[e]&&(-1===m&&(m=e),y=e);if(-1===m||y<=m)return null;const x=s[m],b=s[y],v=g[c+m],P=g[c+y];if(Math.abs(b-x)<1e-6)return null;const A=(P-v)/(b-x),w=v-A*x;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=m,Y=m;for(let e=m;e<=y;e++){const t=i[e];null!=t&&null!=f[c+e]&&(t<i[k]&&(k=e),t>i[Y]&&(Y=e))}let S=1,F=0;const M=i[k],I=i[Y];if(Math.abs(I-M)>1e-6?(S=(f[c+Y]-f[c+k])/(I-M),F=f[c+k]-S*M):F=f[c+k]-M,!isFinite(S)||!isFinite(F)||S<.2||S>5)return null;const C=Math.floor((m+y)/2);if(C!==m&&C!==y&&null!=s[C]&&null!=g[c+C]){const e=A*s[C]+w;if(Math.abs(e-g[c+C])>1.5)return null;if(null!=i[C]&&null!=f[c+C]){const e=S*i[C]+F;if(Math.abs(e-f[c+C])>1.5)return null}}return n.streamScrolled=!0,{ax:A,bx:w,ay:S,by:F}}(f,t,i.xArrj,i.yArrj));let v=null;b||"line"!==e&&"area"!==e||(v=V(f,{type:e,realIndex:t,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),f.globals.seriesXvalues[t]=i.xArrj,f.globals.seriesYvalues[t]=i.yArrj;const P=f.config.forecastDataPoints;if(P.count>0&&"rangeArea"!==e){const e=f.globals.seriesXvalues[t][f.globals.seriesXvalues[t].length-P.count-1],s=m.drawRect(e,0,f.layout.gridWidth,f.layout.gridHeight,0);f.dom.elForecastMask.appendChild(s.node);const i=m.drawRect(0,0,e,f.layout.gridHeight,0);f.dom.elNonForecastMask.appendChild(i.node)}this.pointsChart?H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}):(f.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),T(f,t)&&(null==(r=this.elDataLabelsWrap)?void 0:r.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),f.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const A={i:s,realIndex:t,animationDelay:s,initialSpeed:f.config.chart.animations.speed,dataChangeSpeed:f.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=i.numericXY,k="line"===e||"area"===e,S=k&&i.linePaths.length>1?[i.linePaths.join(" ")]:i.linePaths,F=k&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if("area"===e){const e=x.fillPath({seriesNumber:t});for(let t=0;t<F.length;t++){const s=y.renderPaths(o(l({},A),{pathFrom:b?Y(i.areaPaths[t],b):null!=(a=null==(n=null==v?void 0:v.area)?void 0:n.from)?a:i.pathFromArea,pathTo:F[t],pathToNumeric:w?{xs:w.xs,ys:w.ys,closeY:w.areaCloseY}:void 0,pathToInterp:null==(h=null==v?void 0:v.area)?void 0:h.toInterp,scrollMorph:!!b,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(s)}}if(f.config.stroke.show&&!this.pointsChart){let r=null;if("line"===e)r=x.fillPath({seriesNumber:t,i:s});else if("solid"===f.config.stroke.fill.type)r=f.globals.stroke.colors[t];else{const e=f.config.fill;f.config.fill=f.config.stroke.fill,r=x.fillPath({seriesNumber:t,i:s}),f.config.fill=e}for(let s=0;s<S.length;s++){let n=r;"rangeArea"===e&&(n=x.fillPath({seriesNumber:t}));const a=o(l({},A),{pathFrom:b?Y(i.linePaths[s],b):null!=(c=null==(u=null==v?void 0:v.line)?void 0:u.from)?c:i.pathFromLine,pathTo:S[s],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:null==(g=null==v?void 0:v.line)?void 0:g.toInterp,scrollMorph:!!b,stroke:r,strokeWidth:this.strokeWidth,strokeLineCap:f.config.stroke.lineCap,fill:"rangeArea"===e?n:"none"}),h=y.renderPaths(a);if(this.elSeries.add(h),h.attr("fill-rule","evenodd"),P.count>0&&"rangeArea"!==e){const e=y.renderPaths(a);e.node.setAttribute("stroke-dasharray",P.dashArray),P.strokeWidth&&e.node.setAttribute("stroke-width",P.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${f.globals.cuid})`),h.attr("clip-path",`url(#nonForecastMask${f.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:r,i:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,seriesIndex:g,lineYPosition:f,xArrj:m,yArrj:y,y2Arrj:b,isRangeStart:P,seriesRangeEnd:A}){var w,k;const Y=this.w,S=new p(this.w),F=this.yRatio;let{prevY:M,linePath:I,areaPath:C,pathFromLine:_,pathFromArea:j}=u;const L=x.isNumber(Y.globals.minYArr[i])?Y.globals.minYArr[i]:Y.globals.minY;s||(s=Y.globals.dataPoints>1?Y.globals.dataPoints-1:Y.globals.dataPoints);const X=(e,t)=>t-e/F[r]+2*(this.isReversed?e/F[r]:0);let R=l;const z=Y.config.chart.stacked&&!Y.globals.comboCharts||Y.config.chart.stacked&&Y.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(w=this.w.config.series[i])?void 0:w.type)||"column"===(null==(k=this.w.config.series[i])?void 0:k.type));let D=Y.config.stroke.curve;Array.isArray(D)&&(D=Array.isArray(g)?D[g[n]]:D[n]);let N,O=0;const $=this.pointsChart?this._scatterJitterPx(i):null;if("straight"===D&&!this.pointsChart){const p=this._fastStraightPath({type:e,series:t,i:n,realIndex:i,translationsIndex:r,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,xArrj:m,yArrj:y,y2Arrj:b,stackSeries:z});if(p)return p}for(let r=0;r<s&&0!==t[n].length;r++){const u=void 0===t[n][r+1]||null===t[n][r+1];if(Y.axisFlags.isXNumeric){let e=Y.seriesData.seriesX[i][r+1];void 0===Y.seriesData.seriesX[i][r+1]&&(e=Y.seriesData.seriesX[i][s-1]),a=(e-Y.globals.minX)/this.xRatio}else a+=this.xDivision;if(z)if(n>0&&Y.globals.collapsedSeries.length<Y.config.series.length-1){if((e=>{var t;for(let s=e;s>=0;s--){const e=null!=(t=null==g?void 0:g[s])?t:s;if(-1===Y.globals.collapsedSeriesIndices.indexOf(e)&&-1===Y.globals.ancillaryCollapsedSeriesIndices.indexOf(e))return s}return-1})(n-1)<0)f=this.zeroY;else{const e=this.stackTopAt(i,r+1);f=void 0===e?this.zeroY:e}}else f=this.zeroY;else f=this.zeroY;u?l=X(L,f):(l=X(t[n][r+1],f),"rangeArea"===e&&(R=X(A[n][r+1],f)));let p=a,x=l;if($){const e=100003*i+(r+1);$.x&&(p=a+2*(v(7919*e+13)-.5)*$.x),$.y&&(x=l+2*(v(6271*e+97)-.5)*$.y)}m.push(null===t[n][r+1]?null:p),!u||"smooth"!==Y.config.stroke.curve&&"monotoneCubic"!==Y.config.stroke.curve?(y.push(x),b.push(R)):(y.push(null),b.push(null));const w=this.lineHelpers.calculatePoints({series:t,x:p,y:x,realIndex:i,i:n,j:r,prevY:M}),k=this._createPaths({type:e,series:t,i:n,j:r,x:a,y:l,y2:R,xArrj:m,yArrj:y,y2Arrj:b,pX:o,pY:h,pathState:O,segmentStartX:N,linePath:I,areaPath:C,linePaths:c,areaPaths:d,curve:D,isRangeStart:P});d=k.areaPaths,c=k.linePaths,o=k.pX,h=k.pY,O=k.pathState,N=k.segmentStartX,C=k.areaPath,I=k.linePath,!this.appendPathFrom||Y.globals.hasNullValues||"monotoneCubic"===D&&"rangeArea"===e||(_+=S.line(a,this.areaBottomY),j+=S.line(a,this.areaBottomY)),this.handleNullDataPoints(t,w,n,r,i),this._handleMarkersAndLabels({type:e,pointsPos:w,i:n,j:r,realIndex:i,isRangeStart:P})}return{yArrj:y,xArrj:m,pathFromArea:j,areaPaths:d,pathFromLine:_,linePaths:c,linePath:I,areaPath:C}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:i,j:r,realIndex:n}){const a=this.w,l=new g(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:r+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:n,j:r+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,i=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const r=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,n=this.yRatio.length>1?e:0,a=this.yRatio[n]?1/this.yRatio[n]:0;return{x:(i.x||0)*r,y:(i.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:i,translationsIndex:r,iterations:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:p,xArrj:d,yArrj:g,y2Arrj:f,stackSeries:m}){const y=this.w;if("line"!==e&&"area"!==e)return null;if(y.globals.comboCharts||m)return null;if(y.config.dataLabels.enabled)return null;if(y.config.markers.discrete.length)return null;if(y.globals.markers.size[i]>0)return null;const x=t[s],b=x.length;if(!n||b<2||b-1!==n)return null;for(let e=0;e<=n;e++){const t=x[e];if(null==t)return null}const v=y.axisFlags.isXNumeric,P=v?y.seriesData.seriesX[i]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[r],w=this.isReversed,k=this.zeroY,Y=this.areaBottomY,S=this.xRatio,F=y.globals.minX,M=this.xDivision,I=y.config.markers.offsetX,C=y.config.markers.offsetY,_=this.appendPathFrom&&!y.globals.hasNullValues;let{pathFromLine:j,pathFromArea:L}=u;const X=this.ctx&&this.ctx.renderer,R=!(!X||!X.kind||"svg"===X.kind),z=!R||y.globals.dataChanged&&!!y.globals.prevStreamFrame,D=R?new Float64Array(b):null,N=R?new Float64Array(b):null;D&&N&&(D[0]=o,N[0]=h),void 0===y.globals.pointsArray[i]&&(y.globals.pointsArray[i]=[]);const O=y.globals.pointsArray[i],$=P?(P[0]-F)/S+I:this.categoryAxisCorrection+I;O.push([$,u.prevY+C]);const B=z?new Array(n+1):[];z&&(B[0]="M "+o+" "+h);const T=z&&_?new Array(n):null;let W=a,H=o,V=h;for(let e=0;e<n;e++){P?H=(P[e+1]-F)/S:(W+=M,H=W);const t=x[e+1];V=k-t/A+2*(w?t/A:0),d.push(H),g.push(V),f.push(l),O.push([H+I,V+C]),z&&(B[e+1]=" L "+H+" "+V,T&&(T[e]=" L "+H+" "+Y)),D&&N&&(D[e+1]=H,N[e+1]=V)}let E="",J="";if(z&&(E=B.join(""),J=E+" L "+H+" "+Y+" L "+o+" "+Y+"z"),T){const e=T.join("");j+=e,L+=e}else!z&&_&&(j+=" L "+H+" "+Y,L+=" L "+H+" "+Y);return c.push(E),p.push(J),{yArrj:g,xArrj:d,pathFromArea:L,areaPaths:p,pathFromLine:j,linePaths:c,linePath:E,areaPath:J,numericXY:D?{xs:D,ys:N,areaCloseY:Y}:void 0}}_createPaths({type:e,series:t,i:s,j:i,x:r,y:n,xArrj:a,yArrj:l,y2:o,y2Arrj:h,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m,linePaths:y,areaPaths:x,curve:b,isRangeStart:v}){const P=new p(this.w),w=this.areaBottomY,k="rangeArea"===e,Y="rangeArea"===e&&v;switch(b){case"monotoneCubic":{const e=v?l:h,r=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),n=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},o=(e,t)=>{const s=n(e),i=[];for(let e=0,r=0;e<s.length;r+=s[e++])i[e]=A.slice(t,r,r+s[e]);return i};switch(d){case 0:if(null===e[i+1])break;d=1;case 1:if(!(k?a.length===t[s].length:i===t[s].length-2))break;case 2:{const t=v?a:a.slice().reverse(),s=v?e:e.slice().reverse(),i=r(t,s),n=i.length>1?A.points(i):i;let l=[];k&&(Y?x=i:l=x.reverse());let h=0,u=0;if(o(s,n).forEach(e=>{h++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const i=e[s],r=i.length;r>4?(t+=`C${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`,t+=`, ${i[4]}, ${i[5]}`):r>2&&(t+=`S${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`)}return t})(e),s=u;u+=e.length;const r=u-1;Y?f=P.move(i[s][0],i[s][1])+t:k?f=P.move(l[s][0],l[s][1])+P.line(i[s][0],i[s][1])+t+P.line(l[r][0],l[r][1]):(f=P.move(i[s][0],i[s][1])+t,m=f+P.line(i[r][0],w)+P.line(i[s][0],w)+"z",x.push(m)),y.push(f)}),k&&h>1&&!Y){const e=y.slice(h).reverse();y.splice(h),e.forEach(e=>y.push(e))}d=0;break}}break}case"smooth":{const e=.35*(r-u);if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=Y?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){y.push(f),x.push(m);break}if(d=1,i<t[s].length-2){const t=P.curve(u+e,c,r-e,n,r,n);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=Y?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1;else{const a=P.curve(u+e,c,r-e,n,r,n);f+=a,m+=a,i>=t[s].length-2&&(Y&&(f+=P.curve(r,n,r,n,r,o)+P.move(r,o)),m+=P.curve(r,n,r,n,r,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1)}}u=r,c=n;break}default:{const e=(e,t,s)=>{let i="";switch(e){case"stepline":i=P.line(t,null,"H")+P.line(null,s,"V");break;case"linestep":i=P.line(null,s,"V")+P.line(t,null,"H");break;case"straight":i=P.line(t,s)}return i};if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=Y?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){y.push(f),x.push(m);break}if(d=1,i<t[s].length-2){const t=e(b,r,n);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=Y?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1;else{const a=e(b,r,n);f+=a,m+=a,i>=t[s].length-2&&(Y&&(f+=P.line(r,o)),m+=P.line(r,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1)}}u=r,c=n;break}}return{linePaths:y,areaPaths:x,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m}}handleNullDataPoints(e,t,s,i,r){const n=this.w;if(null===e[s][i]&&n.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-n.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:i+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}u.default.use({line:E,area:E,scatter:E,bubble:E,rangeArea:E}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.default});
|
package/dist/line.esm.js
CHANGED
package/dist/line.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexLine={})}(this,function(e){"use strict";var t=Object.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,l=(e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,o=(e,t)=>{for(var s in t||(t={}))r.call(t,s)&&l(e,s,t[s]);if(n)for(var s of n(t))a.call(t,s)&&l(e,s,t[s]);return e},h=(e,t)=>s(e,i(t));const u=globalThis.ApexCharts,c=globalThis.ApexCharts.__internals.__apex_CoreUtils,p=globalThis.ApexCharts.__internals.__apex_Graphics,d=globalThis.ApexCharts.__internals.__apex_Fill,g=globalThis.ApexCharts.__internals.__apex_DataLabels,f=globalThis.ApexCharts.__internals.__apex_Markers,m=globalThis.ApexCharts.__internals.__apex_charts_Scatter,x=globalThis.ApexCharts.__internals.__apex_Series,y=globalThis.ApexCharts.__internals.__apex_Utils;class b{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[e]){if(new c(this.lineCtx.w).seriesHaveSameValues(e)){const s=t[e].slice();s[s.length-1]=s[s.length-1]+1e-6,t[e]=s}}return t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:n,j:r,prevY:a}){const l=this.w,o=[],h=[];let u=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(u=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===r&&(o.push(u),h.push(y.isNumber(e[n][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(y.isNumber(e[n][r+1])?i+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const i=this.w;for(let n=0;n<i.globals.previousPaths.length;n++){const r=i.globals.previousPaths[n];("line"===r.type||"area"===r.type)&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(s,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[n].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[n].paths[1]&&(e=i.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:n,translationsIndex:r}){var a,l,o;const h=this.w,u=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(a=this.w.config.series[t])?void 0:a.type)||"column"===(null==(l=this.w.config.series[t])?void 0:l.type));if(void 0!==(null==(o=s[e])?void 0:o[0])){if(u)if(e>0){const e=this.lineCtx.stackTopAt(t,0);n=void 0===e?this.lineCtx.zeroY:e}else n=this.lineCtx.zeroY;else n=this.lineCtx.zeroY;i=n-s[e][0]/this.lineCtx.yRatio[r]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[r]:0)}else if(u&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){i=n=this.lineCtx.prevSeriesY[t][0];break}return{prevY:i,lineYPosition:n}}}function v(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const P=e=>{const t=function(e){const t=[];let s=e[0],i=e[1],n=t[0]=w(s,i),r=1;for(let a=e.length-1;r<a;r++)s=i,i=e[r+1],t[r]=.5*(n+(n=w(s,i)));return t[r]=n,t}(e),s=e.length-1,i=[];let n,r,a,l;for(let i=0;i<s;i++)a=w(e[i],e[i+1]),Math.abs(a)<1e-6?t[i]=t[i+1]=0:(n=t[i]/a,r=t[i+1]/a,l=n*n+r*r,l>9&&(l=3*a/Math.sqrt(l),t[i]=l*n,t[i+1]=l*r));for(let n=0;n<=s;n++)l=(e[Math.min(s,n+1)][0]-e[Math.max(0,n-1)][0])/(6*(1+t[n]*t[n])),i.push([l||0,t[n]*l||0]);return i},A={points(e){const t=P(e),s=e[1],i=e[0],n=[],r=t[1],a=t[0];n.push(i,[i[0]+a[0],i[1]+a[1],s[0]-r[0],s[1]-r[1],s[0],s[1]]);for(let s=2,i=t.length;s<i;s++){const i=e[s],r=t[s];n.push([i[0]-r[0],i[1]-r[1],i[0],i[1]])}return n},slice(e,t,s){const i=e.slice(t,s);if(t){if(s-t>1&&i[1].length<6){const e=i[0].length;i[1]=[2*i[0][e-2]-i[0][e-4],2*i[0][e-1]-i[0][e-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function w(e,t){return(t[1]-e[1])/(t[0]-e[0])}const k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function _(e,t){const{ax:s,bx:i,ay:n,by:r}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(k)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+i}`);continue}if("V"===e){for(const e of t)a.push(`V ${n*e+r}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+i} ${n*t[e+6]+r}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+i} ${n*t[e+1]+r}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const Y=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,F=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function C(e){return-Math.cos(e*Math.PI)/2+.5}function M(e,t,s,i){e=Math.min(Math.max(e,0),1),s=Math.min(Math.max(s,0),1);const n=3*e,r=3*(s-e)-n,a=1-n-r,l=3*t,o=3*(i-t)-l,h=1-l-o,u=e=>((a*e+r)*e+n)*e;return e=>e<=0?0:e>=1?1:(e=>((h*e+o)*e+l)*e)((e=>{let t=0,s=1,i=e;if(i<t)return t;if(i>s)return s;for(;t<s;){const n=u(i);if(Math.abs(n-e)<1e-4)return i;e>n?t=i:s=i,i=(t+s)/2}return i})(e))}const S=new Map;function I(e){return"function"==typeof e?j(e):(t=e,Array.isArray(t)&&4===t.length&&t.every(e=>"number"==typeof e)?M(e[0],e[1],e[2],e[3]):"string"==typeof e&&S.has(e)?j(S.get(e)):C);var t}function j(e){return t=>{const s=e(t);return"number"==typeof s&&isFinite(s)?s:t}}S.set("linear",e=>e),S.set("easeInOutSine",C),S.set("easeInSine",e=>1-Math.cos(e*Math.PI/2)),S.set("easeOutSine",e=>Math.sin(e*Math.PI/2)),S.set("easeInQuad",e=>e*e),S.set("easeOutQuad",e=>1-(1-e)*(1-e)),S.set("easeInOutQuad",e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2),S.set("easeInCubic",e=>e*e*e),S.set("easeOutCubic",e=>1-Math.pow(1-e,3)),S.set("easeInOutCubic",e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2),S.set("easeOutBack",e=>{const t=1.70158;return 1+2.70158*Math.pow(e-1,3)+t*Math.pow(e-1,2)}),S.set("easeInOutBack",e=>{const t=2.5949095;return e<.5?Math.pow(2*e,2)*(7.189819*e-t)/2:(Math.pow(2*e-2,2)*((t+1)*(2*e-2)+t)+2)/2});const L=globalThis.ApexCharts.__internals,X=L.__apex_PathMorphing_parsePath;L.__apex_PathMorphing_morphPaths,L.__apex_PathMorphing_pathBbox;const R=L.__apex_PathMorphing_arrayToPath;function z(e,t,s){if(!e||"string"!=typeof e)return null;const i=X(e);if(!i.length||"M"!==i[0][0])return null;for(let e=1;e<i.length;e++)if("M"===i[e][0])return null;let n=i,r=null;if(s){if(i.length<5)return null;if(r=i.slice(-3),n=i.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===i[i.length-1][0])return null;if(n.length!==t||n.length<2)return null;const a=n[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<n.length;e++)if(n[e][0]!==a)return null;const l=n.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:n,closing:r,segType:a,anchors:l}}function D(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function N(e,t,s){const i=e,n=[t[1],t[2]],r=[t[3],t[4]],a=[t[5],t[6]],l=D(i,n,s),o=D(n,r,s),h=D(r,a,s),u=D(l,o,s),c=D(o,h,s),p=D(u,c,s);return{first:["C",l[0],l[1],u[0],u[1],p[0],p[1]],second:["C",c[0],c[1],h[0],h[1],a[0],a[1]],mid:p}}function T(e,t,s){const i=[t[1],t[2]],n=D(e,i,s);return{first:["L",n[0],n[1]],second:["L",i[0],i[1]],mid:n}}function $(e,t){const{body:s,closing:i,segType:n,anchors:r}=e,a=r.length,l=t.length,o=e=>"C"===n?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",r[0][0],r[0][1]]];let u=0;for(;u<l&&0!==t[u];)u++;for(let e=1;e<=u;e++)h.push(o(r[0]));let c=u+1;for(let e=0;e<a-1;e++){let i=0;for(;c+i<l&&-1===t[c+i];)i++;const a=s[e+1];if(i){const t=i+1;let s=r[e],l=a;for(let e=0;e<i;e++){const i=1/(t-e),r="C"===n?N(s,l,i):T(s,l,i);h.push(r.first),s=r.mid,l=r.second}h.push(l)}else h.push(a.slice());c+=i+1}for(;c<l;)h.push(o(r[a-1])),c++;return i&&i.forEach(e=>h.push(e.slice())),h}function O(e,t,s,i,n,r){const a=z(e,i,r);if(!a)return null;const l=z(t,n,r);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:R($(a,o)),toInterp:R($(l,h))}}function B(e){const t=new Map;return e.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),0===s?e:`${e}#${s}`})}function W(e,t,s=!1,i=!1){var n,r;if(!function(e){var t;const s=e.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(t=s.largeDatasetThreshold)?t:0;return!(i>0&&e.globals.dataPoints>i||!(F.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(n=a.seriesY)?void 0:n[t],o=null==(r=e.seriesData.series)?void 0:r[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=B(l.map((e,s)=>function(e,t,s){var i,n;if(e.isXNumeric){const n=null==(i=e.seriesX)?void 0:i[t];if(n&&n.length&&null!=n[s])return"x:"+n[s]}const r=null==(n=e.labels)?void 0:n[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(a,t,s))),u=B(o.map((s,i)=>function(e,t,s){var i,n,r,a;if(null==(i=e.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(n=e.seriesData)?void 0:n.seriesX)?void 0:r[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,i))),c=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const i=new Array(t.length),n=new Set;let r=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!n.has(s.get(e))?s.get(e):-1;i[t]=o,-1!==o&&(n.add(o),o<r&&(a=!1),r=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)n.has(t)||o.push(t);return{toOld:i,exits:o,ordered:a,changed:!l}}(h,u);return(c.ordered||i)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:u}:null}function H(e,t,s,i,n){const r=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-r)/t));i(s(o),o),o<1?Y.requestAnimationFrame(a):n&&n()};Y.requestAnimationFrame(a)}function V(e,{elPointsMain:t,realIndex:s,speed:i}){var n,r,a,l;if(!(null==t?void 0:t.node))return!1;const o=W(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const u=null==(n=h.xPixels)?void 0:n[s],c=null==(r=h.yPixels)?void 0:r[s];if(!u||!c)return!1;const p=t.node.querySelectorAll(".apexcharts-marker");if(!p.length)return!1;const d=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],g=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],f=function(e){var t,s;const i=e.config.chart.animations;return I(null!=(s=null==(t=i.dynamicAnimation)?void 0:t.easing)?s:i.easing)}(e),m=Math.max(1,i||1);return t.node.classList.remove("apexcharts-element-hidden"),p.forEach(t=>{var i,n,r,a,l,p,x,y,b;const v=parseInt(null!=(n=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?n:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=d[v]&&null!=g[v]?[d[v],g[v]]:null;if(-1===P||!A){const s=t.style;return s.opacity="0",void H(e,m,f,e=>{s.opacity=String(e)},()=>{s.opacity=""})}const w=(null!=(r=u[P])?r:NaN)-A[0],k=(null!=(a=c[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(k))return;const _=null!=(x=null==(p=null==(l=h.rPixels)?void 0:l[s])?void 0:p[P])?x:NaN,Y=parseFloat(null!=(b=null!=(y=t.getAttribute("r"))?y:t.getAttribute("default-marker-size"))?b:""),F=isFinite(_)&&isFinite(Y)&&Y>0&&Math.abs(_-Y)>.25;if(!(Math.abs(w)>=.5||Math.abs(k)>=.5)&&!F)return;const C=e=>{const s=w*(1-e),i=k*(1-e);if(F){const n=(_+(Y-_)*e)/Y;t.setAttribute("transform",`translate(${s+A[0]*(1-n)}, ${i+A[1]*(1-n)}) scale(${n})`)}else t.setAttribute("transform",`translate(${s}, ${i})`)};C(0),H(e,m,f,C,()=>{t.removeAttribute("transform")})}),!0}function E(e,{type:t,realIndex:s,pathFromLine:i,pathFromArea:n,linePaths:r,areaPaths:a}){var l,o;const h=W(e,s);if(!h)return null;const{join:u,oldKeys:c,newKeys:p}=h,d=e.globals.prevStreamFrame;if(!d)return null;const g=null==(l=d.seriesY)?void 0:l[s],f=null==(o=e.seriesData.series)?void 0:o[s];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),i=[];let n=0;for(let t=0;t<e.toOld.length;t++){const r=e.toOld[t];if(-1!==r){for(;n<r;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;i.push({oldJ:r,newJ:t}),n=r+1}else i.push({oldJ:-1,newJ:t})}for(;n<t;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;return i}(u,c.length),x={};return Array.isArray(r)&&1===r.length&&i&&(x.line=O(i,r[0],m,c.length,p.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&n&&(x.area=O(n,a[0],m,c.length,p.length,!0)),x.line||x.area?x:null}class J{constructor(e,t,s,i){this.ctx=t,this.w=e,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new m(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new b(this),this.markers=new f(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,s,i){var n;const r=this.w,a=new p(this.w),l=r.globals.comboCharts?t:r.config.chart.type,u=a.group({class:`apexcharts-${l}-series apexcharts-plot-series`}),d=new c(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const g=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);const n=r.globals.comboCharts?s[t]:t,a=this.yRatio.length>1?n:0;this._initSerieVariables(e,t,n);const u=[],c=[],p=[];let d=r.globals.padHorizontal+this.categoryAxisCorrection;const f=1,m=[],y=[];x.addCollapsedClassToSeries(this.w,this.elSeries,n),r.axisFlags.isXNumeric&&r.seriesData.seriesX.length>0&&(d=(r.seriesData.seriesX[n][0]-r.globals.minX)/this.xRatio),p.push(d);const b=d;let v;const P=b;let A=this.zeroY,w=this.zeroY;const k=0;A=this.lineHelpers.determineFirstPrevY({i:t,realIndex:n,series:e,prevY:A,lineYPosition:k,translationsIndex:a}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===e[t][0]?u.push(null):u.push(A);const _=A;let Y;"rangeArea"===l&&(Y=this.lineHelpers.determineFirstPrevY({i:t,realIndex:n,series:i,prevY:w,lineYPosition:k,translationsIndex:a}),w=Y.prevY,v=w,c.push(null!==u[0]?w:null));const F=this._calculatePathsFrom({type:l,series:e,i:t,realIndex:n,translationsIndex:a,prevX:P,prevY:A,prevY2:w}),C=[u[0]],M=[c[0]],S={type:l,series:e,realIndex:n,translationsIndex:a,i:t,x:d,y:f,pX:b,pY:_,pathsFrom:F,linePaths:m,areaPaths:y,seriesIndex:s,lineYPosition:k,xArrj:p,yArrj:u,y2Arrj:c,seriesRangeEnd:i},I=this._iterateOverDataPoints(h(o({},S),{iterations:"rangeArea"===l?e[t].length-1:void 0,isRangeStart:!0}));if("rangeArea"===l){const e=this._calculatePathsFrom({series:i,i:t,realIndex:n,prevX:P,prevY:w}),s=this._iterateOverDataPoints(h(o({},S),{series:i,xArrj:[d],yArrj:C,y2Arrj:M,pY:v,areaPaths:I.areaPaths,pathsFrom:e,iterations:i[t].length-1,isRangeStart:!1})),r=I.linePaths.length/2;for(let e=0;e<r;e++)I.linePaths[e]=s.linePaths[e+r]+I.linePaths[e];I.linePaths.splice(r),I.pathFromLine=s.pathFromLine+I.pathFromLine}else/z\s*$/i.test(I.pathFromArea)||(I.pathFromArea+="z");this._handlePaths({type:l,realIndex:n,i:t,paths:I}),this.markers.flushBatch(this.elPointsMain,n),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),g.push(this.elSeries)}if(void 0!==(null==(n=r.config.series[0])?void 0:n.zIndex)&&g.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),r.config.chart.stacked)for(let e=g.length-1;e>=0;e--)u.add(g[e]);else for(let e=0;e<g.length;e++)u.add(g[e]);return u}_initSerieVariables(e,t,s){const i=this.w,n=new p(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let r=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[r]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=i.config.series[s];if(this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:y.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:i,translationsIndex:n,prevX:r,prevY:a,prevY2:l}){const o=this.w,h=new p(this.w);let u,c,d,g;if(null===t[s][0]){for(let e=0;e<t[s].length;e++)if(null!==t[s][e]){r=this.xDivision*e,a=this.zeroY-t[s][e]/this.yRatio[n],u=h.move(r,a),c=h.move(r,this.areaBottomY);break}}else u=h.move(r,a),"rangeArea"===e&&(u=h.move(r,l)+h.line(r,a)),c=h.move(r,this.areaBottomY)+h.line(r,a);if(d=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),g=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),o.globals.previousPaths.length>0){const e=this.lineHelpers.checkPreviousPaths({pathFromLine:d,pathFromArea:g,realIndex:i});d=e.pathFromLine,g=e.pathFromArea}return{prevX:r,prevY:a,linePath:u,areaPath:c,pathFromLine:d,pathFromArea:g}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;const s=this.w.seriesData.seriesX[e];return s?s[t]:void 0}stackTopAt(e,t){const s=this._stackKey(e,t);if(null!=s)return this.prevSeriesYByX.get(s)}_recordStackTops(e,t){const s=this.w;if(Array.isArray(t)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e))for(let s=0;s<t.length;s++){const i=this._stackKey(e,s);if(null==i)continue;const n=t[s];y.isNumber(n)&&this.prevSeriesYByX.set(i,n)}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){var n,r,a,l,u,c,g;const f=this.w,m=new p(this.w),x=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,m),y=new d(this.w);this.prevSeriesY.push(i.yArrj),this._recordStackTops(t,i.yArrj);let b=null;"line"!==e&&"area"!==e||!f.globals.dataChanged||(b=function(e,t,s,i){var n;const r=e.globals,a=r.prevStreamFrame;if(!a||!r.dataChanged||!(null==(n=e.axisFlags)?void 0:n.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],u=e.seriesData.series[t];if(!(l&&o&&h&&u))return null;if(l.length<3||h.length<3)return null;let c=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){c=e;break}if(-1===c)return null;const p=Math.min(l.length-c,h.length);if(p<2)return null;const d=h.length-p;if(0===c&&0===d)return null;for(let e=0;e<p;e++){if(l[c+e]!==h[e])return null;const t=o[c+e],s=u[e];if(t!==s&&(null!=t||null!=s))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let m=-1,x=-1;for(let e=0;e<p;e++)null!=g[c+e]&&null!=f[c+e]&&null!=s[e]&&null!=i[e]&&(-1===m&&(m=e),x=e);if(-1===m||x<=m)return null;const y=s[m],b=s[x],v=g[c+m],P=g[c+x];if(Math.abs(b-y)<1e-6)return null;const A=(P-v)/(b-y),w=v-A*y;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=m,_=m;for(let e=m;e<=x;e++){const t=i[e];null!=t&&null!=f[c+e]&&(t<i[k]&&(k=e),t>i[_]&&(_=e))}let Y=1,F=0;const C=i[k],M=i[_];if(Math.abs(M-C)>1e-6?(Y=(f[c+_]-f[c+k])/(M-C),F=f[c+k]-Y*C):F=f[c+k]-C,!isFinite(Y)||!isFinite(F)||Y<.2||Y>5)return null;const S=Math.floor((m+x)/2);if(S!==m&&S!==x&&null!=s[S]&&null!=g[c+S]){const e=A*s[S]+w;if(Math.abs(e-g[c+S])>1.5)return null;if(null!=i[S]&&null!=f[c+S]){const e=Y*i[S]+F;if(Math.abs(e-f[c+S])>1.5)return null}}return r.streamScrolled=!0,{ax:A,bx:w,ay:Y,by:F}}(f,t,i.xArrj,i.yArrj));let v=null;b||"line"!==e&&"area"!==e||(v=E(f,{type:e,realIndex:t,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),f.globals.seriesXvalues[t]=i.xArrj,f.globals.seriesYvalues[t]=i.yArrj;const P=f.config.forecastDataPoints;if(P.count>0&&"rangeArea"!==e){const e=f.globals.seriesXvalues[t][f.globals.seriesXvalues[t].length-P.count-1],s=m.drawRect(e,0,f.layout.gridWidth,f.layout.gridHeight,0);f.dom.elForecastMask.appendChild(s.node);const i=m.drawRect(0,0,e,f.layout.gridHeight,0);f.dom.elNonForecastMask.appendChild(i.node)}this.pointsChart?V(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}):(f.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),V(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),W(f,t)&&(null==(n=this.elDataLabelsWrap)?void 0:n.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),f.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const A={i:s,realIndex:t,animationDelay:s,initialSpeed:f.config.chart.animations.speed,dataChangeSpeed:f.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=i.numericXY,k="line"===e||"area"===e,Y=k&&i.linePaths.length>1?[i.linePaths.join(" ")]:i.linePaths,F=k&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if("area"===e){const e=y.fillPath({seriesNumber:t});for(let t=0;t<F.length;t++){const s=x.renderPaths(h(o({},A),{pathFrom:b?_(i.areaPaths[t],b):null!=(a=null==(r=null==v?void 0:v.area)?void 0:r.from)?a:i.pathFromArea,pathTo:F[t],pathToNumeric:w?{xs:w.xs,ys:w.ys,closeY:w.areaCloseY}:void 0,pathToInterp:null==(l=null==v?void 0:v.area)?void 0:l.toInterp,scrollMorph:!!b,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(s)}}if(f.config.stroke.show&&!this.pointsChart){let n=null;if("line"===e)n=y.fillPath({seriesNumber:t,i:s});else if("solid"===f.config.stroke.fill.type)n=f.globals.stroke.colors[t];else{const e=f.config.fill;f.config.fill=f.config.stroke.fill,n=y.fillPath({seriesNumber:t,i:s}),f.config.fill=e}for(let s=0;s<Y.length;s++){let r=n;"rangeArea"===e&&(r=y.fillPath({seriesNumber:t}));const a=h(o({},A),{pathFrom:b?_(i.linePaths[s],b):null!=(c=null==(u=null==v?void 0:v.line)?void 0:u.from)?c:i.pathFromLine,pathTo:Y[s],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:null==(g=null==v?void 0:v.line)?void 0:g.toInterp,scrollMorph:!!b,stroke:n,strokeWidth:this.strokeWidth,strokeLineCap:f.config.stroke.lineCap,fill:"rangeArea"===e?r:"none"}),l=x.renderPaths(a);if(this.elSeries.add(l),l.attr("fill-rule","evenodd"),P.count>0&&"rangeArea"!==e){const e=x.renderPaths(a);e.node.setAttribute("stroke-dasharray",P.dashArray),P.strokeWidth&&e.node.setAttribute("stroke-width",P.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${f.globals.cuid})`),l.attr("clip-path",`url(#nonForecastMask${f.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:n,i:r,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,seriesIndex:g,lineYPosition:f,xArrj:m,yArrj:x,y2Arrj:b,isRangeStart:P,seriesRangeEnd:A}){var w,k;const _=this.w,Y=new p(this.w),F=this.yRatio;let{prevY:C,linePath:M,areaPath:S,pathFromLine:I,pathFromArea:j}=u;const L=y.isNumber(_.globals.minYArr[i])?_.globals.minYArr[i]:_.globals.minY;s||(s=_.globals.dataPoints>1?_.globals.dataPoints-1:_.globals.dataPoints);const X=(e,t)=>t-e/F[n]+2*(this.isReversed?e/F[n]:0);let R=l;const z=_.config.chart.stacked&&!_.globals.comboCharts||_.config.chart.stacked&&_.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(w=this.w.config.series[i])?void 0:w.type)||"column"===(null==(k=this.w.config.series[i])?void 0:k.type));let D=_.config.stroke.curve;Array.isArray(D)&&(D=Array.isArray(g)?D[g[r]]:D[r]);let N,T=0;const $=this.pointsChart?this._scatterJitterPx(i):null;if("straight"===D&&!this.pointsChart){const p=this._fastStraightPath({type:e,series:t,i:r,realIndex:i,translationsIndex:n,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,xArrj:m,yArrj:x,y2Arrj:b,stackSeries:z});if(p)return p}for(let n=0;n<s&&0!==t[r].length;n++){const u=void 0===t[r][n+1]||null===t[r][n+1];if(_.axisFlags.isXNumeric){let e=_.seriesData.seriesX[i][n+1];void 0===_.seriesData.seriesX[i][n+1]&&(e=_.seriesData.seriesX[i][s-1]),a=(e-_.globals.minX)/this.xRatio}else a+=this.xDivision;if(z)if(r>0&&_.globals.collapsedSeries.length<_.config.series.length-1){if((e=>{var t;for(let s=e;s>=0;s--){const e=null!=(t=null==g?void 0:g[s])?t:s;if(-1===_.globals.collapsedSeriesIndices.indexOf(e)&&-1===_.globals.ancillaryCollapsedSeriesIndices.indexOf(e))return s}return-1})(r-1)<0)f=this.zeroY;else{const e=this.stackTopAt(i,n+1);f=void 0===e?this.zeroY:e}}else f=this.zeroY;else f=this.zeroY;u?l=X(L,f):(l=X(t[r][n+1],f),"rangeArea"===e&&(R=X(A[r][n+1],f)));let p=a,y=l;if($){const e=100003*i+(n+1);$.x&&(p=a+2*(v(7919*e+13)-.5)*$.x),$.y&&(y=l+2*(v(6271*e+97)-.5)*$.y)}m.push(null===t[r][n+1]?null:p),!u||"smooth"!==_.config.stroke.curve&&"monotoneCubic"!==_.config.stroke.curve?(x.push(y),b.push(R)):(x.push(null),b.push(null));const w=this.lineHelpers.calculatePoints({series:t,x:p,y:y,realIndex:i,i:r,j:n,prevY:C}),k=this._createPaths({type:e,series:t,i:r,j:n,x:a,y:l,y2:R,xArrj:m,yArrj:x,y2Arrj:b,pX:o,pY:h,pathState:T,segmentStartX:N,linePath:M,areaPath:S,linePaths:c,areaPaths:d,curve:D,isRangeStart:P});d=k.areaPaths,c=k.linePaths,o=k.pX,h=k.pY,T=k.pathState,N=k.segmentStartX,S=k.areaPath,M=k.linePath,!this.appendPathFrom||_.globals.hasNullValues||"monotoneCubic"===D&&"rangeArea"===e||(I+=Y.line(a,this.areaBottomY),j+=Y.line(a,this.areaBottomY)),this.handleNullDataPoints(t,w,r,n,i),this._handleMarkersAndLabels({type:e,pointsPos:w,i:r,j:n,realIndex:i,isRangeStart:P})}return{yArrj:x,xArrj:m,pathFromArea:j,areaPaths:d,pathFromLine:I,linePaths:c,linePath:M,areaPath:S}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:i,j:n,realIndex:r}){const a=this.w,l=new g(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:r,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:n+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:r,j:n+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,i=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const n=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,r=this.yRatio.length>1?e:0,a=this.yRatio[r]?1/this.yRatio[r]:0;return{x:(i.x||0)*n,y:(i.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:i,translationsIndex:n,iterations:r,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:p,xArrj:d,yArrj:g,y2Arrj:f,stackSeries:m}){const x=this.w;if("line"!==e&&"area"!==e)return null;if(x.globals.comboCharts||m)return null;if(x.config.dataLabels.enabled)return null;if(x.config.markers.discrete.length)return null;if(x.globals.markers.size[i]>0)return null;const y=t[s],b=y.length;if(!r||b<2||b-1!==r)return null;for(let e=0;e<=r;e++){const t=y[e];if(null==t)return null}const v=x.axisFlags.isXNumeric,P=v?x.seriesData.seriesX[i]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[n],w=this.isReversed,k=this.zeroY,_=this.areaBottomY,Y=this.xRatio,F=x.globals.minX,C=this.xDivision,M=x.config.markers.offsetX,S=x.config.markers.offsetY,I=this.appendPathFrom&&!x.globals.hasNullValues;let{pathFromLine:j,pathFromArea:L}=u;const X=this.ctx&&this.ctx.renderer,R=!(!X||!X.kind||"svg"===X.kind),z=!R||x.globals.dataChanged&&!!x.globals.prevStreamFrame,D=R?new Float64Array(b):null,N=R?new Float64Array(b):null;D&&N&&(D[0]=o,N[0]=h),void 0===x.globals.pointsArray[i]&&(x.globals.pointsArray[i]=[]);const T=x.globals.pointsArray[i],$=P?(P[0]-F)/Y+M:this.categoryAxisCorrection+M;T.push([$,u.prevY+S]);const O=z?new Array(r+1):[];z&&(O[0]="M "+o+" "+h);const B=z&&I?new Array(r):null;let W=a,H=o,V=h;for(let e=0;e<r;e++){P?H=(P[e+1]-F)/Y:(W+=C,H=W);const t=y[e+1];V=k-t/A+2*(w?t/A:0),d.push(H),g.push(V),f.push(l),T.push([H+M,V+S]),z&&(O[e+1]=" L "+H+" "+V,B&&(B[e]=" L "+H+" "+_)),D&&N&&(D[e+1]=H,N[e+1]=V)}let E="",J="";if(z&&(E=O.join(""),J=E+" L "+H+" "+_+" L "+o+" "+_+"z"),B){const e=B.join("");j+=e,L+=e}else!z&&I&&(j+=" L "+H+" "+_,L+=" L "+H+" "+_);return c.push(E),p.push(J),{yArrj:g,xArrj:d,pathFromArea:L,areaPaths:p,pathFromLine:j,linePaths:c,linePath:E,areaPath:J,numericXY:D?{xs:D,ys:N,areaCloseY:_}:void 0}}_createPaths({type:e,series:t,i:s,j:i,x:n,y:r,xArrj:a,yArrj:l,y2:o,y2Arrj:h,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m,linePaths:x,areaPaths:y,curve:b,isRangeStart:v}){const P=new p(this.w),w=this.areaBottomY,k="rangeArea"===e,_="rangeArea"===e&&v;switch(b){case"monotoneCubic":{const e=v?l:h,n=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),r=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},o=(e,t)=>{const s=r(e),i=[];for(let e=0,n=0;e<s.length;n+=s[e++])i[e]=A.slice(t,n,n+s[e]);return i};switch(d){case 0:if(null===e[i+1])break;d=1;case 1:if(!(k?a.length===t[s].length:i===t[s].length-2))break;case 2:{const t=v?a:a.slice().reverse(),s=v?e:e.slice().reverse(),i=n(t,s),r=i.length>1?A.points(i):i;let l=[];k&&(_?y=i:l=y.reverse());let h=0,u=0;if(o(s,r).forEach(e=>{h++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const i=e[s],n=i.length;n>4?(t+=`C${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`,t+=`, ${i[4]}, ${i[5]}`):n>2&&(t+=`S${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`)}return t})(e),s=u;u+=e.length;const n=u-1;_?f=P.move(i[s][0],i[s][1])+t:k?f=P.move(l[s][0],l[s][1])+P.line(i[s][0],i[s][1])+t+P.line(l[n][0],l[n][1]):(f=P.move(i[s][0],i[s][1])+t,m=f+P.line(i[n][0],w)+P.line(i[s][0],w)+"z",y.push(m)),x.push(f)}),k&&h>1&&!_){const e=x.slice(h).reverse();x.splice(h),e.forEach(e=>x.push(e))}d=0;break}}break}case"smooth":{const e=.35*(n-u);if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=_?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){x.push(f),y.push(m);break}if(d=1,i<t[s].length-2){const t=P.curve(u+e,c,n-e,r,n,r);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=_?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",x.push(f),y.push(m),d=-1;else{const a=P.curve(u+e,c,n-e,r,n,r);f+=a,m+=a,i>=t[s].length-2&&(_&&(f+=P.curve(n,r,n,r,n,o)+P.move(n,o)),m+=P.curve(n,r,n,r,n,w)+P.line(g,w)+"z",x.push(f),y.push(m),d=-1)}}u=n,c=r;break}default:{const e=(e,t,s)=>{let i="";switch(e){case"stepline":i=P.line(t,null,"H")+P.line(null,s,"V");break;case"linestep":i=P.line(null,s,"V")+P.line(t,null,"H");break;case"straight":i=P.line(t,s)}return i};if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=_?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){x.push(f),y.push(m);break}if(d=1,i<t[s].length-2){const t=e(b,n,r);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=_?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",x.push(f),y.push(m),d=-1;else{const a=e(b,n,r);f+=a,m+=a,i>=t[s].length-2&&(_&&(f+=P.line(n,o)),m+=P.line(n,w)+P.line(g,w)+"z",x.push(f),y.push(m),d=-1)}}u=n,c=r;break}}return{linePaths:x,areaPaths:y,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m}}handleNullDataPoints(e,t,s,i,n){const r=this.w;if(null===e[s][i]&&r.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-r.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:i+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}u.use({line:J,area:J,scatter:J,bubble:J,rangeArea:J}),e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,r=Object.defineProperties,t=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,L=(r,t,o)=>t in r?e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o,n=(e,r)=>{for(var t in r||(r={}))a.call(r,t)&&L(e,t,r[t]);if(o)for(var t of o(r))s.call(r,t)&&L(e,t,r[t]);return e};function c(e){const o=(a=n({},e),s={viewBox:e.viewBox||[0,0,100,100]},r(a,t(s)));var a,s;return o.with=r=>c(n(n({},e),r)),Object.freeze(o)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=c({name:"person",category:"people",source:"original",path:"M 37 18 A 13 13 0 0 1 63 18 A 13 13 0 0 1 37 18 Z M 50 34 C 61 34 69 40 70 50 L 73 72 L 65 72 L 63 58 L 61 96 L 53 96 L 51 66 L 49 66 L 47 96 L 39 96 L 37 58 L 35 72 L 27 72 L 30 50 C 31 40 39 34 50 34 Z"}),i=c({name:"house",category:"objects",source:"original",path:"M 50 8 L 94 46 L 82 46 L 82 92 L 58 92 L 58 64 L 42 64 L 42 92 L 18 92 L 18 46 L 6 46 Z"}),C=c({name:"heart",category:"symbols",source:"original",path:"M 50 90 C 22 70 6 54 6 36 C 6 21 17 11 30 11 C 39 11 46 16 50 24 C 54 16 61 11 70 11 C 83 11 94 21 94 36 C 94 54 78 70 50 90 Z"}),u=c({name:"tree",category:"nature",source:"original",path:"M 50 6 C 66 6 78 18 78 33 C 78 38 77 42 75 46 C 82 50 86 57 86 65 C 86 77 76 86 64 86 L 55 86 L 55 96 L 45 96 L 45 86 L 36 86 C 24 86 14 77 14 65 C 14 57 18 50 25 46 C 23 42 22 38 22 33 C 22 18 34 6 50 6 Z"}),g=c({name:"droplet",category:"nature",source:"original",path:"M 50 4 C 50 4 84 42 84 64 C 84 82 69 96 50 96 C 31 96 16 82 16 64 C 16 42 50 4 50 4 Z"}),l=c({name:"star",category:"symbols",source:"original",path:"M 50 6 L 61.2 36.6 L 93.8 37.8 L 68.1 57.9 L 77 89.2 L 50 71 L 23 89.2 L 31.9 57.9 L 6.2 37.8 L 38.8 36.6 Z"}),b=c({name:"car",category:"transport",source:"original",path:"M 6 72 L 9 53 C 10 46 15 41 22 40 L 32 23 C 35 19 39 17 44 17 L 60 17 C 65 17 69 19 71 23 L 81 40 C 88 41 93 46 94 53 L 97 72 L 97 80 L 6 80 Z M 13 88 A 11 11 0 1 1 35 88 A 11 11 0 1 1 13 88 Z M 65 88 A 11 11 0 1 1 87 88 A 11 11 0 1 1 65 88 Z"}),y=c({name:"bag",category:"objects",source:"original",path:"M 10 30 L 90 30 L 95 96 L 5 96 Z M 32 30 C 32 14 40 4 50 4 C 60 4 68 14 68 30 L 59 30 C 59 19 55 13 50 13 C 45 13 41 19 41 30 Z"}),h=c({name:"book",category:"objects",source:"original",path:"M 8 14 C 8 14 26 6 50 16 C 74 6 92 14 92 14 L 92 88 C 92 88 74 80 50 90 C 26 80 8 88 8 88 Z"}),m=c({name:"cup",category:"objects",source:"original",path:"M 14 22 L 70 22 L 70 34 L 80 34 C 90 34 96 41 96 51 C 96 63 87 71 75 71 L 69 71 C 65 84 55 92 42 92 C 26 92 14 79 14 61 Z"}),M=c({name:"bulb",category:"objects",source:"original",path:"M 50 4 C 32 4 18 18 18 36 C 18 48 25 56 31 63 C 35 68 37 72 37 78 L 63 78 C 63 72 65 68 69 63 C 75 56 82 48 82 36 C 82 18 68 4 50 4 Z M 38 84 L 38 90 L 62 90 L 62 84 Z M 42 94 L 45 99 L 55 99 L 58 94 Z"}),x=c({name:"plane",category:"transport",source:"original",path:"M 50 4 C 55 4 58 12 58 24 L 58 38 L 94 62 L 94 72 L 58 60 L 58 82 L 70 90 L 70 97 L 50 92 L 30 97 L 30 90 L 42 82 L 42 60 L 6 72 L 6 62 L 42 38 L 42 24 C 42 12 45 4 50 4 Z"}),f=[p,i,C,u,g,l,b,y,h,m,M,x],Z="__apexcharts_unit_marks__";function j(){const e=globalThis;return e[Z]||(e[Z]={}),e[Z]}exports.bag=y,exports.book=h,exports.bulb=M,exports.car=b,exports.catalog=f,exports.cup=m,exports.definePictogram=c,exports.droplet=g,exports.heart=C,exports.house=i,exports.person=p,exports.plane=x,exports.registerMarks=function(e){const r=j(),t=[];return(Array.isArray(e)?e.map(e=>[e?e.name:"",e]):Object.entries(e)).forEach(([e,o])=>{const a=String(e);a&&o&&"string"==typeof o.path&&(r[a]=o,t.push(a))}),t},exports.registeredMarkNames=function(){return Object.keys(j())},exports.star=l,exports.tree=u,exports.unregisterMarks=function(e){const r=j();(Array.isArray(e)?e:[e]).forEach(e=>{delete r[e]})};
|
package/dist/pictograms.esm.js
CHANGED
package/dist/pictograms.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).ApexPictograms={})}(this,function(e){"use strict";var r=Object.defineProperty,t=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,c=(e,t,o)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,s=(e,r)=>{for(var t in r||(r={}))n.call(r,t)&&c(e,t,r[t]);if(a)for(var t of a(r))L.call(r,t)&&c(e,t,r[t]);return e};function i(e){const r=(a=s({},e),n={viewBox:e.viewBox||[0,0,100,100]},t(a,o(n)));var a,n;return r.with=r=>i(s(s({},e),r)),Object.freeze(r)}const p=i({name:"person",category:"people",source:"original",path:"M 37 18 A 13 13 0 0 1 63 18 A 13 13 0 0 1 37 18 Z M 50 34 C 61 34 69 40 70 50 L 73 72 L 65 72 L 63 58 L 61 96 L 53 96 L 51 66 L 49 66 L 47 96 L 39 96 L 37 58 L 35 72 L 27 72 L 30 50 C 31 40 39 34 50 34 Z"}),l=i({name:"house",category:"objects",source:"original",path:"M 50 8 L 94 46 L 82 46 L 82 92 L 58 92 L 58 64 L 42 64 L 42 92 L 18 92 L 18 46 L 6 46 Z"}),u=i({name:"heart",category:"symbols",source:"original",path:"M 50 90 C 22 70 6 54 6 36 C 6 21 17 11 30 11 C 39 11 46 16 50 24 C 54 16 61 11 70 11 C 83 11 94 21 94 36 C 94 54 78 70 50 90 Z"}),C=i({name:"tree",category:"nature",source:"original",path:"M 50 6 C 66 6 78 18 78 33 C 78 38 77 42 75 46 C 82 50 86 57 86 65 C 86 77 76 86 64 86 L 55 86 L 55 96 L 45 96 L 45 86 L 36 86 C 24 86 14 77 14 65 C 14 57 18 50 25 46 C 23 42 22 38 22 33 C 22 18 34 6 50 6 Z"}),g=i({name:"droplet",category:"nature",source:"original",path:"M 50 4 C 50 4 84 42 84 64 C 84 82 69 96 50 96 C 31 96 16 82 16 64 C 16 42 50 4 50 4 Z"}),b=i({name:"star",category:"symbols",source:"original",path:"M 50 6 L 61.2 36.6 L 93.8 37.8 L 68.1 57.9 L 77 89.2 L 50 71 L 23 89.2 L 31.9 57.9 L 6.2 37.8 L 38.8 36.6 Z"}),y=i({name:"car",category:"transport",source:"original",path:"M 6 72 L 9 53 C 10 46 15 41 22 40 L 32 23 C 35 19 39 17 44 17 L 60 17 C 65 17 69 19 71 23 L 81 40 C 88 41 93 46 94 53 L 97 72 L 97 80 L 6 80 Z M 13 88 A 11 11 0 1 1 35 88 A 11 11 0 1 1 13 88 Z M 65 88 A 11 11 0 1 1 87 88 A 11 11 0 1 1 65 88 Z"}),f=i({name:"bag",category:"objects",source:"original",path:"M 10 30 L 90 30 L 95 96 L 5 96 Z M 32 30 C 32 14 40 4 50 4 C 60 4 68 14 68 30 L 59 30 C 59 19 55 13 50 13 C 45 13 41 19 41 30 Z"}),h=i({name:"book",category:"objects",source:"original",path:"M 8 14 C 8 14 26 6 50 16 C 74 6 92 14 92 14 L 92 88 C 92 88 74 80 50 90 C 26 80 8 88 8 88 Z"}),m=i({name:"cup",category:"objects",source:"original",path:"M 14 22 L 70 22 L 70 34 L 80 34 C 90 34 96 41 96 51 C 96 63 87 71 75 71 L 69 71 C 65 84 55 92 42 92 C 26 92 14 79 14 61 Z"}),M=i({name:"bulb",category:"objects",source:"original",path:"M 50 4 C 32 4 18 18 18 36 C 18 48 25 56 31 63 C 35 68 37 72 37 78 L 63 78 C 63 72 65 68 69 63 C 75 56 82 48 82 36 C 82 18 68 4 50 4 Z M 38 84 L 38 90 L 62 90 L 62 84 Z M 42 94 L 45 99 L 55 99 L 58 94 Z"}),d=i({name:"plane",category:"transport",source:"original",path:"M 50 4 C 55 4 58 12 58 24 L 58 38 L 94 62 L 94 72 L 58 60 L 58 82 L 70 90 L 70 97 L 50 92 L 30 97 L 30 90 L 42 82 L 42 60 L 6 72 L 6 62 L 42 38 L 42 24 C 42 12 45 4 50 4 Z"}),Z=[p,l,u,C,g,b,y,f,h,m,M,d],j="__apexcharts_unit_marks__";function A(){const e=globalThis;return e[j]||(e[j]={}),e[j]}function O(e){const r=A(),t=[];return(Array.isArray(e)?e.map(e=>[e?e.name:"",e]):Object.entries(e)).forEach(([e,o])=>{const a=String(e);a&&o&&"string"==typeof o.path&&(r[a]=o,t.push(a))}),t}O(Z);const x=globalThis;x.ApexCharts&&(x.ApexCharts.pictograms=Z),e.bag=f,e.book=h,e.bulb=M,e.car=y,e.catalog=Z,e.cup=m,e.definePictogram=i,e.droplet=g,e.heart=u,e.house=l,e.person=p,e.plane=d,e.registerMarks=O,e.registeredMarkNames=function(){return Object.keys(A())},e.star=b,e.tree=C,e.unregisterMarks=function(e){const r=A();(Array.isArray(e)?e:[e]).forEach(e=>{delete r[e]})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/dist/pie.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,l=(t,a,i)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,r=(e,t)=>{for(var a in t||(t={}))s.call(t,a)&&l(e,a,t[a]);if(i)for(var a of i(t))n.call(t,a)&&l(e,a,t[a]);return e},o=(e,i)=>t(e,a(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const a in e)if("default"!==a){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}return t.default=e,Object.freeze(t)}const c=h(require("apexcharts/core")),d=c.__apex_Animations,g=c.__apex_Fill,p=c.__apex_Utils,f=c.__apex_Graphics,u=c.__apex_Filters,b=c.__apex_Scales;class m{constructor(e){this.w=e}drawYAxisTexts(e,t,a,i){const s=this.w,n=s.config.yaxis[0],l=s.formatters.yLabelFormatters[0];return new f(this.w).drawText({x:e+n.labels.offsetX,y:t+n.labels.offsetY,text:l(i,a),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[a]:n.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:a}={}){const i=new f(this.w);let s=0;return e.forEach(e=>{if(null==e||""===e)return;const n=i.getTextRects(`${e}`,t||"12px",a,"");s=Math.max(s,n.width)}),s}drawExternalLabel(e){return function(e,t){const{lines:a,lineHeight:i,anchor:s,elbow:n,labelX:l,labelY:r,side:o,connector:h,style:c,foreColor:d}=t,g=new f(e),p=g.group({class:t.groupClass||"apexcharts-outer-label-group"});if(h.show){const e=`M ${s.x} ${s.y} L ${n.x} ${n.y} L ${l} ${r}`,a=g.drawPath({d:e,stroke:h.color,strokeWidth:h.width,fill:"none",strokeLinecap:"round"});a.node.classList.add(t.connectorClass||"apexcharts-outer-label-connector"),p.add(a)}const u="right"===o?l+4:l-4,b=a.length,m=r-(b-1)*i/2,x=g.drawText({x:u,y:m,text:1===b?a[0]:a,textAnchor:"right"===o?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:d,dominantBaseline:"central",cssClass:t.textClass||"apexcharts-outer-label"});if(b>1){const e=x.node.getElementsByTagName("tspan");for(let t=0;t<e.length;t++)e[t].setAttribute("x",`${u}`),e[t].setAttribute("dy",0===t?"0":`${i}`)}return p.add(x),p}(this.w,o(r({},e),{groupClass:"apexcharts-pie-name-label-group",textClass:"apexcharts-pie-name-label",connectorClass:"apexcharts-pie-label-connector"}))}}const x=c.__apex_Environment_Environment,y=Math.PI/180,A=180/Math.PI;function w(e,t,a,i){return{x:e+a*Math.cos((i-90)*y),y:t+a*Math.sin((i-90)*y)}}const S=e=>`${e.x} ${e.y}`;function v({cx:e,cy:t,rIn:a,rOut:i,a0:s,a1:n,r:l,spanDeg:r}){const o=(a,i)=>w(e,t,a,i),h=l/i*A,c=l/a*A,d=o(i,s+h),g=o(i,n-h),p=r-2*h>180?1:0,f=o(i,n),u=o(i-l,n),b=o(i,s),m=o(i-l,s),x=o(a,n-c),y=o(a,s+c),v=r-2*c>180?1:0,L=o(a,n),O=o(a+l,n),z=o(a,s),C=o(a+l,s);return["M",S(d),"A",i,i,0,p,1,S(g),"Q",S(f),S(u),"L",S(O),"Q",S(L),S(x),"A",a,a,0,v,0,S(y),"Q",S(z),S(C),"L",S(m),"Q",S(b),S(d),"Z"].join(" ")}class L{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==e.globals.stroke.colors?e.globals.stroke.colors:e.globals.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=e.layout.gridHeight/2,this.centerX=e.layout.gridWidth/2,"radialBar"===e.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;const a=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||a.fontSize,fontFamily:this.externalCfg.fontFamily||a.fontFamily,fontWeight:this.externalCfg.fontWeight||a.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&"polarArea"!==this.chartType,this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;const i=e.config.plotOptions.pie.customScale,s=e.layout.gridWidth/2,n=e.layout.gridHeight/2;this.translateX=s-s*i,this.translateY=n-n*i,this.dataLabelsGroup=new f(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(e){var t,a,i;const s=this.w,n=s.seriesData.seriesNames[e],l=this.externalCfg.formatter;return"function"==typeof l?l(n,{seriesIndex:e,percent:null==(a=null==(t=s.globals.seriesPercent)?void 0:t[e])?void 0:a[0],value:null==(i=s.globals.seriesTotals)?void 0:i[e],w:s}):null==n?"":`${n}`}getExternalLabelLines(e){const t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${null==t?"":t}`.split("\n")).map(e=>null==e?"":`${e}`)}reserveExternalLabelSpace(){const e=this.w,t=new m(e),a=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),i=t.getMaxLabelWidth(a.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=a.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round(1.35*(parseFloat(this.externalLabelStyle.fontSize)||12));const s=this.externalCfg.connector,n=this.externalLabelMaxLines*this.externalLabelLineH,l=i+(s.length||0)+(s.gap||0)+12,r=n/2+(s.gap||0)+6,o=Math.min(e.globals.radialSize,e.layout.gridWidth/2-l,e.layout.gridHeight/2-r);e.globals.radialSize=Math.max(o,.15*this.defaultSize),e.globals.pieExternalLabelMarginY=r;const h=e.config.chart.height?String(e.config.chart.height):"",c=""!==h&&"auto"!==h;this.centerY=c?e.layout.gridHeight/2:e.globals.radialSize+r}draw(e){var t;const a=this.w,i=new f(this.w),s=i.group({class:"apexcharts-pie"});if(a.globals.noData)return s;let n=0;for(let t=0;t<e.length;t++)n+=p.negToZero(e[t]);const l=[],r=i.group();0===n&&(n=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),a.config.yaxis[0].max&&(this.maxY=a.config.yaxis[0].max),"back"===a.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(s);const o=a.globals.collapsedSeriesIndices||[];let h=1;if("polarArea"===this.chartType){let t=0;for(let a=0;a<e.length;a++)-1===o.indexOf(a)&&t++;h=Math.max(1,t)}for(let t=0;t<e.length;t++){const i=this.fullAngle*p.negToZero(e[t])/n;l.push(i),"polarArea"===this.chartType?(l[t]=o.indexOf(t)>-1?0:this.fullAngle/h,this.sliceSizes.push(a.globals.radialSize*e[t]/(this.maxY||1))):this.sliceSizes.push(a.globals.radialSize)}const c=!0===(null==(t=this.ctx.morphTypeChange)?void 0:t.isActive());if(a.globals.dataChanged&&!c)if("polarArea"===this.chartType){const e=a.globals.previousPaths,t=a.globals.prevPolarAngles;if(Array.isArray(t)&&t.length===e.length)this.prevSectorAngleArr=t.slice();else for(let t=0;t<e.length;t++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,e.length));let i=0;for(let t=0;t<e.length;t++)i=Math.max(i,p.negToZero(e[t]));a.config.yaxis[0].max&&(i=a.config.yaxis[0].max),this.prevSliceSizes=e.map(e=>a.globals.radialSize*p.negToZero(e)/(i||1))}else{let e,t=0;for(let e=0;e<a.globals.previousPaths.length;e++)t+=p.negToZero(a.globals.previousPaths[e]);for(let i=0;i<a.globals.previousPaths.length;i++)e=this.fullAngle*p.negToZero(a.globals.previousPaths[i])/t,this.prevSectorAngleArr.push(e)}if("polarArea"===this.chartType&&(a.globals.prevPolarAngles=l.slice()),this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){const e=i.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:a.config.plotOptions.pie.donut.background?a.config.plotOptions.pie.donut.background:"transparent"}),r.add(e)}const d=this.drawArcs(l,e);if(this.sliceLabels.forEach(e=>{d.add(e)}),r.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${a.config.plotOptions.pie.customScale})`}),r.add(d),s.add(r),this.donutDataLabels.show){const e=this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){const e=this.dataLabelsGroup.node;e.style.transition="opacity 280ms ease-out",setTimeout(()=>{e.style.opacity="1"},this.animDur)}s.add(t)}return"front"===a.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(s),s}drawArcs(e,t){var a,i,s,n,l;const r=this.w,o=new u(this.w),h=new f(this.w),c=new g(this.w),d=h.group({class:"apexcharts-slices"});this.elHoverOutline=h.group({class:"apexcharts-pie-hover-outline"}),this.elHoverOutline.node.style.pointerEvents="none",this.elHoverOutline.node.style.opacity="0",r.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition="opacity 180ms ease-out"),d.add(this.elHoverOutline);let b=this.initialAngle,y=this.initialAngle,A=this.initialAngle,w=this.initialAngle;this.strokeWidth=r.config.stroke.show?r.config.stroke.width:0;const S=!0===(null==(a=this.ctx.morphTypeChange)?void 0:a.isActive());for(let a=0;a<e.length;a++){const g=h.group({class:"apexcharts-series apexcharts-pie-series",seriesName:p.escapeString(r.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});d.add(g),b=A,y=w,A=b+e[a],w=y+this.prevSectorAngleArr[a];const m=A<b?this.fullAngle+A-b:A-b,x=c.fillPath({seriesNumber:a,size:this.sliceSizes[a],value:t[a]}),v=S?this.ctx.morphTypeChange.getInitialPathFor(a,0):null,L="polarArea"===this.chartType&&r.globals.dataChanged&&!S?this.prevSliceSizes[a]||0:void 0,O=v||this.getChangedPath(y,w,L),z=h.drawPath({d:O,stroke:Array.isArray(this.lineColorArr)?null!=(i=this.lineColorArr[a])?i:this.lineColorArr[a%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:x,fillOpacity:r.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${a}`});if(z.attr({index:0,j:a}),o.setSelectionFilter(z,0,a),r.config.chart.dropShadow.enabled){const e=r.config.chart.dropShadow;o.dropShadow(z,e,a)}this.addListeners(z,this.donutDataLabels,a);let C={x:0,y:0};const P=(b+m/2)%this.fullAngle;let T={x:this.centerX,y:this.centerY};"pie"===this.chartType||"polarArea"===this.chartType?(C=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize/1.25+r.config.plotOptions.pie.dataLabels.offset,P),T=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize/2,P)):"donut"===this.chartType&&(C=p.polarToCartesian(this.centerX,this.centerY,(r.globals.radialSize+this.donutSize)/2+r.config.plotOptions.pie.dataLabels.offset,P),T=p.polarToCartesian(this.centerX,this.centerY,(r.globals.radialSize+this.donutSize)/2,P)),f.setAttrs(z.node,{"data:angle":m,"data:startAngle":b,"data:strokeWidth":this.strokeWidth,"data:value":t[a],"data:cx":T.x,"data:cy":T.y}),g.add(z);let E=!1;if(S){const e=this.getPiePath({me:this,startAngle:b,angle:m,size:this.sliceSizes[a]});z.node.setAttribute("data:pathFinal",e),E=!0===(null==(n=(s=this.ctx.morphTypeChange).claimsTargetMark)?void 0:n.call(s,a,0)),E&&(z.attr({d:e}),z.node.setAttribute("data:pathOrig",e),z.node.setAttribute("opacity","0"),z.node.setAttribute("data-piece-hidden","1"))}let D=0;if(!this.initialAnim||r.globals.resized||r.globals.dataChanged?this.animBeginArr.push(0):(D=m/this.fullAngle*r.config.chart.animations.speed,0===D&&(D=1),this.animDur=D+this.animDur,this.animBeginArr.push(this.animDur)),E);else if(S&&v){const e=this.getPiePath({me:this,startAngle:b,angle:m,size:this.sliceSizes[a]}),t=this.ctx.morphTypeChange.getSpeed(),i=this.ctx.animations;z.node.setAttribute("data:pathOrig",e);const s=z.animate(t).plot(e,"polygons").attr({"stroke-width":this.strokeWidth});s&&"function"==typeof s.after?s.after(()=>i.animationCompleted(z)):i.animationCompleted(z)}else this.dynamicAnim&&r.globals.dataChanged?this.animatePaths(z,{size:this.sliceSizes[a],prevSize:L,endAngle:A,startAngle:b,prevStartAngle:y,prevEndAngle:w,animateStartingPos:!0,i:a,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:r.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(z,{size:this.sliceSizes[a],endAngle:A,startAngle:b,i:a,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:D});if(this.getExpandOffset()>0?z.node.addEventListener("mouseup",this.pieClicked.bind(this,a)):0===a&&u.drilldownBlocksSliceOffset(r)&&(null==(l=this.ctx.drilldown)||l.warnSliceOffsetDisabled()),void 0!==r.interact.selectedDataPoints[0]&&r.interact.selectedDataPoints[0].indexOf(a)>-1)if(this.initialAnim&&!r.globals.resized&&!r.globals.dataChanged&&this.animDur>0){const e=this,t=a;setTimeout(()=>e.pieClicked(t,{animate:!1}),this.animDur)}else this.pieClicked(a,{animate:!1});if(r.config.dataLabels.enabled){const t=C.x,i=C.y;let s=100*m/this.fullAngle+"%";if(0!==m&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[a]){const e=r.config.dataLabels.formatter;void 0!==e&&(s=e(r.globals.seriesPercent[a][0],{seriesIndex:a,w:r}));const n=r.globals.dataLabels.style.colors[a],l=h.group({class:"apexcharts-datalabels"}),c=h.drawText({x:t,y:i,text:s,textAnchor:"middle",fontSize:r.config.dataLabels.style.fontSize,fontFamily:r.config.dataLabels.style.fontFamily,fontWeight:r.config.dataLabels.style.fontWeight,foreColor:n});if(l.add(c),r.config.dataLabels.dropShadow.enabled){const e=r.config.dataLabels.dropShadow;o.dropShadow(c,e)}c.node.classList.add("apexcharts-pie-label"),r.config.chart.animations.animate&&!1===r.globals.resized&&(c.node.classList.add("apexcharts-pie-label-delay"),c.node.style.animationDelay=r.config.chart.animations.speed/940+"s"),this.sliceLabels.push(l),this.sliceLabelGroups[a]=l.node}}if(this.showExternalLabels&&0!==m){const e=this.getExternalLabelLines(a);if(e.some(e=>""!==e)){const t=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize,P),i=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize+(this.externalCfg.connector.gap||0),P),s=i.x>=this.centerX,n=s?i.x+(this.externalCfg.connector.length||0):i.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:a,lines:e,anchor:t,elbow:i,side:s?"right":"left",labelX:n+parseFloat(this.externalCfg.offsetX||0),idealY:i.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||r.globals.colors[a],foreColor:this.externalCfg.color||r.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const e=x.isBrowser()&&(S||this.dynamicAnim&&r.globals.dataChanged||this.initialAnim&&!r.globals.resized&&!r.globals.dataChanged);this.externalLabels.forEach(t=>{const a=new m(r).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(a.node.classList.add("apexcharts-element-hidden"),r.globals.delayedElements.push({el:a.node})),this.externalLabelGroups[t.i]=a.node,d.add(a)})}return d}placeExternalLabels(){const e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,a=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;["left","right"].forEach(e=>{!function(e,t,a){const i=e.slice().sort((e,t)=>e.idealY-t.idealY);i.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<i.length;e++)i[e].labelY-i[e-1].labelY<t&&(i[e].labelY=i[e-1].labelY+t);const s=i[i.length-1],n=s?s.labelY-a:0;if(n>0)for(let e=i.length-1;e>=0;e--)i[e].labelY-=n,e<i.length-1&&i[e+1].labelY-i[e].labelY<t&&(i[e].labelY=i[e+1].labelY-t)}(this.externalLabels.filter(t=>t.side===e),t,a)})}addListeners(e,t,a){const i=new f(this.w,this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(i,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(i,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),"number"==typeof a&&(e.node.addEventListener("mouseenter",this.showHoverOutline.bind(this,a)),e.node.addEventListener("mouseleave",this.hideHoverOutline.bind(this))),e.node.addEventListener("mousedown",i.pathMouseDown.bind(i,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){const a=this.w;let i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,s=i,n=t.startAngle;const l=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(n=t.prevEndAngle,s=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===a.config.series.length-1&&(i+l>this.fullAngle?t.endAngle=t.endAngle-(i+l):i+l<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(i+l)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(e,n,l,i,s,t)}animateArc(e,t,a,i,s,n){const l=this,r=this.w,o=new d(this.w),h=n.size;let c;(isNaN(t)||isNaN(s))&&(t=a,s=i,n.dur=0);let g=i,p=a;const f=t<a?this.fullAngle+t-a:t-a,u="number"==typeof n.prevSize;r.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(c=l.getPiePath({me:l,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:u?n.prevSize:h}),e.attr({d:c})),0!==n.dur?e.animate(n.dur,n.animBeginArr[n.i]).after(function(){"pie"!==l.chartType&&"donut"!==l.chartType&&"polarArea"!==l.chartType||this.animate(r.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),n.i===r.config.series.length-1&&o.animationCompleted(e)}).during(r=>{g=f+(i-f)*r,n.animateStartingPos&&(g=s+(i-s)*r,p=t-s+(a-(t-s))*r),c=l.getPiePath({me:l,startAngle:p,angle:g,size:u?n.prevSize+(h-n.prevSize)*r:h}),e.node.setAttribute("data:pathOrig",c),e.attr({d:c})}):(c=l.getPiePath({me:l,startAngle:p,angle:i,size:h}),n.isTrack||(r.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",c),e.attr({d:c,"stroke-width":l.strokeWidth}))}pieClicked(e,t){const a=this.w,i=!(t&&!1===t.animate),s=a.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!s)return;if("true"===s.attr("data:pieClicked"))return s.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(),void this.offsetSlice(e,0,i);const n=a.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(n,e=>{const t="true"===e.getAttribute("data:pieClicked");e.setAttribute("data:pieClicked","false"),t&&this.offsetSlice(parseInt(e.getAttribute("j"),10),0,i)}),a.interact.capturedDataPointIndex=e,s.attr("data:pieClicked","true"),this.offsetSlice(e,this.getExpandOffset(),i)}getExpandOffset(){const e=this.w.config.plotOptions.pie;if(!e.expandOnClick||"polarArea"===this.chartType)return 0;if(u.drilldownBlocksSliceOffset(this.w))return 0;const t=Number(e.expandOffset);return Number.isFinite(t)&&t>0?t:0}getSliceMovers(e){const t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return[t?t.node:null,this.sliceLabelGroups[e],this.externalLabelGroups[e],this.hoverOutlineIndex===e&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(e,t,a=!0){const i=this.w;if(!i.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`))return;const{dx:s,dy:n}=this.getSliceOffsetVector(e,t),l=`translate(${s} ${n})`,r=a&&i.config.chart.animations.enabled?"transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)":"";this.getSliceMovers(e).forEach(e=>{e.style.transition=r,e.setAttribute("transform",l)})}getSliceOffsetVector(e,t){const a=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`),i=a?parseFloat(a.attr("data:angle")):NaN;if(!t||!Number.isFinite(i)||i>=this.fullAngle)return{dx:0,dy:0};const s=parseFloat(a.attr("data:startAngle")),n=Math.PI*(s+i/2-90)/180;return{dx:t*Math.cos(n),dy:t*Math.sin(n)}}showHoverOutline(e){const t=this.w;if(!u.hoverOutlineOwnsHoverState(t))return;if(!this.elHoverOutline)return;const a=this.getHoverOutlinePath(e);if(!a)return;const i=t.config.plotOptions.pie.hoverOutline,s=i.color||t.globals.colors[e];if(!this.elHoverOutlinePath){const e=new f(t);this.elHoverOutlinePath=e.drawPath({d:a,fill:s,strokeWidth:0,classes:"apexcharts-pie-hover-outline-band"}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:a,fill:s,"fill-opacity":i.opacity});const{dx:n,dy:l}=this.getSliceOffsetVector(e,this.isSliceOut(e)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition="",this.elHoverOutlinePath.node.setAttribute("transform",`translate(${n} ${l})`),this.hoverOutlineIndex=e,this.elHoverOutline.node.style.opacity="1"}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity="0")}isSliceOut(e){const t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return!!t&&"true"===t.attr("data:pieClicked")}getHoverOutlinePath(e){const t=this.w,a=t.config.plotOptions.pie.hoverOutline,i=t.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!i)return null;const s=parseFloat(i.attr("data:angle"));if(!Number.isFinite(s)||s<=0)return null;const n=this.sliceSizes[e],l=Number(a.size);if(!Number.isFinite(n)||!Number.isFinite(l)||l<=0)return null;const{startDeg:h,spanDeg:c}=this.getSliceExtent({me:this,startAngle:parseFloat(i.attr("data:startAngle")),angle:s,size:n});if(!(c>0))return null;const d=n+(this.strokeWidth||0)/2+(Number(a.gap)||0),g=d+l,p={cx:this.centerX,cy:this.centerY,rIn:d,rOut:g,a0:h,a1:h+c,spanDeg:c},f=Math.min(l/2,c*Math.PI/180/2*d);return f>.5?v(o(r({},p),{r:f})):function({cx:e,cy:t,rIn:a,rOut:i,a0:s,a1:n,spanDeg:l}){const r=(a,i)=>w(e,t,a,i),o=l>180?1:0,h=r(i,s),c=r(i,n),d=r(a,n),g=r(a,s);return["M",S(h),"A",i,i,0,o,1,S(c),"L",S(d),"A",a,a,0,o,0,S(g),"Z"].join(" ")}(p)}getChangedPath(e,t,a){let i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:"number"==typeof a?a:this.size})),i}getSliceExtent({me:e,startAngle:t,angle:a,size:i}){const s=this.w;let n=t,l=a+t;Math.ceil(l)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(l=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let r=l-n;const o="pie"===e.chartType||"donut"===e.chartType||"polarArea"===e.chartType,h=s.config.plotOptions.pie.spacing;if(o&&h>0&&r>0){const t="donut"===e.chartType?(i+e.donutSize)/2:i,a=t>0?h/t*(180/Math.PI):0,s=Math.min(a/2,Math.max(0,r/2-.5));n+=s,r-=2*s}return l=n+r,Math.ceil(l)>this.fullAngle&&(l-=this.fullAngle),{startDeg:n,spanDeg:r,endDeg:l}}getPiePath({me:e,startAngle:t,angle:a,size:i}){let s;const n=this.w,l=new f(this.w),{startDeg:r,spanDeg:o,endDeg:h}=this.getSliceExtent({me:e,startAngle:t,angle:a,size:i}),c="pie"===e.chartType||"donut"===e.chartType||"polarArea"===e.chartType,d=Math.PI*(r-90)/180,g=n.config.plotOptions.pie.borderRadius;if(g>0&&c){const t=this.getRoundedSlicePath({me:e,startDeg:r,spanDeg:o,size:i,borderRadius:g});if(t)return t}const u=Math.PI*(h-90)/180,b=e.centerX+i*Math.cos(d),m=e.centerY+i*Math.sin(d),x=e.centerX+i*Math.cos(u),y=e.centerY+i*Math.sin(u),A=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,h),w=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),S=o>180?1:0,v=["M",b,m,"A",i,i,0,S,1,x,y];return s="donut"===e.chartType?[...v,"L",A.x,A.y,"A",e.donutSize,e.donutSize,0,S,0,w.x,w.y,"L",b,m,"z"].join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[...v,"L",e.centerX,e.centerY,"L",b,m].join(" "):[...v].join(" "),l.roundPathCorners(s,2*this.strokeWidth)}getRoundedSlicePath({me:e,startDeg:t,spanDeg:a,size:i,borderRadius:s}){if(!(a>0))return null;const n=Math.PI/180,l=e.centerX,r=e.centerY,o="donut"===e.chartType,h=i,c=o?e.donutSize:0,d=a*n;let g=s;if(g=Math.min(g,d*h/2),o?(g=Math.min(g,d*c/2),g=Math.min(g,(h-c)/2)):g=Math.min(g,h/2),!(g>.5))return null;const p=t,f=t+a;return o?v({cx:l,cy:r,rIn:c,rOut:h,a0:p,a1:f,r:g,spanDeg:a}):function({cx:e,cy:t,rOut:a,a0:i,a1:s,r:n,spanDeg:l}){const r=(a,i)=>w(e,t,a,i),o=n/a*A,h=r(a,i+o),c=r(a,s-o),d=l-2*o>180?1:0,g=r(a,s),p=r(a-n,s),f=r(a,i),u=r(a-n,i);return["M",S(h),"A",a,a,0,d,1,S(c),"Q",S(g),S(p),"L",`${e} ${t}`,"L",S(u),"Q",S(f),S(h),"Z"].join(" ")}({cx:l,cy:r,rOut:h,a0:p,a1:f,r:g,spanDeg:a})}drawPolarElements(e){const t=this.w,a=new b(this.w),i=new f(this.w),s=new m(this.w),n=i.group(),l=i.group(),r=a.niceScale(0,Math.ceil(this.maxY),0),o=r.result.reverse(),h=r.result.length;this.maxY=r.niceMax;let c=t.globals.radialSize;const d=c/(h-1);for(let e=0;e<h-1;e++){const a=i.drawCircle(c);if(a.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){const a=s.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,o[e]);l.add(a)}n.add(a),c-=d}this.drawSpokes(e),e.add(n),e.add(l)}renderInnerDataLabels(e,t,a){const i=this.w,s=new f(this.w),n=t.total.show;e.node.innerHTML="",e.node.style.opacity=a.opacity;const l=a.centerX,r=this.donutDataLabels.total.label?a.centerY:a.centerY-a.centerY/6;let o,h;o=void 0===t.name.color?i.globals.colors[0]:t.name.color;let c=t.name.fontSize,d=t.name.fontFamily,g=t.name.fontWeight;h=void 0===t.value.color?i.config.chart.foreColor:t.value.color;const p=t.value.formatter;let u="",b="";if(n?(o=t.total.color,c=t.total.fontSize,d=t.total.fontFamily,g=t.total.fontWeight,b=this.donutDataLabels.total.label?t.total.label:"",u=t.total.formatter(i)):1===i.seriesData.series.length&&(u=p(i.seriesData.series[0],i),b=i.seriesData.seriesNames[0]),b&&(b=t.name.formatter(b,t.total.show,i)),t.name.show){const a=s.drawText({x:l,y:r+parseFloat(t.name.offsetY),text:b,textAnchor:"middle",foreColor:o,fontSize:c,fontWeight:g,fontFamily:d});a.node.classList.add("apexcharts-datalabel-label"),e.add(a)}if(t.value.show){const a=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,i=s.drawText({x:l,y:r+a,text:u,textAnchor:"middle",foreColor:h,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});i.node.classList.add("apexcharts-datalabel-value"),e.add(i)}return e}printInnerLabels(e,t,a,i){const s=this.w;let n;i?n=void 0===e.name.color?s.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:e.name.color:s.seriesData.series.length>1&&e.total.show&&(n=e.total.color);const l=s.dom.baseEl.querySelector(".apexcharts-datalabel-label"),r=s.dom.baseEl.querySelector(".apexcharts-datalabel-value");a=(0,e.value.formatter)(a,s),i||"function"!=typeof e.total.formatter||(a=e.total.formatter(s));const o=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,o,s):"",null!==l&&(l.textContent=t),null!==r&&(r.textContent=a),null!==l){l.style.fill=n}}printDataLabelsInner(e,t){const a=this.w,i=e.getAttribute("data:value"),s=a.seriesData.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];a.seriesData.series.length>1&&this.printInnerLabels(t,s,i,e);const n=a.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(null!==n){n.style.opacity="1"}}drawSpokes(e){const t=this.w,a=new f(this.w),i=t.config.plotOptions.polarArea.spokes;if(0===i.strokeWidth)return;const s=[],n=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)s.push(p.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+n*e));s.forEach((t,s)=>{const n=a.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[s]:i.connectorColors);e.add(n)})}revertDataLabelsInner(){const e=this.w;if(this.donutDataLabels.show){const t=e.dom.Paper.findOne(".apexcharts-datalabels-group"),a=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(a)}}}c.default.use({pie:L,donut:L,polarArea:L}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
|
package/dist/pie.esm.js
CHANGED