apexcharts 7.2.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +30 -11
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +545 -463
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.esm.js +1149 -801
- package/dist/apexcharts.js +684 -254
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +684 -254
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +20 -10
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +20 -10
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +20 -10
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +20 -10
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +545 -463
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +20 -10
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +364 -26
- 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 +2 -2
- package/dist/features/exports.esm.js +12 -14
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +14 -1
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +38 -38
- 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 +11 -11
- 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 +11 -11
- 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 +2 -2
- package/dist/features/toolbar.esm.js +172 -25
- package/dist/features/toolbar.js +2 -2
- 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 +180 -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 +2 -2
- package/dist/histogram.esm.js +20 -10
- 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 +2 -2
- package/dist/raincloud.esm.js +20 -10
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +20 -10
- 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 +79 -79
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +20 -10
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +20 -10
- package/package.json +2 -2
- package/src/apexcharts.js +39 -15
- package/src/charts/common/bar/Helpers.js +31 -12
- package/src/modules/Data.js +8 -2
- package/src/modules/Exports.js +14 -12
- package/src/modules/Formatters.js +24 -1
- package/src/modules/Range.js +28 -1
- package/src/modules/Toolbar.js +112 -2
- package/src/modules/ZoomPanSelection.js +85 -7
- package/src/modules/accessibility/KeyboardNavigation.js +14 -0
- package/src/modules/axes/YAxis.js +12 -15
- package/src/modules/helpers/UpdateHelpers.js +25 -8
- package/src/modules/settings/Globals.js +5 -10
- package/src/modules/settings/Options.js +15 -0
- package/src/modules/weave/PluginAPI.js +57 -1
- package/src/modules/weave/WeaveHost.js +148 -0
- package/src/ssr/DOMShim.js +50 -0
- package/src/types/internal.d.ts +1 -1
- package/src/utils/Utils.js +6 -9
- package/types/apexcharts.d.ts +17 -0
package/dist/rangeArea.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.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/rangeArea.esm.js
CHANGED
package/dist/rangeBar.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=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={}))i.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))r.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")),b=d.__apex_Graphics,c=d.__apex_DataLabels,u=(t,e,s,a)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(i)?i:0},g=d.__apex_BrowserAPIs_BrowserAPIs,p=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)&&!!(p.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function f(t,e,s){var a,i,r,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[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 v(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 i,r;if(!x(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=v(n.map((t,s)=>function(t,e,s){var a,i;if(t.isXNumeric){const i=null==(a=t.seriesX)?void 0:a[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const r=null==(i=t.labels)?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(o,e,s))),d=v(l.map((s,a)=>f(t,e,a))),b=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!i.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(b.ordered||a)&&(b.changed||s)?{join:b,oldKeys:h,newKeys:d}:null}function m({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){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 b(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 b=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(b=i?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 c=n.style;c.transformBox="fill-box",c.transformOrigin=b;const u=Math.max(1,r||1),p=performance.now(),x=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-p)/u)),a=1-Math.pow(1-s,3),r=1-a;c.transform=i?`scaleX(${r})`:`scaleY(${r})`,c.opacity=String(1-a),s<1?g.requestAnimationFrame(x):n.parentNode.removeChild(n)};g.requestAnimationFrame(x)})}class C{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:i,y1:r,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:g,barHeight:p,barWidth:x,barXPosition:f,barYPosition:v,visibleSeries:y}=t,m=this.w,C=new b(this.barCtx.w),w=m.waterfallData&&m.waterfallData.values,I=w&&w[c]&&null!=w[c][d]?w[c][d]:null,P=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let H,L;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(H=a+x*(y+1),L=i+p*(y+1)-P):(H=a+x*y,L=i+p*y);let S=null,D=null,k=a,R=i,X={};const W=m.config.dataLabels,A=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==v&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(L=v,R=v),void 0!==f&&this.barCtx.isVerticalGroupedRangeBar&&(H=f,k=f);const O=u(W.offsetX,m,c,d),Y=u(W.offsetY,m,c,d);let B={width:0,height:0};if(m.config.dataLabels.enabled){const t=null!==I?I:m.seriesData.series[c][d];B=C.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(t,l(n({},m),{seriesIndex:c,dataPointIndex:d,w:m})):m.formatters.yLabelFormatters[0](t),parseFloat(W.style.fontSize).toString(),W.style.fontFamily,void 0,!0,W.style.fontWeight)}const j={x:a,y:i,i:h,j:d,realIndex:c,columnGroupIndex:g,bcx:H,bcy:L,barHeight:p,barWidth:x,textRects:B,strokeWidth:P,dataLabelsX:k,dataLabelsY:R,dataLabelsConfig:W,barDataLabelsConfig:A,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(X=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(j):this.calculateColumnsDataLabelsPosition(j),null!==I&&this.barCtx.isHorizontal&&"center"===A.position){const t=null==(s=null==(e=m.waterfallData.geometry)?void 0:e[c])?void 0:s[d];t&&t.horizontal&&(X.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return S=this.drawCalculatedDataLabels({x:X.dataLabelsX,y:X.dataLabelsY,val:null!==I?I:this.barCtx.isRangeBar?[r,o]:"100%"===m.config.chart.stackType?m.globals.seriesPercent[c][d]:m.seriesData.series[c][d],i:c,j:d,barWidth:x,barHeight:p,textRects:B,dataLabelsConfig:W}),m.config.chart.stacked&&F.enabled&&(D=this.drawTotalDataLabels({x:X.totalDataLabelsX,y:X.totalDataLabelsY,barWidth:x,barHeight:p,realIndex:c,j:d,textAnchor:X.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:W,barTotalDataLabelsConfig:F})),{dataLabelsPos:X,dataLabels:S,totalDataLabels:D}}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),i=s.seriesData.stackedSeriesTotalsByGroups;return a&&i&&i[a.groupIndex]?i[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:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:g,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:v,offX:y,offY:m}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:I}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=v/2;const P=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+y:l-P+h/2+y,!e.config.chart.stacked&&I>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*I)),w){const t=2;u=u+c.height/2-v/2-t}const H=e.seriesData.series[i][r]<0;let L=n;switch(this.barCtx.isReversed&&(L=n+(H?d:-d)),x.position){case"center":g=w?H?L-d/2+m:L+d/2-m:H?L-d/2+c.height/2+m:L+d/2+c.height/2-m;break;case"bottom":g=w?H?L-d+m:L+d-m:H?L-d+c.height+v+m:L+d-c.height/2+v-m;break;case"top":g=w?H?L+m:L-m:H?L-c.height/2-m:L+c.height+m}let S=L;const D=this.getTotalGroupContext(o);if((D?[D.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{S=H?Math.max(t[r],S):Math.min(t[r],S)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new b(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);s=H?S-i.height/2-m-f.offsetY+t:S+i.height+m+f.offsetY-t;const n=P;a=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(g<0?g=0+v:g+c.height/3>e.layout.gridHeight&&(g=e.layout.gridHeight-v)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:v}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,I;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+v-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+v-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*m);let P="start";const H=s.seriesData.series[i][r]<0;let L=a;if(this.barCtx.isReversed&&(L=a+(H?-h:h),P=H?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+f;else switch(p.position){case"center":c=H?L+h/2-f:Math.max(d.width/2,L-h/2)+f;break;case"bottom":c=H?L+h-u-f:L-h+u+f;break;case"top":c=H?L-u-f:L-u+f}let S=L;const D=this.getTotalGroupContext(o);if((D?[D.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{S=H?Math.min(t[r],S):Math.max(t[r],S)})}),this.drawsStackedTotal(o)&&x.enabled){const t=new b(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);H?(w=S-u-f-x.offsetX,P="end"):w=S+f+x.offsetX+(this.barCtx.isReversed?-(h+u):u),I=C-d.height/2+t.height/2+x.offsetY+u,s.globals.barGroups.length>1&&!D&&(I-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=H&&"middle"!==g.textAnchor?"start"===g.textAnchor?"end":"start":g.textAnchor;let e;e="vertical"===p.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===p.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:C,totalDataLabelsX:w,totalDataLabelsY:I,totalDataLabelsAnchor:P}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var u,g,p;const x=this.w;let v="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(v=`rotate(-90, ${t}, ${e})`);const y=new c(this.barCtx.w,this.barCtx.ctx),m=new b(this.barCtx.w),C=d.formatter;let w=null;const I=x.globals.collapsedSeriesIndices.indexOf(a)>-1,P=(x.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(P){const t=null==(u=x.globals.prevDataLabels)?void 0:u.get(`${a}::${f(x,a,i)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!I||P)){w=m.group({class:"apexcharts-data-labels",transform:v});const b=x.config.dataLabels;((null==(g=b.animate)?void 0:g.enabled)||(null==(p=b.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",`${a}::${f(x,a,i)}`),w.node.setAttribute("data:dlJ",String(i)),"number"==typeof s&&isFinite(s)&&w.node.setAttribute("data:dlVal",String(s)));let c="";void 0!==s&&(c=C(s,l(n({},x),{seriesIndex:a,dataPointIndex:i,w:x}))),!s&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(c="");const u=x.seriesData.series[a][i]<0,I=x.config.plotOptions.bar.dataLabels.position;if("vertical"===x.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=u?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=u?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<m.getTextRects(c,parseFloat(d.style.fontSize).toString()).width&&(c="")}x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!P&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(c=""):r.height/1.6>Math.abs(o)&&(c=""));const H=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?H.textAnchor="end":"end"===d.textAnchor&&(H.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:c,i:a,j:i,parent:w,dataLabelsConfig:H,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new b(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){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 b=this.w.config.dataLabels;if((null==(l=b.animate)?void 0:l.enabled)||(null==(h=b.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);c.node.setAttribute("data:dlTotalKey",`${t}::${f(this.w,i,r)}`),c.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const w=d.__apex_Series,I=d.__apex_Fill,P=d.__apex_Utils;function H(t){var e,s,a,i,r,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(i=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class L{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),P.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,i=1/0;for(;;){let t=1/0,r=-1;for(let a=0;a<e.length;a++){const i=e[a];for(;s[a]<i.length&&"number"!=typeof i[s[a]];)s[a]++;if(s[a]>=i.length)continue;const o=i[s[a]];o==o?o<t&&(t=o,r=a):(s[a]++,a--)}if(-1===r)break;if(s[r]++,a==a){const e=t-a;e>0&&e<i&&(i=e)}a=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let s,a,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let b=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||H(e))&&(b=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/b,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/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=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/b*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+P.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:i,xDivision:r,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 i;const r=this.w,o=new I(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==(i=r.config.series[e].data[s])?void 0:i.fill),b=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let c;b&&b.color&&(n=b.color,c=b.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:c,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[a]:r.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 i=s.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=a.order[e];if(!r)return null;const o=s.globals.colors[r[0]],n=s.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.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,i=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.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,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(a?"top":"none"));if(a)return o;const n="bar"===this.w.config.chart.type&&1===r,l=n?"top":"both",h=n?"top":"bottom";for(const e of this.getStackedSeriesIndices(i))for(let s=0;s<r;s++){const a=[],i=[];for(const r of e){const e=t[r][s];e>0?a.push(r):e<0&&i.push(r)}if(a.length>0&&0===i.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const i of a)o[i][s]=i===t?h:i===e?"top":"none"}else if(i.length>0&&0===a.length)if(1===i.length)o[i[0]][s]="both";else{const t=Math.max(...i),e=Math.min(...i);for(const a of i)o[a][s]=a===t?"bottom":a===e?"top":"none"}else if(a.length>0&&i.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new b(this.barCtx.w),h=new w(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!==i?i:0,void 0!==a?a:n.layout.gridWidth,void 0!==r?r: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:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,g,p;const x=new b(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,v=e;(null==(u=c.config.series[l].data[d])?void 0:u.columnWidthOffset)&&(v=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const y=i/2,m=v+y,C=v+f-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-y*w,a+=.001+y*w;const I=x.line(C,s),P="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",H=x.move(m,s)+x.line(m,a)+x.line(C,a)+I+P;let L=H;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let S=null;const D=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(D?S=D:c.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(l,d,L,H)),null==S&&(S=x.move(m,s)+x.line(m,s)+I+I+I+I+I+x.line(m,s)+P),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:S,drawnBox:{x1:m,x2:C,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new b(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,g=u(s[a][i]),p=i===s[a].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:g:u(s[a][i+1]);const v=o/2,y=t+v,m=t+e-v,C=c-g,w=c+g,I=c-f,P=c+f,H=d.move(C,y)+d.line(w,y)+d.line(P,m)+d.line(I,m)+" Z";let L=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return S?L=S:n.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(r,i,H)),null==L&&(L=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:H,pathFrom:L,x:w,x1:C,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||s<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const a=n/r,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:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new b(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,g=t+u,p=t+e-u,x=c-s,f=c+s,v=c-a,y=c+a,m=d.move(x,g)+d.line(f,g)+d.line(y,p)+d.line(v,p)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,m)),null==C&&(C=d.move(c,g)+d.line(c,g)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:m,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,g,p;const x=new b(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,v=e;(null==(u=c.config.series[l].data[d])?void 0:u.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,v=e+c.config.series[l].data[d].barHeightOffset);const y=i/2,m=f+y,C=f+v-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+y*w,a+=.001-y*w;const I=this.barCtx.isFunnel,P=I?(s+a)/2:s,H=x.line(s,C),L="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=x.move(s,m)+x.line(a,m)+x.line(a,C)+H+L;let D=S;"none"!==this.arrBorderRadius[l][d]&&(D=x.roundPathCorners(D,c.config.plotOptions.bar.borderRadius));let k=null;const R=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(R?k=R:c.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(l,d,D,S)),null==k){const t=I?x.line(P,C):H;k=x.move(P,m)+x.line(P,m)+t+t+t+t+t+x.line(P,m)+L}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:D,pathFrom:k,drawnBox:{x1:s,x2:a,y1:m,y2:C}}}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 i=a?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),i}getGoalValues(t,e,s,a,i,r){const o=this.w,h=[],d=(a,i)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,r,!1),attrs:i})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][i]&&Array.isArray(o.seriesData.seriesGoals[a][i])&&o.seriesData.seriesGoals[a][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,i);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 r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const b=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!b.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,i,t.index),color:b.colorFromMarker?t.color:Array.isArray(b.style.colors)?b.style.colors[t.index]||b.style.colors[0]:b.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],i=s.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&a.push({value:r,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[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 i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:i,barHeight:r}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new b(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:r/2,a=e+s+r/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:i/2,a=t+s+i/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 b(s),i=s.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*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:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,u=l+e.barHeight,g=new b(this.barCtx.w),p=new P,x=g.move(n,u)+g.line(o,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,P.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 i=0,r=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&&i++,s<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}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 i=a.indexOf(s);return i<0&&(a.push(s),i=a.length-1),{groupIndex:s,columnGroupIndex:i}}}const S=d.__apex_CoreUtils,D=d.__apex_Filters,k=d.__apex_Animations_computeStagger;class R{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)/R.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*R.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 i=a.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class X{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 w(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new S(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new L(this)}draw(t,e){var s,a,i;const r=this.w,o=new b(this.w),h=new S(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"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,b=0;h<t.length;h++,b++){let c,u;const g=[],p=[],x=r.globals.comboCharts?e[h]:h,{columnGroupIndex:v}=this.barHelpers.getGroupIndex(x),y=o.group({class:"apexcharts-series",rel:h+1,seriesName:P.escapeString(r.seriesData.seriesNames[x]),"data:realIndex":x});w.addCollapsedClassToSeries(this.w,y,x),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const C=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const I=this.barHelpers.initialPositions(x),{y:H,yDivision:L,zeroW:S,x:k,xDivision:R,zeroH:X}=I;let W=I.barHeight,A=I.barWidth;u=H,c=k,this.isHorizontal||p.push(c+(null!=A?A:0)/2);const F=o.group({class:"apexcharts-datalabels","data:realIndex":x});r.globals.delayedElements.push({el:F.node,holdUntilComplete:!(null==(s=r.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(x)}),F.node.classList.add("apexcharts-element-hidden");const O=o.group({class:"apexcharts-bar-goals-markers"}),Y=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:Y.node}),Y.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,x);let o=null;const d={indexes:{i:h,j:e,realIndex:x,translationsIndex:C,bc:b},x:c,y:u,strokeWidth:s,elSeries:y};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:W,zeroW:S,yDivision:L})),A=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:R,barWidth:A,zeroH:X})),W=this.series[h][e]/this.yRatio[C]);const f=this.barHelpers.getPathFillColor(t,h,e,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=r.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof f.color&&-1===(null==(i=f.color)?void 0:i.indexOf("url"))?f.color:P.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:x,j:e});if(Y.add(t),r.config.chart.dropShadow.enabled){new D(this.w).dropShadow(t,r.config.chart.dropShadow,x)}}this.pathArr.push(o);const m=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:W,barWidth:A});m&&O.add(m),u=o.y,c=o.x,e>0&&p.push(c+(null!=A?A:0)/2),g.push(u),this.renderSeries(l(n({realIndex:x,pathFill:f.color},f.useRangeColor?{lineFill:f.color}:{}),{j:e,i:h,columnGroupIndex:v,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:y,x:c,y:u,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:W),barWidth:Math.abs(o.barWidth?o.barWidth:A),elDataLabelsWrap:F,elGoalsMarkers:O,elBarShadows:Y,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=g,r.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(f(r,x,s));m({w:r,elSeries:y,record:this._prevRecord(x),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(y)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:u,y2:g,series:p,barHeight:x,barWidth:v,barXPosition:y,barYPosition:m,elDataLabelsWrap:w,elGoalsMarkers:I,elBarShadows:P,visibleSeries:H,type:L,classes:S}){var R,X,W,A,F,O,Y;const B=this.w,j=new b(this.w,this.ctx),T=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,j);let z=!1;const G=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,j.setupEventDelegation(h,`.apexcharts-${L}-area`)),!s){let e=function(t){const e=B.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:B.seriesData.series[t][a],dataPointIndex:a,w:B}):s};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];s=this.barOptions.distributed?B.globals.stroke.colors[a]:i}const M=B.config.chart.animations,_=M.animateGradually;let N=0,V=0;if(_&&!1!==_.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=_.delay||0,s=Math.min(e,.5*M.speed/Math.max(1,t));V=k({style:"sequential",index:a,baseDelay:s}),B.config.chart.stacked&&!B.globals.dataChanged&&(V+=i*s*.5);N=V/(e||1)}const E=new C(this).handleBarDataLabels({x:d,y:c,y1:u,y2:g,i:i,j:a,series:p,realIndex:t,columnGroupIndex:r,barHeight:x,barWidth:v,barXPosition:y,barYPosition:m,visibleSeries:H});if(V>0){const t=B.config.dataLabels;if((null==(R=t.animate)?void 0:R.enabled)||(null==(X=t.countUp)?void 0:X.enabled)){const t=String(Math.round(V));null==(A=null==(W=E.dataLabels)?void 0:W.node)||A.setAttribute("data:dlDelay",t),null==(O=null==(F=E.totalDataLabels)?void 0:F.node)||O.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(v,B.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(v,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[a]&&B.config.series[i].data[a].strokeColor&&(s=B.config.series[i].data[a].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(Y=this.ctx.morphTypeChange)?void 0:Y.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,b=r&&this.ctx.morphTypeChange.claimsTargetMark(t,a);b&&(o=n,N=0);const c=T.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:G,animationDelay:N,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${L}-area${S?` ${S}`:""}`,chartType:L,bindEventsOnPaths:!1});c.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),b&&(c.node.setAttribute("opacity","0"),c.node.setAttribute("data-piece-hidden","1"));const p=B.config.forecastDataPoints;p.count>0&&a>=B.globals.dataPoints-p.count&&(c.node.setAttribute("stroke-dasharray",p.dashArray),c.node.setAttribute("stroke-width",p.strokeWidth),c.node.setAttribute("fill-opacity",p.fillOpacity)),void 0!==u&&void 0!==g&&(c.attr("data-range-y1",u),c.attr("data-range-y2",g));new D(this.w).setSelectionFilter(c,t,a),h.add(c),c.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:B.seriesData.series[i][a],barHeight:x,barWidth:v,"data:pathKey":f(B,t,a)}),"canvas"===T.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:v}),null!==E.dataLabels&&w.add(E.dataLabels),E.totalDataLabels&&w.add(E.totalDataLabels),h.add(w),I&&h.add(I),P&&h.add(P)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let b;if(l.axisFlags.isXNumeric)b=(r=(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),b=r+e*this.visibleI,b-=e*s}else b=r+e*this.visibleI;const c=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!u;if(u)b=u.y,e=u.height;else if(this.isFunnel&&!c){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=u?this.barHelpers.getPyramidPaths({barYPosition:b,barHeight:e,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):c?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:b,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(c||g)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=b),this.barHelpers.barBackground({j:d,i:h,y1:b-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:b,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,b=t.i,c=t.j,u=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:b,j:c});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*s}else g=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[b][c],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:b,j:c,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:u,j:c,i:b,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const i=this.w;let r=s;return i.seriesData.seriesX[s].length||(r=i.globals.maxValsInArrayIndex),P.isNumber(i.seriesData.seriesX[r][a])&&(t=R.dataXToPx(i,i.seriesData.seriesX[r][a])-e*this.seriesLen/2),{barXPosition:t+(H(i)?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 i=e.globals.previousPaths[a];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(s=i)}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 i=!1;if(x(a)&&a.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(f(a,t,s))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}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 i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return x(i)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(f(i,t,e));s?o=s.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=X.pathCommandCount(o),e=X.pathCommandCount(s);if(t===e)return o;const r=new b(i),n=t=>{const e=X.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=r.roundPathCorners(o,0);if(X.pathCommandCount(t)===e){if(l&&a){const t=r.roundPathCorners(a,0);X.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(s,0);if(X.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=X.squareLike(o),s=e?r.roundPathCorners(e,0):null;if(s&&X.pathCommandCount(s)===t)return s}return o}}}return n&&x(i)?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 i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),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=X.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,b,c;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[b,c]=l(o[1],i,r)):(b=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,c=b===i?r:i,[h,d]=l(o[0],s,a));const u=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${b} L ${h} ${c} L ${d} ${c} L ${d} ${b}${u}`:`M ${h} ${b} L ${d} ${b} L ${d} ${c} L ${h} ${c}${u}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const i=this._prevKeyedPaths(t),r=i?i.get(f(s,t,e)):a.paths[e];return r?!!r.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:X,column:X,barStacked:class extends X{draw(t,e){const s=this.w;this.graphics=new b(this.w),this.bar=new X(this.w,this.ctx,this.xyRatios);const a=new S(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 i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let c=!1;for(let a=0,h=0;a<t.length;a++,h++){const b=s.globals.comboCharts?e[a]:a,{groupIndex:u,columnGroupIndex:g}=this.barHelpers.getGroupIndex(b);this.groupCtx=this[s.labelData.seriesGroups[u]];const p=[],x=[];let f=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],f=b),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let v=this.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(s.seriesData.seriesNames[b]),rel:a+1,"data:realIndex":b});w.addCollapsedClassToSeries(this.w,v,b);const y=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":b});w.addCollapsedClassToSeries(this.w,y,b),(s.globals.collapsingSeriesIndices||[]).indexOf(b)>-1&&y.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const m=this.graphics.group({class:"apexcharts-bar-goals-markers"}),C=this.initialPositions(r,o,void 0,void 0,void 0,void 0,f),{xDivision:I,yDivision:H,zeroH:L,zeroW:S}=C;let D=C.barHeight,k=C.barWidth;o=C.y,r=C.x,s.globals.barHeight=D,s.globals.barWidth=k,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(()=>L),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const i=this.barHelpers.getStrokeWidth(a,e,b),C={indexes:{i:a,j:e,realIndex:b,translationsIndex:f,bc:h},strokeWidth:i,x:r,y:o,elSeries:v,columnGroupIndex:g,seriesGroup:s.labelData.seriesGroups[u]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},C),{zeroW:S,barHeight:D,yDivision:H})),k=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},C),{xDivision:I,barWidth:k,zeroH:L})),D=this.series[a][e]/this.yRatio[f]);const P=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:D,barWidth:k});P&&m.add(P),o=w.y,r=w.x,p.push(r),x.push(o);const R=this.barHelpers.getPathFillColor(t,a,e,b);let X="";const W=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",A="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&&!A&&this.getPreviousFlip(b,e);(A||F)&&(X=W),F&&(X+=" apexcharts-flip-held",c=!0),v=this.renderSeries(l(n({realIndex:b,pathFill:R.color},R.useRangeColor?{lineFill:R.color}:{}),{j:e,i:a,columnGroupIndex:g,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:i,elSeries:v,x:r,y:o,series:t,barHeight:D,barWidth:k,elDataLabelsWrap:y,elGoalsMarkers:m,type:"bar",visibleSeries:g,classes:X}))}s.globals.seriesXvalues[b]=p,s.globals.seriesYvalues[b]=x,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),i.add(v)}return c&&this.settleHeldMirrors(),i}settleHeldMirrors(){const t=this.w;if(!p.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&P.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,i,r,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,r=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)),i=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:i,zeroW:r}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,b,c,u,g;const p=this.w,x=r+o*e;let f;const v=t.i,y=t.j,m=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][y];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][y]<0?t=(null==(d=this.series[v])?void 0:d[y])>=0?this.groupCtx.prevX[I-1][y]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][y]:this.groupCtx.prevXVal[I-1][y]>=0&&(t=(null==(b=this.series[v])?void 0:b[y])>=0?this.groupCtx.prevX[I-1][y]:this.groupCtx.prevX[I-1][y]-w+2*(this.isReversed?w:0)),f=t}else f=a;i=null===(null==(c=this.series[v])?void 0:c[y])?f:f+(null==(u=this.series[v])?void 0:u[y])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[v])?void 0:g[y])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:v,j:y,w:p});return this.barHelpers.barBackground({j:y,i:v,y1:x,y2:e,elSeries:h}),r+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,m,y,C),barXPosition:f,barYPosition:x,x:i,y:r}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,b,c,u,g,p,x,f;const v=this.w,y=t.i,m=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(v.axisFlags.isXNumeric){let t=v.seriesData.seriesX[w][m];t||(t=0),e=(t-v.globals.minX)/this.xRatio-i/2*v.globals.barGroups.length}const P=e+o*i;let H,L=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)L+=isNaN(this.groupCtx.prevYF[t][m])?0:this.groupCtx.prevYF[t][m];const S=this.groupCtx.prevY.length;if(S>0&&!v.axisFlags.isXNumeric||S>0&&v.axisFlags.isXNumeric&&v.seriesData.seriesX[w-1][m]===v.seriesData.seriesX[w][m]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[S-1]&&this.groupCtx.prevY[S-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[S-t])?void 0:h[m])){e=this.groupCtx.prevY[S-t][m];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[S-a])?void 0:d[m])<0){t=(null==(b=this.series[y])?void 0:b[m])>=0?e-L+2*(this.isReversed?L:0):e;break}if((null==(c=this.groupCtx.prevYVal[S-a])?void 0:c[m])>=0){t=(null==(u=this.series[y])?void 0:u[m])>=0?e:e+L-2*(this.isReversed?L:0);break}}void 0===t&&(t=v.layout.gridHeight),H=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,S).every(t=>t.every(t=>isNaN(t)))?r:t}else H=r;s=(null==(p=this.series[y])?void 0:p[m])?H-(null==(x=this.series[y])?void 0:x[m])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[y])?void 0:f[m])/this.yRatio[I]:0):H;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:i,y1:H,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:y,j:m,w:v});return this.barHelpers.barBackground({bc:C,j:m,i:y,x1:P,x2:i,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,w,m,0),barXPosition:P,x:v.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends X{draw(t,e){var s,a,i,r,o,l,h,d,c;const u=this.w,g=new b(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.rangeData.seriesRangeStart,this.seriesRangeEnd=u.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let b=0;b<t.length;b++){let x,f;const v=u.globals.comboCharts?e[b]:b,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(v),m=g.group({class:"apexcharts-series",seriesName:P.escapeString(u.seriesData.seriesNames[v]),rel:b+1,"data:realIndex":v});w.addCollapsedClassToSeries(this.w,m,v),t[b].length>0&&(this.visibleI=this.visibleI+1);let C=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[v][0],C=v);const I=this.barHelpers.initialPositions(v),{y:H,zeroW:L,x:S,zeroH:D}=I;let k=null!=(s=I.barWidth)?s:0,R=null!=(a=I.barHeight)?a:0;const X=null!=(i=I.yDivision)?i:0,W=null!=(r=I.xDivision)?r:0;f=H,x=S;const A=g.group({class:"apexcharts-datalabels","data:realIndex":v}),F=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<u.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(b,e,v),a=this.seriesRangeStart[b][e],i=this.seriesRangeEnd[b][e];let r=null,g=null,p=null;const w={x:x,y:f,strokeWidth:s,elSeries:m};let P=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=u.config.series[b].data)?void 0:o[e]))break;if(this.isHorizontal){p=f+R*this.visibleI;const t=(X-R*P)/2;if(null==(h=null==(l=u.config.series[b].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:b,j:e,barYPosition:p,srty:t,barHeight:R,yDivision:X,initPositions:I});R=s.barHeight,p=s.barYPosition}r=this.drawRangeBarPaths(n({indexes:{i:b,j:e,realIndex:v},barHeight:R,barYPosition:p,zeroW:L,yDivision:X,y1:a,y2:i},w)),k=r.barWidth}else{u.axisFlags.isXNumeric&&(x=(u.seriesData.seriesX[b][e]-u.globals.minX)/this.xRatio-k/2),g=x+k*this.visibleI;const t=(W-k*P)/2;if(null==(c=null==(d=u.config.series[b].data)?void 0:d[e])?void 0:c.x){const s=this.detectOverlappingBars({i:b,j:e,barXPosition:g,srtx:t,barWidth:k,xDivision:W,initPositions:I});k=s.barWidth,g=s.barXPosition}r=this.drawRangeColumnPaths(n({indexes:{i:b,j:e,realIndex:v,translationsIndex:C},barWidth:k,barXPosition:g,zeroH:D,xDivision:W},w)),R=r.barHeight}const H=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:p,goalX:r.goalX,goalY:r.goalY,barHeight:R,barWidth:k});H&&F.add(H),f=r.y,x=r.x;const S=this.barHelpers.getPathFillColor(t,b,e,v);this.renderSeries({realIndex:v,pathFill:S.color,lineFill:S.useRangeColor?S.color:u.globals.stroke.colors[v],j:e,i:b,x:x,y:f,y1:a,y2:i,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:s,elSeries:m,series:t,barHeight:R,barWidth:k,barXPosition:g,barYPosition:p,columnGroupIndex:y,elDataLabelsWrap:A,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}p.add(m)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:i,srtx:r,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var b,c,u,g;const p=this.w;let x=[];const f=null==(c=null==(b=p.globals.seriesRangeName)?void 0:b[t])?void 0:c[e],v=null==(g=null==(u=p.config.series[t].data)?void 0:u[e])?void 0:g.x,y=Array.isArray(v)?v.join(" "):v,m=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(y),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===y&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?i+l*m:i+o*this.visibleI+l*m,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*m))):(m>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?r+h*m:r+n*this.visibleI+h*m),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*m))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:i,zeroH:r}){var o,n;const l=this.w,{i:h,j:d,realIndex:b,translationsIndex:c}=t,u=this.yRatio[c],g=this.getRangeValue(b,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=r-p/u,x=r-x/u):p=r;const v=Math.abs(x-p),y=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:b,i:b,j:d,w:l});if(f){const t=y.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(b,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:b,barWidth:a});e=t.x,i=t.barXPosition}else e+=s;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:v,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,r,b,d,c),barXPosition:i}}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:i,barHeight:r,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,b=this.preventBarOverflow(n+s/this.invertedYRatio),c=this.preventBarOverflow(n+a/this.invertedYRatio),u=this.getRangeValue(h,d),g=Math.abs(c-b),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:b,x2:c,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=u.start&&null!=u.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+=i),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:u.start<0&&u.end<0?b:c,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});
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=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={}))i.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))r.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")),b=d.__apex_Graphics,c=d.__apex_DataLabels,u=(t,e,s,a)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(i)?i:0},g=d.__apex_BrowserAPIs_BrowserAPIs,p=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)&&!!(p.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function f(t,e,s){var a,i,r,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[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 v(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 i,r;if(!x(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=v(n.map((t,s)=>function(t,e,s){var a,i;if(t.isXNumeric){const i=null==(a=t.seriesX)?void 0:a[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const r=null==(i=t.labels)?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(o,e,s))),d=v(l.map((s,a)=>f(t,e,a))),b=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!i.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(b.ordered||a)&&(b.changed||s)?{join:b,oldKeys:h,newKeys:d}:null}function m({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){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 b(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 b=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(b=i?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 c=n.style;c.transformBox="fill-box",c.transformOrigin=b;const u=Math.max(1,r||1),p=performance.now(),x=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-p)/u)),a=1-Math.pow(1-s,3),r=1-a;c.transform=i?`scaleX(${r})`:`scaleY(${r})`,c.opacity=String(1-a),s<1?g.requestAnimationFrame(x):n.parentNode.removeChild(n)};g.requestAnimationFrame(x)})}class C{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:i,y1:r,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:g,barHeight:p,barWidth:x,barXPosition:f,barYPosition:v,visibleSeries:y}=t,m=this.w,C=new b(this.barCtx.w),w=m.waterfallData&&m.waterfallData.values,I=w&&w[c]&&null!=w[c][d]?w[c][d]:null,P=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let H,L;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(H=a+x*(y+1),L=i+p*(y+1)-P):(H=a+x*y,L=i+p*y);let S=null,k=null,D=a,R=i,X={};const W=m.config.dataLabels,A=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==v&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(L=v,R=v),void 0!==f&&this.barCtx.isVerticalGroupedRangeBar&&(H=f,D=f);const O=u(W.offsetX,m,c,d),Y=u(W.offsetY,m,c,d);let B={width:0,height:0};if(m.config.dataLabels.enabled){const t=null!==I?I:m.seriesData.series[c][d];B=C.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(t,l(n({},m),{seriesIndex:c,dataPointIndex:d,w:m})):m.formatters.yLabelFormatters[0](t),parseFloat(W.style.fontSize).toString(),W.style.fontFamily,void 0,!0,W.style.fontWeight)}const j={x:a,y:i,i:h,j:d,realIndex:c,columnGroupIndex:g,bcx:H,bcy:L,barHeight:p,barWidth:x,textRects:B,strokeWidth:P,dataLabelsX:D,dataLabelsY:R,dataLabelsConfig:W,barDataLabelsConfig:A,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(X=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(j):this.calculateColumnsDataLabelsPosition(j),null!==I&&this.barCtx.isHorizontal&&"center"===A.position){const t=null==(s=null==(e=m.waterfallData.geometry)?void 0:e[c])?void 0:s[d];t&&t.horizontal&&(X.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return S=this.drawCalculatedDataLabels({x:X.dataLabelsX,y:X.dataLabelsY,val:null!==I?I:this.barCtx.isRangeBar?[r,o]:"100%"===m.config.chart.stackType?m.globals.seriesPercent[c][d]:m.seriesData.series[c][d],i:c,j:d,barWidth:x,barHeight:p,textRects:B,dataLabelsConfig:W}),m.config.chart.stacked&&F.enabled&&(k=this.drawTotalDataLabels({x:X.totalDataLabelsX,y:X.totalDataLabelsY,barWidth:x,barHeight:p,realIndex:c,j:d,textAnchor:X.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:W,barTotalDataLabelsConfig:F})),{dataLabelsPos:X,dataLabels:S,totalDataLabels:k}}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),i=s.seriesData.stackedSeriesTotalsByGroups;return a&&i&&i[a.groupIndex]?i[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:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:g,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:v,offX:y,offY:m}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:I}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=v/2;const P=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+y:l-P+h/2+y,!e.config.chart.stacked&&I>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*I)),w){const t=2;u=u+c.height/2-v/2-t}const H=e.seriesData.series[i][r]<0;let L=n;switch(this.barCtx.isReversed&&(L=n+(H?d:-d)),x.position){case"center":g=w?H?L-d/2+m:L+d/2-m:H?L-d/2+c.height/2+m:L+d/2+c.height/2-m;break;case"bottom":g=w?H?L-d+m:L+d-m:H?L-d+c.height+v+m:L+d-c.height/2+v-m;break;case"top":g=w?H?L+m:L-m:H?L-c.height/2-m:L+c.height+m}let S=L;const k=this.getTotalGroupContext(o);if((k?[k.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{S=H?Math.max(t[r],S):Math.min(t[r],S)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new b(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);s=H?S-i.height/2-m-f.offsetY+t:S+i.height+m+f.offsetY-t;const n=P;a=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(g<0?g=0+v:g+c.height/3>e.layout.gridHeight&&(g=e.layout.gridHeight-v)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:v}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,I;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+v-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+v-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*m);let P="start";const H=s.seriesData.series[i][r]<0;let L=a;if(this.barCtx.isReversed&&(L=a+(H?-h:h),P=H?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+f;else switch(p.position){case"center":c=H?L+h/2-f:Math.max(d.width/2,L-h/2)+f;break;case"bottom":c=H?L+h-u-f:L-h+u+f;break;case"top":c=H?L-u-f:L-u+f}let S=L;const k=this.getTotalGroupContext(o);if((k?[k.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{S=H?Math.min(t[r],S):Math.max(t[r],S)})}),this.drawsStackedTotal(o)&&x.enabled){const t=new b(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);H?(w=S-u-f-x.offsetX,P="end"):w=S+f+x.offsetX+(this.barCtx.isReversed?-(h+u):u),I=C-d.height/2+t.height/2+x.offsetY+u,s.globals.barGroups.length>1&&!k&&(I-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=H&&"middle"!==g.textAnchor?"start"===g.textAnchor?"end":"start":g.textAnchor;let e;e="vertical"===p.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===p.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:C,totalDataLabelsX:w,totalDataLabelsY:I,totalDataLabelsAnchor:P}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var u,g,p;const x=this.w;let v="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(v=`rotate(-90, ${t}, ${e})`);const y=new c(this.barCtx.w,this.barCtx.ctx),m=new b(this.barCtx.w),C=d.formatter;let w=null;const I=x.globals.collapsedSeriesIndices.indexOf(a)>-1,P=(x.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(P){const t=null==(u=x.globals.prevDataLabels)?void 0:u.get(`${a}::${f(x,a,i)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!I||P)){w=m.group({class:"apexcharts-data-labels",transform:v});const b=x.config.dataLabels;((null==(g=b.animate)?void 0:g.enabled)||(null==(p=b.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",`${a}::${f(x,a,i)}`),w.node.setAttribute("data:dlJ",String(i)),"number"==typeof s&&isFinite(s)&&w.node.setAttribute("data:dlVal",String(s)));let c="";void 0!==s&&(c=C(s,l(n({},x),{seriesIndex:a,dataPointIndex:i,w:x}))),!s&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(c="");const u=x.seriesData.series[a][i]<0,I=x.config.plotOptions.bar.dataLabels.position;if("vertical"===x.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=u?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=u?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<m.getTextRects(c,parseFloat(d.style.fontSize).toString()).width&&(c="")}x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!P&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(c=""):r.height/1.6>Math.abs(o)&&(c=""));const H=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?H.textAnchor="end":"end"===d.textAnchor&&(H.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:c,i:a,j:i,parent:w,dataLabelsConfig:H,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new b(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){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 b=this.w.config.dataLabels;if((null==(l=b.animate)?void 0:l.enabled)||(null==(h=b.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);c.node.setAttribute("data:dlTotalKey",`${t}::${f(this.w,i,r)}`),c.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const w=d.__apex_Series,I=d.__apex_Fill,P=d.__apex_Utils;function H(t){var e,s,a,i,r,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(i=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class L{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),P.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,i=1/0;for(;;){let t=1/0,r=-1;for(let a=0;a<e.length;a++){const i=e[a];for(;s[a]<i.length&&"number"!=typeof i[s[a]];)s[a]++;if(s[a]>=i.length)continue;const o=i[s[a]];o==o?o<t&&(t=o,r=a):(s[a]++,a--)}if(-1===r)break;if(s[r]++,a==a){const e=t-a;e>0&&e<i&&(i=e)}a=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let s,a,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let b=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||H(e))&&(b=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/b,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/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=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/b*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+P.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:i,xDivision:r,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 i;const r=this.w,o=new I(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==(i=r.config.series[e].data[s])?void 0:i.fill),b=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let c;b&&b.color&&(n=b.color,c=b.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:c,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[a]:r.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 i=s.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=a.order[e];if(!r)return null;const o=s.globals.colors[r[0]],n=s.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.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,i=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.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,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(a?"top":"none"));if(a)return o;const n="last"===s.config.plotOptions.bar.borderRadiusWhenStacked,l=n?"top":"both",h=n?"bottom":"both",d=n?"none":"bottom",b=n?"none":"top";for(const e of this.getStackedSeriesIndices(i))for(let s=0;s<r;s++){const a=[],i=[];for(const r of e){const e=t[r][s];e>0?a.push(r):e<0&&i.push(r)}if(a.length>0&&0===i.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const i of a)o[i][s]=i===t?d:i===e?"top":"none"}else if(i.length>0&&0===a.length)if(1===i.length)o[i[0]][s]=h;else{const t=Math.min(...i),e=Math.max(...i);for(const a of i)o[a][s]=a===t?b:a===e?"bottom":"none"}else if(a.length>0&&i.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new b(this.barCtx.w),h=new w(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!==i?i:0,void 0!==a?a:n.layout.gridWidth,void 0!==r?r: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:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,g,p;const x=new b(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,v=e;(null==(u=c.config.series[l].data[d])?void 0:u.columnWidthOffset)&&(v=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const y=i/2,m=v+y,C=v+f-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-y*w,a+=.001+y*w;const I=x.line(C,s),P="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",H=x.move(m,s)+x.line(m,a)+x.line(C,a)+I+P;let L=H;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let S=null;const k=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(k?S=k:c.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(l,d,L,H)),null==S&&(S=x.move(m,s)+x.line(m,s)+I+I+I+I+I+x.line(m,s)+P),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:S,drawnBox:{x1:m,x2:C,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new b(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,g=u(s[a][i]),p=i===s[a].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:g:u(s[a][i+1]);const v=o/2,y=t+v,m=t+e-v,C=c-g,w=c+g,I=c-f,P=c+f,H=d.move(C,y)+d.line(w,y)+d.line(P,m)+d.line(I,m)+" Z";let L=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return S?L=S:n.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(r,i,H)),null==L&&(L=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:H,pathFrom:L,x:w,x1:C,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||s<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const a=n/r,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:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new b(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,g=t+u,p=t+e-u,x=c-s,f=c+s,v=c-a,y=c+a,m=d.move(x,g)+d.line(f,g)+d.line(y,p)+d.line(v,p)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,m)),null==C&&(C=d.move(c,g)+d.line(c,g)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:m,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,g,p;const x=new b(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,v=e;(null==(u=c.config.series[l].data[d])?void 0:u.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,v=e+c.config.series[l].data[d].barHeightOffset);const y=i/2,m=f+y,C=f+v-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+y*w,a+=.001-y*w;const I=this.barCtx.isFunnel,P=I?(s+a)/2:s,H=x.line(s,C),L="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=x.move(s,m)+x.line(a,m)+x.line(a,C)+H+L;let k=S;"none"!==this.arrBorderRadius[l][d]&&(k=x.roundPathCorners(k,c.config.plotOptions.bar.borderRadius));let D=null;const R=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(R?D=R:c.globals.previousPaths.length>0&&(D=this.barCtx.getPreviousPath(l,d,k,S)),null==D){const t=I?x.line(P,C):H;D=x.move(P,m)+x.line(P,m)+t+t+t+t+t+x.line(P,m)+L}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:k,pathFrom:D,drawnBox:{x1:s,x2:a,y1:m,y2:C}}}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 i=a?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),i}getGoalValues(t,e,s,a,i,r){const o=this.w,h=[],d=(a,i)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,r,!1),attrs:i})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][i]&&Array.isArray(o.seriesData.seriesGoals[a][i])&&o.seriesData.seriesGoals[a][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,i);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 r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const b=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!b.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,i,t.index),color:b.colorFromMarker?t.color:Array.isArray(b.style.colors)?b.style.colors[t.index]||b.style.colors[0]:b.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],i=s.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&a.push({value:r,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[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 i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:i,barHeight:r}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new b(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:r/2,a=e+s+r/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:i/2,a=t+s+i/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 b(s),i=s.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*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:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,u=l+e.barHeight,g=new b(this.barCtx.w),p=new P,x=g.move(n,u)+g.line(o,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,P.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 i=0,r=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&&i++,s<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}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 i=a.indexOf(s);return i<0&&(a.push(s),i=a.length-1),{groupIndex:s,columnGroupIndex:i}}}const S=d.__apex_CoreUtils,k=d.__apex_Filters,D=d.__apex_Animations_computeStagger;class R{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)/R.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*R.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 i=a.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class X{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 w(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new S(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new L(this)}draw(t,e){var s,a,i;const r=this.w,o=new b(this.w),h=new S(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"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,b=0;h<t.length;h++,b++){let c,u;const g=[],p=[],x=r.globals.comboCharts?e[h]:h,{columnGroupIndex:v}=this.barHelpers.getGroupIndex(x),y=o.group({class:"apexcharts-series",rel:h+1,seriesName:P.escapeString(r.seriesData.seriesNames[x]),"data:realIndex":x});w.addCollapsedClassToSeries(this.w,y,x),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const C=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const I=this.barHelpers.initialPositions(x),{y:H,yDivision:L,zeroW:S,x:D,xDivision:R,zeroH:X}=I;let W=I.barHeight,A=I.barWidth;u=H,c=D,this.isHorizontal||p.push(c+(null!=A?A:0)/2);const F=o.group({class:"apexcharts-datalabels","data:realIndex":x});r.globals.delayedElements.push({el:F.node,holdUntilComplete:!(null==(s=r.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(x)}),F.node.classList.add("apexcharts-element-hidden");const O=o.group({class:"apexcharts-bar-goals-markers"}),Y=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:Y.node}),Y.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,x);let o=null;const d={indexes:{i:h,j:e,realIndex:x,translationsIndex:C,bc:b},x:c,y:u,strokeWidth:s,elSeries:y};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:W,zeroW:S,yDivision:L})),A=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:R,barWidth:A,zeroH:X})),W=this.series[h][e]/this.yRatio[C]);const f=this.barHelpers.getPathFillColor(t,h,e,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=r.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof f.color&&-1===(null==(i=f.color)?void 0:i.indexOf("url"))?f.color:P.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:x,j:e});if(Y.add(t),r.config.chart.dropShadow.enabled){new k(this.w).dropShadow(t,r.config.chart.dropShadow,x)}}this.pathArr.push(o);const m=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:W,barWidth:A});m&&O.add(m),u=o.y,c=o.x,e>0&&p.push(c+(null!=A?A:0)/2),g.push(u),this.renderSeries(l(n({realIndex:x,pathFill:f.color},f.useRangeColor?{lineFill:f.color}:{}),{j:e,i:h,columnGroupIndex:v,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:y,x:c,y:u,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:W),barWidth:Math.abs(o.barWidth?o.barWidth:A),elDataLabelsWrap:F,elGoalsMarkers:O,elBarShadows:Y,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=g,r.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(f(r,x,s));m({w:r,elSeries:y,record:this._prevRecord(x),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(y)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:u,y2:g,series:p,barHeight:x,barWidth:v,barXPosition:y,barYPosition:m,elDataLabelsWrap:w,elGoalsMarkers:I,elBarShadows:P,visibleSeries:H,type:L,classes:S}){var R,X,W,A,F,O,Y;const B=this.w,j=new b(this.w,this.ctx),T=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,j);let z=!1;const G=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,j.setupEventDelegation(h,`.apexcharts-${L}-area`)),!s){let e=function(t){const e=B.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:B.seriesData.series[t][a],dataPointIndex:a,w:B}):s};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];s=this.barOptions.distributed?B.globals.stroke.colors[a]:i}const M=B.config.chart.animations,_=M.animateGradually;let N=0,V=0;if(_&&!1!==_.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=_.delay||0,s=Math.min(e,.5*M.speed/Math.max(1,t));V=D({style:"sequential",index:a,baseDelay:s}),B.config.chart.stacked&&!B.globals.dataChanged&&(V+=i*s*.5);N=V/(e||1)}const E=new C(this).handleBarDataLabels({x:d,y:c,y1:u,y2:g,i:i,j:a,series:p,realIndex:t,columnGroupIndex:r,barHeight:x,barWidth:v,barXPosition:y,barYPosition:m,visibleSeries:H});if(V>0){const t=B.config.dataLabels;if((null==(R=t.animate)?void 0:R.enabled)||(null==(X=t.countUp)?void 0:X.enabled)){const t=String(Math.round(V));null==(A=null==(W=E.dataLabels)?void 0:W.node)||A.setAttribute("data:dlDelay",t),null==(O=null==(F=E.totalDataLabels)?void 0:F.node)||O.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(v,B.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(v,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[a]&&B.config.series[i].data[a].strokeColor&&(s=B.config.series[i].data[a].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(Y=this.ctx.morphTypeChange)?void 0:Y.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,b=r&&this.ctx.morphTypeChange.claimsTargetMark(t,a);b&&(o=n,N=0);const c=T.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:G,animationDelay:N,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${L}-area${S?` ${S}`:""}`,chartType:L,bindEventsOnPaths:!1});c.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),b&&(c.node.setAttribute("opacity","0"),c.node.setAttribute("data-piece-hidden","1"));const p=B.config.forecastDataPoints;p.count>0&&a>=B.globals.dataPoints-p.count&&(c.node.setAttribute("stroke-dasharray",p.dashArray),c.node.setAttribute("stroke-width",p.strokeWidth),c.node.setAttribute("fill-opacity",p.fillOpacity)),void 0!==u&&void 0!==g&&(c.attr("data-range-y1",u),c.attr("data-range-y2",g));new k(this.w).setSelectionFilter(c,t,a),h.add(c),c.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:B.seriesData.series[i][a],barHeight:x,barWidth:v,"data:pathKey":f(B,t,a)}),"canvas"===T.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:v}),null!==E.dataLabels&&w.add(E.dataLabels),E.totalDataLabels&&w.add(E.totalDataLabels),h.add(w),I&&h.add(I),P&&h.add(P)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let b;if(l.axisFlags.isXNumeric)b=(r=(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),b=r+e*this.visibleI,b-=e*s}else b=r+e*this.visibleI;const c=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!u;if(u)b=u.y,e=u.height;else if(this.isFunnel&&!c){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=u?this.barHelpers.getPyramidPaths({barYPosition:b,barHeight:e,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):c?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:b,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(c||g)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=b),this.barHelpers.barBackground({j:d,i:h,y1:b-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:b,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,b=t.i,c=t.j,u=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:b,j:c});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*s}else g=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[b][c],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:b,j:c,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:u,j:c,i:b,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const i=this.w;let r=s;return i.seriesData.seriesX[s].length||(r=i.globals.maxValsInArrayIndex),P.isNumber(i.seriesData.seriesX[r][a])&&(t=R.dataXToPx(i,i.seriesData.seriesX[r][a])-e*this.seriesLen/2),{barXPosition:t+(H(i)?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 i=e.globals.previousPaths[a];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(s=i)}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 i=!1;if(x(a)&&a.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(f(a,t,s))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}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 i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return x(i)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(f(i,t,e));s?o=s.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=X.pathCommandCount(o),e=X.pathCommandCount(s);if(t===e)return o;const r=new b(i),n=t=>{const e=X.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=r.roundPathCorners(o,0);if(X.pathCommandCount(t)===e){if(l&&a){const t=r.roundPathCorners(a,0);X.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(s,0);if(X.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=X.squareLike(o),s=e?r.roundPathCorners(e,0):null;if(s&&X.pathCommandCount(s)===t)return s}return o}}}return n&&x(i)?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 i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),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=X.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,b,c;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[b,c]=l(o[1],i,r)):(b=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,c=b===i?r:i,[h,d]=l(o[0],s,a));const u=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${b} L ${h} ${c} L ${d} ${c} L ${d} ${b}${u}`:`M ${h} ${b} L ${d} ${b} L ${d} ${c} L ${h} ${c}${u}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const i=this._prevKeyedPaths(t),r=i?i.get(f(s,t,e)):a.paths[e];return r?!!r.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:X,column:X,barStacked:class extends X{draw(t,e){const s=this.w;this.graphics=new b(this.w),this.bar=new X(this.w,this.ctx,this.xyRatios);const a=new S(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 i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let c=!1;for(let a=0,h=0;a<t.length;a++,h++){const b=s.globals.comboCharts?e[a]:a,{groupIndex:u,columnGroupIndex:g}=this.barHelpers.getGroupIndex(b);this.groupCtx=this[s.labelData.seriesGroups[u]];const p=[],x=[];let f=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],f=b),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let v=this.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(s.seriesData.seriesNames[b]),rel:a+1,"data:realIndex":b});w.addCollapsedClassToSeries(this.w,v,b);const y=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":b});w.addCollapsedClassToSeries(this.w,y,b),(s.globals.collapsingSeriesIndices||[]).indexOf(b)>-1&&y.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const m=this.graphics.group({class:"apexcharts-bar-goals-markers"}),C=this.initialPositions(r,o,void 0,void 0,void 0,void 0,f),{xDivision:I,yDivision:H,zeroH:L,zeroW:S}=C;let k=C.barHeight,D=C.barWidth;o=C.y,r=C.x,s.globals.barHeight=k,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(()=>L),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const i=this.barHelpers.getStrokeWidth(a,e,b),C={indexes:{i:a,j:e,realIndex:b,translationsIndex:f,bc:h},strokeWidth:i,x:r,y:o,elSeries:v,columnGroupIndex:g,seriesGroup:s.labelData.seriesGroups[u]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},C),{zeroW:S,barHeight:k,yDivision:H})),D=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},C),{xDivision:I,barWidth:D,zeroH:L})),k=this.series[a][e]/this.yRatio[f]);const P=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:k,barWidth:D});P&&m.add(P),o=w.y,r=w.x,p.push(r),x.push(o);const R=this.barHelpers.getPathFillColor(t,a,e,b);let X="";const W=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",A="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&&!A&&this.getPreviousFlip(b,e);(A||F)&&(X=W),F&&(X+=" apexcharts-flip-held",c=!0),v=this.renderSeries(l(n({realIndex:b,pathFill:R.color},R.useRangeColor?{lineFill:R.color}:{}),{j:e,i:a,columnGroupIndex:g,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:i,elSeries:v,x:r,y:o,series:t,barHeight:k,barWidth:D,elDataLabelsWrap:y,elGoalsMarkers:m,type:"bar",visibleSeries:g,classes:X}))}s.globals.seriesXvalues[b]=p,s.globals.seriesYvalues[b]=x,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),i.add(v)}return c&&this.settleHeldMirrors(),i}settleHeldMirrors(){const t=this.w;if(!p.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&P.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,i,r,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,r=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)),i=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:i,zeroW:r}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,b,c,u,g;const p=this.w,x=r+o*e;let f;const v=t.i,y=t.j,m=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][y];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][y]<0?t=(null==(d=this.series[v])?void 0:d[y])>=0?this.groupCtx.prevX[I-1][y]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][y]:this.groupCtx.prevXVal[I-1][y]>=0&&(t=(null==(b=this.series[v])?void 0:b[y])>=0?this.groupCtx.prevX[I-1][y]:this.groupCtx.prevX[I-1][y]-w+2*(this.isReversed?w:0)),f=t}else f=a;i=null===(null==(c=this.series[v])?void 0:c[y])?f:f+(null==(u=this.series[v])?void 0:u[y])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[v])?void 0:g[y])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:v,j:y,w:p});return this.barHelpers.barBackground({j:y,i:v,y1:x,y2:e,elSeries:h}),r+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,m,y,C),barXPosition:f,barYPosition:x,x:i,y:r}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,b,c,u,g,p,x,f;const v=this.w,y=t.i,m=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(v.axisFlags.isXNumeric){let t=v.seriesData.seriesX[w][m];t||(t=0),e=(t-v.globals.minX)/this.xRatio-i/2*v.globals.barGroups.length}const P=e+o*i;let H,L=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)L+=isNaN(this.groupCtx.prevYF[t][m])?0:this.groupCtx.prevYF[t][m];const S=this.groupCtx.prevY.length;if(S>0&&!v.axisFlags.isXNumeric||S>0&&v.axisFlags.isXNumeric&&v.seriesData.seriesX[w-1][m]===v.seriesData.seriesX[w][m]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[S-1]&&this.groupCtx.prevY[S-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[S-t])?void 0:h[m])){e=this.groupCtx.prevY[S-t][m];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[S-a])?void 0:d[m])<0){t=(null==(b=this.series[y])?void 0:b[m])>=0?e-L+2*(this.isReversed?L:0):e;break}if((null==(c=this.groupCtx.prevYVal[S-a])?void 0:c[m])>=0){t=(null==(u=this.series[y])?void 0:u[m])>=0?e:e+L-2*(this.isReversed?L:0);break}}void 0===t&&(t=v.layout.gridHeight),H=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,S).every(t=>t.every(t=>isNaN(t)))?r:t}else H=r;s=(null==(p=this.series[y])?void 0:p[m])?H-(null==(x=this.series[y])?void 0:x[m])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[y])?void 0:f[m])/this.yRatio[I]:0):H;const k=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:i,y1:H,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:y,j:m,w:v});return this.barHelpers.barBackground({bc:C,j:m,i:y,x1:P,x2:i,elSeries:l}),{pathTo:k.pathTo,pathFrom:k.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,w,m,0),barXPosition:P,x:v.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends X{draw(t,e){var s,a,i,r,o,l,h,d,c;const u=this.w,g=new b(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.rangeData.seriesRangeStart,this.seriesRangeEnd=u.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let b=0;b<t.length;b++){let x,f;const v=u.globals.comboCharts?e[b]:b,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(v),m=g.group({class:"apexcharts-series",seriesName:P.escapeString(u.seriesData.seriesNames[v]),rel:b+1,"data:realIndex":v});w.addCollapsedClassToSeries(this.w,m,v),t[b].length>0&&(this.visibleI=this.visibleI+1);let C=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[v][0],C=v);const I=this.barHelpers.initialPositions(v),{y:H,zeroW:L,x:S,zeroH:k}=I;let D=null!=(s=I.barWidth)?s:0,R=null!=(a=I.barHeight)?a:0;const X=null!=(i=I.yDivision)?i:0,W=null!=(r=I.xDivision)?r:0;f=H,x=S;const A=g.group({class:"apexcharts-datalabels","data:realIndex":v}),F=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<u.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(b,e,v),a=this.seriesRangeStart[b][e],i=this.seriesRangeEnd[b][e];let r=null,g=null,p=null;const w={x:x,y:f,strokeWidth:s,elSeries:m};let P=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=u.config.series[b].data)?void 0:o[e]))break;if(this.isHorizontal){p=f+R*this.visibleI;const t=(X-R*P)/2;if(null==(h=null==(l=u.config.series[b].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:b,j:e,barYPosition:p,srty:t,barHeight:R,yDivision:X,initPositions:I});R=s.barHeight,p=s.barYPosition}r=this.drawRangeBarPaths(n({indexes:{i:b,j:e,realIndex:v},barHeight:R,barYPosition:p,zeroW:L,yDivision:X,y1:a,y2:i},w)),D=r.barWidth}else{u.axisFlags.isXNumeric&&(x=(u.seriesData.seriesX[b][e]-u.globals.minX)/this.xRatio-D/2),g=x+D*this.visibleI;const t=(W-D*P)/2;if(null==(c=null==(d=u.config.series[b].data)?void 0:d[e])?void 0:c.x){const s=this.detectOverlappingBars({i:b,j:e,barXPosition:g,srtx:t,barWidth:D,xDivision:W,initPositions:I});D=s.barWidth,g=s.barXPosition}r=this.drawRangeColumnPaths(n({indexes:{i:b,j:e,realIndex:v,translationsIndex:C},barWidth:D,barXPosition:g,zeroH:k,xDivision:W},w)),R=r.barHeight}const H=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:p,goalX:r.goalX,goalY:r.goalY,barHeight:R,barWidth:D});H&&F.add(H),f=r.y,x=r.x;const S=this.barHelpers.getPathFillColor(t,b,e,v);this.renderSeries({realIndex:v,pathFill:S.color,lineFill:S.useRangeColor?S.color:u.globals.stroke.colors[v],j:e,i:b,x:x,y:f,y1:a,y2:i,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:s,elSeries:m,series:t,barHeight:R,barWidth:D,barXPosition:g,barYPosition:p,columnGroupIndex:y,elDataLabelsWrap:A,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}p.add(m)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:i,srtx:r,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var b,c,u,g;const p=this.w;let x=[];const f=null==(c=null==(b=p.globals.seriesRangeName)?void 0:b[t])?void 0:c[e],v=null==(g=null==(u=p.config.series[t].data)?void 0:u[e])?void 0:g.x,y=Array.isArray(v)?v.join(" "):v,m=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(y),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===y&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?i+l*m:i+o*this.visibleI+l*m,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*m))):(m>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?r+h*m:r+n*this.visibleI+h*m),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*m))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:i,zeroH:r}){var o,n;const l=this.w,{i:h,j:d,realIndex:b,translationsIndex:c}=t,u=this.yRatio[c],g=this.getRangeValue(b,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=r-p/u,x=r-x/u):p=r;const v=Math.abs(x-p),y=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:b,i:b,j:d,w:l});if(f){const t=y.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(b,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:b,barWidth:a});e=t.x,i=t.barXPosition}else e+=s;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:v,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,r,b,d,c),barXPosition:i}}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:i,barHeight:r,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,b=this.preventBarOverflow(n+s/this.invertedYRatio),c=this.preventBarOverflow(n+a/this.invertedYRatio),u=this.getRangeValue(h,d),g=Math.abs(c-b),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:b,x2:c,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=u.start&&null!=u.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+=i),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:u.start<0&&u.end<0?b:c,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/rangeBar.esm.js
CHANGED
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* ApexCharts v7.
|
|
21
|
+
* ApexCharts v7.4.0
|
|
22
22
|
* (c) 2018-2026 ApexCharts
|
|
23
23
|
*/
|
|
24
24
|
import * as _core from "apexcharts/core";
|
|
@@ -1311,6 +1311,14 @@ class Helpers {
|
|
|
1311
1311
|
* second at the top, and nothing else touched. Stacked totals already resolve
|
|
1312
1312
|
* per group (see drawsStackedTotal, #4173); corners never got the same fix.
|
|
1313
1313
|
*
|
|
1314
|
+
* plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
|
|
1315
|
+
* caps both the baseline and the far end, 'last' only the far end (#4845).
|
|
1316
|
+
*
|
|
1317
|
+
* A single-data-point chart used to hand its baseline segment 'top' (and a
|
|
1318
|
+
* solo segment 'top' instead of 'both'), which on a horizontal stack rounded
|
|
1319
|
+
* the first segment on its INNER edge and left a pill in the middle of the
|
|
1320
|
+
* bar (#4845). One data point is resolved like any other now.
|
|
1321
|
+
*
|
|
1314
1322
|
* @param {any[]} series
|
|
1315
1323
|
* @returns {string[][]}
|
|
1316
1324
|
*/
|
|
@@ -1325,9 +1333,11 @@ class Helpers {
|
|
|
1325
1333
|
() => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
|
|
1326
1334
|
);
|
|
1327
1335
|
if (alwaysApplyRadius) return output;
|
|
1328
|
-
const
|
|
1329
|
-
const
|
|
1330
|
-
const
|
|
1336
|
+
const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
|
|
1337
|
+
const soloPositive = lastOnly ? "top" : "both";
|
|
1338
|
+
const soloNegative = lastOnly ? "bottom" : "both";
|
|
1339
|
+
const positiveBase = lastOnly ? "none" : "bottom";
|
|
1340
|
+
const negativeBase = lastOnly ? "none" : "top";
|
|
1331
1341
|
for (const stack of this.getStackedSeriesIndices(numSeries)) {
|
|
1332
1342
|
for (let j = 0; j < numColumns; j++) {
|
|
1333
1343
|
const positiveIndices = [];
|
|
@@ -1339,22 +1349,22 @@ class Helpers {
|
|
|
1339
1349
|
}
|
|
1340
1350
|
if (positiveIndices.length > 0 && negativeIndices.length === 0) {
|
|
1341
1351
|
if (positiveIndices.length === 1) {
|
|
1342
|
-
output[positiveIndices[0]][j] =
|
|
1352
|
+
output[positiveIndices[0]][j] = soloPositive;
|
|
1343
1353
|
} else {
|
|
1344
1354
|
const first = positiveIndices[0];
|
|
1345
1355
|
const last = positiveIndices[positiveIndices.length - 1];
|
|
1346
1356
|
for (const i of positiveIndices) {
|
|
1347
|
-
output[i][j] = i === first ?
|
|
1357
|
+
output[i][j] = i === first ? positiveBase : i === last ? "top" : "none";
|
|
1348
1358
|
}
|
|
1349
1359
|
}
|
|
1350
1360
|
} else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
|
|
1351
1361
|
if (negativeIndices.length === 1) {
|
|
1352
|
-
output[negativeIndices[0]][j] =
|
|
1362
|
+
output[negativeIndices[0]][j] = soloNegative;
|
|
1353
1363
|
} else {
|
|
1354
|
-
const
|
|
1355
|
-
const
|
|
1364
|
+
const nearest = Math.min(...negativeIndices);
|
|
1365
|
+
const farthest = Math.max(...negativeIndices);
|
|
1356
1366
|
for (const i of negativeIndices) {
|
|
1357
|
-
output[i][j] = i ===
|
|
1367
|
+
output[i][j] = i === nearest ? negativeBase : i === farthest ? "bottom" : "none";
|
|
1358
1368
|
}
|
|
1359
1369
|
}
|
|
1360
1370
|
} else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
|
package/dist/scatter.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.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/scatter.esm.js
CHANGED