apexcharts 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +271 -173
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +35 -0
  6. package/dist/apexcharts.esm.js +1722 -1527
  7. package/dist/apexcharts.full.js +1459 -1075
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +994 -715
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +994 -715
  13. package/dist/area.common.js +2 -2
  14. package/dist/area.esm.js +91 -40
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +433 -394
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +364 -322
  20. package/dist/bubble.common.js +2 -2
  21. package/dist/bubble.esm.js +91 -40
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +364 -322
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +433 -394
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +271 -173
  29. package/dist/donut.common.js +1 -1
  30. package/dist/donut.esm.js +1 -1
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +433 -394
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +250 -187
  35. package/dist/features/annotations.common.js +1 -1
  36. package/dist/features/annotations.esm.js +1 -1
  37. package/dist/features/annotations.js +1 -1
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +2 -2
  42. package/dist/features/drilldown.esm.js +4 -2
  43. package/dist/features/drilldown.js +2 -2
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +1 -1
  48. package/dist/features/exports.esm.js +1 -1
  49. package/dist/features/exports.js +1 -1
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +2 -2
  54. package/dist/features/highlight-filter.esm.js +14 -9
  55. package/dist/features/highlight-filter.js +2 -2
  56. package/dist/features/history.common.js +1 -1
  57. package/dist/features/history.esm.js +1 -1
  58. package/dist/features/history.js +1 -1
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +2 -2
  63. package/dist/features/keyboard.esm.js +97 -145
  64. package/dist/features/keyboard.js +2 -2
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +63 -43
  67. package/dist/features/legend.js +2 -2
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +1 -1
  78. package/dist/features/morph.esm.js +1 -1
  79. package/dist/features/morph.js +1 -1
  80. package/dist/features/perspectives.common.js +1 -1
  81. package/dist/features/perspectives.esm.js +1 -1
  82. package/dist/features/perspectives.js +1 -1
  83. package/dist/features/raincloud.common.js +1 -1
  84. package/dist/features/raincloud.esm.js +1 -1
  85. package/dist/features/raincloud.js +1 -1
  86. package/dist/features/renderer-canvas.common.js +2 -2
  87. package/dist/features/renderer-canvas.esm.js +2 -1
  88. package/dist/features/renderer-canvas.js +2 -2
  89. package/dist/features/stats.common.js +1 -1
  90. package/dist/features/stats.esm.js +1 -1
  91. package/dist/features/stats.js +1 -1
  92. package/dist/features/storyboard.common.js +1 -1
  93. package/dist/features/storyboard.esm.js +1 -1
  94. package/dist/features/storyboard.js +1 -1
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +3 -2
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +92 -2
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +83 -47
  103. package/dist/features/trellis.js +2 -2
  104. package/dist/features/waterfall.common.js +1 -1
  105. package/dist/features/waterfall.esm.js +1 -1
  106. package/dist/features/waterfall.js +1 -1
  107. package/dist/features/weave.common.js +1 -1
  108. package/dist/features/weave.esm.js +1 -1
  109. package/dist/features/weave.js +1 -1
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +950 -795
  112. package/dist/heatmap.common.js +2 -2
  113. package/dist/heatmap.esm.js +3 -17
  114. package/dist/heatmap.js +2 -2
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +433 -394
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +54 -38
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +2 -2
  121. package/dist/line.esm.js +91 -40
  122. package/dist/line.js +2 -2
  123. package/dist/locales/en.json +2 -1
  124. package/dist/locales/ro.json +3 -2
  125. package/dist/pictograms.common.js +1 -1
  126. package/dist/pictograms.esm.js +1 -1
  127. package/dist/pictograms.js +1 -1
  128. package/dist/pie.common.js +1 -1
  129. package/dist/pie.esm.js +1 -1
  130. package/dist/pie.js +1 -1
  131. package/dist/polarArea.common.js +1 -1
  132. package/dist/polarArea.esm.js +1 -1
  133. package/dist/radar.common.js +2 -2
  134. package/dist/radar.esm.js +5 -4
  135. package/dist/radar.js +2 -2
  136. package/dist/radialBar.common.js +1 -1
  137. package/dist/radialBar.esm.js +1 -1
  138. package/dist/radialBar.js +1 -1
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +72 -26
  141. package/dist/rangeArea.common.js +2 -2
  142. package/dist/rangeArea.esm.js +91 -40
  143. package/dist/rangeBar.common.js +2 -2
  144. package/dist/rangeBar.esm.js +433 -394
  145. package/dist/scatter.common.js +2 -2
  146. package/dist/scatter.esm.js +91 -40
  147. package/dist/streamgraph.common.js +2 -2
  148. package/dist/streamgraph.esm.js +93 -41
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +103 -93
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +105 -86
  154. package/dist/treemap.js +2 -2
  155. package/dist/unit-shapes.common.js +1 -1
  156. package/dist/unit-shapes.esm.js +1 -1
  157. package/dist/unit-shapes.js +1 -1
  158. package/dist/unit.common.js +2 -2
  159. package/dist/unit.esm.js +280 -202
  160. package/dist/unit.js +2 -2
  161. package/dist/violin.common.js +2 -2
  162. package/dist/violin.esm.js +72 -26
  163. package/dist/violin.js +2 -2
  164. package/dist/waterfall.common.js +2 -2
  165. package/dist/waterfall.esm.js +432 -393
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +13 -6
  168. package/src/assets/apexcharts.css +35 -0
  169. package/src/charts/Bar.js +62 -55
  170. package/src/charts/BarStacked.js +80 -88
  171. package/src/charts/BoxCandleStick.js +28 -31
  172. package/src/charts/Icicle.js +37 -37
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Radar.js +5 -7
  175. package/src/charts/RangeBar.js +47 -43
  176. package/src/charts/Sunburst.js +101 -98
  177. package/src/charts/Treemap.js +108 -66
  178. package/src/charts/Unit.js +368 -250
  179. package/src/charts/Violin.js +48 -30
  180. package/src/charts/common/Breadcrumb.js +2 -2
  181. package/src/charts/common/Hierarchy.js +32 -11
  182. package/src/charts/common/Jitter.js +32 -7
  183. package/src/charts/common/bar/DataLabels.js +76 -81
  184. package/src/charts/common/bar/Helpers.js +43 -7
  185. package/src/charts/common/line/Helpers.js +12 -15
  186. package/src/charts/common/partition/NodeTooltip.js +8 -1
  187. package/src/charts/common/partition/Partition.js +33 -1
  188. package/src/charts/common/treemap/Helpers.js +3 -11
  189. package/src/locales/en.json +2 -1
  190. package/src/locales/ro.json +3 -2
  191. package/src/modules/Core.js +4 -0
  192. package/src/modules/CoreUtils.js +18 -42
  193. package/src/modules/Data.js +23 -24
  194. package/src/modules/DataLabels.js +6 -6
  195. package/src/modules/Graphics.js +62 -49
  196. package/src/modules/Markers.js +3 -1
  197. package/src/modules/Range.js +44 -29
  198. package/src/modules/RendererController.js +17 -3
  199. package/src/modules/Scales.js +32 -9
  200. package/src/modules/Series.js +39 -18
  201. package/src/modules/Theme.js +1 -1
  202. package/src/modules/ZoomPanSelection.js +119 -2
  203. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  204. package/src/modules/animations/LengthTransition.js +22 -2
  205. package/src/modules/drilldown/Breadcrumb.js +5 -2
  206. package/src/modules/helpers/Destroy.js +1 -1
  207. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  208. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  209. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  210. package/src/modules/legend/Helpers.js +2 -0
  211. package/src/modules/legend/Legend.js +11 -12
  212. package/src/modules/settings/Options.js +7 -0
  213. package/src/modules/streamgraph/StreamLabels.js +1 -0
  214. package/src/modules/tooltip/Tooltip.js +20 -4
  215. package/src/modules/tooltip/Utils.js +8 -0
  216. package/src/modules/trellis/Trellis.js +6 -0
  217. package/src/modules/trellis/TrellisChrome.js +18 -7
  218. package/src/modules/trellis/TrellisSync.js +2 -0
  219. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  220. package/src/ssr/DOMShim.js +10 -0
  221. package/src/types/internal.d.ts +9 -3
  222. package/types/apexcharts.d.ts +31 -12
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=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={}))n.call(t,s)&&a(e,s,t[s]);if(i)for(var s of i(t))r.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 c=h(require("apexcharts/core")),u=c.__apex_CoreUtils,d=c.__apex_Graphics,p=c.__apex_Fill,g=c.__apex_DataLabels,f=c.__apex_Markers,m=c.__apex_charts_Scatter,x=c.__apex_Series,y=c.__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 u(this.lineCtx.w).seriesHaveSameValues(e)){const s=t[e].slice();s[s.length-1]=s[s.length-1]+1e-6,t[e]=s}}return t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:n,j:r,prevY:a}){const l=this.w,o=[],h=[];let c=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(c=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===r&&(o.push(c),h.push(y.isNumber(e[n][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(y.isNumber(e[n][r+1])?i+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const i=this.w;for(let n=0;n<i.globals.previousPaths.length;n++){const r=i.globals.previousPaths[n];("line"===r.type||"area"===r.type)&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(s,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[n].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[n].paths[1]&&(e=i.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}previousRangeAreaPath(e){for(const t of this.w.globals.previousPaths)if("rangeArea"===t.type&&parseInt(t.realIndex,10)===parseInt(String(e),10)&&1===t.paths.length&&t.paths[0].d)return t.paths[0].d;return null}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:n,translationsIndex:r}){var a,l,o;const h=this.w,c=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(c)if(e>0){const e=this.lineCtx.stackTopAt(t,0);n=void 0===e?this.lineCtx.zeroY:e}else n=this.lineCtx.zeroY;else n=this.lineCtx.zeroY;i=n-s[e][0]/this.lineCtx.yRatio[r]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[r]:0)}else if(c&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){i=n=this.lineCtx.prevSeriesY[t][0];break}return{prevY:i,lineYPosition:n}}}function v(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const P=e=>{const t=function(e){const t=[];let s=e[0],i=e[1],n=t[0]=w(s,i),r=1;for(let a=e.length-1;r<a;r++)s=i,i=e[r+1],t[r]=.5*(n+(n=w(s,i)));return t[r]=n,t}(e),s=e.length-1,i=[];let n,r,a,l;for(let i=0;i<s;i++)a=w(e[i],e[i+1]),Math.abs(a)<1e-6?t[i]=t[i+1]=0:(n=t[i]/a,r=t[i+1]/a,l=n*n+r*r,l>9&&(l=3*a/Math.sqrt(l),t[i]=l*n,t[i+1]=l*r));for(let n=0;n<=s;n++)l=(e[Math.min(s,n+1)][0]-e[Math.max(0,n-1)][0])/(6*(1+t[n]*t[n])),i.push([l||0,t[n]*l||0]);return i},A={points(e){const t=P(e),s=e[1],i=e[0],n=[],r=t[1],a=t[0];n.push(i,[i[0]+a[0],i[1]+a[1],s[0]-r[0],s[1]-r[1],s[0],s[1]]);for(let s=2,i=t.length;s<i;s++){const i=e[s],r=t[s];n.push([i[0]-r[0],i[1]-r[1],i[0],i[1]])}return n},slice(e,t,s){const i=e.slice(t,s);if(t){if(s-t>1&&i[1].length<6){const e=i[0].length;i[1]=[2*i[0][e-2]-i[0][e-4],2*i[0][e-1]-i[0][e-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function w(e,t){return(t[1]-e[1])/(t[0]-e[0])}const k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function S(e,t){const{ax:s,bx:i,ay:n,by:r}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(k)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+i}`);continue}if("V"===e){for(const e of t)a.push(`V ${n*e+r}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+i} ${n*t[e+6]+r}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+i} ${n*t[e+1]+r}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const F=c.__apex_Animations,Y=c.__apex_BrowserAPIs_BrowserAPIs,_=c.__apex_Environment_Environment,M=c.__apex_Easing_resolveEasing,C=c.__apex_PathMorphing_parsePath,I=c.__apex_PathMorphing_arrayToPath;function j(e,t,s){if(!e||"string"!=typeof e)return null;const i=C(e);if(!i.length||"M"!==i[0][0])return null;for(let e=1;e<i.length;e++)if("M"===i[e][0])return null;let n=i,r=null;if(s){if(i.length<5)return null;if(r=i.slice(-3),n=i.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===i[i.length-1][0])return null;if(n.length!==t||n.length<2)return null;const a=n[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<n.length;e++)if(n[e][0]!==a)return null;const l=n.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:n,closing:r,segType:a,anchors:l}}function L(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function R(e,t,s){const i=e,n=[t[1],t[2]],r=[t[3],t[4]],a=[t[5],t[6]],l=L(i,n,s),o=L(n,r,s),h=L(r,a,s),c=L(l,o,s),u=L(o,h,s),d=L(c,u,s);return{first:["C",l[0],l[1],c[0],c[1],d[0],d[1]],second:["C",u[0],u[1],h[0],h[1],a[0],a[1]],mid:d}}function X(e,t,s){const i=[t[1],t[2]],n=L(e,i,s);return{first:["L",n[0],n[1]],second:["L",i[0],i[1]],mid:n}}function N(e,t){const{body:s,closing:i,segType:n,anchors:r}=e,a=r.length,l=t.length,o=e=>"C"===n?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",r[0][0],r[0][1]]];let c=0;for(;c<l&&0!==t[c];)c++;for(let e=1;e<=c;e++)h.push(o(r[0]));let u=c+1;for(let e=0;e<a-1;e++){let i=0;for(;u+i<l&&-1===t[u+i];)i++;const a=s[e+1];if(i){const t=i+1;let s=r[e],l=a;for(let e=0;e<i;e++){const i=1/(t-e),r="C"===n?R(s,l,i):X(s,l,i);h.push(r.first),s=r.mid,l=r.second}h.push(l)}else h.push(a.slice());u+=i+1}for(;u<l;)h.push(o(r[a-1])),u++;return i&&i.forEach(e=>h.push(e.slice())),h}function z(e,t,s,i,n,r){const a=j(e,i,r);if(!a)return null;const l=j(t,n,r);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:I(N(a,o)),toInterp:I(N(l,h))}}function D(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)&&!!(_.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function O(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 $(e,t,s=!1,i=!1){var n,r;if(!D(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(n=a.seriesY)?void 0:n[t],o=null==(r=e.seriesData.series)?void 0:r[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=O(l.map((e,s)=>function(e,t,s){var i,n;if(e.isXNumeric){const n=null==(i=e.seriesX)?void 0:i[t];if(n&&n.length&&null!=n[s])return"x:"+n[s]}const r=null==(n=e.labels)?void 0:n[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(a,t,s))),c=O(o.map((s,i)=>function(e,t,s){var i,n,r,a;if(null==(i=e.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(n=e.seriesData)?void 0:n.seriesX)?void 0:r[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,i))),u=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const i=new Array(t.length),n=new Set;let r=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!n.has(s.get(e))?s.get(e):-1;i[t]=o,-1!==o&&(n.add(o),o<r&&(a=!1),r=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)n.has(t)||o.push(t);return{toOld:i,exits:o,ordered:a,changed:!l}}(h,c);return(u.ordered||i)&&(u.changed||s)?{join:u,oldKeys:h,newKeys:c}:null}function T(e){var t,s;const i=e.config.chart.animations;return M(null!=(s=null==(t=i.dynamicAnimation)?void 0:t.easing)?s:i.easing)}function B(e,t,s,i,n){const r=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-r)/t));i(s(o),o),o<1?Y.requestAnimationFrame(a):n&&n()};Y.requestAnimationFrame(a)}function W(e,{elPointsMain:t,realIndex:s,speed:i}){var n,r,a,l;if(!(null==t?void 0:t.node))return!1;const o=$(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const c=null==(n=h.xPixels)?void 0:n[s],u=null==(r=h.yPixels)?void 0:r[s];if(!c||!u)return!1;const d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;const p=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],g=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],f=T(e),m=Math.max(1,i||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(t=>{var i,n,r,a,l,d,x,y,b;const v=parseInt(null!=(n=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?n:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=p[v]&&null!=g[v]?[p[v],g[v]]:null;if(-1===P||!A){const s=t.style;return s.opacity="0",void B(e,m,f,e=>{s.opacity=String(e)},()=>{s.opacity=""})}const w=(null!=(r=c[P])?r:NaN)-A[0],k=(null!=(a=u[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(k))return;const S=null!=(x=null==(d=null==(l=h.rPixels)?void 0:l[s])?void 0:d[P])?x:NaN,F=parseFloat(null!=(b=null!=(y=t.getAttribute("r"))?y:t.getAttribute("default-marker-size"))?b:""),Y=isFinite(S)&&isFinite(F)&&F>0&&Math.abs(S-F)>.25;if(!(Math.abs(w)>=.5||Math.abs(k)>=.5)&&!Y)return;const _=e=>{const s=w*(1-e),i=k*(1-e);if(Y){const n=(S+(F-S)*e)/F;t.setAttribute("transform",`translate(${s+A[0]*(1-n)}, ${i+A[1]*(1-n)}) scale(${n})`)}else t.setAttribute("transform",`translate(${s}, ${i})`)};_(0),B(e,m,f,_,()=>{t.removeAttribute("transform")})}),!0}function H(e,t,s,i){e.setAttribute("transform",`translate(${t*(1-i)}, ${s*(1-i)}) scale(${i})`)}function E(e,{type:t,realIndex:s,pathFromLine:i,pathFromArea:n,linePaths:r,areaPaths:a}){var l,o;const h=$(e,s);if(!h)return null;const{join:c,oldKeys:u,newKeys:d}=h,p=e.globals.prevStreamFrame;if(!p)return null;const g=null==(l=p.seriesY)?void 0:l[s],f=null==(o=e.seriesData.series)?void 0:o[s];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),i=[];let n=0;for(let t=0;t<e.toOld.length;t++){const r=e.toOld[t];if(-1!==r){for(;n<r;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;i.push({oldJ:r,newJ:t}),n=r+1}else i.push({oldJ:-1,newJ:t})}for(;n<t;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;return i}(c,u.length),x={};return Array.isArray(r)&&1===r.length&&i&&(x.line=z(i,r[0],m,u.length,d.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&n&&(x.area=z(n,a[0],m,u.length,d.length,!0)),x.line||x.area?x:null}class V{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,this._shapeOnly=!1}draw(e,t,s,i){var n;const r=this.w,a=this.ctx.highlightFilter,l=new d(this.w),o=r.globals.comboCharts?t:r.config.chart.type,h=l.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new u(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e,s),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const p=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);const n=r.globals.comboCharts?s[t]:t,l=this.yRatio.length>1?n:0,h=this._collapsedBaselineRow(e,t,n);this._shapeOnly=!!h,h&&((e=e.slice())[t]=h,"rangeArea"===o&&i&&((i=i.slice())[t]=h)),this._initSerieVariables(e,t,n),x.addCollapsedClassToSeries(this.w,this.elSeries,n);const c=this._buildSeriesPaths(o,e,t,n,l,s,i);this._handlePaths({type:o,realIndex:n,i:t,paths:c}),null==a||a.line(this,o,e,t,n,l,c),this.markers.flushBatch(this.elPointsMain,n),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),p.push(this.elSeries)}if(void 0!==(null==(n=r.config.series[0])?void 0:n.zIndex)&&p.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),r.config.chart.stacked)for(let e=p.length-1;e>=0;e--)h.add(p[e]);else for(let e=0;e<p.length;e++)h.add(p[e]);return h}_buildSeriesPaths(e,t,s,i,n,r,a){const h=this.w,c=[],u=[],d=[];let p=h.globals.padHorizontal+this.categoryAxisCorrection;h.axisFlags.isXNumeric&&h.seriesData.seriesX.length>0&&(p=(h.seriesData.seriesX[i][0]-h.globals.minX)/this.xRatio),d.push(p);const g=p;let f,m=this.zeroY,x=this.zeroY;m=this.lineHelpers.determineFirstPrevY({i:s,realIndex:i,series:t,prevY:m,lineYPosition:0,translationsIndex:n}).prevY,"monotoneCubic"===h.config.stroke.curve&&null===t[s][0]?c.push(null):c.push(m);const y=m;let b;"rangeArea"===e&&(b=this.lineHelpers.determineFirstPrevY({i:s,realIndex:i,series:a,prevY:x,lineYPosition:0,translationsIndex:n}),x=b.prevY,f=x,u.push(null!==c[0]?x:null));const v=this._calculatePathsFrom(i,m),P=[c[0]],A=[u[0]],w={type:e,series:t,realIndex:i,translationsIndex:n,i:s,x:p,y:1,pX:g,pY:y,pathsFrom:v,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:a},k=this._iterateOverDataPoints(o(l({},w),{iterations:"rangeArea"===e?t[s].length-1:void 0,isRangeStart:!0}));if("rangeArea"===e){const e=this._calculatePathsFrom(i,x),t=this._iterateOverDataPoints(o(l({},w),{series:a,xArrj:[p],yArrj:P,y2Arrj:A,pY:f,areaPaths:k.areaPaths,pathsFrom:e,iterations:a[s].length-1,isRangeStart:!1})),n=k.linePaths.length/2;for(let e=0;e<n;e++)k.linePaths[e]=t.linePaths[e+n]+k.linePaths[e];k.linePaths.splice(n);const r=1===k.linePaths.length?this.lineHelpers.previousRangeAreaPath(i):null;k.pathFromLine=null!=r?r:t.pathFromLine+k.pathFromLine}else/z\s*$/i.test(k.pathFromArea)||(k.pathFromArea+="z");return k}_collapsedBaselineRow(e,t,s){const i=this.w,n=i.globals;if(i.config.chart.stacked||this.pointsChart)return null;if(!Array.isArray(e[t])||0!==e[t].length)return null;if(-1===n.collapsedSeriesIndices.indexOf(s)&&-1===n.ancillaryCollapsedSeriesIndices.indexOf(s))return null;const r=i.axisFlags.isXNumeric?(i.seriesData.seriesX[s]||[]).length:n.dataPoints;if(!r)return null;const a=y.isNumber(n.minYArr[s])?n.minYArr[s]:n.minY,l=y.isNumber(n.maxYArr[s])?n.maxYArr[s]:n.maxY,o=Math.min(Math.max(0,a),l);return new Array(r).fill(y.isNumber(o)?o:0)}_initSerieVariables(e,t,s){const i=this.w,n=new d(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let r=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[r]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=i.config.series[s];if(this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:y.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom(e,t){const s=new d(this.w);let i=s.move(0,this.areaBottomY)+s.line(0,this.areaBottomY),n=i;if(this.w.globals.previousPaths.length>0){const t=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:e});i=t.pathFromLine,n=t.pathFromArea}return{prevY:t,pathFromLine:i,pathFromArea:n}}_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(s.config.chart.stacked&&Array.isArray(t)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e))for(let s=0;s<t.length;s++){const i=this._stackKey(e,s);if(null==i)continue;const n=t[s];y.isNumber(n)&&this.prevSeriesYByX.set(i,n)}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){var n,r,a,h,c,u,g;const f=this.w,m=new d(this.w),x=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,m),y=new p(this.w);this.marks=[],this.prevSeriesY.push(i.yArrj),this._recordStackTops(t,i.yArrj);let b=null;"line"!==e&&"area"!==e||!f.globals.dataChanged||(b=function(e,t,s,i){var n;const r=e.globals,a=r.prevStreamFrame;if(!a||!r.dataChanged||!(null==(n=e.axisFlags)?void 0:n.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],c=e.seriesData.series[t];if(!(l&&o&&h&&c))return null;if(l.length<3||h.length<3)return null;let u=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){u=e;break}if(-1===u)return null;const d=Math.min(l.length-u,h.length);if(d<2)return null;const p=h.length-d;if(0===u&&0===p)return null;for(let e=0;e<d;e++){if(l[u+e]!==h[e])return null;const t=o[u+e],s=c[e];if(t!==s&&(null!=t||null!=s))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let m=-1,x=-1;for(let e=0;e<d;e++)null!=g[u+e]&&null!=f[u+e]&&null!=s[e]&&null!=i[e]&&(-1===m&&(m=e),x=e);if(-1===m||x<=m)return null;const y=s[m],b=s[x],v=g[u+m],P=g[u+x];if(Math.abs(b-y)<1e-6)return null;const A=(P-v)/(b-y),w=v-A*y;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=m,S=m;for(let e=m;e<=x;e++){const t=i[e];null!=t&&null!=f[u+e]&&(t<i[k]&&(k=e),t>i[S]&&(S=e))}let F=1,Y=0;const _=i[k],M=i[S];if(Math.abs(M-_)>1e-6?(F=(f[u+S]-f[u+k])/(M-_),Y=f[u+k]-F*_):Y=f[u+k]-_,!isFinite(F)||!isFinite(Y)||F<.2||F>5)return null;const C=Math.floor((m+x)/2);if(C!==m&&C!==x&&null!=s[C]&&null!=g[u+C]){const e=A*s[C]+w;if(Math.abs(e-g[u+C])>1.5)return null;if(null!=i[C]&&null!=f[u+C]){const e=F*i[C]+Y;if(Math.abs(e-f[u+C])>1.5)return null}}return r.streamScrolled=!0,{ax:A,bx:w,ay:F,by:Y}}(f,t,i.xArrj,i.yArrj));let v=null;b||"line"!==e&&"area"!==e||(v=E(f,{type:e,realIndex:t,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),f.globals.seriesXvalues[t]=i.xArrj,f.globals.seriesYvalues[t]=i.yArrj;const P=f.config.forecastDataPoints;if(P.count>0&&"rangeArea"!==e){const e=f.globals.seriesXvalues[t][f.globals.seriesXvalues[t].length-P.count-1],s=m.drawRect(e,0,f.layout.gridWidth,f.layout.gridHeight,0);f.dom.elForecastMask.appendChild(s.node);const i=m.drawRect(0,0,e,f.layout.gridHeight,0);f.dom.elNonForecastMask.appendChild(i.node)}if(this.pointsChart)W(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),function(e,{elPointsMain:t,realIndex:s,speed:i}){if(!(null==t?void 0:t.node)||!D(e))return!1;if(-1===(e.globals.risingSeries||[]).indexOf(s))return!1;const n=t.node.querySelectorAll(".apexcharts-marker");if(!n.length)return!1;const r=T(e);t.node.classList.remove("apexcharts-element-hidden"),n.forEach(t=>{const s=t.getBBox(),n=s.x+s.width/2,a=s.y+s.height/2;H(t,n,a,0),B(e,Math.max(1,i||1),r,e=>H(t,n,a,e),()=>t.removeAttribute("transform"))})}(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),(f.seriesData.series[t]||[]).length||function(e,{elPointsMain:t,realIndex:s,speed:i,drawPoint:n}){var r,a,l;if(!(null==t?void 0:t.node)||!D(e))return!1;if(-1===(e.globals.collapsingSeriesIndices||[]).indexOf(s))return!1;const o=e.globals.prevStreamFrame,h=null==(r=null==o?void 0:o.xPixels)?void 0:r[s],c=null==(a=null==o?void 0:o.yPixels)?void 0:a[s];if(!Array.isArray(h)||!Array.isArray(c))return!1;const u=(null==(l=null==o?void 0:o.rPixels)?void 0:l[s])||[],d=e.globals.markers.size[s]||0,p=T(e);let g=!1;for(let r=0;r<h.length;r++){const a=h[r],l=c[r];if(null==a||null==l||!isFinite(a)||!isFinite(l))continue;const o=isFinite(u[r])?u[r]:d;if(!(o>0))continue;const f=n(a,l,o,r);if(!(null==f?void 0:f.node))continue;t.add(f);const m=f.node;m.classList.add("apexcharts-marker-exit");const x=F.trackSeriesTween(e,s);B(e,Math.max(1,i||1),p,e=>H(m,a,l,1-e),()=>{H(m,a,l,0),x()}),g=!0}g&&t.node.classList.remove("apexcharts-element-hidden")}(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed,drawPoint:(e,s,i,n)=>this.scatter.drawPoint(e,s,i,t,n,n)});else{f.globals.delayedElements.push({el:this.elPointsMain.node,index:t});W(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed})||"line"!==e||f.config.stroke.show||!f.globals.dataChanged&&!f.globals.resized||this.elPointsMain.node.classList.remove("apexcharts-element-hidden"),$(f,t)&&(null==(n=this.elDataLabelsWrap)?void 0:n.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),f.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0}))}const A={i:s,realIndex:t,animationDelay:s,initialSpeed:f.config.chart.animations.speed,dataChangeSpeed:f.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=i.numericXY,k="line"===e||"area"===e,Y=k&&i.linePaths.length>1?[i.linePaths.join(" ")]:i.linePaths,_=k&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if("area"===e){const e=y.fillPath({seriesNumber:t});for(let t=0;t<_.length;t++){const s=x.renderPaths(o(l({},A),{pathFrom:b?S(i.areaPaths[t],b):null!=(a=null==(r=null==v?void 0:v.area)?void 0:r.from)?a:i.pathFromArea,pathTo:_[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),this.marks.push(s)}}if(f.config.stroke.show&&!this.pointsChart){let n=null;if("line"===e)n=y.fillPath({seriesNumber:t,i:s});else if("solid"===f.config.stroke.fill.type)n=f.globals.stroke.colors[t];else{const e=f.config.fill;f.config.fill=f.config.stroke.fill,n=y.fillPath({seriesNumber:t,i:s}),f.config.fill=e}for(let s=0;s<Y.length;s++){let r=n;"rangeArea"===e&&(r=y.fillPath({seriesNumber:t}));const a=o(l({},A),{pathFrom:b?S(i.linePaths[s],b):null!=(u=null==(c=null==v?void 0:v.line)?void 0:c.from)?u:i.pathFromLine,pathTo:Y[s],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:null==(g=null==v?void 0:v.line)?void 0:g.toInterp,scrollMorph:!!b,stroke:n,strokeWidth:this.strokeWidth,strokeLineCap:f.config.stroke.lineCap,fill:"rangeArea"===e?r:"none"}),h=x.renderPaths(a);if(this.elSeries.add(h),this.marks.push(h),h.attr("fill-rule","evenodd"),P.count>0&&"rangeArea"!==e){const e=x.renderPaths(a);e.node.setAttribute("stroke-dasharray",P.dashArray),P.strokeWidth&&e.node.setAttribute("stroke-width",P.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${f.globals.cuid})`),h.attr("clip-path",`url(#nonForecastMask${f.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:n,i:r,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:p,seriesIndex:g,lineYPosition:f,xArrj:m,yArrj:x,y2Arrj:b,isRangeStart:P,seriesRangeEnd:A}){var w,k;const S=this.w,F=new d(this.w),Y=this.yRatio,_=c.prevY;let M,C,{pathFromLine:I,pathFromArea:j}=c;const L=y.isNumber(S.globals.minYArr[i])?S.globals.minYArr[i]:S.globals.minY;s||(s=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);const R=(e,t)=>t-e/Y[n]+2*(this.isReversed?e/Y[n]:0);let X=l;const N=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.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 z=S.config.stroke.curve;Array.isArray(z)&&(z=Array.isArray(g)?z[g[r]]:z[r]);let D,O=0;const $=this.pointsChart?this._scatterJitterPx(i):null;if("straight"===z&&!this.pointsChart){const d=this._fastStraightPath({type:e,series:t,i:r,realIndex:i,translationsIndex:n,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:p,xArrj:m,yArrj:x,y2Arrj:b,stackSeries:N});if(d)return d}for(let n=0;n<s&&0!==t[r].length;n++){const c=void 0===t[r][n+1]||null===t[r][n+1];if(S.axisFlags.isXNumeric){let e=S.seriesData.seriesX[i][n+1];void 0===S.seriesData.seriesX[i][n+1]&&(e=S.seriesData.seriesX[i][s-1]),a=(e-S.globals.minX)/this.xRatio}else a+=this.xDivision;if(N)if(r>0&&S.globals.collapsedSeries.length<S.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===S.globals.collapsedSeriesIndices.indexOf(e)&&-1===S.globals.ancillaryCollapsedSeriesIndices.indexOf(e))return s}return-1})(r-1)<0)f=this.zeroY;else{const e=this.stackTopAt(i,n+1);f=void 0===e?this.zeroY:e}}else f=this.zeroY;else f=this.zeroY;c?l=R(L,f):(l=R(t[r][n+1],f),"rangeArea"===e&&(X=R(A[r][n+1],f)));let d=a,y=l;if($){const e=100003*i+(n+1);$.x&&(d=a+2*(v(7919*e+13)-.5)*$.x),$.y&&(y=l+2*(v(6271*e+97)-.5)*$.y)}m.push(null===t[r][n+1]?null:d),!c||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(x.push(y),b.push(X)):(x.push(null),b.push(null));const w=this.lineHelpers.calculatePoints({series:t,x:d,y:y,realIndex:i,i:r,j:n,prevY:_}),k=this._createPaths({type:e,series:t,i:r,j:n,x:a,y:l,y2:X,xArrj:m,yArrj:x,y2Arrj:b,pX:o,pY:h,pathState:O,segmentStartX:D,linePath:M,areaPath:C,linePaths:u,areaPaths:p,curve:z,isRangeStart:P});p=k.areaPaths,u=k.linePaths,o=k.pX,h=k.pY,O=k.pathState,D=k.segmentStartX,C=k.areaPath,M=k.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===z&&"rangeArea"===e||(I+=F.line(a,this.areaBottomY),j+=F.line(a,this.areaBottomY)),this._shapeOnly||(this.handleNullDataPoints(t,w,r,n,i),this._handleMarkersAndLabels({type:e,pointsPos:w,i:r,j:n,realIndex:i,isRangeStart:P}))}return{yArrj:x,xArrj:m,pathFromArea:j,areaPaths:p,pathFromLine:I,linePaths:u}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:i,j:n,realIndex:r}){const a=this.w,l=new g(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:r,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:n+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:r,j:n+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,i=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const n=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,r=this.yRatio.length>1?e:0,a=this.yRatio[r]?1/this.yRatio[r]:0;return{x:(i.x||0)*n,y:(i.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:i,translationsIndex:n,iterations:r,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:d,xArrj:p,yArrj:g,y2Arrj:f,stackSeries:m}){const x=this.w;if("line"!==e&&"area"!==e)return null;if(x.globals.comboCharts||m)return null;if(x.config.dataLabels.enabled)return null;if(x.config.markers.discrete.length)return null;if(x.globals.markers.size[i]>0)return null;const y=t[s],b=y.length;if(!r||b<2||b-1!==r)return null;for(let e=0;e<=r;e++){const t=y[e];if(null==t)return null}const v=x.axisFlags.isXNumeric,P=v?x.seriesData.seriesX[i]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[n],w=this.isReversed,k=this.zeroY,S=this.areaBottomY,F=this.xRatio,Y=x.globals.minX,_=this.xDivision,M=x.config.markers.offsetX,C=x.config.markers.offsetY,I=this.appendPathFrom&&!x.globals.hasNullValues;let{pathFromLine:j,pathFromArea:L}=c;const R=this.ctx&&this.ctx.renderer,X=!(!R||!R.kind||"svg"===R.kind),N=!X||x.globals.dataChanged&&!!x.globals.prevStreamFrame,z=X?new Float64Array(b):null,D=X?new Float64Array(b):null;z&&D&&(z[0]=o,D[0]=h),void 0===x.globals.pointsArray[i]&&(x.globals.pointsArray[i]=[]);const O=x.globals.pointsArray[i],$=P?(P[0]-Y)/F+M:this.categoryAxisCorrection+M;O.push([$,c.prevY+C]);const T=N?new Array(r+1):[];N&&(T[0]="M "+o+" "+h);const B=N&&I?new Array(r):null;let W=a,H=o,E=h;for(let e=0;e<r;e++){P?H=(P[e+1]-Y)/F:(W+=_,H=W);const t=y[e+1];E=k-t/A+2*(w?t/A:0),p.push(H),g.push(E),f.push(l),O.push([H+M,E+C]),N&&(T[e+1]=" L "+H+" "+E,B&&(B[e]=" L "+H+" "+S)),z&&D&&(z[e+1]=H,D[e+1]=E)}let V="",J="";if(N&&(V=T.join(""),J=V+" L "+H+" "+S+" L "+o+" "+S+"z"),B){const e=B.join("");j+=e,L+=e}else!N&&I&&(j+=" L "+H+" "+S,L+=" L "+H+" "+S);return u.push(V),d.push(J),{yArrj:g,xArrj:p,pathFromArea:L,areaPaths:d,pathFromLine:j,linePaths:u,numericXY:z?{xs:z,ys:D,areaCloseY:S}:void 0}}_createPaths({type:e,series:t,i:s,j:i,x:n,y:r,xArrj:a,yArrj:l,y2:o,y2Arrj:h,pX:c,pY:u,pathState:p,segmentStartX:g,linePath:f,areaPath:m,linePaths:x,areaPaths:y,curve:b,isRangeStart:v}){const P=new d(this.w),w=this.areaBottomY,k="rangeArea"===e,S="rangeArea"===e&&v;switch(b){case"monotoneCubic":{const e=v?l:h,n=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),r=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},o=(e,t)=>{const s=r(e),i=[];for(let e=0,n=0;e<s.length;n+=s[e++])i[e]=A.slice(t,n,n+s[e]);return i};switch(p){case 0:if(null===e[i+1])break;p=1;case 1:if(!(k?a.length===t[s].length:i===t[s].length-2))break;case 2:{const t=v?a:a.slice().reverse(),s=v?e:e.slice().reverse(),i=n(t,s),r=i.length>1?A.points(i):i;let l=[];k&&(S?y=i:l=y.reverse());let h=0,c=0;if(o(s,r).forEach(e=>{h++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const i=e[s],n=i.length;n>4?(t+=`C${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`,t+=`, ${i[4]}, ${i[5]}`):n>2&&(t+=`S${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`)}return t})(e),s=c;c+=e.length;const n=c-1;S?f=P.move(i[s][0],i[s][1])+t:k?f=P.move(l[s][0],l[s][1])+P.line(i[s][0],i[s][1])+t+P.line(l[n][0],l[n][1]):(f=P.move(i[s][0],i[s][1])+t,m=f+P.line(i[n][0],w)+P.line(i[s][0],w)+"z",y.push(m)),x.push(f)}),k&&h>1&&!S){const e=x.slice(h).reverse();x.splice(h),e.forEach(e=>x.push(e))}p=0;break}}break}case"smooth":{const e=.35*(n-c);if(null===t[s][i])p=0;else switch(p){case 0:if(g=c,f=S?P.move(c,h[i])+P.line(c,u):P.move(c,u),m=P.move(c,u),null===t[s][i+1]||void 0===t[s][i+1]){x.push(f),y.push(m);break}if(p=1,i<t[s].length-2){const t=P.curve(c+e,u,n-e,r,n,r);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=S?P.line(c,o):P.move(c,u),m+=P.line(c,w)+P.line(g,w)+"z",x.push(f),y.push(m),p=-1;else{const a=P.curve(c+e,u,n-e,r,n,r);f+=a,m+=a,i>=t[s].length-2&&(S&&(f+=P.curve(n,r,n,r,n,o)+P.move(n,o)),m+=P.curve(n,r,n,r,n,w)+P.line(g,w)+"z",x.push(f),y.push(m),p=-1)}}c=n,u=r;break}default:{const e=(e,t,s)=>{let i="";switch(e){case"stepline":i=P.line(t,null,"H")+P.line(null,s,"V");break;case"linestep":i=P.line(null,s,"V")+P.line(t,null,"H");break;case"straight":i=P.line(t,s)}return i};if(null===t[s][i])p=0;else switch(p){case 0:if(g=c,f=S?P.move(c,h[i])+P.line(c,u):P.move(c,u),m=P.move(c,u),null===t[s][i+1]||void 0===t[s][i+1]){x.push(f),y.push(m);break}if(p=1,i<t[s].length-2){const t=e(b,n,r);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=S?P.line(c,o):P.move(c,u),m+=P.line(c,w)+P.line(g,w)+"z",x.push(f),y.push(m),p=-1;else{const a=e(b,n,r);f+=a,m+=a,i>=t[s].length-2&&(S&&(f+=P.line(n,o)),m+=P.line(n,w)+P.line(g,w)+"z",x.push(f),y.push(m),p=-1)}}c=n,u=r;break}}return{linePaths:x,areaPaths:y,pX:c,pY:u,pathState:p,segmentStartX:g,linePath:f,areaPath:m}}handleNullDataPoints(e,t,s,i,n){const r=this.w;if(null===e[s][i]&&r.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-r.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:i+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}c.default.use({line:V,area:V,scatter:V,bubble:V,rangeArea:V}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
5
+ "use strict";var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=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={}))n.call(t,s)&&a(e,s,t[s]);if(i)for(var s of i(t))r.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 c=h(require("apexcharts/core")),u=c.__apex_CoreUtils,d=c.__apex_Graphics,p=c.__apex_Fill,g=c.__apex_DataLabels,f=c.__apex_Markers,m=c.__apex_charts_Scatter,x=c.__apex_Series,y=c.__apex_Utils;class b{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t,s){const i=this.w,n=t[e];return"gradient"!==i.config.fill.type&&"gradient"!==i.config.fill.type[s]||!n.every(e=>e===n[0])||(t[e]=n.slice(),t[e][n.length-1]+=1e-6),t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:n,j:r,prevY:a}){const l=this.w,o=[],h=[];let c=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(c=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===r&&(o.push(c),h.push(y.isNumber(e[n][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(y.isNumber(e[n][r+1])?i+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const i=this.w;for(let n=0;n<i.globals.previousPaths.length;n++){const r=i.globals.previousPaths[n];("line"===r.type||"area"===r.type)&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(s,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[n].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[n].paths[1]&&(e=i.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}previousRangeAreaPath(e){for(const t of this.w.globals.previousPaths)if("rangeArea"===t.type&&parseInt(t.realIndex,10)===parseInt(String(e),10)&&1===t.paths.length&&t.paths[0].d)return t.paths[0].d;return null}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:n,translationsIndex:r}){var a,l,o;const h=this.w,c=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(c)if(e>0){const e=this.lineCtx.stackTopAt(t,0);n=void 0===e?this.lineCtx.zeroY:e}else n=this.lineCtx.zeroY;else n=this.lineCtx.zeroY;i=n-s[e][0]/this.lineCtx.yRatio[r]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[r]:0)}else if(c&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){i=n=this.lineCtx.prevSeriesY[t][0];break}return{prevY:i,lineYPosition:n}}}function v(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const P=e=>{const t=function(e){const t=[];let s=e[0],i=e[1],n=t[0]=w(s,i),r=1;for(let a=e.length-1;r<a;r++)s=i,i=e[r+1],t[r]=.5*(n+(n=w(s,i)));return t[r]=n,t}(e),s=e.length-1,i=[];let n,r,a,l;for(let i=0;i<s;i++)a=w(e[i],e[i+1]),Math.abs(a)<1e-6?t[i]=t[i+1]=0:(n=t[i]/a,r=t[i+1]/a,l=n*n+r*r,l>9&&(l=3*a/Math.sqrt(l),t[i]=l*n,t[i+1]=l*r));for(let n=0;n<=s;n++)l=(e[Math.min(s,n+1)][0]-e[Math.max(0,n-1)][0])/(6*(1+t[n]*t[n])),i.push([l||0,t[n]*l||0]);return i},A={points(e){const t=P(e),s=e[1],i=e[0],n=[],r=t[1],a=t[0];n.push(i,[i[0]+a[0],i[1]+a[1],s[0]-r[0],s[1]-r[1],s[0],s[1]]);for(let s=2,i=t.length;s<i;s++){const i=e[s],r=t[s];n.push([i[0]-r[0],i[1]-r[1],i[0],i[1]])}return n},slice(e,t,s){const i=e.slice(t,s);if(t){if(s-t>1&&i[1].length<6){const e=i[0].length;i[1]=[2*i[0][e-2]-i[0][e-4],2*i[0][e-1]-i[0][e-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function w(e,t){return(t[1]-e[1])/(t[0]-e[0])}const k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function _(e,t){const{ax:s,bx:i,ay:n,by:r}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(k)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+i}`);continue}if("V"===e){for(const e of t)a.push(`V ${n*e+r}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+i} ${n*t[e+6]+r}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+i} ${n*t[e+1]+r}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const F=c.__apex_Animations,S=c.__apex_BrowserAPIs_BrowserAPIs,Y=c.__apex_Environment_Environment,M=c.__apex_Easing_resolveEasing,j=c.__apex_PathMorphing_parsePath,C=c.__apex_PathMorphing_arrayToPath;function I(e,t,s){if(!e||"string"!=typeof e)return null;const i=j(e);if(!i.length||"M"!==i[0][0])return null;for(let e=1;e<i.length;e++)if("M"===i[e][0])return null;let n=i,r=null;if(s){if(i.length<5)return null;if(r=i.slice(-3),n=i.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===i[i.length-1][0])return null;if(n.length!==t||n.length<2)return null;const a=n[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<n.length;e++)if(n[e][0]!==a)return null;const l=n.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:n,closing:r,segType:a,anchors:l}}function L(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function X(e,t,s){const i=e,n=[t[1],t[2]],r=[t[3],t[4]],a=[t[5],t[6]],l=L(i,n,s),o=L(n,r,s),h=L(r,a,s),c=L(l,o,s),u=L(o,h,s),d=L(c,u,s);return{first:["C",l[0],l[1],c[0],c[1],d[0],d[1]],second:["C",u[0],u[1],h[0],h[1],a[0],a[1]],mid:d}}function R(e,t,s){const i=[t[1],t[2]],n=L(e,i,s);return{first:["L",n[0],n[1]],second:["L",i[0],i[1]],mid:n}}function D(e,t){const{body:s,closing:i,segType:n,anchors:r}=e,a=r.length,l=t.length,o=e=>"C"===n?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",r[0][0],r[0][1]]];let c=0;for(;c<l&&0!==t[c];)c++;for(let e=1;e<=c;e++)h.push(o(r[0]));let u=c+1;for(let e=0;e<a-1;e++){let i=0;for(;u+i<l&&-1===t[u+i];)i++;const a=s[e+1];if(i){const t=i+1;let s=r[e],l=a;for(let e=0;e<i;e++){const i=1/(t-e),r="C"===n?X(s,l,i):R(s,l,i);h.push(r.first),s=r.mid,l=r.second}h.push(l)}else h.push(a.slice());u+=i+1}for(;u<l;)h.push(o(r[a-1])),u++;return i&&i.forEach(e=>h.push(e.slice())),h}function N(e,t,s,i,n,r){const a=I(e,i,r);if(!a)return null;const l=I(t,n,r);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:C(D(a,o)),toInterp:C(D(l,h))}}function z(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)&&!!(Y.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function $(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 O(e,t,s=0|(s=>null==(s=e.seriesData.series[t])?void 0:s.length)()){return $(Array.from({length:s},(s,i)=>function(e,t,s){var i,n,r,a;if(null==(i=e.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(n=e.seriesData)?void 0:n.seriesX)?void 0:r[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,i)))}function B(e,t,s=!1,i=!1){var n,r;if(!z(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(n=a.seriesY)?void 0:n[t],o=null==(r=e.seriesData.series)?void 0:r[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=$(l.map((e,s)=>function(e,t,s){var i,n;if(e.isXNumeric){const n=null==(i=e.seriesX)?void 0:i[t];if(n&&n.length&&null!=n[s])return"x:"+n[s]}const r=null==(n=e.labels)?void 0:n[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(a,t,s))),c=O(e,t),u=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const i=new Array(t.length),n=new Set;let r=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!n.has(s.get(e))?s.get(e):-1;i[t]=o,-1!==o&&(n.add(o),o<r&&(a=!1),r=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)n.has(t)||o.push(t);return{toOld:i,exits:o,ordered:a,changed:!l}}(h,c);return(u.ordered||i)&&(u.changed||s)?{join:u,oldKeys:h,newKeys:c}:null}function T(e){var t,s;const i=e.config.chart.animations;return M(null!=(s=null==(t=i.dynamicAnimation)?void 0:t.easing)?s:i.easing)}function W(e,t,s,i,n){const r=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-r)/t));i(s(o),o),o<1?S.requestAnimationFrame(a):n&&n()};S.requestAnimationFrame(a)}function H(e,{elPointsMain:t,realIndex:s,speed:i}){var n,r,a,l;if(!(null==t?void 0:t.node))return!1;const o=B(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const c=null==(n=h.xPixels)?void 0:n[s],u=null==(r=h.yPixels)?void 0:r[s];if(!c||!u)return!1;const d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;const p=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],g=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],f=T(e),m=Math.max(1,i||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(t=>{var i,n,r,a,l,d,x,y,b;const v=parseInt(null!=(n=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?n:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=p[v]&&null!=g[v]?[p[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!=(r=c[P])?r:NaN)-A[0],k=(null!=(a=u[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(k))return;const _=null!=(x=null==(d=null==(l=h.rPixels)?void 0:l[s])?void 0:d[P])?x:NaN,F=parseFloat(null!=(b=null!=(y=t.getAttribute("r"))?y:t.getAttribute("default-marker-size"))?b:""),S=isFinite(_)&&isFinite(F)&&F>0&&Math.abs(_-F)>.25;if(!(Math.abs(w)>=.5||Math.abs(k)>=.5)&&!S)return;const Y=e=>{const s=w*(1-e),i=k*(1-e);if(S){const n=(_+(F-_)*e)/F;t.setAttribute("transform",`translate(${s+A[0]*(1-n)}, ${i+A[1]*(1-n)}) scale(${n})`)}else t.setAttribute("transform",`translate(${s}, ${i})`)};Y(0),W(e,m,f,Y,()=>{t.removeAttribute("transform")})}),!0}function E(e,t,s,i){e.setAttribute("transform",`translate(${t*(1-i)}, ${s*(1-i)}) scale(${i})`)}function V(e,{type:t,realIndex:s,pathFromLine:i,pathFromArea:n,linePaths:r,areaPaths:a}){var l,o;const h=B(e,s);if(!h)return null;const{join:c,oldKeys:u,newKeys:d}=h,p=e.globals.prevStreamFrame;if(!p)return null;const g=null==(l=p.seriesY)?void 0:l[s],f=null==(o=e.seriesData.series)?void 0:o[s];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),i=[];let n=0;for(let t=0;t<e.toOld.length;t++){const r=e.toOld[t];if(-1!==r){for(;n<r;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;i.push({oldJ:r,newJ:t}),n=r+1}else i.push({oldJ:-1,newJ:t})}for(;n<t;)s.has(n)&&i.push({oldJ:n,newJ:-1}),n++;return i}(c,u.length),x={};return Array.isArray(r)&&1===r.length&&i&&(x.line=N(i,r[0],m,u.length,d.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&n&&(x.area=N(n,a[0],m,u.length,d.length,!0)),x.line||x.area?x:null}class J{constructor(e,t,s,i){this.ctx=t,this.w=e,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new m(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new b(this),this.markers=new f(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null,this._shapeOnly=!1}draw(e,t,s,i){var n;const r=this.w,a=this.ctx.highlightFilter,l=new d(this.w),o=r.globals.comboCharts?t:r.config.chart.type,h=l.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new u(this.w);if(this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e,s),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this._stackXs=null,r.config.chart.stacked&&r.axisFlags.isXNumeric){const t=e.map((e,t)=>r.globals.comboCharts?s[t]:t).filter(e=>!this._hidden(e)).map(e=>r.seriesData.seriesX[e]||[]);t.some(e=>e.length!==t[0].length||e.some((e,s)=>e!==t[0][s]))&&(this._stackXs=[...new Set(t.flat())].sort((e,t)=>e-t))}const p=[];for(let t=0;t<e.length;t++){const n=r.globals.comboCharts?s[t]:t;e=this.lineHelpers.sameValueSeriesFix(t,e,n);const l=this.yRatio.length>1?n:0,h=this._collapsedBaselineRow(e,t,n);this._shapeOnly=!!h,h&&((e=e.slice())[t]=h,"rangeArea"===o&&i&&((i=i.slice())[t]=h)),this._initSerieVariables(e,t,n),x.addCollapsedClassToSeries(this.w,this.elSeries,n);const c=this._buildSeriesPaths(o,e,t,n,l,s,i);this._handlePaths({type:o,realIndex:n,i:t,paths:c}),null==a||a.line(this,o,e,t,n,l,c),this.markers.flushBatch(this.elPointsMain,n),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),p.push(this.elSeries)}if(void 0!==(null==(n=r.config.series[0])?void 0:n.zIndex)&&p.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),r.config.chart.stacked)for(let e=p.length-1;e>=0;e--)h.add(p[e]);else for(let e=0;e<p.length;e++)h.add(p[e]);return h}_buildSeriesPaths(e,t,s,i,n,r,a){const h=this.w,c=[],u=[],d=[];let p=h.globals.padHorizontal+this.categoryAxisCorrection;h.axisFlags.isXNumeric&&h.seriesData.seriesX.length>0&&(p=(h.seriesData.seriesX[i][0]-h.globals.minX)/this.xRatio),d.push(p);const g=p;let f,m=this.zeroY,x=this.zeroY;m=this.lineHelpers.determineFirstPrevY({i:s,realIndex:i,series:t,prevY:m,lineYPosition:0,translationsIndex:n}).prevY,"monotoneCubic"===h.config.stroke.curve&&null===t[s][0]?c.push(null):c.push(m);const y=m;let b;"rangeArea"===e&&(b=this.lineHelpers.determineFirstPrevY({i:s,realIndex:i,series:a,prevY:x,lineYPosition:0,translationsIndex:n}),x=b.prevY,f=x,u.push(null!==c[0]?x:null));const v=this._calculatePathsFrom(i,m),P=[c[0]],A=[u[0]],w={type:e,series:t,realIndex:i,translationsIndex:n,i:s,x:p,y:1,pX:g,pY:y,pathsFrom:v,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:a},k=this._iterateOverDataPoints(o(l({},w),{iterations:"rangeArea"===e?t[s].length-1:void 0,isRangeStart:!0}));if("rangeArea"===e){const e=this._calculatePathsFrom(i,x),t=this._iterateOverDataPoints(o(l({},w),{series:a,xArrj:[p],yArrj:P,y2Arrj:A,pY:f,areaPaths:k.areaPaths,pathsFrom:e,iterations:a[s].length-1,isRangeStart:!1})),n=k.linePaths.length/2;for(let e=0;e<n;e++)k.linePaths[e]=t.linePaths[e+n]+k.linePaths[e];k.linePaths.splice(n);const r=1===k.linePaths.length?this.lineHelpers.previousRangeAreaPath(i):null;k.pathFromLine=null!=r?r:t.pathFromLine+k.pathFromLine}else/z\s*$/i.test(k.pathFromArea)||(k.pathFromArea+="z");return k}_collapsedBaselineRow(e,t,s){const i=this.w,n=i.globals;if(i.config.chart.stacked||this.pointsChart)return null;if(!Array.isArray(e[t])||0!==e[t].length)return null;if(!this._hidden(s))return null;const r=i.axisFlags.isXNumeric?(i.seriesData.seriesX[s]||[]).length:n.dataPoints;if(!r)return null;const a=y.isNumber(n.minYArr[s])?n.minYArr[s]:n.minY,l=y.isNumber(n.maxYArr[s])?n.maxYArr[s]:n.maxY,o=Math.min(Math.max(0,a),l);return new Array(r).fill(y.isNumber(o)?o:0)}_initSerieVariables(e,t,s){const i=this.w,n=new d(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let r=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[r]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=i.config.series[s];if(this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:y.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom(e,t){const s=new d(this.w);let i=s.move(0,this.areaBottomY)+s.line(0,this.areaBottomY),n=i;if(this.w.globals.previousPaths.length>0){const t=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:e});i=t.pathFromLine,n=t.pathFromArea}return{prevY:t,pathFromLine:i,pathFromArea:n}}_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)}_hidden(e){const t=this.w.globals;return t.collapsedSeriesIndices.indexOf(e)>-1||t.ancillaryCollapsedSeriesIndices.indexOf(e)>-1}_recordStackTops(e,t,s=this.w.seriesData.series[e]){if(this.w.config.chart.stacked&&Array.isArray(t)&&!this._hidden(e))for(let i=0;i<t.length;i++){const n=this._stackKey(e,i);if(null==n)continue;const r=t[i];y.isNumber(r)&&null!=(null==s?void 0:s[i])&&this.prevSeriesYByX.set(n,r)}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){var n,r,a,h,c,u,g;const f=this.w,m=new d(this.w),x=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,m),y=new p(this.w);this.marks=[],this.prevSeriesY.push(i.yArrj),this._recordStackTops(t,i.yArrj);let b=null;"line"!==e&&"area"!==e||!f.globals.dataChanged||(b=function(e,t,s,i){var n;const r=e.globals,a=r.prevStreamFrame;if(!a||!r.dataChanged||!(null==(n=e.axisFlags)?void 0:n.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],c=e.seriesData.series[t];if(!(l&&o&&h&&c))return null;if(l.length<3||h.length<3)return null;let u=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){u=e;break}if(-1===u)return null;const d=Math.min(l.length-u,h.length);if(d<2)return null;const p=h.length-d;if(0===u&&0===p)return null;for(let e=0;e<d;e++){if(l[u+e]!==h[e])return null;const t=o[u+e],s=c[e];if(t!==s&&(null!=t||null!=s))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let m=-1,x=-1;for(let e=0;e<d;e++)null!=g[u+e]&&null!=f[u+e]&&null!=s[e]&&null!=i[e]&&(-1===m&&(m=e),x=e);if(-1===m||x<=m)return null;const y=s[m],b=s[x],v=g[u+m],P=g[u+x];if(Math.abs(b-y)<1e-6)return null;const A=(P-v)/(b-y),w=v-A*y;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=m,_=m;for(let e=m;e<=x;e++){const t=i[e];null!=t&&null!=f[u+e]&&(t<i[k]&&(k=e),t>i[_]&&(_=e))}let F=1,S=0;const Y=i[k],M=i[_];if(Math.abs(M-Y)>1e-6?(F=(f[u+_]-f[u+k])/(M-Y),S=f[u+k]-F*Y):S=f[u+k]-Y,!isFinite(F)||!isFinite(S)||F<.2||F>5)return null;const j=Math.floor((m+x)/2);if(j!==m&&j!==x&&null!=s[j]&&null!=g[u+j]){const e=A*s[j]+w;if(Math.abs(e-g[u+j])>1.5)return null;if(null!=i[j]&&null!=f[u+j]){const e=F*i[j]+S;if(Math.abs(e-f[u+j])>1.5)return null}}return r.streamScrolled=!0,{ax:A,bx:w,ay:F,by:S}}(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=i.xArrj.length-P.count-1,s=f.axisFlags.isXNumeric?(f.seriesData.seriesX[t][e]-f.globals.minX)/this.xRatio:f.globals.padHorizontal+this.categoryAxisCorrection+e*this.xDivision,n=m.drawRect(s,0,f.layout.gridWidth,f.layout.gridHeight,0);f.dom.elForecastMask.appendChild(n.node);const r=m.drawRect(0,0,s,f.layout.gridHeight,0);f.dom.elNonForecastMask.appendChild(r.node)}if(this.pointsChart)H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),function(e,{elPointsMain:t,realIndex:s,speed:i}){if(!(null==t?void 0:t.node)||!z(e))return!1;if(-1===(e.globals.risingSeries||[]).indexOf(s))return!1;const n=t.node.querySelectorAll(".apexcharts-marker");if(!n.length)return!1;const r=T(e);t.node.classList.remove("apexcharts-element-hidden"),n.forEach(t=>{const s=t.getBBox(),n=s.x+s.width/2,a=s.y+s.height/2;E(t,n,a,0),W(e,Math.max(1,i||1),r,e=>E(t,n,a,e),()=>t.removeAttribute("transform"))})}(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),(f.seriesData.series[t]||[]).length||function(e,{elPointsMain:t,realIndex:s,speed:i,drawPoint:n}){var r,a,l;if(!(null==t?void 0:t.node)||!z(e))return!1;if(-1===(e.globals.collapsingSeriesIndices||[]).indexOf(s))return!1;const o=e.globals.prevStreamFrame,h=null==(r=null==o?void 0:o.xPixels)?void 0:r[s],c=null==(a=null==o?void 0:o.yPixels)?void 0:a[s];if(!Array.isArray(h)||!Array.isArray(c))return!1;const u=(null==(l=null==o?void 0:o.rPixels)?void 0:l[s])||[],d=e.globals.markers.size[s]||0,p=T(e);let g=!1;for(let r=0;r<h.length;r++){const a=h[r],l=c[r];if(null==a||null==l||!isFinite(a)||!isFinite(l))continue;const o=isFinite(u[r])?u[r]:d;if(!(o>0))continue;const f=n(a,l,o,r);if(!(null==f?void 0:f.node))continue;t.add(f);const m=f.node;m.classList.add("apexcharts-marker-exit");const x=F.trackSeriesTween(e,s);W(e,Math.max(1,i||1),p,e=>E(m,a,l,1-e),()=>{E(m,a,l,0),x()}),g=!0}g&&t.node.classList.remove("apexcharts-element-hidden")}(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed,drawPoint:(e,s,i,n)=>this.scatter.drawPoint(e,s,i,t,n,n)});else{f.globals.delayedElements.push({el:this.elPointsMain.node,index:t});H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed})||"line"!==e||f.config.stroke.show||!f.globals.dataChanged&&!f.globals.resized||this.elPointsMain.node.classList.remove("apexcharts-element-hidden"),B(f,t)&&(null==(n=this.elDataLabelsWrap)?void 0:n.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),f.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0}))}const A={i:s,realIndex:t,animationDelay:s,initialSpeed:f.config.chart.animations.speed,dataChangeSpeed:f.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=i.numericXY,k="line"===e||"area"===e,S=k&&i.linePaths.length>1?[i.linePaths.join(" ")]:i.linePaths,Y=k&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if("area"===e){const e=y.fillPath({seriesNumber:t});for(let t=0;t<Y.length;t++){const s=x.renderPaths(o(l({},A),{pathFrom:b?_(i.areaPaths[t],b):null!=(a=null==(r=null==v?void 0:v.area)?void 0:r.from)?a:i.pathFromArea,pathTo:Y[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),this.marks.push(s)}}if(f.config.stroke.show&&!this.pointsChart){let n=null;if("line"===e)n=y.fillPath({seriesNumber:t,i:s});else if("solid"===f.config.stroke.fill.type)n=f.globals.stroke.colors[t];else{const e=f.config.fill;f.config.fill=f.config.stroke.fill,n=y.fillPath({seriesNumber:t,i:s}),f.config.fill=e}for(let s=0;s<S.length;s++){let r=n;"rangeArea"===e&&(r=y.fillPath({seriesNumber:t}));const a=o(l({},A),{pathFrom:b?_(i.linePaths[s],b):null!=(u=null==(c=null==v?void 0:v.line)?void 0:c.from)?u: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:n,strokeWidth:this.strokeWidth,strokeLinecap:f.config.stroke.lineCap,fill:"rangeArea"===e?r:"none"}),h=x.renderPaths(a);if(this.elSeries.add(h),this.marks.push(h),h.attr("fill-rule","evenodd"),P.count>0&&"rangeArea"!==e){const e=x.renderPaths(a);e.node.setAttribute("stroke-dasharray",P.dashArray),P.strokeWidth&&e.node.setAttribute("stroke-width",P.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${f.globals.cuid})`),h.attr("clip-path",`url(#nonForecastMask${f.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:n,i:r,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:p,seriesIndex:g,lineYPosition:f,xArrj:m,yArrj:x,y2Arrj:b,isRangeStart:P,seriesRangeEnd:A}){var w,k,_;const F=this.w,S=new d(this.w),Y=this.yRatio,M=c.prevY;let j,C,{pathFromLine:I,pathFromArea:L}=c;const X=y.isNumber(F.globals.minYArr[i])?F.globals.minYArr[i]:F.globals.minY;s||(s=F.globals.dataPoints>1?F.globals.dataPoints-1:F.globals.dataPoints);const R=(e,t)=>t-e/Y[n]+2*(this.isReversed?e/Y[n]:0);let D=l;const N=F.config.chart.stacked&&!F.globals.comboCharts||F.config.chart.stacked&&F.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 z=F.config.stroke.curve;Array.isArray(z)&&(z=Array.isArray(g)?z[g[r]]:z[r]);let $,O=0;const B=this.pointsChart?this._scatterJitterPx(i):null;if("straight"===z&&!this.pointsChart){const d=this._fastStraightPath({type:e,series:t,i:r,realIndex:i,translationsIndex:n,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:p,xArrj:m,yArrj:x,y2Arrj:b,stackSeries:N});if(d)return d}const T=N?this._stackXs:null;let W=0;const H=[];for(let n=0;n<s&&0!==t[r].length;n++){const c=void 0===t[r][n+1]||null===t[r][n+1];if(F.axisFlags.isXNumeric){const e=F.seriesData.seriesX[i];let t=e[n+1];if(void 0===t&&(t=e[s-1]),a=(t-F.globals.minX)/this.xRatio,T){const s=[];for(;T[W]<=e[n];)W++;for(;T[W]<t;)s.push([(T[W]-F.globals.minX)/this.xRatio,null!=(_=this.prevSeriesYByX.get(T[W++]))?_:this.zeroY]);s.length&&(H[n+1]=s)}}else a+=this.xDivision;if(N)if(r>0&&F.globals.collapsedSeries.length<F.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(!this._hidden(e))return s}return-1})(r-1)<0)f=this.zeroY;else{const e=this.stackTopAt(i,n+1);f=void 0===e?this.zeroY:e}}else f=this.zeroY;else f=this.zeroY;c?l=R(X,f):(l=R(t[r][n+1],f),"rangeArea"===e&&(D=R(A[r][n+1],f)));let d=a,y=l;if(B){const e=100003*i+(n+1);B.x&&(d=a+2*(v(7919*e+13)-.5)*B.x),B.y&&(y=l+2*(v(6271*e+97)-.5)*B.y)}m.push(null===t[r][n+1]?null:d),!c||"smooth"!==F.config.stroke.curve&&"monotoneCubic"!==F.config.stroke.curve?(x.push(y),b.push(D)):(x.push(null),b.push(null));const w=this.lineHelpers.calculatePoints({series:t,x:d,y:y,realIndex:i,i:r,j:n,prevY:M}),k=this._createPaths({type:e,series:t,i:r,j:n,x:a,y:l,midsAt:H,y2:D,xArrj:m,yArrj:x,y2Arrj:b,pX:o,pY:h,pathState:O,segmentStartX:$,linePath:j,areaPath:C,linePaths:u,areaPaths:p,curve:z,isRangeStart:P});p=k.areaPaths,u=k.linePaths,o=k.pX,h=k.pY,O=k.pathState,$=k.segmentStartX,C=k.areaPath,j=k.linePath,!this.appendPathFrom||F.globals.hasNullValues||"monotoneCubic"===z&&"rangeArea"===e||(I+=S.line(a,this.areaBottomY),L+=S.line(a,this.areaBottomY)),this._shapeOnly||(this.handleNullDataPoints(t,w,r,n,i),this._handleMarkersAndLabels({type:e,pointsPos:w,i:r,j:n,realIndex:i,isRangeStart:P}))}return{yArrj:x,xArrj:m,pathFromArea:L,areaPaths:p,pathFromLine:I,linePaths:u}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:i,j:n,realIndex:r}){const a=this.w,l=new g(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:r,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:n+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:r,j:n+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,i=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const n=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,r=this.yRatio.length>1?e:0,a=this.yRatio[r]?1/this.yRatio[r]:0;return{x:(i.x||0)*n,y:(i.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:i,translationsIndex:n,iterations:r,x:a,y:l,pX:o,pY:h,pathsFrom:c,linePaths:u,areaPaths:d,xArrj:p,yArrj:g,y2Arrj:f,stackSeries:m}){const x=this.w;if("line"!==e&&"area"!==e)return null;if(x.globals.comboCharts||m)return null;if(x.config.dataLabels.enabled)return null;if(x.config.markers.discrete.length)return null;if(x.globals.markers.size[i]>0)return null;const y=t[s],b=y.length;if(!r||b<2||b-1!==r)return null;for(let e=0;e<=r;e++){const t=y[e];if(null==t)return null}const v=x.axisFlags.isXNumeric,P=v?x.seriesData.seriesX[i]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[n],w=this.isReversed,k=this.zeroY,_=this.areaBottomY,F=this.xRatio,S=x.globals.minX,Y=this.xDivision,M=x.config.markers.offsetX,j=x.config.markers.offsetY,C=this.appendPathFrom&&!x.globals.hasNullValues;let{pathFromLine:I,pathFromArea:L}=c;const X=this.ctx&&this.ctx.renderer,R=!(!X||!X.kind||"svg"===X.kind),D=!R||x.globals.dataChanged&&!!x.globals.prevStreamFrame,N=R?new Float64Array(b):null,z=R?new Float64Array(b):null;N&&z&&(N[0]=o,z[0]=h),void 0===x.globals.pointsArray[i]&&(x.globals.pointsArray[i]=[]);const $=x.globals.pointsArray[i],O=P?(P[0]-S)/F+M:this.categoryAxisCorrection+M;$.push([O,c.prevY+j]);const B=D?new Array(r+1):[];D&&(B[0]="M "+o+" "+h);const T=D&&C?new Array(r):null;let W=a,H=o,E=h;for(let e=0;e<r;e++){P?H=(P[e+1]-S)/F:(W+=Y,H=W);const t=y[e+1];E=k-t/A+2*(w?t/A:0),p.push(H),g.push(E),f.push(l),$.push([H+M,E+j]),D&&(B[e+1]=" L "+H+" "+E,T&&(T[e]=" L "+H+" "+_)),N&&z&&(N[e+1]=H,z[e+1]=E)}let V="",J="";if(D&&(V=B.join(""),J=V+" L "+H+" "+_+" L "+o+" "+_+"z"),T){const e=T.join("");I+=e,L+=e}else!D&&C&&(I+=" L "+H+" "+_,L+=" L "+H+" "+_);return u.push(V),d.push(J),{yArrj:g,xArrj:p,pathFromArea:L,areaPaths:d,pathFromLine:I,linePaths:u,numericXY:N?{xs:N,ys:z,areaCloseY:_}:void 0}}_createPaths({type:e,series:t,i:s,j:i,x:n,y:r,midsAt:a,xArrj:l,yArrj:o,y2:h,y2Arrj:c,pX:u,pY:p,pathState:g,segmentStartX:f,linePath:m,areaPath:x,linePaths:y,areaPaths:b,curve:v,isRangeStart:P}){const w=new d(this.w),k=this.areaBottomY,_="rangeArea"===e,F="rangeArea"===e&&P,S=a[i+1],Y=e=>S?[...S,[n,r]].map(([t,s],i,n)=>e(...i?n[i-1]:[u,p],t,s)).join(""):e(u,p,n,r);switch(v){case"monotoneCubic":{const e=P?o:c,n=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),r=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},h=(e,t)=>{const s=r(e),i=[];for(let e=0,n=0;e<s.length;n+=s[e++])i[e]=A.slice(t,n,n+s[e]);return i};switch(g){case 0:if(null===e[i+1])break;g=1;case 1:if(!(_?l.length===t[s].length:i===t[s].length-2))break;case 2:{let t=P?l:l.slice().reverse(),s=P?e:e.slice().reverse();if(a.length&&!_){const e=[];t.forEach((t,i)=>{null!==s[i]&&null!=s[i-1]&&a[i]&&e.push(...a[i]),e.push([t,s[i]])}),t=e.map(e=>e[0]),s=e.map(e=>e[1])}const i=n(t,s),r=i.length>1?A.points(i):i;let o=[];_&&(F?b=i:o=b.reverse());let c=0,u=0;if(h(s,r).forEach(e=>{c++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const i=e[s],n=i.length;n>4?(t+=`C${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`,t+=`, ${i[4]}, ${i[5]}`):n>2&&(t+=`S${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`)}return t})(e),s=u;u+=e.length;const n=u-1;F?m=w.move(i[s][0],i[s][1])+t:_?m=w.move(o[s][0],o[s][1])+w.line(i[s][0],i[s][1])+t+w.line(o[n][0],o[n][1]):(m=w.move(i[s][0],i[s][1])+t,x=m+w.line(i[n][0],k)+w.line(i[s][0],k)+"z",b.push(x)),y.push(m)}),_&&c>1&&!F){const e=y.slice(c).reverse();y.splice(c),e.forEach(e=>y.push(e))}g=0;break}}break}case"smooth":{const e=(e,t,s,i)=>{const n=.35*(s-e);return w.curve(e+n,t,s-n,i,s,i)};if(null===t[s][i])g=0;else switch(g){case 0:if(f=u,m=F?w.move(u,c[i])+w.line(u,p):w.move(u,p),x=w.move(u,p),null===t[s][i+1]||void 0===t[s][i+1]){y.push(m),b.push(x);break}if(g=1,i<t[s].length-2){const t=Y(e);m+=t,x+=t;break}case 1:if(null===t[s][i+1])m+=F?w.line(u,h):w.move(u,p),x+=w.line(u,k)+w.line(f,k)+"z",y.push(m),b.push(x),g=-1;else{const a=Y(e);m+=a,x+=a,i>=t[s].length-2&&(F&&(m+=w.curve(n,r,n,r,n,h)+w.move(n,h)),x+=w.curve(n,r,n,r,n,k)+w.line(f,k)+"z",y.push(m),b.push(x),g=-1)}}u=n,p=r;break}default:{const e=(e,t,s,i)=>{let n="";switch(v){case"stepline":n=w.line(s,null,"H")+w.line(null,i,"V");break;case"linestep":n=w.line(null,i,"V")+w.line(s,null,"H");break;case"straight":n=w.line(s,i)}return n};if(null===t[s][i])g=0;else switch(g){case 0:if(f=u,m=F?w.move(u,c[i])+w.line(u,p):w.move(u,p),x=w.move(u,p),null===t[s][i+1]||void 0===t[s][i+1]){y.push(m),b.push(x);break}if(g=1,i<t[s].length-2){const t=Y(e);m+=t,x+=t;break}case 1:if(null===t[s][i+1])m+=F?w.line(u,h):w.move(u,p),x+=w.line(u,k)+w.line(f,k)+"z",y.push(m),b.push(x),g=-1;else{const r=Y(e);m+=r,x+=r,i>=t[s].length-2&&(F&&(m+=w.line(n,h)),x+=w.line(n,k)+w.line(f,k)+"z",y.push(m),b.push(x),g=-1)}}u=n,p=r;break}}return{linePaths:y,areaPaths:b,pX:u,pY:p,pathState:g,segmentStartX:f,linePath:m,areaPath:x}}handleNullDataPoints(e,t,s,i,n){const r=this.w;if(null===e[s][i]&&r.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-r.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:i+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}c.default.use({line:J,area:J,scatter:J,bubble:J,rangeArea:J}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.2.0
21
+ * ApexCharts v8.3.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -41,18 +41,16 @@ class Helpers {
41
41
  this.lineCtx = lineCtx;
42
42
  }
43
43
  /**
44
- * @param {number} i
44
+ * @param {number} i index into `series`, the rows this draw call renders
45
45
  * @param {any[]} series
46
+ * @param {number} realIndex index into the config / fill options
46
47
  */
47
- sameValueSeriesFix(i, series) {
48
+ sameValueSeriesFix(i, series, realIndex) {
48
49
  const w = this.w;
49
- if (w.config.fill.type === "gradient" || w.config.fill.type[i] === "gradient") {
50
- const coreUtils = new CoreUtils(this.lineCtx.w);
51
- if (coreUtils.seriesHaveSameValues(i)) {
52
- const gSeries = series[i].slice();
53
- gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 1e-6;
54
- series[i] = gSeries;
55
- }
50
+ const s = series[i];
51
+ if ((w.config.fill.type === "gradient" || w.config.fill.type[realIndex] === "gradient") && s.every((v) => v === s[0])) {
52
+ series[i] = s.slice();
53
+ series[i][s.length - 1] += 1e-6;
56
54
  }
57
55
  return series;
58
56
  }
@@ -653,6 +651,11 @@ function uniquifyKeys(keys) {
653
651
  return count === 0 ? k : `${k}#${count}`;
654
652
  });
655
653
  }
654
+ function seriesKeys(w, realIndex, n = ((_a) => (_a = w.seriesData.series[realIndex]) == null ? void 0 : _a.length)() | 0) {
655
+ return uniquifyKeys(
656
+ Array.from({ length: n }, (_, j) => datumKey(w, realIndex, j))
657
+ );
658
+ }
656
659
  function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false) {
657
660
  var _a, _b;
658
661
  if (!lengthTransitionEnabled(w)) return null;
@@ -665,7 +668,7 @@ function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false)
665
668
  const oldKeys = uniquifyKeys(
666
669
  oldY.map((_, j) => frameDatumKey(frame, realIndex, j))
667
670
  );
668
- const newKeys = uniquifyKeys(newY.map((_, j) => datumKey(w, realIndex, j)));
671
+ const newKeys = seriesKeys(w, realIndex);
669
672
  const join = joinKeys(oldKeys, newKeys);
670
673
  if (!join.ordered && !allowReorder) return null;
671
674
  if (!join.changed && !includeIdentity) return null;
@@ -929,13 +932,27 @@ class Line {
929
932
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
930
933
  this.prevSeriesY = [];
931
934
  this.prevSeriesYByX = /* @__PURE__ */ new Map();
935
+ this._stackXs = null;
936
+ if (w.config.chart.stacked && w.axisFlags.isXNumeric) {
937
+ const xs = series.map(
938
+ (_, i) => w.globals.comboCharts ? (
939
+ /** @type {any} */
940
+ seriesIndex[i]
941
+ ) : i
942
+ ).filter((ri) => !this._hidden(ri)).map((ri) => w.seriesData.seriesX[ri] || []);
943
+ if (xs.some(
944
+ (a) => a.length !== xs[0].length || a.some((v, k) => v !== xs[0][k])
945
+ )) {
946
+ this._stackXs = [...new Set(xs.flat())].sort((a, b) => a - b);
947
+ }
948
+ }
932
949
  const allSeries = [];
933
950
  for (let i = 0; i < series.length; i++) {
934
- series = this.lineHelpers.sameValueSeriesFix(i, series);
935
951
  const realIndex = w.globals.comboCharts ? (
936
952
  /** @type {any} */
937
953
  seriesIndex[i]
938
954
  ) : i;
955
+ series = this.lineHelpers.sameValueSeriesFix(i, series, realIndex);
939
956
  const translationsIndex = this.yRatio.length > 1 ? realIndex : 0;
940
957
  const flat = this._collapsedBaselineRow(series, i, realIndex);
941
958
  this._shapeOnly = !!flat;
@@ -1119,9 +1136,7 @@ class Line {
1119
1136
  const gl = w.globals;
1120
1137
  if (w.config.chart.stacked || this.pointsChart) return null;
1121
1138
  if (!Array.isArray(series[i]) || series[i].length !== 0) return null;
1122
- if (gl.collapsedSeriesIndices.indexOf(realIndex) === -1 && gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) === -1) {
1123
- return null;
1124
- }
1139
+ if (!this._hidden(realIndex)) return null;
1125
1140
  const n = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex] || []).length : gl.dataPoints;
1126
1141
  if (!n) return null;
1127
1142
  const lo = Utils.isNumber(gl.minYArr[realIndex]) ? gl.minYArr[realIndex] : gl.minY;
@@ -1250,6 +1265,11 @@ class Line {
1250
1265
  if (key === void 0 || key === null) return void 0;
1251
1266
  return this.prevSeriesYByX.get(key);
1252
1267
  }
1268
+ /** @param {number} ri */
1269
+ _hidden(ri) {
1270
+ const g = this.w.globals;
1271
+ return g.collapsedSeriesIndices.indexOf(ri) > -1 || g.ancillaryCollapsedSeriesIndices.indexOf(ri) > -1;
1272
+ }
1253
1273
  /**
1254
1274
  * Fold a drawn series into the running stack top, so the next series can find
1255
1275
  * its baseline by x (#4886).
@@ -1265,19 +1285,18 @@ class Line {
1265
1285
  * correct if that representation ever changes.
1266
1286
  * @param {number} realIndex
1267
1287
  * @param {any[]} yArrj
1288
+ * @param {any[]} [row] the drawn row, if not the series' own (a part)
1268
1289
  */
1269
- _recordStackTops(realIndex, yArrj) {
1290
+ _recordStackTops(realIndex, yArrj, row = this.w.seriesData.series[realIndex]) {
1270
1291
  const w = this.w;
1271
1292
  if (!w.config.chart.stacked) return;
1272
1293
  if (!Array.isArray(yArrj)) return;
1273
- if (w.globals.collapsedSeriesIndices.indexOf(realIndex) !== -1 || w.globals.ancillaryCollapsedSeriesIndices.indexOf(realIndex) !== -1) {
1274
- return;
1275
- }
1294
+ if (this._hidden(realIndex)) return;
1276
1295
  for (let j = 0; j < yArrj.length; j++) {
1277
1296
  const key = this._stackKey(realIndex, j);
1278
1297
  if (key === void 0 || key === null) continue;
1279
1298
  const y = yArrj[j];
1280
- if (!Utils.isNumber(y)) continue;
1299
+ if (!Utils.isNumber(y) || (row == null ? void 0 : row[j]) == null) continue;
1281
1300
  this.prevSeriesYByX.set(key, y);
1282
1301
  }
1283
1302
  }
@@ -1310,7 +1329,8 @@ class Line {
1310
1329
  w.globals.seriesYvalues[realIndex] = paths.yArrj;
1311
1330
  const forecast = w.config.forecastDataPoints;
1312
1331
  if (forecast.count > 0 && type !== "rangeArea") {
1313
- const forecastCutoff = w.globals.seriesXvalues[realIndex][w.globals.seriesXvalues[realIndex].length - forecast.count - 1];
1332
+ const ci = paths.xArrj.length - forecast.count - 1;
1333
+ const forecastCutoff = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex][ci] - w.globals.minX) / this.xRatio : w.globals.padHorizontal + this.categoryAxisCorrection + ci * this.xDivision;
1314
1334
  const elForecastMask = graphics.drawRect(
1315
1335
  forecastCutoff,
1316
1336
  0,
@@ -1397,7 +1417,7 @@ class Line {
1397
1417
  scrollMorph: !!streamScroll,
1398
1418
  stroke: "none",
1399
1419
  strokeWidth: 0,
1400
- strokeLineCap: null,
1420
+ strokeLinecap: null,
1401
1421
  fill: pathFill
1402
1422
  }));
1403
1423
  this.elSeries.add(renderedPath);
@@ -1439,7 +1459,7 @@ class Line {
1439
1459
  scrollMorph: !!streamScroll,
1440
1460
  stroke: lineFill,
1441
1461
  strokeWidth: this.strokeWidth,
1442
- strokeLineCap: w.config.stroke.lineCap,
1462
+ strokeLinecap: w.config.stroke.lineCap,
1443
1463
  fill: type === "rangeArea" ? pathFill : "none"
1444
1464
  });
1445
1465
  const renderedPath = emit.renderPaths(linePathCommonOpts);
@@ -1493,7 +1513,7 @@ class Line {
1493
1513
  isRangeStart,
1494
1514
  seriesRangeEnd
1495
1515
  }) {
1496
- var _a, _b;
1516
+ var _a, _b, _c;
1497
1517
  const w = this.w;
1498
1518
  const graphics = new Graphics(this.w);
1499
1519
  const yRatio = this.yRatio;
@@ -1545,15 +1565,30 @@ class Line {
1545
1565
  });
1546
1566
  if (fast) return fast;
1547
1567
  }
1568
+ const ks = stackSeries ? this._stackXs : null;
1569
+ let kp = 0;
1570
+ const midsAt = [];
1548
1571
  for (let j = 0; j < iterations; j++) {
1549
1572
  if (series[i].length === 0) break;
1550
1573
  const isNull = typeof series[i][j + 1] === "undefined" || series[i][j + 1] === null;
1551
1574
  if (w.axisFlags.isXNumeric) {
1552
- let sX = w.seriesData.seriesX[realIndex][j + 1];
1553
- if (typeof w.seriesData.seriesX[realIndex][j + 1] === "undefined") {
1554
- sX = w.seriesData.seriesX[realIndex][iterations - 1];
1575
+ const sxs = w.seriesData.seriesX[realIndex];
1576
+ let sX = sxs[j + 1];
1577
+ if (typeof sX === "undefined") {
1578
+ sX = sxs[iterations - 1];
1555
1579
  }
1556
1580
  x = (sX - w.globals.minX) / this.xRatio;
1581
+ if (ks) {
1582
+ const m = [];
1583
+ while (ks[kp] <= sxs[j]) kp++;
1584
+ while (ks[kp] < sX) {
1585
+ m.push([
1586
+ (ks[kp] - w.globals.minX) / this.xRatio,
1587
+ (_c = this.prevSeriesYByX.get(ks[kp++])) != null ? _c : this.zeroY
1588
+ ]);
1589
+ }
1590
+ if (m.length) midsAt[j + 1] = m;
1591
+ }
1557
1592
  } else {
1558
1593
  x = x + this.xDivision;
1559
1594
  }
@@ -1563,9 +1598,7 @@ class Line {
1563
1598
  var _a2;
1564
1599
  for (let pii = pi; pii >= 0; pii--) {
1565
1600
  const ri = (_a2 = seriesIndex == null ? void 0 : seriesIndex[pii]) != null ? _a2 : pii;
1566
- if (w.globals.collapsedSeriesIndices.indexOf(ri) === -1 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(ri) === -1) {
1567
- return pii;
1568
- }
1601
+ if (!this._hidden(ri)) return pii;
1569
1602
  }
1570
1603
  return -1;
1571
1604
  };
@@ -1621,6 +1654,7 @@ class Line {
1621
1654
  j,
1622
1655
  x,
1623
1656
  y,
1657
+ midsAt,
1624
1658
  y2,
1625
1659
  xArrj,
1626
1660
  yArrj,
@@ -1861,7 +1895,7 @@ class Line {
1861
1895
  numericXY: nxs ? { xs: nxs, ys: nys, areaCloseY: bottomY } : void 0
1862
1896
  };
1863
1897
  }
1864
- /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
1898
+ /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, midsAt: any[][], xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
1865
1899
  _createPaths({
1866
1900
  type,
1867
1901
  series,
@@ -1869,6 +1903,7 @@ class Line {
1869
1903
  j,
1870
1904
  x,
1871
1905
  y,
1906
+ midsAt,
1872
1907
  xArrj,
1873
1908
  yArrj,
1874
1909
  y2,
@@ -1888,6 +1923,8 @@ class Line {
1888
1923
  const areaBottomY = this.areaBottomY;
1889
1924
  const rangeArea = type === "rangeArea";
1890
1925
  const isLowerRangeAreaPath = type === "rangeArea" && isRangeStart;
1926
+ const mids = midsAt[j + 1];
1927
+ const via = (f) => mids ? [...mids, [x, y]].map(([bx, by], k, a) => f(...k ? a[k - 1] : [pX, pY], bx, by)).join("") : f(pX, pY, x, y);
1891
1928
  switch (curve) {
1892
1929
  case "monotoneCubic": {
1893
1930
  const yAj = isRangeStart ? yArrj : y2Arrj;
@@ -1933,8 +1970,19 @@ class Line {
1933
1970
  }
1934
1971
  // falls through
1935
1972
  case 2: {
1936
- const _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
1937
- const _yAj = isRangeStart ? yAj : yAj.slice().reverse();
1973
+ let _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
1974
+ let _yAj = isRangeStart ? yAj : yAj.slice().reverse();
1975
+ if (midsAt.length && !rangeArea) {
1976
+ const P = [];
1977
+ _xAj.forEach((v, k) => {
1978
+ if (_yAj[k] !== null && _yAj[k - 1] != null && midsAt[k]) {
1979
+ P.push(...midsAt[k]);
1980
+ }
1981
+ P.push([v, _yAj[k]]);
1982
+ });
1983
+ _xAj = P.map((p) => p[0]);
1984
+ _yAj = P.map((p) => p[1]);
1985
+ }
1938
1986
  const smoothInputs = getSmoothInputs(_xAj, _yAj);
1939
1987
  const points = smoothInputs.length > 1 ? spline.points(smoothInputs) : smoothInputs;
1940
1988
  let smoothInputsLower = [];
@@ -1993,7 +2041,10 @@ class Line {
1993
2041
  break;
1994
2042
  }
1995
2043
  case "smooth": {
1996
- const length = (x - pX) * 0.35;
2044
+ const toPoint = (ax, ay, bx, by) => {
2045
+ const l = (bx - ax) * 0.35;
2046
+ return graphics.curve(ax + l, ay, bx - l, by, bx, by);
2047
+ };
1997
2048
  if (series[i][j] === null) {
1998
2049
  pathState = 0;
1999
2050
  } else {
@@ -2013,7 +2064,7 @@ class Line {
2013
2064
  }
2014
2065
  pathState = 1;
2015
2066
  if (j < series[i].length - 2) {
2016
- const p = graphics.curve(pX + length, pY, x - length, y, x, y);
2067
+ const p = via(toPoint);
2017
2068
  linePath += p;
2018
2069
  areaPath += p;
2019
2070
  break;
@@ -2031,7 +2082,7 @@ class Line {
2031
2082
  areaPaths.push(areaPath);
2032
2083
  pathState = -1;
2033
2084
  } else {
2034
- const p = graphics.curve(pX + length, pY, x - length, y, x, y);
2085
+ const p = via(toPoint);
2035
2086
  linePath += p;
2036
2087
  areaPath += p;
2037
2088
  if (j >= series[i].length - 2) {
@@ -2052,9 +2103,9 @@ class Line {
2052
2103
  break;
2053
2104
  }
2054
2105
  default: {
2055
- const pathToPoint = (curve2, x2, y3) => {
2106
+ const pathToPoint = (_ax, _ay, x2, y3) => {
2056
2107
  let path = "";
2057
- switch (curve2) {
2108
+ switch (curve) {
2058
2109
  case "stepline":
2059
2110
  path = graphics.line(x2, null, "H") + graphics.line(null, y3, "V");
2060
2111
  break;
@@ -2086,7 +2137,7 @@ class Line {
2086
2137
  }
2087
2138
  pathState = 1;
2088
2139
  if (j < series[i].length - 2) {
2089
- const p = pathToPoint(curve, x, y);
2140
+ const p = via(pathToPoint);
2090
2141
  linePath += p;
2091
2142
  areaPath += p;
2092
2143
  break;
@@ -2104,7 +2155,7 @@ class Line {
2104
2155
  areaPaths.push(areaPath);
2105
2156
  pathState = -1;
2106
2157
  } else {
2107
- const p = pathToPoint(curve, x, y);
2158
+ const p = via(pathToPoint);
2108
2159
  linePath += p;
2109
2160
  areaPath += p;
2110
2161
  if (j >= series[i].length - 2) {