apexcharts 8.2.0 → 8.3.1

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 (256) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +19793 -19713
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +38 -8
  6. package/dist/apexcharts.esm.js +1882 -1625
  7. package/dist/apexcharts.full.js +22044 -21634
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +21414 -21124
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +21413 -21123
  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 +478 -406
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +409 -334
  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 +409 -334
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +478 -406
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +19793 -19713
  29. package/dist/donut.common.js +2 -2
  30. package/dist/donut.esm.js +3 -9
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +478 -406
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +442 -324
  35. package/dist/features/annotations.common.js +2 -2
  36. package/dist/features/annotations.esm.js +65 -48
  37. package/dist/features/annotations.js +2 -2
  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 +2 -2
  48. package/dist/features/exports.esm.js +10 -4
  49. package/dist/features/exports.js +2 -2
  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 +64 -44
  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 +2 -2
  78. package/dist/features/morph.esm.js +9 -5
  79. package/dist/features/morph.js +2 -2
  80. package/dist/features/perspectives.common.js +2 -2
  81. package/dist/features/perspectives.esm.js +4 -1
  82. package/dist/features/perspectives.js +2 -2
  83. package/dist/features/raincloud.common.js +2 -2
  84. package/dist/features/raincloud.esm.js +26 -27
  85. package/dist/features/raincloud.js +2 -2
  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 +2 -2
  90. package/dist/features/stats.esm.js +52 -59
  91. package/dist/features/stats.js +2 -2
  92. package/dist/features/storyboard.common.js +2 -2
  93. package/dist/features/storyboard.esm.js +4 -1
  94. package/dist/features/storyboard.js +2 -2
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +48 -14
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +148 -18
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +150 -63
  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 +2 -2
  108. package/dist/features/weave.esm.js +13 -12
  109. package/dist/features/weave.js +2 -2
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +1068 -842
  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 +529 -464
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +80 -46
  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 +2 -2
  129. package/dist/pie.esm.js +3 -9
  130. package/dist/pie.js +2 -2
  131. package/dist/polarArea.common.js +2 -2
  132. package/dist/polarArea.esm.js +3 -9
  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 +2 -2
  137. package/dist/radialBar.esm.js +5 -12
  138. package/dist/radialBar.js +2 -2
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +97 -52
  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 +478 -406
  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 +138 -53
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +116 -94
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +138 -104
  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 +477 -405
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +40 -59
  168. package/src/assets/apexcharts.css +38 -8
  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 +68 -47
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Pie.js +2 -8
  175. package/src/charts/Radar.js +5 -7
  176. package/src/charts/Radial.js +2 -6
  177. package/src/charts/RangeBar.js +47 -43
  178. package/src/charts/Sunburst.js +101 -98
  179. package/src/charts/Treemap.js +150 -88
  180. package/src/charts/Unit.js +368 -250
  181. package/src/charts/Violin.js +48 -30
  182. package/src/charts/common/Breadcrumb.js +2 -2
  183. package/src/charts/common/Hierarchy.js +32 -11
  184. package/src/charts/common/Jitter.js +32 -7
  185. package/src/charts/common/Stats.js +30 -23
  186. package/src/charts/common/bar/DataLabels.js +76 -81
  187. package/src/charts/common/bar/Helpers.js +43 -7
  188. package/src/charts/common/line/Helpers.js +12 -15
  189. package/src/charts/common/partition/NodeTooltip.js +29 -7
  190. package/src/charts/common/partition/Partition.js +33 -1
  191. package/src/charts/common/treemap/Helpers.js +3 -11
  192. package/src/charts/common/treemap/Nested.js +2 -3
  193. package/src/features/raincloud.js +16 -10
  194. package/src/features/stats.js +67 -62
  195. package/src/locales/en.json +2 -1
  196. package/src/locales/ro.json +3 -2
  197. package/src/modules/Animations.js +102 -95
  198. package/src/modules/AxisMapping.js +47 -12
  199. package/src/modules/Core.js +4 -0
  200. package/src/modules/CoreUtils.js +18 -42
  201. package/src/modules/Data.js +23 -24
  202. package/src/modules/DataLabels.js +6 -6
  203. package/src/modules/Exports.js +12 -5
  204. package/src/modules/Fill.js +17 -8
  205. package/src/modules/Filters.js +50 -50
  206. package/src/modules/Graphics.js +69 -51
  207. package/src/modules/Markers.js +3 -1
  208. package/src/modules/MorphTypeChange.js +13 -7
  209. package/src/modules/Range.js +44 -29
  210. package/src/modules/RendererController.js +17 -3
  211. package/src/modules/Scales.js +32 -9
  212. package/src/modules/Series.js +41 -19
  213. package/src/modules/Theme.js +1 -1
  214. package/src/modules/Toolbar.js +3 -2
  215. package/src/modules/UnitMarkRegistry.js +0 -5
  216. package/src/modules/ZoomPanSelection.js +123 -2
  217. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  218. package/src/modules/animations/Easing.js +2 -1
  219. package/src/modules/animations/LengthTransition.js +22 -2
  220. package/src/modules/annotations/Helpers.js +68 -52
  221. package/src/modules/axes/Grid.js +21 -7
  222. package/src/modules/axes/YAxis.js +8 -9
  223. package/src/modules/dimensions/Dimensions.js +9 -3
  224. package/src/modules/dimensions/Grid.js +2 -2
  225. package/src/modules/dimensions/XAxis.js +2 -5
  226. package/src/modules/drilldown/Breadcrumb.js +5 -2
  227. package/src/modules/helpers/Destroy.js +1 -1
  228. package/src/modules/helpers/UpdateHelpers.js +33 -15
  229. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  230. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  231. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  232. package/src/modules/legend/Helpers.js +8 -1
  233. package/src/modules/legend/Legend.js +11 -12
  234. package/src/modules/license/LicenseEnforcer.js +5 -0
  235. package/src/modules/settings/Defaults.js +28 -56
  236. package/src/modules/settings/Globals.js +5 -0
  237. package/src/modules/settings/Options.js +7 -7
  238. package/src/modules/settings/TypeAliases.js +33 -16
  239. package/src/modules/streamgraph/StreamLabels.js +1 -0
  240. package/src/modules/tooltip/Labels.js +73 -76
  241. package/src/modules/tooltip/Marker.js +25 -21
  242. package/src/modules/tooltip/Position.js +88 -51
  243. package/src/modules/tooltip/Tooltip.js +242 -255
  244. package/src/modules/tooltip/Utils.js +71 -130
  245. package/src/modules/tooltip/constants.js +5 -5
  246. package/src/modules/trellis/Trellis.js +6 -0
  247. package/src/modules/trellis/TrellisChrome.js +18 -7
  248. package/src/modules/trellis/TrellisSync.js +2 -0
  249. package/src/modules/trellis/TrellisTooltip.js +2 -11
  250. package/src/modules/weave/WeaveHost.js +18 -12
  251. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  252. package/src/ssr/DOMShim.js +10 -0
  253. package/src/svg/SVGFilter.js +26 -17
  254. package/src/types/internal.d.ts +9 -3
  255. package/src/utils/Utils.js +0 -14
  256. package/types/apexcharts.d.ts +33 -12
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,l=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&o(t,i,e[i]);if(n)for(var i of n(e))r.call(e,i)&&o(t,i,e[i]);return t},a=(t,n)=>e(t,i(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const u=h(require("apexcharts/core")),c="__apexcharts_series_transforms__";globalThis[c]||(globalThis[c]={});const d=u.__apex_Utils;function p(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const n=(i-1)*e,s=Math.floor(n),r=Math.ceil(n);return s===r?t[s]:t[s]+(t[r]-t[s])*(n-s)}function f(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=i.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(i),e=p(i,.75)-p(i,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),o=i[0]-2*s,l=(i[n-1]+2*s-o)/(r-1),a=1/(n*s*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<r;t++){const e=o+t*l;let r=0;for(let t=0;t<n;t++){const n=(e-i[t])/s;r+=Math.exp(-.5*n*n)}h.push([e,r*a])}return{density:h,bandwidth:s}}function g(t,e){var i,n;const s=null!=(i=t.statsDerived)?i:t.statsDerived={};return null!=(n=s[e])?n:s[e]=new Map}function x(t,e,i){const n=t.get(e);if(!n||!Array.isArray(i)||n.length!==i.length)return!1;for(let t=0;t<i.length;t++){const e=n[t],s=i[t];if(e!==s&&(!Array.isArray(e)||!Array.isArray(s)||e[0]!==s[0]||e[1]!==s[1]))return!1}return!0}var b,y;b="raincloud","function"==typeof(y=function(t,e){var i,n;if(!Array.isArray(t))return t;const s=(null==(i=e.config.plotOptions)?void 0:i.violin)||{},r=s.kde||{},o=(null==(n=s.box)?void 0:n.whiskers)||"minmax",h=g(e,"raincloudDensity"),u=g(e,"raincloudSummary");return t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"raincloud"!==t.type&&"violin"!==t.type)return t;let i=!1;const n=t.data.map((t,n)=>{const s=e+":"+n,c=(null==t?void 0:t.y)&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{},g=!Array.isArray(c.density)||!c.density.length||x(h,s,c.density),b=!Array.isArray(c.summary)||5!==c.summary.length||x(u,s,c.summary);if(!g&&!b)return t;const y=function(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let i=null;if(Array.isArray(t.points)?i=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?i=t.y.points:Array.isArray(t.y)&&"number"==typeof t.y[0]&&(i=t.y),!i)return null;const n=[];for(let t=0;t<i.length;t++){const e=d.parseNumber(i[t]);null!==e&&isFinite(e)&&n.push(e)}return n.length?n:null}(t);if(!y)return t;const m=l({},c);if(g){const e=f(y,{bandwidth:r.bandwidth,resolution:r.resolution});if(!e)return t;m.density=e.density,m.points=y,h.set(s,e.density)}if(b){const t=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=p(i,.25),s=p(i,.5),r=p(i,.75),o=r-n;let l=i[0],a=i[i.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=n-1.5*o,e=r+1.5*o;let s=0;for(;s<i.length&&i[s]<t;)s++;let u=i.length-1;for(;u>=0&&i[u]>e;)u--;s<=u&&(l=i[s],a=i[u],h=i.slice(0,s).concat(i.slice(u+1)))}return{summary:[l,n,s,r,a],outliers:h,iqr:o}}(y,{whiskers:o});t&&(m.summary=t.summary,u.set(s,t.summary))}return i=!0,a(l({},t),{y:m})});return i?a(l({},t),{data:n}):t})})?globalThis[c][b]=y:console.warn(`ApexCharts: registerSeriesTransform("${b}") expects a function (series, w) => series.`);const m=u.__apex_CoreUtils,v=u.__apex_ChartFactory_getChartClass,P=u.__apex_Fill,w=u.__apex_Graphics,M=u.__apex_Series,S=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=F(i,n),r=1;for(let o=t.length-1;r<o;r++)i=n,n=t[r+1],e[r]=.5*(s+(s=F(i,n)));return e[r]=s,e}(t),i=t.length-1,n=[];let s,r,o,l;for(let n=0;n<i;n++)o=F(t[n],t[n+1]),Math.abs(o)<1e-6?e[n]=e[n+1]=0:(s=e[n]/o,r=e[n+1]/o,l=s*s+r*r,l>9&&(l=3*o/Math.sqrt(l),e[n]=l*s,e[n+1]=l*r));for(let s=0;s<=i;s++)l=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([l||0,e[s]*l||0]);return n},O={points(t){const e=S(t),i=t[1],n=t[0],s=[],r=e[1],o=e[0];s.push(n,[n[0]+o[0],n[1]+o[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],r=e[i];s.push([n[0]-r[0],n[1]-r[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function F(t,e){return(e[1]-t[1])/(e[0]-t[0])}function W({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:r,realIndex:o,wrapClass:l,pointClass:a}){if(!s||!1===s.show||!n.length)return;const h=null!=s.opacity?s.opacity:.9,u=null!=s.strokeColor?s.strokeColor:"#fff",c=null!=s.strokeWidth?s.strokeWidth:1,d=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:d?`${l} apexcharts-element-hidden`:l});d&&e.globals.delayedElements.push({el:p.node}),n.forEach(({groups:i,j:n})=>{const l=r?e.globals.colors[n]:e.globals.colors[o],d=s.fillColor,f="series"===d?l:"series-dark"===d?A(l,.45):d||A(l,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:f,stroke:c>0?u:"none",strokeWidth:c,fillOpacity:h,classes:a});s.attr("data:realIndex",o),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",p.add(s)})}),i.add(p)}function A(t,e){const i=d.parseHex(t);if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function C(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,r=d.parseHex(t[n])||[0,0,0],o=d.parseHex(t[Math.min(n+1,t.length-1)])||r,l=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${l(r[0],o[0])},${l(r[1],o[1])},${l(r[2],o[2])})`}function H(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function j(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function I(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const $=class{};class _ extends ${constructor(t,e,i){!function(){const t=v("bar");if(Object.getPrototypeOf(_)===t)return;Object.setPrototypeOf(_,t),Object.setPrototypeOf(_.prototype,t.prototype)}(),super(t,e,i)}draw(t,e,i){var n,s,r;const o=this.w,l=new w(this.w),a=new P(this.w);this.violinOptions=o.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=D(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:D(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?k(this.boxOptions.width,.15):0,this.rainFrac=k(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=o.config.plotOptions.bar.distributed,this.isHorizontal=o.config.plotOptions.bar.horizontal,this.coreUtils=new m(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const h=l.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let u,c;const p=[],f=[],g=o.globals.comboCharts?i[e]:e,{columnGroupIndex:x}=this.barHelpers.getGroupIndex(g),b=l.group({class:"apexcharts-series",seriesName:d.escapeString(o.seriesData.seriesNames[g]),rel:e+1,"data:realIndex":g});M.addCollapsedClassToSeries(this.w,b,g),t[e].length>0&&(this.visibleI=this.visibleI+1);const y=this.setSeriesAxis(g),m=this.barHelpers.initialPositions(g),{y:v,barHeight:P,yDivision:w,zeroW:S,x:O,barWidth:F,xDivision:A,zeroH:C}=m;c=v,u=O,f.push(u+(null!=F?F:0)/2);const H=l.group({class:"apexcharts-datalabels","data:realIndex":g});if(this.seriesMaxWeight=0,"group"===this.normalize){(o.violinData.seriesViolinDensity[g]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const j=[];for(let i=0;i<o.globals.dataPoints;i++){const l=this.barHelpers.getStrokeWidth(e,i,g),h=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:g,translationsIndex:y},y:c,yDivision:w,barHeight:P,zeroW:S}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:g,translationsIndex:y},x:u,xDivision:A,barWidth:F,zeroH:C});u=h.x,c=h.y,i>0&&f.push(h.center),p.push(h.alongRepresentative);const d=this.buildPointsSubPath({realIndex:g,j:i,center:h.center,halfExtent:h.halfExtent,alongFn:h.alongFn,density:h.density,maxWeight:h.maxWeight,cloudBase:h.cloudBase,cloudMaxPx:h.cloudMaxPx,rainCenter:h.rainCenter,rainHalfPx:h.rainHalfPx});d.length&&j.push({groups:d,j:i});const m=a.fillPath({seriesNumber:this.distributed?i:g,dataPointIndex:i,color:this.distributed?o.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:g,pathFill:m,lineFill:o.globals.stroke.colors[g],j:i,i:e,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:l,elSeries:b,x:u,y:c,series:t,columnGroupIndex:x,barHeight:P,barWidth:F,elDataLabelsWrap:H,visibleSeries:this.visibleI,type:"violin"});const v=b.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(v&&isFinite(h.alongRepresentative)&&v.setAttribute(this.isHorizontal?"cx":"cy",`${h.alongRepresentative}`),v&&v.setAttribute("data:center",`${h.center}`),h.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;h.boxPaths.forEach(n=>{this.renderSeries({realIndex:g,pathFill:n.filled?this.boxOptions.fillColor||m:"none",lineFill:o.globals.stroke.colors[g],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:b,x:u,y:c,series:t,columnGroupIndex:x,barHeight:P,barWidth:F,elDataLabelsWrap:H,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box"})})}const M=!v&&(null==(r=null==(s=o.globals.barCanvasCoords)?void 0:s[g])?void 0:r[i]);M&&isFinite(h.alongRepresentative)&&(this.isHorizontal?M.cx=h.alongRepresentative:(M.bodyCx=M.cx,M.cx=h.center,M.cy=h.alongRepresentative))}W({graphics:l,w:o,elSeries:b,pointsByCat:j,options:this.pointsOptions,distributed:this.distributed,realIndex:g,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),o.globals.seriesXvalues[g]=f,o.globals.seriesYvalues[g]=p,h.add(b)}return h}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){var r,o,l,a,h,u,c;const d=this.w,{realIndex:p,j:f,translationsIndex:g}=t,x=this.yRatio[g];d.axisFlags.isXNumeric&&(e=(d.seriesData.seriesX[p][f]-d.globals.minX)/this.xRatio-n/2);const b=e+n*this.visibleI+n/2,y=n/2,m=this.getDensity(p,f),v=this.effectiveMaxWeight(m),P=t=>s-this.logVal(t,p)/x,w=B({halfExtent:y,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(a=this.rainFrac)?a:0}),M=b+w.cloudBaseOff,S=this.buildBodyPath({nodes:m.nodes,center:M,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:P,collapsed:!1,sideSign:this.cloudSign});let O=null;const F=null==(u=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:u.getInitialPathFor(p,f);return F?O=F:d.globals.previousPaths.length>0&&(O=this.getPreviousPath(p,f,S)),null==O&&(O=this.buildBodyPath({nodes:m.nodes,center:M,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:P,collapsed:!0,sideSign:this.cloudSign})),d.axisFlags.isXNumeric||(e+=i),{pathTo:S,pathFrom:O,x:e,y:s,center:b,halfExtent:y,alongFn:P,density:m,maxWeight:v,cloudBase:M,cloudMaxPx:w.cloudMaxPx,rainCenter:b+w.rainCenterOff,rainHalfPx:w.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:f,boxCenter:b+w.boxCenterOff,boxHalfPx:w.boxHalfPx,alongFn:P,vertical:!0}),alongRepresentative:P(null!=(c=this.series[t.i][f])?c:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){var r,o,l,a,h,u,c;const d=this.w,{realIndex:p,j:f}=t,g=this.invertedYRatio,x=e+n*this.visibleI+n/2,b=n/2,y=this.getDensity(p,f),m=this.effectiveMaxWeight(y),v=t=>s+this.logVal(t,p)/g,P=B({halfExtent:b,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(a=this.rainFrac)?a:0}),w=x+P.cloudBaseOff,M=this.buildBodyPath({nodes:y.nodes,center:w,halfExtent:P.cloudMaxPx,maxWeight:m,vertical:!1,alongFn:v,collapsed:!1,sideSign:this.cloudSign});let S=null;const O=null==(u=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:u.getInitialPathFor(p,f);return O?S=O:d.globals.previousPaths.length>0&&(S=this.getPreviousPath(p,f,M)),null==S&&(S=this.buildBodyPath({nodes:y.nodes,center:w,halfExtent:P.cloudMaxPx,maxWeight:m,vertical:!1,alongFn:v,collapsed:!0,sideSign:this.cloudSign})),{pathTo:M,pathFrom:S,x:s,y:e+=i,center:x,halfExtent:b,alongFn:v,maxWeight:m,density:y,cloudBase:w,cloudMaxPx:P.cloudMaxPx,rainCenter:x+P.rainCenterOff,rainHalfPx:P.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:f,boxCenter:x+P.boxCenterOff,boxHalfPx:P.boxHalfPx,alongFn:v,vertical:!1}),alongRepresentative:v(null!=(c=this.series[t.i][f])?c:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const r=[];let o=null;for(const t of s){const e=n.values[t];null!==o&&e===o||(r.push({v:e,w:n.weights[t]}),o=e)}return{nodes:r,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:r,collapsed:o,sideSign:l=0}){const a=new w(this.w);if(0===t.length){const t=r(0);return s?a.move(e,t)+a.line(e,t):a.move(t,e)+a.line(t,e)}const h=t=>{if(o||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},u=[],c=[];for(let i=0;i<t.length;i++){const n=r(t[i].v),o=h(t[i].w),a=0===l?e+o:e+l*o,d=0===l?e-o:e;s?(u.push([a,n]),c.push([d,n])):(u.push([n,a]),c.push([n,d]))}return c.reverse(),this.smoothSegment(u,s,!1)+this.smoothSegment(c,s,!0)+"z"}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:r}){var o,l;const a=this.w;if(!this.boxShown||n<=0)return null;const h=null==(o=a.violinData.seriesViolinSummary[t])?void 0:o[e];if(!h)return null;const u=n*Math.min(1,Math.max(0,null!=(l=this.boxOptions.capWidth)?l:.5)),[c,d,p,f,g]=h.map(t=>s(t)),x=(t,e)=>{const n=new w(this.w),s=(t,e)=>r?[t,e]:[e,t],o=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),l=i;return{whiskers:o([s(l,c),s(l,d)])+o([s(l,f),s(l,g)])+o([s(l-t,c),s(l+t,c)])+o([s(l-t,g),s(l+t,g)]),box:o([s(l-e,d),s(l+e,d),s(l+e,f),s(l-e,f)])+"z"+o([s(l-e,p),s(l+e,p)])}},b=x(u,n),y=x(0,0),m=(i,n)=>{let s=null;return a.globals.previousPaths.length>0&&(s=this.getPreviousPath(t,e,i)),null==s?n:s};return[{pathTo:b.whiskers,pathFrom:m(b.whiskers,y.whiskers),filled:!1},{pathTo:b.box,pathFrom:m(b.box,y.box),filled:!0}]}smoothSegment(t,e,i){const n=new w(this.w),s=t[0];let r=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=n.line(t[e][0],t[e][1]);return r}const o=t.map(([t,i])=>e?[i,t]:[t,i]),l=O.points(o);return r+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?l.map(z):l),r}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:r,maxWeight:o,cloudBase:l,cloudMaxPx:a,rainCenter:h,rainHalfPx:u}){var c;const d=0!==this.rainSign,p=d?h:0!==this.cloudSign?l:i,f=d?u:0!==this.cloudSign?a:n;return function({w:t,points:e,seedA:i,seedB:n,center:s,halfExtent:r,alongFn:o,isHorizontal:l,options:a,clampAt:h,sideSign:u}){const c=a;if(!c||!1===c.show)return[];if(!e||!e.length)return[];const d=c.maxPoints||3e3,p=e.length>d?Math.ceil(e.length/d):1,f=null!=c.size?c.size:2.5,g=r*(null!=c.jitter?c.jitter:.5),x=!1!==c.constrainToViolin&&"function"==typeof h,b="square"===c.shape,y=c.colorScale,m=y&&Array.isArray(y.colors)&&y.colors.length>0,v=m?Math.max(2,y.steps||24):1,P=m&&null!=y.min?y.min:t.globals.minY,w=(m&&null!=y.max?y.max:t.globals.maxY)-P||1,M=m?new Array(v).fill(""):[""];for(let t=0;t<e.length;t+=p){const r=e[t],a=o(r);let c=2*(H(7919*i+100003*n+t)-.5)*g;if(x){const t=h(r);c>t&&(c=t),c<-t&&(c=-t)}u&&(c=Math.abs(c)*u);const d=l?a:s+c,p=l?s+c:a,y=b?I(d,p,f):j(d,p,f);if(m){let t=(r-P)/w;t<0&&(t=0),t>1&&(t=1),M[Math.round(t*(v-1))]+=y}else M[0]+=y}if(!m)return M[0]?[{fill:null,d:M[0]}]:[];const S=[];for(let t=0;t<v;t++)M[t]&&S.push({fill:C(y.colors,t/(v-1)),d:M[t]});return S}({w:this.w,points:null==(c=this.w.violinData.seriesViolinPoints[t])?void 0:c[e],seedA:t,seedB:e,center:p,halfExtent:f,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:t=>this.halfWidthAtValue(t,r,f,o),sideSign:d?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,r=null!=n?n:e.maxWeight;if(!s.length||r<=0)return 0;const o=t=>Math.min(i,t/r*i*this.bandwidthScale);if(t<=s[0].v)return o(s[0].w);if(t>=s[s.length-1].v)return o(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],r=n.v===i.v?0:(t-i.v)/(n.v-i.v);return o(i.w+(n.w-i.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function z(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function D(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function k(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}function B({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const r=n*t,o=0===i?t:s*t,l=0===i?0:i*(t-o);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:l,rainHalfPx:o};const a=0===i?0:s,h=2*Math.max(0,1-a-n)*t,u=e*(t-h);return{cloudBaseOff:u,cloudMaxPx:h,boxCenterOff:u-e*r,boxHalfPx:r,rainCenterOff:l,rainHalfPx:o}}u.default.use({violin:_}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.default});
5
+ "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,l=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&o(t,i,e[i]);if(n)for(var i of n(e))r.call(e,i)&&o(t,i,e[i]);return t},a=(t,n)=>e(t,i(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const u=h(require("apexcharts/core")),c="__apexcharts_series_transforms__";globalThis[c]||(globalThis[c]={});const d=u.__apex_Utils;function p(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const n=(i-1)*e,s=Math.floor(n),r=Math.ceil(n);return s===r?t[s]:t[s]+(t[r]-t[s])*(n-s)}function f(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=p(i,.25),s=p(i,.5),r=p(i,.75),o=r-n;let l=i[0],a=i[i.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=n-1.5*o,e=r+1.5*o;let s=0;for(;s<i.length&&i[s]<t;)s++;let u=i.length-1;for(;u>=0&&i[u]>e;)u--;s<=u&&(l=i[s],a=i[u],h=i.slice(0,s).concat(i.slice(u+1)))}return{summary:[l,n,s,r,a],outliers:h,iqr:o}}function x(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),n=i.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let i=0;for(let n=0;n<e;n++)i+=t[n];const n=i/e;let s=0;for(let i=0;i<e;i++){const e=t[i]-n;s+=e*e}return Math.sqrt(s/e)}(i),e=p(i,.75)-p(i,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),o=i[0]-2*s,l=(i[n-1]+2*s-o)/(r-1),a=1/(n*s*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<r;t++){const e=o+t*l;let r=0;for(let t=0;t<n;t++){const n=(e-i[t])/s;r+=Math.exp(-.5*n*n)}h.push([e,r*a])}return{density:h,bandwidth:s}}function g(t,e){const i=t.statsDerived||(t.statsDerived={});return i[e]||(i[e]=new Map)}function b(t,e,i,n,s){const r=JSON.stringify(n)+i;let o=t.get(e);return o&&o.s===r||t.set(e,o={s:r,e:s(i,n)}),o.e}function y(t,e,i){const n=(t.get(e)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(i)}var v,m;v="raincloud","function"==typeof(m=function(t,e){var i,n;if(!Array.isArray(t))return t;const s=(null==(i=e.config.plotOptions)?void 0:i.violin)||{},r=s.kde||{},o=(null==(n=s.box)?void 0:n.whiskers)||"minmax",h=g(e,"raincloudDensity"),u=g(e,"raincloudSummary");return t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"raincloud"!==t.type&&"violin"!==t.type)return t;let i=!1;const n=t.data.map((t,n)=>{const s=e+":"+n,c=(null==t?void 0:t.y)&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{},p=!Array.isArray(c.density)||!c.density.length||y(h,s,c.density),g=!Array.isArray(c.summary)||5!==c.summary.length||y(u,s,c.summary);if(!p&&!g)return t;const v=function(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let i=null;if(Array.isArray(t.points)?i=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?i=t.y.points:Array.isArray(t.y)&&"number"==typeof t.y[0]&&(i=t.y),!i)return null;const n=[];for(let t=0;t<i.length;t++){const e=d.parseNumber(i[t]);null!==e&&isFinite(e)&&n.push(e)}return n.length?n:null}(t);if(!v)return t;const m=l({},c);if(p){const e=b(h,s,v,{bandwidth:r.bandwidth,resolution:r.resolution},x);if(!e)return t;m.density=e.density,m.points=v}if(g){const t=b(u,s,v,{whiskers:o},f);t&&(m.summary=t.summary)}return i=!0,a(l({},t),{y:m})});return i?a(l({},t),{data:n}):t})})?globalThis[c][v]=m:console.warn(`ApexCharts: registerSeriesTransform("${v}") expects a function (series, w) => series.`);const P=u.__apex_CoreUtils,S=u.__apex_ChartFactory_getChartClass,w=u.__apex_Fill,M=u.__apex_Graphics,O=u.__apex_Series;function F(t,e,i){var n,s,r,o;if(null==(n=t.axisFlags)?void 0:n.isXNumeric){const n=null==(r=null==(s=t.seriesData)?void 0:s.seriesX)?void 0:r[e];if(n&&n.length&&null!=n[i])return"x:"+n[i]}const l=null==(o=t.globals.labels)?void 0:o[i];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+i}const C=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=j(i,n),r=1;for(let o=t.length-1;r<o;r++)i=n,n=t[r+1],e[r]=.5*(s+(s=j(i,n)));return e[r]=s,e}(t),i=t.length-1,n=[];let s,r,o,l;for(let n=0;n<i;n++)o=j(t[n],t[n+1]),Math.abs(o)<1e-6?e[n]=e[n+1]=0:(s=e[n]/o,r=e[n+1]/o,l=s*s+r*r,l>9&&(l=3*o/Math.sqrt(l),e[n]=l*s,e[n+1]=l*r));for(let s=0;s<=i;s++)l=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([l||0,e[s]*l||0]);return n},W={points(t){const e=C(t),i=t[1],n=t[0],s=[],r=e[1],o=e[0];s.push(n,[n[0]+o[0],n[1]+o[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],r=e[i];s.push([n[0]-r[0],n[1]-r[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function j(t,e){return(e[1]-t[1])/(e[0]-t[0])}function A({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:r,realIndex:o,wrapClass:l,pointClass:a}){if(!s||!1===s.show||!n.length)return;const h=null!=s.opacity?s.opacity:.9,u=null!=s.strokeColor?s.strokeColor:"#fff",c=null!=s.strokeWidth?s.strokeWidth:1,d=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:d?`${l} apexcharts-element-hidden`:l});d&&e.globals.delayedElements.push({el:p.node}),n.forEach(({groups:i,j:n})=>{const l=r?e.globals.colors[n]:e.globals.colors[o],d=s.fillColor,f="series"===d?l:"series-dark"===d?H(l,.45):d||H(l,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:f,stroke:c>0?u:"none",strokeWidth:c,fillOpacity:h,classes:a});s.attr("data:realIndex",o),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",p.add(s)})}),i.add(p)}function H(t,e){const i=d.parseColor(t)||d.parseColor(d.resolveColor(t));if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function I(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,r=d.parseHex(t[n])||[0,0,0],o=d.parseHex(t[Math.min(n+1,t.length-1)])||r,l=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${l(r[0],o[0])},${l(r[1],o[1])},${l(r[2],o[2])})`}function $(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function _(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function D(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const z=class{};class B extends z{constructor(t,e,i){!function(){const t=S("bar");if(Object.getPrototypeOf(B)===t)return;Object.setPrototypeOf(B,t),Object.setPrototypeOf(B.prototype,t.prototype)}(),super(t,e,i)}draw(t,e,i){var n,s,r;const o=this.w,l=new M(this.w),a=new w(this.w);this.violinOptions=o.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.jx=function(t,e){let i=1/0,n=-1/0;return t.slice(0,e.seriesData.series.length).flat(2).forEach(t=>{t===+t&&(t<i&&(i=t),t>n&&(n=t))}),[i,n]}(o.violinData.seriesViolinPoints,o),this.boxOptions=this.violinOptions.box||{},this.cloudSign=k(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:k(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?V(this.boxOptions.width,.15):0,this.rainFrac=V(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=o.config.plotOptions.bar.distributed,this.isHorizontal=o.config.plotOptions.bar.horizontal,this.coreUtils=new P(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,i);const h=l.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let u,c;const p=[],f=[],x=o.globals.comboCharts?i[e]:e,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(x),b=l.group({class:"apexcharts-series",seriesName:d.escapeString(o.seriesData.seriesNames[x]),rel:e+1,"data:realIndex":x});O.addCollapsedClassToSeries(this.w,b,x),t[e].length>0&&(this.visibleI=this.visibleI+1);const y=this.setSeriesAxis(x),v=this.barHelpers.initialPositions(x),{y:m,barHeight:P,yDivision:S,zeroW:w,x:M,barWidth:F,xDivision:C,zeroH:W}=v;c=m,u=M,f.push(u+(null!=F?F:0)/2);const j=l.group({class:"apexcharts-datalabels","data:realIndex":x});if(this.seriesMaxWeight=0,"group"===this.normalize){(o.violinData.seriesViolinDensity[x]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const H=[];for(let i=0;i<o.globals.dataPoints;i++){const l=this.barHelpers.getStrokeWidth(e,i,x),h=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:y},y:c,yDivision:S,barHeight:P,zeroW:w}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:y},x:u,xDivision:C,barWidth:F,zeroH:W});u=h.x,c=h.y,i>0&&f.push(h.center),p.push(h.alongRepresentative);const d=this.buildPointsSubPath({realIndex:x,j:i,center:h.center,halfExtent:h.halfExtent,alongFn:h.alongFn,density:h.density,maxWeight:h.maxWeight,cloudBase:h.cloudBase,cloudMaxPx:h.cloudMaxPx,rainCenter:h.rainCenter,rainHalfPx:h.rainHalfPx});d.length&&H.push({groups:d,j:i});const v=a.fillPath({seriesNumber:this.distributed?i:x,dataPointIndex:i,color:this.distributed?o.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:x,pathFill:v,lineFill:o.globals.stroke.colors[x],j:i,i:e,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:l,elSeries:b,x:u,y:c,series:t,columnGroupIndex:g,barHeight:P,barWidth:F,elDataLabelsWrap:j,visibleSeries:this.visibleI,type:"violin"});const m=b.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(m&&isFinite(h.alongRepresentative)&&m.setAttribute(this.isHorizontal?"cx":"cy",`${h.alongRepresentative}`),m&&m.setAttribute("data:center",`${h.center}`),h.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;h.boxPaths.forEach(n=>{this.renderSeries({realIndex:x,pathFill:n.filled?this.boxOptions.fillColor||v:"none",lineFill:o.globals.stroke.colors[x],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:b,x:u,y:c,series:t,columnGroupIndex:g,barHeight:P,barWidth:F,elDataLabelsWrap:j,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box",noLabel:!0})})}const M=!m&&(null==(r=null==(s=o.globals.barCanvasCoords)?void 0:s[x])?void 0:r[i]);M&&isFinite(h.alongRepresentative)&&(this.isHorizontal?M.cx=h.alongRepresentative:(M.bodyCx=M.cx,M.cx=h.center,M.cy=h.alongRepresentative))}A({graphics:l,w:o,elSeries:b,pointsByCat:H,options:this.pointsOptions,distributed:this.distributed,realIndex:x,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),o.globals.seriesXvalues[x]=f,o.globals.seriesYvalues[x]=p,h.add(b)}return h}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){var r,o,l,a,h,u,c;const d=this.w,{realIndex:p,j:f,translationsIndex:x}=t,g=this.yRatio[x]*(this.isReversed?-1:1);let b=e+n*this.visibleI;d.axisFlags.isXNumeric&&({x:e,barXPosition:b}=this.getBarXForNumericXAxis({x:e,barWidth:n,realIndex:p,j:f}));const y=b+n/2,v=n/2,m=this.getDensity(p,f),P=this.effectiveMaxWeight(m),S=t=>s-this.logVal(t,p)/g,w=T({halfExtent:v,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(a=this.rainFrac)?a:0}),M=y+w.cloudBaseOff,O=this.buildBodyPath({nodes:m.nodes,center:M,halfExtent:w.cloudMaxPx,maxWeight:P,vertical:!0,alongFn:S,collapsed:!1,sideSign:this.cloudSign});let F=null;const C=null==(u=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:u.getInitialPathFor(p,f);return C?F=C:d.globals.previousPaths.length>0&&(F=this._prevBody(p,f,O)),null==F&&(F=this.buildBodyPath({nodes:m.nodes,center:M,halfExtent:w.cloudMaxPx,maxWeight:P,vertical:!0,alongFn:S,collapsed:!0,sideSign:this.cloudSign})),d.axisFlags.isXNumeric||(e+=i),{pathTo:O,pathFrom:F,x:e,y:s,center:y,halfExtent:v,alongFn:S,density:m,maxWeight:P,cloudBase:M,cloudMaxPx:w.cloudMaxPx,rainCenter:y+w.rainCenterOff,rainHalfPx:w.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:f,boxCenter:y+w.boxCenterOff,boxHalfPx:w.boxHalfPx,alongFn:S,vertical:!0}),alongRepresentative:S(null!=(c=d.seriesData.series[p][f])?c:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){var r,o,l,a,h,u,c;const d=this.w,{realIndex:p,j:f}=t,x=this.invertedYRatio*(this.isReversed?-1:1),g=e+n*this.visibleI+n/2,b=n/2,y=this.getDensity(p,f),v=this.effectiveMaxWeight(y),m=t=>s+this.logVal(t,p)/x,P=T({halfExtent:b,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(a=this.rainFrac)?a:0}),S=g+P.cloudBaseOff,w=this.buildBodyPath({nodes:y.nodes,center:S,halfExtent:P.cloudMaxPx,maxWeight:v,vertical:!1,alongFn:m,collapsed:!1,sideSign:this.cloudSign});let M=null;const O=null==(u=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:u.getInitialPathFor(p,f);return O?M=O:d.globals.previousPaths.length>0&&(M=this._prevBody(p,f,w)),null==M&&(M=this.buildBodyPath({nodes:y.nodes,center:S,halfExtent:P.cloudMaxPx,maxWeight:v,vertical:!1,alongFn:m,collapsed:!0,sideSign:this.cloudSign})),{pathTo:w,pathFrom:M,x:s,y:e+=i,center:g,halfExtent:b,alongFn:m,maxWeight:v,density:y,cloudBase:S,cloudMaxPx:P.cloudMaxPx,rainCenter:g+P.rainCenterOff,rainHalfPx:P.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:f,boxCenter:g+P.boxCenterOff,boxHalfPx:P.boxHalfPx,alongFn:m,vertical:!1}),alongRepresentative:m(null!=(c=d.seriesData.series[p][f])?c:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const r=[];let o=null;for(const t of s){const e=n.values[t];null!==o&&e===o||(r.push({v:e,w:n.weights[t]}),o=e)}return{nodes:r,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:r,collapsed:o,sideSign:l=0}){const a=new M(this.w);if(0===t.length){const t=r(0);return s?a.move(e,t)+a.line(e,t):a.move(t,e)+a.line(t,e)}const h=t=>{if(o||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},u=[],c=[];for(let i=0;i<t.length;i++){const n=r(t[i].v),o=h(t[i].w),a=0===l?e+o:e+l*o,d=0===l?e-o:e;s?(u.push([a,n]),c.push([d,n])):(u.push([n,a]),c.push([n,d]))}return c.reverse(),this.smoothSegment(u,s,!1)+this.smoothSegment(c,s,!0)+"z"}_prevBody(t,e,i){var n,s;const r=null==(s=null==(n=this._prevKeyedPaths(t))?void 0:n.get(F(this.w,t,e)))?void 0:s.d;return r&&B.pathCommandCount(r)===B.pathCommandCount(i)?r:null}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:r}){var o,l,a;const h=this.w;if(!this.boxShown||n<=0)return null;const u=null==(o=h.violinData.seriesViolinSummary[t])?void 0:o[e];if(!u)return null;const c=n*Math.min(1,Math.max(0,null!=(l=this.boxOptions.capWidth)?l:.5)),[d,p,f,x,g]=u.map(t=>s(t)),b=(t,e)=>{const n=new M(this.w),s=(t,e)=>r?[t,e]:[e,t],o=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),l=i;return{whiskers:o([s(l,d),s(l,p)])+o([s(l,x),s(l,g)])+o([s(l-t,d),s(l+t,d)])+o([s(l-t,g),s(l+t,g)]),box:o([s(l-e,p),s(l+e,p),s(l+e,x),s(l-e,x)])+"z"+o([s(l-e,f),s(l+e,f)])}},y=b(c,n),v=b(0,0),m=h.globals.previousPaths.length?this._prevKeyedPaths(t):null,P=(null==(a=null==m?void 0:m.get(F(h,t,e)))?void 0:a.box)||[];return[{pathTo:y.whiskers,pathFrom:P[0]||v.whiskers,filled:!1},{pathTo:y.box,pathFrom:P[1]||v.box,filled:!0}]}smoothSegment(t,e,i){const n=new M(this.w),s=t[0];let r=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=n.line(t[e][0],t[e][1]);return r}const o=t.map(([t,i])=>e?[i,t]:[t,i]),l=W.points(o);return r+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?l.map(E):l),r}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:r,maxWeight:o,cloudBase:l,cloudMaxPx:a,rainCenter:h,rainHalfPx:u}){var c;const d=0!==this.rainSign,p=d?h:0!==this.cloudSign?l:i,f=d?u:0!==this.cloudSign?a:n;return function({points:t,extent:e,seedA:i,seedB:n,center:s,halfExtent:r,alongFn:o,isHorizontal:l,options:a,clampAt:h,sideSign:u}){var c,d;const p=a;if(!p||!1===p.show)return[];if(!t||!t.length)return[];const f=p.maxPoints||3e3,x=t.length>f?Math.ceil(t.length/f):1,g=null!=p.size?p.size:2.5,b=r*(null!=p.jitter?p.jitter:.5),y=!1!==p.constrainToViolin&&"function"==typeof h,v="square"===p.shape,m=p.colorScale,P=m&&Array.isArray(m.colors)&&m.colors.length>0,S=P?Math.max(2,m.steps||24):1,w=null!=(c=null==m?void 0:m.min)?c:e[0],M=(null!=(d=null==m?void 0:m.max)?d:e[1])-w||1,O=P?new Array(S).fill(""):[""];for(let e=0;e<t.length;e+=x){const r=t[e],a=o(r);let c=2*($(7919*i+100003*n+e)-.5)*b;if(y){const t=h(r);c>t&&(c=t),c<-t&&(c=-t)}u&&(c=Math.abs(c)*u);const d=l?a:s+c,p=l?s+c:a,f=v?D(d,p,g):_(d,p,g);if(P){let t=(r-w)/M;t<0&&(t=0),t>1&&(t=1),O[Math.round(t*(S-1))]+=f}else O[0]+=f}if(!P)return O[0]?[{fill:null,d:O[0]}]:[];const F=[];for(let t=0;t<S;t++)O[t]&&F.push({fill:I(m.colors,t/(S-1)),d:O[t]});return F}({points:null==(c=this.w.violinData.seriesViolinPoints[t])?void 0:c[e],extent:this.jx,seedA:t,seedB:e,center:p,halfExtent:f,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:t=>this.halfWidthAtValue(t,r,f,o),sideSign:d?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,r=null!=n?n:e.maxWeight;if(!s.length||r<=0)return 0;const o=t=>Math.min(i,t/r*i*this.bandwidthScale);if(t<=s[0].v)return o(s[0].w);if(t>=s[s.length-1].v)return o(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],r=n.v===i.v?0:(t-i.v)/(n.v-i.v);return o(i.w+(n.w-i.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function E(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function k(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function V(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}function T({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const r=n*t,o=0===i?t:s*t,l=0===i?0:i*(t-o);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:l,rainHalfPx:o};const a=0===i?0:s,h=2*Math.max(0,1-a-n)*t,u=e*(t-h);return{cloudBaseOff:u,cloudMaxPx:h,boxCenterOff:u-e*r,boxHalfPx:r,rainCenterOff:l,rainHalfPx:o}}u.default.use({violin:B}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.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.1
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -148,24 +148,18 @@ function observationsOf(d, allowFlatY) {
148
148
  return out.length ? out : null;
149
149
  }
150
150
  function derivedStats(w, kind) {
151
- var _a, _b;
152
- const all = (_a = w.statsDerived) != null ? _a : w.statsDerived = {};
153
- return (_b = all[kind]) != null ? _b : all[kind] = /* @__PURE__ */ new Map();
151
+ const all = w.statsDerived || (w.statsDerived = {});
152
+ return all[kind] || (all[kind] = /* @__PURE__ */ new Map());
153
+ }
154
+ function deriveStat(derived, key, values, opts, fn) {
155
+ const s = JSON.stringify(opts) + values;
156
+ let hit = derived.get(key);
157
+ if (!hit || hit.s !== s) derived.set(key, hit = { s, e: fn(values, opts) });
158
+ return hit.e;
154
159
  }
155
160
  function isDerived(derived, key, value) {
156
- const ours = derived.get(key);
157
- if (!ours || !Array.isArray(value) || ours.length !== value.length) {
158
- return false;
159
- }
160
- for (let k = 0; k < value.length; k++) {
161
- const a = ours[k];
162
- const b = value[k];
163
- if (a === b) continue;
164
- if (!Array.isArray(a) || !Array.isArray(b) || a[0] !== b[0] || a[1] !== b[1]) {
165
- return false;
166
- }
167
- }
168
- return true;
161
+ const e = (derived.get(key) || {}).e;
162
+ return !!e && JSON.stringify(e.density || e.summary) === JSON.stringify(value);
169
163
  }
170
164
  function raincloudTransform(ser, w) {
171
165
  var _a, _b;
@@ -190,21 +184,26 @@ function raincloudTransform(ser, w) {
190
184
  if (!values) return d;
191
185
  const out = __spreadValues({}, y);
192
186
  if (needDensity) {
193
- const est = kernelDensity(values, {
194
- bandwidth: kde.bandwidth,
195
- resolution: kde.resolution
196
- });
187
+ const est = deriveStat(
188
+ ourDensity,
189
+ key,
190
+ values,
191
+ { bandwidth: kde.bandwidth, resolution: kde.resolution },
192
+ kernelDensity
193
+ );
197
194
  if (!est) return d;
198
195
  out.density = est.density;
199
196
  out.points = values;
200
- ourDensity.set(key, est.density);
201
197
  }
202
198
  if (needSummary) {
203
- const est = fiveNumberSummary(values, { whiskers });
204
- if (est) {
205
- out.summary = est.summary;
206
- ourSummary.set(key, est.summary);
207
- }
199
+ const est = deriveStat(
200
+ ourSummary,
201
+ key,
202
+ values,
203
+ { whiskers },
204
+ fiveNumberSummary
205
+ );
206
+ if (est) out.summary = est.summary;
208
207
  }
209
208
  touched = true;
210
209
  return __spreadProps(__spreadValues({}, d), { y: out });
@@ -218,6 +217,18 @@ const getChartClass = _core.__apex_ChartFactory_getChartClass;
218
217
  const Fill = _core.__apex_Fill;
219
218
  const Graphics = _core.__apex_Graphics;
220
219
  const Series = _core.__apex_Series;
220
+ function datumKey(w, realIndex, j) {
221
+ var _a, _b, _c, _d;
222
+ if ((_a = w.axisFlags) == null ? void 0 : _a.isXNumeric) {
223
+ const sx = (_c = (_b = w.seriesData) == null ? void 0 : _b.seriesX) == null ? void 0 : _c[realIndex];
224
+ if (sx && sx.length && sx[j] != null) return "x:" + sx[j];
225
+ }
226
+ const lbl = (_d = w.globals.labels) == null ? void 0 : _d[j];
227
+ if (lbl != null && String(lbl) !== "") {
228
+ return "c:" + (Array.isArray(lbl) ? lbl.join(" ") : String(lbl));
229
+ }
230
+ return "j:" + j;
231
+ }
221
232
  const tangents = (points) => {
222
233
  const m = finiteDifferences(points);
223
234
  const n = points.length - 1;
@@ -328,9 +339,20 @@ function finiteDifferences(points) {
328
339
  m[i] = d;
329
340
  return m;
330
341
  }
342
+ function jitterExtent(pool, w) {
343
+ let lo = Infinity;
344
+ let hi = -Infinity;
345
+ pool.slice(0, w.seriesData.series.length).flat(2).forEach((v) => {
346
+ if (v === +v) {
347
+ if (v < lo) lo = v;
348
+ if (v > hi) hi = v;
349
+ }
350
+ });
351
+ return [lo, hi];
352
+ }
331
353
  function buildJitterGroups({
332
- w,
333
354
  points,
355
+ extent,
334
356
  seedA,
335
357
  seedB,
336
358
  center,
@@ -341,6 +363,7 @@ function buildJitterGroups({
341
363
  clampAt,
342
364
  sideSign
343
365
  }) {
366
+ var _a, _b;
344
367
  const opts = options;
345
368
  if (!opts || opts.show === false) return [];
346
369
  if (!points || !points.length) return [];
@@ -354,8 +377,8 @@ function buildJitterGroups({
354
377
  const scale = opts.colorScale;
355
378
  const useScale = scale && Array.isArray(scale.colors) && scale.colors.length > 0;
356
379
  const steps = useScale ? Math.max(2, scale.steps || 24) : 1;
357
- const sMin = useScale && scale.min != null ? scale.min : w.globals.minY;
358
- const sMax = useScale && scale.max != null ? scale.max : w.globals.maxY;
380
+ const sMin = (_a = scale == null ? void 0 : scale.min) != null ? _a : extent[0];
381
+ const sMax = (_b = scale == null ? void 0 : scale.max) != null ? _b : extent[1];
359
382
  const span = sMax - sMin || 1;
360
383
  const buckets = useScale ? new Array(steps).fill("") : [""];
361
384
  for (let k = 0; k < points.length; k += stride) {
@@ -441,7 +464,7 @@ function renderJitter({
441
464
  elSeries.add(elPointsWrap);
442
465
  }
443
466
  function darkenColor(color, amount) {
444
- const rgb = Utils.parseHex(color);
467
+ const rgb = Utils.parseColor(color) || Utils.parseColor(Utils.resolveColor(color));
445
468
  if (!rgb) return color;
446
469
  const f = Math.max(0, 1 - amount);
447
470
  return `rgb(${Math.round(rgb[0] * f)},${Math.round(rgb[1] * f)},${Math.round(rgb[2] * f)})`;
@@ -498,6 +521,7 @@ class Violin extends BarBase {
498
521
  const fill = new Fill(this.w);
499
522
  this.violinOptions = w.config.plotOptions.violin;
500
523
  this.pointsOptions = this.violinOptions.points;
524
+ this.jx = jitterExtent(w.violinData.seriesViolinPoints, w);
501
525
  this.boxOptions = this.violinOptions.box || {};
502
526
  this.cloudSign = crossSign(this.violinOptions.side);
503
527
  this.rainSign = this.pointsOptions.show === false ? 0 : crossSign(this.pointsOptions.position);
@@ -512,7 +536,7 @@ class Violin extends BarBase {
512
536
  series = this.coreUtils.getLogSeries(series);
513
537
  this.series = series;
514
538
  this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);
515
- this.barHelpers.initVariables(series);
539
+ this.barHelpers.initVariables(series, seriesIndex);
516
540
  const ret = graphics.group({
517
541
  class: "apexcharts-violin-series apexcharts-plot-series"
518
542
  });
@@ -659,7 +683,8 @@ class Violin extends BarBase {
659
683
  elDataLabelsWrap,
660
684
  visibleSeries: this.visibleI,
661
685
  type: "violin",
662
- classes: "apexcharts-raincloud-box"
686
+ classes: "apexcharts-raincloud-box",
687
+ noLabel: true
663
688
  });
664
689
  });
665
690
  }
@@ -696,11 +721,16 @@ class Violin extends BarBase {
696
721
  var _a, _b, _c, _d, _e, _f, _g;
697
722
  const w = this.w;
698
723
  const { realIndex, j, translationsIndex } = indexes;
699
- const yRatio = this.yRatio[translationsIndex];
724
+ const yRatio = this.yRatio[translationsIndex] * (this.isReversed ? -1 : 1);
725
+ let barXPosition = x + barWidth * this.visibleI;
700
726
  if (w.axisFlags.isXNumeric) {
701
- x = (w.seriesData.seriesX[realIndex][j] - w.globals.minX) / this.xRatio - barWidth / 2;
727
+ ({ x, barXPosition } = this.getBarXForNumericXAxis({
728
+ x,
729
+ barWidth,
730
+ realIndex,
731
+ j
732
+ }));
702
733
  }
703
- const barXPosition = x + barWidth * this.visibleI;
704
734
  const center = barXPosition + barWidth / 2;
705
735
  const halfExtent = barWidth / 2;
706
736
  const density = this.getDensity(realIndex, j);
@@ -729,7 +759,7 @@ class Violin extends BarBase {
729
759
  if (morphFrom) {
730
760
  pathFrom = morphFrom;
731
761
  } else if (w.globals.previousPaths.length > 0) {
732
- pathFrom = this.getPreviousPath(realIndex, j, pathTo);
762
+ pathFrom = this._prevBody(realIndex, j, pathTo);
733
763
  }
734
764
  if (pathFrom == null) {
735
765
  pathFrom = this.buildBodyPath({
@@ -768,7 +798,7 @@ class Violin extends BarBase {
768
798
  alongFn,
769
799
  vertical: true
770
800
  }),
771
- alongRepresentative: alongFn((_g = this.series[indexes.i][j]) != null ? _g : 0)
801
+ alongRepresentative: alongFn((_g = w.seriesData.series[realIndex][j]) != null ? _g : 0)
772
802
  };
773
803
  }
774
804
  /** @param {{indexes: any, y: any, yDivision: any, barHeight: any, zeroW: any}} opts */
@@ -776,7 +806,7 @@ class Violin extends BarBase {
776
806
  var _a, _b, _c, _d, _e, _f, _g;
777
807
  const w = this.w;
778
808
  const { realIndex, j } = indexes;
779
- const yRatio = this.invertedYRatio;
809
+ const yRatio = this.invertedYRatio * (this.isReversed ? -1 : 1);
780
810
  const barYPosition = y + barHeight * this.visibleI;
781
811
  const center = barYPosition + barHeight / 2;
782
812
  const halfExtent = barHeight / 2;
@@ -806,7 +836,7 @@ class Violin extends BarBase {
806
836
  if (morphFrom) {
807
837
  pathFrom = morphFrom;
808
838
  } else if (w.globals.previousPaths.length > 0) {
809
- pathFrom = this.getPreviousPath(realIndex, j, pathTo);
839
+ pathFrom = this._prevBody(realIndex, j, pathTo);
810
840
  }
811
841
  if (pathFrom == null) {
812
842
  pathFrom = this.buildBodyPath({
@@ -843,7 +873,7 @@ class Violin extends BarBase {
843
873
  alongFn,
844
874
  vertical: false
845
875
  }),
846
- alongRepresentative: alongFn((_g = this.series[indexes.i][j]) != null ? _g : 0)
876
+ alongRepresentative: alongFn((_g = w.seriesData.series[realIndex][j]) != null ? _g : 0)
847
877
  };
848
878
  }
849
879
  /**
@@ -934,6 +964,23 @@ class Violin extends BarBase {
934
964
  leftPts.reverse();
935
965
  return this.smoothSegment(rightPts, vertical, false) + this.smoothSegment(leftPts, vertical, true) + "z";
936
966
  }
967
+ /**
968
+ * The survivor's previous body when it can morph to `pathTo`, else null so
969
+ * the violin regrows from its centreline (a changed density node count
970
+ * cannot tween, and bar corner reconciliation does not apply here).
971
+ *
972
+ * @param {number} realIndex
973
+ * @param {number} j
974
+ * @param {string} pathTo
975
+ * @returns {string | null}
976
+ */
977
+ _prevBody(realIndex, j, pathTo) {
978
+ var _a, _b;
979
+ const d = (_b = (_a = this._prevKeyedPaths(realIndex)) == null ? void 0 : _a.get(
980
+ datumKey(this.w, realIndex, j)
981
+ )) == null ? void 0 : _b.d;
982
+ return d && Violin.pathCommandCount(d) === Violin.pathCommandCount(pathTo) ? d : null;
983
+ }
937
984
  /**
938
985
  * Build the five-number box sub-paths for one category — the raincloud
939
986
  * "umbrella", or a violin box overlay. Two sub-paths so each can carry its
@@ -951,7 +998,7 @@ class Violin extends BarBase {
951
998
  * @returns {{pathTo:string, pathFrom:string, filled:boolean}[] | null}
952
999
  */
953
1000
  buildBoxSubPaths({ realIndex, j, boxCenter, boxHalfPx, alongFn, vertical }) {
954
- var _a, _b;
1001
+ var _a, _b, _c;
955
1002
  const w = this.w;
956
1003
  if (!this.boxShown || boxHalfPx <= 0) return null;
957
1004
  const summary = (_a = w.violinData.seriesViolinSummary[realIndex]) == null ? void 0 : _a[j];
@@ -976,22 +1023,17 @@ class Violin extends BarBase {
976
1023
  };
977
1024
  const full = build(capHalf, boxHalfPx);
978
1025
  const collapsed = build(0, 0);
979
- const fromFor = (pathTo, collapsedFrom) => {
980
- let pathFrom = null;
981
- if (w.globals.previousPaths.length > 0) {
982
- pathFrom = this.getPreviousPath(realIndex, j, pathTo);
983
- }
984
- return pathFrom == null ? collapsedFrom : pathFrom;
985
- };
1026
+ const keyed = w.globals.previousPaths.length ? this._prevKeyedPaths(realIndex) : null;
1027
+ const prevBox = ((_c = keyed == null ? void 0 : keyed.get(datumKey(w, realIndex, j))) == null ? void 0 : _c.box) || [];
986
1028
  return [
987
1029
  {
988
1030
  pathTo: full.whiskers,
989
- pathFrom: fromFor(full.whiskers, collapsed.whiskers),
1031
+ pathFrom: prevBox[0] || collapsed.whiskers,
990
1032
  filled: false
991
1033
  },
992
1034
  {
993
1035
  pathTo: full.box,
994
- pathFrom: fromFor(full.box, collapsed.box),
1036
+ pathFrom: prevBox[1] || collapsed.box,
995
1037
  filled: true
996
1038
  }
997
1039
  ];
@@ -1067,8 +1109,11 @@ class Violin extends BarBase {
1067
1109
  const scatterCenter = offsetLane ? rainCenter : this.cloudSign !== 0 ? cloudBase : center;
1068
1110
  const scatterHalf = offsetLane ? rainHalfPx : this.cloudSign !== 0 ? cloudMaxPx : halfExtent;
1069
1111
  return buildJitterGroups({
1070
- w: this.w,
1071
1112
  points: (_a = this.w.violinData.seriesViolinPoints[realIndex]) == null ? void 0 : _a[j],
1113
+ extent: (
1114
+ /** @type {number[]} */
1115
+ this.jx
1116
+ ),
1072
1117
  seedA: realIndex,
1073
1118
  seedB: j,
1074
1119
  center: scatterCenter,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
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});