apexcharts 8.3.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 (211) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +19754 -19772
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +3 -8
  6. package/dist/apexcharts.esm.js +233 -171
  7. package/dist/apexcharts.full.js +20740 -20714
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +20664 -20653
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +20664 -20653
  13. package/dist/area.common.js +1 -1
  14. package/dist/area.esm.js +1 -1
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +46 -13
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +46 -13
  20. package/dist/bubble.common.js +1 -1
  21. package/dist/bubble.esm.js +1 -1
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +46 -13
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +46 -13
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +19754 -19772
  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 +46 -13
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +193 -138
  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 +1 -1
  42. package/dist/features/drilldown.esm.js +1 -1
  43. package/dist/features/drilldown.js +1 -1
  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 +1 -1
  54. package/dist/features/highlight-filter.esm.js +1 -1
  55. package/dist/features/highlight-filter.js +1 -1
  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 +1 -1
  63. package/dist/features/keyboard.esm.js +1 -1
  64. package/dist/features/keyboard.js +1 -1
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +2 -2
  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 +1 -1
  87. package/dist/features/renderer-canvas.esm.js +1 -1
  88. package/dist/features/renderer-canvas.js +1 -1
  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 +46 -13
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +57 -17
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +68 -17
  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 +125 -54
  112. package/dist/heatmap.common.js +1 -1
  113. package/dist/heatmap.esm.js +1 -1
  114. package/dist/heatmap.js +1 -1
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +97 -71
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +30 -12
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +1 -1
  121. package/dist/line.esm.js +1 -1
  122. package/dist/line.js +1 -1
  123. package/dist/pictograms.common.js +1 -1
  124. package/dist/pictograms.esm.js +1 -1
  125. package/dist/pictograms.js +1 -1
  126. package/dist/pie.common.js +2 -2
  127. package/dist/pie.esm.js +3 -9
  128. package/dist/pie.js +2 -2
  129. package/dist/polarArea.common.js +2 -2
  130. package/dist/polarArea.esm.js +3 -9
  131. package/dist/radar.common.js +1 -1
  132. package/dist/radar.esm.js +1 -1
  133. package/dist/radar.js +1 -1
  134. package/dist/radialBar.common.js +2 -2
  135. package/dist/radialBar.esm.js +5 -12
  136. package/dist/radialBar.js +2 -2
  137. package/dist/raincloud.common.js +2 -2
  138. package/dist/raincloud.esm.js +26 -27
  139. package/dist/rangeArea.common.js +1 -1
  140. package/dist/rangeArea.esm.js +1 -1
  141. package/dist/rangeBar.common.js +2 -2
  142. package/dist/rangeBar.esm.js +46 -13
  143. package/dist/scatter.common.js +1 -1
  144. package/dist/scatter.esm.js +1 -1
  145. package/dist/streamgraph.common.js +2 -2
  146. package/dist/streamgraph.esm.js +46 -13
  147. package/dist/sunburst.common.js +2 -2
  148. package/dist/sunburst.esm.js +15 -3
  149. package/dist/sunburst.js +2 -2
  150. package/dist/treemap.common.js +2 -2
  151. package/dist/treemap.esm.js +38 -23
  152. package/dist/treemap.js +2 -2
  153. package/dist/unit-shapes.common.js +1 -1
  154. package/dist/unit-shapes.esm.js +1 -1
  155. package/dist/unit-shapes.js +1 -1
  156. package/dist/unit.common.js +1 -1
  157. package/dist/unit.esm.js +1 -1
  158. package/dist/unit.js +1 -1
  159. package/dist/violin.common.js +1 -1
  160. package/dist/violin.esm.js +1 -1
  161. package/dist/violin.js +1 -1
  162. package/dist/waterfall.common.js +2 -2
  163. package/dist/waterfall.esm.js +46 -13
  164. package/package.json +1 -1
  165. package/src/apexcharts.js +27 -53
  166. package/src/assets/apexcharts.css +3 -8
  167. package/src/charts/Icicle.js +33 -12
  168. package/src/charts/Pie.js +2 -8
  169. package/src/charts/Radial.js +2 -6
  170. package/src/charts/Treemap.js +50 -30
  171. package/src/charts/common/Stats.js +30 -23
  172. package/src/charts/common/partition/NodeTooltip.js +21 -6
  173. package/src/charts/common/treemap/Nested.js +2 -3
  174. package/src/features/raincloud.js +16 -10
  175. package/src/features/stats.js +67 -62
  176. package/src/modules/Animations.js +102 -95
  177. package/src/modules/AxisMapping.js +47 -12
  178. package/src/modules/Exports.js +12 -5
  179. package/src/modules/Fill.js +17 -8
  180. package/src/modules/Filters.js +50 -50
  181. package/src/modules/Graphics.js +7 -2
  182. package/src/modules/MorphTypeChange.js +13 -7
  183. package/src/modules/Series.js +2 -1
  184. package/src/modules/Toolbar.js +3 -2
  185. package/src/modules/UnitMarkRegistry.js +0 -5
  186. package/src/modules/ZoomPanSelection.js +4 -0
  187. package/src/modules/animations/Easing.js +2 -1
  188. package/src/modules/annotations/Helpers.js +68 -52
  189. package/src/modules/axes/Grid.js +21 -7
  190. package/src/modules/axes/YAxis.js +8 -9
  191. package/src/modules/dimensions/Dimensions.js +9 -3
  192. package/src/modules/dimensions/Grid.js +2 -2
  193. package/src/modules/dimensions/XAxis.js +2 -5
  194. package/src/modules/helpers/UpdateHelpers.js +33 -15
  195. package/src/modules/legend/Helpers.js +6 -1
  196. package/src/modules/license/LicenseEnforcer.js +5 -0
  197. package/src/modules/settings/Defaults.js +28 -56
  198. package/src/modules/settings/Globals.js +5 -0
  199. package/src/modules/settings/Options.js +0 -7
  200. package/src/modules/settings/TypeAliases.js +33 -16
  201. package/src/modules/tooltip/Labels.js +73 -76
  202. package/src/modules/tooltip/Marker.js +25 -21
  203. package/src/modules/tooltip/Position.js +88 -51
  204. package/src/modules/tooltip/Tooltip.js +222 -251
  205. package/src/modules/tooltip/Utils.js +64 -131
  206. package/src/modules/tooltip/constants.js +5 -5
  207. package/src/modules/trellis/TrellisTooltip.js +2 -11
  208. package/src/modules/weave/WeaveHost.js +18 -12
  209. package/src/svg/SVGFilter.js +26 -17
  210. package/src/utils/Utils.js +0 -14
  211. package/types/apexcharts.d.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.3.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))r.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))i.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_Utils,u="__apexcharts_series_transforms__";function b(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[u][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[u]||(globalThis[u]={});const g="__apexcharts_row_sources__";function p(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[g][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function x(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function f(t,e){const s=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const o=t||{},{hidden:h}=o,d=((t,e)=>{var s={};for(var o in t)r.call(t,o)&&e.indexOf(o)<0&&(s[o]=t[o]);if(null!=t&&a)for(var o of a(t))e.indexOf(o)<0&&i.call(t,o)&&(s[o]=t[o]);return s})(o,["hidden"]);let c=d.data;if(Array.isArray(c)&&!c.length){const t=s.find(t=>t.index===e);t&&Array.isArray(t.data)&&(c=t.data)}return l(n({},d),{data:Array.isArray(c)?c.slice():c})})}globalThis[g]||(globalThis[g]={});function y(t,e){const s=t.length;if(0===s)return NaN;if(1===s)return t[0];const a=(s-1)*e,r=Math.floor(a),i=Math.ceil(a);return r===i?t[r]:t[r]+(t[i]-t[r])*(a-r)}function m(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e);let a=s[0],r=s[s.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(a=t,r=e)}if(!(r>a)){const t=Math.abs(a)>0?.05*Math.abs(a):.5;return{edges:[a-t,a+t],binWidth:2*t,rule:"single",capped:!1}}const o=r-a;let n,l;if("number"==typeof e.binWidth&&e.binWidth>0)n=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)n=o/Math.floor(e.bins),l="count";else{const t=function(t,e,s){const a=t.length,r=t=>e/Math.max(1,Math.ceil(t)),i=()=>r(Math.log2(a)+1);switch(s){case"sqrt":return{width:r(Math.sqrt(a)),rule:"sqrt"};case"rice":return{width:r(2*Math.cbrt(a)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}(t);return e>0?{width:3.49*e*Math.pow(a,-1/3),rule:"scott"}:{width:i(),rule:"sturges"}}case"fd":{const e=y(t,.75)-y(t,.25);return e>0?{width:2*e*Math.pow(a,-1/3),rule:"fd"}:{width:i(),rule:"sturges"}}case"auto":{const e=i(),s=y(t,.75)-y(t,.25);if(s<=0)return{width:e,rule:"sturges"};const r=2*s*Math.pow(a,-1/3);return r<e?{width:r,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:i(),rule:"sturges"}}}(s,o,"string"==typeof e.bins?e.bins:"auto");n=t.width,l=t.rule}(!Number.isFinite(n)||n<=0)&&(n=o);let h=Math.ceil(o/n);(!Number.isFinite(h)||h<1)&&(h=1);let d=!1;h>1e3&&(h=1e3,d=!0),n=o/h;const c=new Array(h+1);for(let t=0;t<=h;t++)c[t]=a+t*n;return c[h]=Math.max(c[h],r),{edges:c,binWidth:n,rule:l,capped:d}}function v(t,e){const s=e.length-1;if(!(t>=e[0])||t>e[s])return-1;if(t===e[s])return s-1;const a=(e[s]-e[0])/s;if(a>0){let r=Math.floor((t-e[0])/a);return r<0&&(r=0),r>s-1&&(r=s-1),t<e[r]?r--:t>=e[r+1]&&r++,r<0||r>s-1?-1:r}let r=0,i=s-1;for(;r<=i;){const s=r+i>>1;if(t<e[s])i=s-1;else{if(!(t>=e[s+1]))return s;r=s+1}}return-1}function w(t,e){const s=Math.max(0,e.length-1),a=new Array(s);for(let t=0;t<s;t++)a[t]=[];for(let s=0;s<t.length;s++){const r=v(t[s],e);r>=0&&a[r].push(t[s])}return a}function C(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=s.length;let r=e.bandwidth;if(!("number"==typeof r&&r>0)){const t=function(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}(s),e=y(s,.75)-y(s,.25);r=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(a,-.2)}if(!isFinite(r)||r<=0){const t=s[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=s[0]-2*r,n=(s[a-1]+2*r-o)/(i-1),l=1/(a*r*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<i;t++){const e=o+t*n;let i=0;for(let t=0;t<a;t++){const a=(e-s[t])/r;i+=Math.exp(-.5*a*a)}h.push([e,i*l])}return{density:h,bandwidth:r}}function A(t,e){var s;if(!t||"object"!=typeof t||Array.isArray(t))return null;let a=null;if(Array.isArray(t.points)?a=t.points:Array.isArray(null==(s=t.y)?void 0:s.points)?a=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(a=t.y),!a)return null;const r=[];for(let t=0;t<a.length;t++){const e=c.parseNumber(a[t]);null!==e&&isFinite(e)&&r.push(e)}return r.length?r:null}function I(t,e){var s,a;const r=null!=(s=t.statsDerived)?s:t.statsDerived={};return null!=(a=r[e])?a:r[e]=new Map}function P(t,e,s){const a=t.get(e);if(!a||!Array.isArray(s)||a.length!==s.length)return!1;for(let t=0;t<s.length;t++){const e=a[t],r=s[t];if(e!==r&&(!Array.isArray(e)||!Array.isArray(r)||e[0]!==r[0]||e[1]!==r[1]))return!1}return!0}function S(t){const e=[];if(!Array.isArray(t))return e;for(let s=0;s<t.length;s++){const a=t[s];let r=a;Array.isArray(a)?r=1===a.length?a[0]:a[1]:a&&"object"==typeof a&&(r=void 0!==a.y?a.y:a.x);const i=c.parseNumber(r);null!==i&&isFinite(i)&&e.push(i)}return e}function k(t,e,s){if(!e.length)return;const a=[];for(let t=0;t<s;t++){const s=e[t];if(!s){a.push(null);continue}const r=[];for(const t of s)if(t)for(let e=0;e<t.length;e++)r.push(t[e]);a.push({values:r,byPoint:s})}t.seriesObservations=a}function H(t,e,s){const a=s&&null!=s.maxRows?s.maxRows:3e3,r=function(t,e){let s=0,a=0;for(const e of t)s+=e.length,e.length>a&&(a=e.length);if(s<=e)return{clusters:t,stride:1,total:s,kept:s};const r=e=>{let s=0;for(const a of t)s+=Math.ceil(a.length/e);return s};let i=Math.max(2,Math.ceil(s/e));for(;i<a&&r(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let s=0;s<t.length;s+=i)e.push(t[s]);return o+=e.length,e}),stride:i,total:s,kept:o}}(e.map(t=>t.rows),a);r.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${r.total} rows to ${r.kept} (every ${r.stride}${2===r.stride?"nd":3===r.stride?"rd":"th"} row) to stay under maxRows=${a}. Raise maxRows to draw more.`);const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const s=i[t.realIndex]||i[0];return{name:t.name,data:r.clusters[e].map((a,r)=>n({id:`${t.realIndex}:${e}:${r}`,x:t.name,y:a},s?{fillColor:s}:{}))}})}function L(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function W(t){return(e,s)=>{var a;const r=t(e);if(!Array.isArray(r)||!r.length)return null;const i=e.globals?x(e.globals):[],o=e.globals&&((null==(a=e.globals.categoryLabels)?void 0:a.length)?e.globals.categoryLabels:e.globals.labels)||[],n=[];return r.forEach((t,s)=>{var a;if(-1!==i.indexOf(s))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(a=e.seriesData.seriesNames)?void 0:a[s]);t.forEach((t,e)=>{const a=null!=o[e]?String(o[e]):`#${e+1}`;n.push({name:r.length>1&&l?`${l} ${a}`:a,realIndex:s,rows:Array.isArray(t)?t.slice():[]})})}),n.length?H(e,n,s):null}}const D=W(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),R=W(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});b("histogram",function(t,e){var s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.histogramRawSeries||(r.histogramRawSeries=f(t,r));const i=r.histogramRawSeries,o=(null==(s=a.plotOptions)?void 0:s.histogram)||{},h=i.map(t=>S(null==t?void 0:t.data));let d=[];if(1===h.length)d=h[0];else for(const t of h)d=d.concat(t);const c=m(d,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!c)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:u,binWidth:b}=c,g=h.map(t=>function(t,e){const s=new Array(Math.max(0,e.length-1)).fill(0);for(let a=0;a<t.length;a++){const r=v(t[a],e);r>=0&&s[r]++}return s}(t,u));e.histogramData={edges:u,binWidth:b,counts:g,rule:c.rule,capped:c.capped};const p=x(r);return e.seriesObservations=h.map((t,e)=>({values:t,byPoint:-1!==p.indexOf(e)?[]:w(t,u)})),i.map((t,e)=>{if(-1!==p.indexOf(e))return l(n({},t),{data:[]});const s=function(t,e={}){let s=t.slice();if(e.cumulative){let t=0;s=s.map(e=>t+=e)}const a=t.reduce((t,e)=>t+e,0);if(a<=0)return s;if("relative"===e.normalize)return s.map(t=>t/a*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return s.map(e=>e/(a*t))}return s}(g[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:b}),a=[];for(let t=0;t<s.length;t++)a.push({x:(u[t]+u[t+1])/2,y:s[t]});return l(n({},t),{data:a})})}),b("boxPlot",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.boxPlot)?void 0:a.whiskers)||"minmax",i=I(e,"boxPlot"),o=[],h=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"boxPlot"!==t.type)return t;let s=!1;const a=new Array(t.data.length).fill(null),h=t.data.map((t,o)=>{const h=e+":"+o;if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!P(i,h,t.y))return t;const d=A(t,!1);if(!d)return t;const c=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=y(s,.25),r=y(s,.5),i=y(s,.75),o=i-a;let n=s[0],l=s[s.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=a-1.5*o,e=i+1.5*o;let r=0;for(;r<s.length&&s[r]<t;)r++;let d=s.length-1;for(;d>=0&&s[d]>e;)d--;r<=d&&(n=s[r],l=s[d],h=s.slice(0,r).concat(s.slice(d+1)))}return{summary:[n,a,r,i,l],outliers:h,iqr:o}}(d,{whiskers:r});return c?(s=!0,a[o]=d,i.set(h,c.summary),l(n({},t),{y:c.summary,points:d})):t});return s&&(o[e]=a),s?l(n({},t),{data:h}):t});return k(e,o,t.length),h}),b("violin",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.violin)?void 0:a.kde)||{},i=I(e,"violin"),o=[],h=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"violin"!==t.type)return t;let s=!1;const a=new Array(t.data.length).fill(null),h=t.data.map((t,o)=>{var h;const d=e+":"+o;if(Array.isArray(null==(h=null==t?void 0:t.y)?void 0:h.density)&&t.y.density.length&&!P(i,d,t.y.density))return t;const c=A(t,!0);if(!c)return t;const u=C(c,{bandwidth:r.bandwidth,resolution:r.resolution});if(!u)return t;s=!0,a[o]=c;const b=t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{};return i.set(d,u.density),l(n({},t),{y:l(n({},b),{density:u.density,points:c})})});return s&&(o[e]=a),s?l(n({},t),{data:h}):t});return k(e,o,t.length),h}),p("histogram",function(t,e){const s=t.globals,a=t.histogramData,r=s&&s.histogramRawSeries;if(!a||!Array.isArray(a.edges)||a.edges.length<2)return null;if(!Array.isArray(r)||!r.length)return null;const i=x(s),o=a.edges,n=[];return r.forEach((e,s)=>{var a;if(-1!==i.indexOf(s))return;const l=w(S(e&&e.data),o),h=t.seriesData&&(null==(a=t.seriesData.seriesNames)?void 0:a[s])||(null==e?void 0:e.name);l.forEach((t,e)=>{const a=`${L(o[e])}-${L(o[e+1])}`;n.push({name:r.length>1&&h?`${h} ${a}`:a,realIndex:s,rows:t})})}),n.length?H(t,n,e):null}),p("boxPlot",D),p("violin",R);const X=d.__apex_Graphics,F=d.__apex_DataLabels,O=(t,e,s,a)=>{if("function"!=typeof t)return t;const r=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(r)?r:0};class M{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s,a,r,i,o;const{x:h,y:d,y1:c,y2:u,i:b,j:g,realIndex:p,columnGroupIndex:x,barHeight:f,barWidth:y,barXPosition:m,barYPosition:v,visibleSeries:w,hl:C,noLabel:A}=t,I=this.w,P=new X(this.barCtx.w);this.hlt=null==C?void 0:C.total;const S=I.waterfallData&&I.waterfallData.values,k=C&&null!=C.val?C.val:S&&S[p]&&null!=S[p][g]?S[p][g]:null,H=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[p]:this.barCtx.strokeWidth;let L,W;I.axisFlags.isXNumeric&&!I.globals.isBarHorizontal?(L=h+y*(w+1),W=d+f*(w+1)-H):(L=h+y*w,W=d+f*w);let D=null,R=null,F=h,M=d,T={};const _=I.config.dataLabels,j=this.barCtx.barOptions.dataLabels,Y=this.barCtx.barOptions.dataLabels.total;void 0!==v&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(W=v,M=v),void 0!==m&&this.barCtx.isVerticalGroupedRangeBar&&(L=m,F=m);const B=O(_.offsetX,I,p,g),z=O(_.offsetY,I,p,g),G=(null==C?void 0:C.hide)?void 0:null!==k?k:void 0!==u?[c,u]:"100%"===I.config.chart.stackType?I.globals.seriesPercent[p][g]:I.seriesData.series[p][g];let N,V={width:0,height:0};_.enabled&&(N=void 0===G?"":_.formatter(G,l(n({},I),{seriesIndex:p,dataPointIndex:g,w:I})),V=P.getTextRects(N,parseFloat(_.style.fontSize).toString(),_.style.fontFamily,void 0,!0,_.style.fontWeight));const E={x:null!=(e=null==C?void 0:C.x)?e:h,y:null!=(s=null==C?void 0:C.y)?s:d,neg:C&&null!=C.val?C.val<0:void 0,i:b,j:g,realIndex:p,columnGroupIndex:x,bcx:L,bcy:W,barHeight:null!=(a=null==C?void 0:C.barHeight)?a:f,barWidth:null!=(r=null==C?void 0:C.barWidth)?r:y,textRects:V,strokeWidth:H,dataLabelsX:F,dataLabelsY:M,dataLabelsConfig:_,barDataLabelsConfig:j,barTotalDataLabelsConfig:Y,offX:B,offY:z};if(T=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(E):this.calculateColumnsDataLabelsPosition(E),null!==k&&this.barCtx.isHorizontal&&"center"===j.position){const t=null==(o=null==(i=I.waterfallData.geometry)?void 0:i[p])?void 0:o[g];t&&t.horizontal&&(T.dataLabelsX=(t.levelStart+t.levelEnd)/2+B)}return D=A?null:this.drawCalculatedDataLabels({x:T.dataLabelsX,y:T.dataLabelsY,neg:E.neg,val:G,text:N,i:p,j:g,barWidth:E.barWidth,barHeight:E.barHeight,textRects:V,dataLabelsConfig:_}),I.config.chart.stacked&&Y.enabled&&!1!==this.hlt&&(R=this.drawTotalDataLabels({x:T.totalDataLabelsX,y:T.totalDataLabelsY,barWidth:y,barHeight:f,realIndex:p,j:g,textAnchor:T.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:p,j:g}),rawVal:this.getStackedTotalValue({realIndex:p,j:g}),dataLabelsConfig:_,barTotalDataLabelsConfig:Y})),{dataLabelsPos:T,dataLabels:D,totalDataLabels:R}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){if(this.hlt)return this.hlt.val;const s=this.w,a=this.xStackTop(t,e);if(a)return a[3];const r=this.getTotalGroupContext(t),i=s.seriesData.stackedSeriesTotalsByGroups;return r&&i&&i[r.groupIndex]?i[r.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}xStackTop(t,e){var s,a;const r=this.w;return r.axisFlags.isXNumeric&&(null==(a=null==(s=this.barCtx.stacks)?void 0:s[r.labelData.seriesGroupIndex[t]])?void 0:a.tops.get(r.seriesData.seriesX[t][e]))}totalRects(t,e){const s=this.barCtx.barOptions.dataLabels.total.style;return new X(this.w).getTextRects(this.getStackedTotalDataLabel({realIndex:t,j:e}),s.fontSize,s.fontFamily,void 0,!0,s.fontWeight)}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){var e;const s=this.w;let a,r,{j:i,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,strokeWidth:x,offX:f,offY:y}=t;const m=l;d=Math.abs(d);const v="vertical"===s.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:o,j:i});l-=x/2;const C=s.layout.gridWidth/s.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=s.axisFlags.isXNumeric?l-h/2+f:l-C+h/2+f,!s.config.chart.stacked&&w>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*w)),v){const t=2;u=u+c.height/2-x/2-t}const A=null!=(e=t.neg)?e:s.seriesData.series[o][i]<0;let I=n;switch(this.barCtx.isReversed&&(I=n+(A?d:-d)),g.position){case"center":b=v?A?I-d/2+y:I+d/2-y:A?I-d/2+c.height/2+y:I+d/2+c.height/2-y;break;case"bottom":b=v?A?I-d+y:I+d-y:A?I-d+c.height+x+y:I+d-c.height/2+x-y;break;case"top":b=v?A?I+y:I-y:A?I-c.height/2-y:I+c.height+y}let P=I;const S=this.getTotalGroupContext(o),k=this.xStackTop(o,i),H=k?[]:this.barCtx.stacks||[];if(k&&(P=A?Math.max(I,k[5]):Math.min(I,k[4])),H.forEach((t,e)=>{S&&e!==S.groupIndex||t.prevY.forEach(t=>{P=A?Math.max(t[i],P):Math.min(t[i],P)})}),this.hlt&&(P=this.hlt.edge),this.drawsStackedTotal(o)&&p.enabled){const t=this.totalRects(o,i).height;a=A?P+.77*t-y-p.offsetY:P-.3*t+y+p.offsetY;const e=C;r=m+(s.axisFlags.isXNumeric?-h/2:h/2-e)+p.offsetX}return s.config.chart.stacked||(b<0?b=0+x:b+c.height/3>s.layout.gridHeight&&(b=s.layout.gridHeight-x)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:b,totalDataLabelsX:r,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e,s;const a=this.w;let{x:r,j:i,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:x,offY:f}=t;const y=a.layout.gridHeight/a.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:o,j:i});let v,w,C;if(h=Math.abs(h),this.barCtx.isPyramid){v=n+l/2+f-(null!=(e=d.centerOffset)?e:0)}else v=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+f-3;!a.config.chart.stacked&&m>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=l*m);let A="start";const I=null!=(s=t.neg)?s:a.seriesData.series[o][i]<0;let P=r;if(this.barCtx.isReversed&&(P=r+(I?-h:h),A=I?"start":"end"),this.barCtx.isPyramid)c=a.layout.gridWidth/2+x;else switch(g.position){case"center":c=I?P+h/2-x:Math.max(d.width/2,P-h/2)+x;break;case"bottom":c=I?P+h-u-x:P-h+u+x;break;case"top":c=I?P-u-x:P-u+x}let S=P;const k=this.getTotalGroupContext(o),H=this.xStackTop(o,i),L=H?[]:this.barCtx.stacks||[];if(H&&(S=I?Math.min(P,H[4]):Math.max(P,H[5])),L.forEach((t,e)=>{k&&e!==k.groupIndex||t.prevX.forEach(t=>{S=I?Math.min(t[i],S):Math.max(t[i],S)})}),this.hlt&&(S=this.hlt.edge),this.drawsStackedTotal(o)&&p.enabled){const t=this.totalRects(o,i);I?(w=S-u-x-p.offsetX,A="end"):w=S+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),C=v-d.height/2+t.height/2+p.offsetY+u,a.globals.barGroups.length>1&&!k&&(C-=a.globals.barGroups.length/2*(l/2))}if(!a.config.chart.stacked){const t=I&&"middle"!==b.textAnchor?"start"===b.textAnchor?"end":"start":b.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const s=("vertical"===g.orientation?d.height:d.width)-e;c+s>a.layout.gridWidth-u&&(c=a.layout.gridWidth-s-u),c-e<u&&(c=e+u)}return{bcx:r,bcy:n,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:w,totalDataLabelsY:C,totalDataLabelsAnchor:A}}drawCalculatedDataLabels({x:t,y:e,val:s,text:a,neg:r,i:i,j:o,textRects:h,barHeight:d,barWidth:c,dataLabelsConfig:u}){var b,g,p;const x=this.w;let f="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(f=`rotate(-90, ${t}, ${e})`);const y=new F(this.barCtx.w,this.barCtx.ctx),m=new X(this.barCtx.w),v=u.formatter;let w=null;const C=x.globals.collapsedSeriesIndices.indexOf(i)>-1,A=(x.globals.collapsingSeriesIndices||[]).indexOf(i)>-1,I=`${i}::${this.barCtx._keys(i)[o]}`;if(A){const t=null==(b=x.globals.prevDataLabels)?void 0:b.get(I);t&&isFinite(t.val)&&(s=t.val,a=void 0)}if(u.enabled&&(!C||A)){w=m.group({class:"apexcharts-data-labels",transform:f});const b=x.config.dataLabels;((null==(g=b.animate)?void 0:g.enabled)||(null==(p=b.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",I),w.node.setAttribute("data:dlJ",String(o)),"number"==typeof s&&isFinite(s)&&w.node.setAttribute("data:dlVal",String(s))),void 0===s?a="":void 0===a&&(a=v(s,l(n({},x),{seriesIndex:i,dataPointIndex:o,w:x}))),!s&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(a="");let C=u.textAnchor;"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(C="center"===x.config.plotOptions.bar.dataLabels.position?"middle":(null!=r?r:x.seriesData.series[i][o]<0)?"end":"start"),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<h.width&&(a=""),x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!A&&(this.barCtx.isHorizontal?h.width/1.6>Math.abs(c)&&(a=""):h.height/1.6>Math.abs(d)&&(a=""));const P=l(n({},u),{textAnchor:C});this.barCtx.isHorizontal&&s<0&&("start"===C?P.textAnchor="end":"end"===C&&(P.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:a,i:i,j:o,parent:w,dataLabelsConfig:P,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:r,j:i,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new X(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(r)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(r);c.node.setAttribute("data:dlTotalKey",`${t}::${this.barCtx._keys(r)[i]}`),c.node.setAttribute("data:dlTotalSeries",String(r)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const T=d.__apex_Series,_=d.__apex_Fill,j=d.__apex_CoreUtils;function Y(t){var e,s,a,r,i,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(r=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:r.overlap)&&(null!=(n=null==(o=null==(i=t.seriesData)?void 0:i.series)?void 0:o.length)?n:0)>1)}class B{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t,e){const s=this.w;this.seriesIndex=e,this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let e=0;e<t.length;e++)if(t[e].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[e].length),s.axisFlags.isXNumeric)for(let a=0;a<t[e].length;a++)s.seriesData.seriesX[e][a]>s.globals.minX&&s.seriesData.seriesX[e][a]<s.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=s.globals.dataPoints;const a=s.labelData.labels;this.rows=s.globals.isBarHorizontal&&s.axisFlags.isXNumeric&&!this.barCtx.isRangeBar&&s.seriesData.seriesX.some(t=>null==t?void 0:t.some((t,e)=>t!==a[e]))?new Map(a.map((t,e)=>[t,e])):null,this.arrBorderRadius=this.createBorderRadiusArr(s.seriesData.series),c.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=this.seriesIndex,s=[];for(let a=0;a<t.length;a++){const r=t[a];e&&e.indexOf(a)<0||Array.isArray(r)&&r.length>0&&s.push(r.some((t,e)=>t<r[e-1])?r.filter(t=>t===+t).sort((t,e)=>t-e):r)}if(!s.length)return 0;const a=new Array(s.length).fill(0);let r=NaN,i=1/0;for(;;){let t=1/0,e=-1;for(let r=0;r<s.length;r++){const i=s[r];for(;a[r]<i.length&&"number"!=typeof i[a[r]];)a[r]++;if(a[r]>=i.length)continue;const o=i[a[r]];o==o?o<t&&(t=o,e=r):(a[r]++,r--)}if(-1===e)break;if(a[e]++,r==r){const e=t-r;e>0&&e<i&&(i=e)}r=t}return isFinite(i)?i:0}barRow(t,e){var s,a,r;return null!=(r=null==(a=this.rows)?void 0:a.get(null==(s=this.w.seriesData.seriesX[t])?void 0:s[e]))?r:e}initialPositions(t){const e=this.w;let s,a,r,i,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let u=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||Y(e))&&(u=1),this.barCtx.isHorizontal)r=e.layout.gridHeight/d,o=r/u,o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(r-o*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(i=e/t),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+c.noExponents(i-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:r,xDivision:i,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.stacks=t.w.labelData.seriesGroups.map(()=>({prevY:[],prevX:[],prevYF:[],prevXF:[],prevYVal:[],prevXVal:[],tops:new Map}))}initializeStackedXYVars(t){t.stacks.forEach(t=>{t.xArrj=[],t.xArrjF=[],t.xArrjVal=[],t.yArrj=[],t.yArrjF=[],t.yArrjVal=[]})}getPathFillColor(t,e,s,a){var r;const i=this.w,o=new _(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(r=i.config.series[a].data[s])?void 0:r.fill),c=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:u,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(i.config.fill.type)?i.config.fill.type[a]:i.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const r=s.config.plotOptions.bar.dumbbell.connector;if(r.color)return null;const i=a.order[e];if(!i)return null;const o=s.globals.colors[i[0]],n=s.globals.colors[i[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:r.opacity,opacityTo:r.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===r.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,r=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(r);return e.length?[e]:[]}const i=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!r(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?i[t].push(e):o.push(e)}return o.length&&i.push(o),i.filter(t=>t.length>0)}createBorderRadiusArr(t){const e=this.w,s=!this.w.config.chart.stacked||e.config.plotOptions.bar.borderRadius<=0,a=t.length,r=Math.max(0,...t.map(t=>0|(null==t?void 0:t.length))),i=Array.from({length:a},()=>Array(r).fill(s?"top":"none"));if(s)return i;const o="last"===e.config.plotOptions.bar.borderRadiusWhenStacked,n=o?"top":"both",l=o?"bottom":"both",h=o?"none":"bottom",d=o?"none":"top";for(const e of this.getStackedSeriesIndices(a))for(let s=0;s<r;s++){const a=[],r=[];for(const i of e){const e=t[i][s];e>0?a.push(i):e<0&&r.push(i)}if(a.length>0&&0===r.length)if(1===a.length)i[a[0]][s]=n;else{const t=a[0],e=a[a.length-1];for(const r of a)i[r][s]=r===t?h:r===e?"top":"none"}else if(r.length>0&&0===a.length)if(1===r.length)i[r[0]][s]=l;else{const t=Math.min(...r),e=Math.max(...r);for(const a of r)i[a][s]=a===t?d:a===e?"bottom":"none"}else if(a.length>0&&r.length>0){const t=a[a.length-1];for(const e of a)i[e][s]=e===t?"top":"none";const e=Math.max(...r);for(const t of r)i[t][s]=t===e?"bottom":"none"}}return i}barBackground({j:t,i:e,x1:s,x2:a,y1:r,y2:i,elSeries:o}){const n=this.w,l=new X(this.barCtx.w),h=new T(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==r?r:0,void 0!==a?a:n.layout.gridWidth,void 0!==i?i:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}barRect({a:t,len:e,v1:s,v2:a,strokeWidth:r,realIndex:i,j:o,dir:n,horizontal:l}){const h=this.w,d=new X(h);(r=Array.isArray(r)?r[i]:r)||(r=0);const c=h.config.series[i].data[o],u=l?null==c?void 0:c.barHeightOffset:null==c?void 0:c.columnWidthOffset;u&&(t-=u/2,e+=u);const b=r/2,g=n*(this.barCtx.isReversed?-1:1),p="around"===h.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[i][o]?" Z":" z";let x,f,y,m,v,w;l?(y=t+b,m=t+e-b,x=s+.001+b*g,f=a+.001-b*g,v=d.line(x,m),w=d.move(x,y)+d.line(f,y)+d.line(f,m)+v+p):(x=t+b,f=t+e-b,y=s+.001-b*g,m=a+.001+b*g,v=d.line(f,y),w=d.move(x,y)+d.line(x,m)+d.line(f,m)+v+p);return{x1:x,x2:f,y1:y,y2:m,sl:v,closing:p,squarePathTo:w,pathTo:"none"!==this.arrBorderRadius[i][o]?d.roundPathCorners(w,h.config.plotOptions.bar.borderRadius):w,base:d.move(x,y)+d.line(x,y)+v+v+v+v+v+d.line(x,y)+p,strokeWidth:r,strokeCenter:b,direction:g}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:r,series:i,realIndex:o,i:n,j:l,w:h}){var d,c,u;const b=this.barRect({a:e,len:t,v1:s,v2:a,strokeWidth:r,realIndex:o,j:l,dir:i[n][l]>=0?1:-1}),{pathTo:g,squarePathTo:p,strokeCenter:x,direction:f}=b;s=b.y1,a=b.y2;let y=null;const m=null==(c=null==(d=this.barCtx.ctx)?void 0:d.morphTypeChange)?void 0:c.getInitialPathFor(o,l);if(m?y=m:h.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(o,l,g,p)),null==y&&(y=b.base),h.config.chart.stacked){const t=this.barCtx.groupCtx;t.yArrj.push(a-x*f),t.yArrjF.push(Math.abs(s-a+b.strokeWidth*f)),t.yArrjVal.push(null!=(u=this.barCtx.series[n][l])?u:null)}return{pathTo:g,pathFrom:y,drawnBox:{x1:b.x1,x2:b.x2,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:r,realIndex:i,strokeWidth:o,w:n}){var l,h;const d=new X(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,b=u(s[a][r]),g=r===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let x;x=g?"taper"===p?0:b:u(s[a][r+1]);const f=o/2,y=t+f,m=t+e-f,v=c-b,w=c+b,C=c-x,A=c+x,I=d.move(v,y)+d.line(w,y)+d.line(A,m)+d.line(C,m)+" Z";let P=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return S?P=S:n.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(i,r,I)),null==P&&(P=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:I,pathFrom:P,x:w,x1:v,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,r=t.map(t=>Math.abs(Number(t)||0)),i=r.reduce((t,e)=>t+e,0);if(0===i||s<=0)return r.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<r.length;t++){const e=n/i;n+=r[t];const a=n/i,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:r,j:i,strokeWidth:o,w:n}){var l,h;const d=new X(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,b=t+u,g=t+e-u,p=c-s,x=c+s,f=c-a,y=c+a,m=d.move(p,b)+d.line(x,b)+d.line(y,g)+d.line(f,g)+" Z";let v=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return w?v=w:n.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(r,i,m)),null==v&&(v=d.move(c,b)+d.line(c,b)+d.line(c,g)+d.line(c,g)+" Z"),{pathTo:m,pathFrom:v,x:x,x1:p,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:r,series:i,realIndex:o,i:n,j:l,w:h}){var d,c,u;const b=new X(this.barCtx.w),g=this.barRect({a:t,len:e,v1:s,v2:a,strokeWidth:r,realIndex:o,j:l,dir:i[n][l]>=0?1:-1,horizontal:!0}),{y1:p,y2:x,sl:f,closing:y,squarePathTo:m,pathTo:v,strokeCenter:w,direction:C}=g;s=g.x1,a=g.x2;const A=this.barCtx.isFunnel,I=A?(s+a)/2:s;let P=null;const S=null==(c=null==(d=this.barCtx.ctx)?void 0:d.morphTypeChange)?void 0:c.getInitialPathFor(o,l);if(S?P=S:h.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(o,l,v,m)),null==P){const t=A?b.line(I,x):f;P=b.move(I,p)+b.line(I,p)+t+t+t+t+t+b.line(I,p)+y}if(h.config.chart.stacked){const t=this.barCtx.groupCtx;t.xArrj.push(a+w*C),t.xArrjF.push(Math.abs(s-a-g.strokeWidth*C)),t.xArrjVal.push(null!=(u=this.barCtx.series[n][l])?u:null)}return{pathTo:v,pathFrom:P,drawnBox:{x1:s,x2:a,y1:p,y2:x}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let r=a?e:null;return null!=t&&(r=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),r}getGoalValues(t,e,s,a,r,i){const o=this.w,h=[],d=(r,n)=>{o.globals.invalidLogScale||(r=new j(o).getLogValAtSeriesIndex(r,a)),h.push({[t]:"x"===t?this.getXForValue(r,e,!1):this.getYForValue(r,s,i,!1),attrs:n})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][r]&&Array.isArray(o.seriesData.seriesGoals[a][r])&&o.seriesData.seriesGoals[a][r].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,r);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let i=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[i].value&&(i=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!c.enabled||e!==i&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,r,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===i&&i!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],r=s.dumbbellData;if(r&&"series"===r.form){const t=r.values[e]||[];for(let e=0;e<t.length;e++){const i=t[e];null!==i&&-1===r.hidden.indexOf(e)&&a.push({value:i,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const i=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(i[t])?i[t][e]:i[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const r=this.w,i=r.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof i.formatter)return i.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:r});const o=this.barCtx.isHorizontal?r.formatters.xLabelFormatter:r.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,r):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:r,barHeight:i}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new X(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:i/2,a=e+s+i/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+s+r/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new X(s),r=s.config.plotOptions.bar.dumbbell.dataLabels,i=e.markerSize/2+r.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?i*o:0),y:e.y-(e.horizontal?0:i*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:r}){const i=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:u}=e,b=l+e.barHeight,g=new X(this.barCtx.w),p=new c,x=g.move(n,b)+g.line(o,b)+g.line(h,u)+g.line(d,u)+g.line(n,b)+("around"===i.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][r]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,c.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let r=0,i=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.seriesData.series[s][e];o&&r++,s<t&&!o&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(t){var e;return null!=(e=this.w.labelData.seriesGroupIndex[t])?e:-1}getGroupIndex(t){const e=this.getSeriesGroupIndex(t),s=this.barCtx.columnGroupIndices;let a=s.indexOf(e);return a<0&&(s.push(e),a=s.length-1),{groupIndex:e,columnGroupIndex:a}}}const z=d.__apex_Filters,G=d.__apex_Animations,N=d.__apex_Animations_computeStagger,V=d.__apex_BrowserAPIs_BrowserAPIs,E=d.__apex_Environment_Environment;function $(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(E.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function Z(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function q(t,e,s=0|(s=>null==(s=t.seriesData.series[e])?void 0:s.length)()){return Z(Array.from({length:s},(s,a)=>function(t,e,s){var a,r,i,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(i=null==(r=t.seriesData)?void 0:r.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(t,e,a)))}function K(t,e,s=!1,a=!1){var r,i;if(!$(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(r=o.seriesY)?void 0:r[e],l=null==(i=t.seriesData.series)?void 0:i[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=Z(n.map((t,s)=>function(t,e,s){var a,r;if(t.isXNumeric){const r=null==(a=t.seriesX)?void 0:a[e];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const i=null==(r=t.labels)?void 0:r[s];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+s}(o,e,s))),d=q(t,e),c=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),r=new Set;let i=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!r.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(r.add(l),l<i&&(o=!1),i=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)r.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function U({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:r,speed:i}){var o;if(!$(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new X(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(a=>{let o=a.fill||d||"#c8c8c8";0===String(o).indexOf("url(")&&(o=d||"#c8c8c8");const n=h.drawPath({d:a.d,stroke:"none",strokeWidth:0,fill:o,fillOpacity:1,classes:"apexcharts-bar-ghost"}),l=n.node;l.setAttribute("pointer-events","none"),n.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(l,e.node.firstChild);const c=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(a.d);let u=r?"left center":"center bottom";try{const t=l.getBBox();c&&t&&(u=r?Math.abs(c.x-t.x)<=Math.abs(c.x-(t.x+t.width))?"left center":"right center":Math.abs(c.y-(t.y+t.height))<=Math.abs(c.y-t.y)?"center bottom":"center top")}catch(t){}const b=l.style;b.transformBox="fill-box",b.transformOrigin=u,l.setAttribute("data:ghostKey",`${s.realIndex}::${a.key}`);try{const t=l.getBBox(),e=r?u.startsWith("left")?t.x:t.x+t.width:u.endsWith("bottom")?t.y+t.height:t.y;isFinite(e)&&l.setAttribute("data:ghostEdge",String(e))}catch(t){}const g=Math.max(1,i||1),p=performance.now(),x=e=>{if(t.globals.isDestroyed||!l.parentNode)return;const s=Math.max(0,Math.min(1,(e-p)/g)),a=1-Math.pow(1-s,3),i=1-a;b.transform=r?`scaleX(${i})`:`scaleY(${i})`,b.opacity=String(1-a),s<1?V.requestAnimationFrame(x):l.parentNode.removeChild(l)};V.requestAnimationFrame(x)})}class J{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/J.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*J.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const r=a.getBoundingClientRect(),i=t.globals.svgWidth?r.width/t.globals.svgWidth:1;return(e-r.left)/(i||1)-t.layout.translateX}}class Q{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new T(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const r=a.getBarSeriesIndices(),i=new j(this.w);this.stackedSeriesTotals=i.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===r.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new B(this)}setSeriesAxis(t){var e;return this.yRatio.length>1&&(this.yaxisIndex=this.w.globals.seriesYAxisReverseMap[t],this.translationsIndex=t),this.isReversed=null==(e=this.w.config.yaxis[this.yaxisIndex])?void 0:e.reversed,this.translationsIndex}draw(t,e){var s,a,r,i,o;const h=this.w,d=new X(this.w),u=new j(this.w);t=u.getLogSeries(t),this.series=t,this.yRatio=u.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,e);const b=d.group({class:"apexcharts-bar-series apexcharts-plot-series"}),g=this.ctx.highlightFilter;h.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let u=0,p=0;u<t.length;u++,p++){let x,f;const y=[],m=[],v=h.globals.comboCharts?e[u]:u,{columnGroupIndex:w}=this.barHelpers.getGroupIndex(v),C=d.group({class:"apexcharts-series",rel:u+1,seriesName:c.escapeString(h.seriesData.seriesNames[v]),"data:realIndex":v});T.addCollapsedClassToSeries(this.w,C,v),t[u].length>0&&(this.visibleI=this.visibleI+1);const A=this.setSeriesAxis(v);this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[u]));const I=this.barHelpers.initialPositions(v),{y:P,yDivision:S,zeroW:k,x:H,xDivision:L,zeroH:W}=I;let D=I.barHeight,R=I.barWidth;f=P,x=H,this.isHorizontal||m.push(x+(null!=R?R:0)/2);const X=d.group({class:"apexcharts-datalabels","data:realIndex":v}),F=h.config.dataLabels,O=!(null==(s=F.animate)?void 0:s.enabled)&&this.isLengthTransition(v);h.globals.dataChanged&&!O&&!(!(null==(a=F.animate)?void 0:a.enabled)&&!(null==(r=F.countUp)?void 0:r.enabled))||(h.globals.delayedElements.push({el:X.node,holdUntilComplete:O}),X.node.classList.add("apexcharts-element-hidden"));const M=d.group({class:"apexcharts-bar-goals-markers"}),_=d.group({class:"apexcharts-bar-shadows"}),j=this.ctx,Y=j._barShadows,B=j._barShadows=[],G=h.globals.dataChanged&&h.globals.shouldAnimate&&h.config.chart.animations.dynamicAnimation.enabled&&(null==Y?void 0:Y.length)===t[u].length-1;G||(h.globals.delayedElements.push({el:_.node}),_.node.classList.add("apexcharts-element-hidden"));for(let e=0;e<t[u].length;e++){const s=this.barHelpers.getStrokeWidth(u,e,v);let a=null;const r={indexes:{i:u,j:e,realIndex:v,translationsIndex:A,bc:p},x:x,y:f,strokeWidth:s,elSeries:C};this.isHorizontal?(a=this.drawBarPaths(l(n(n({},r),this.barHelpers.rows&&{y:P+this.barHelpers.barRow(v,e)*S}),{barHeight:D,zeroW:k,yDivision:S})),R=this.series[u][e]/this.invertedYRatio):(a=this.drawColumnPaths(l(n({},r),{xDivision:L,barWidth:R,zeroH:W})),D=this.series[u][e]/this.yRatio[A]);const d=this.barHelpers.getPathFillColor(t,u,e,v);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(i=h.config.plotOptions.funnel)?void 0:i.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof d.color&&-1===(null==(o=d.color)?void 0:o.indexOf("url"))?d.color:c.hexToRgba(h.globals.colors[u]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:v,j:e});if(_.add(t),B.push(t),this._shadow=G&&[t,Y[e-1].attr("d")],h.config.chart.dropShadow.enabled){new z(this.w).dropShadow(t,h.config.chart.dropShadow,v)}}this.pathArr.push(a);const b=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:D,barWidth:R});b&&M.add(b),f=a.y,x=a.x,e>0&&m.push(x+(null!=R?R:0)/2),y.push(f),this.renderSeries(l(n({hl:null==g?void 0:g.bar(this,{i:u,j:e,realIndex:v,translationsIndex:A,paths:a,zeroH:W,zeroW:k}),realIndex:v,pathFill:d.color},d.useRangeColor?{lineFill:d.color}:{}),{j:e,i:u,columnGroupIndex:w,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:s,elSeries:C,x:x,y:f,series:t,barHeight:Math.abs(a.barHeight?a.barHeight:D),barWidth:Math.abs(a.barWidth?a.barWidth:R),barXPosition:a.barXPosition,elDataLabelsWrap:X,elGoalsMarkers:M,elBarShadows:_,visibleSeries:this.visibleI,type:"bar"}))}h.globals.seriesXvalues[v]=m,h.globals.seriesYvalues[v]=y,h.globals.previousPaths.length>0&&U({w:h,elSeries:C,record:this._prevRecord(v),newKeys:this._keys(v),isHorizontal:this.isHorizontal,speed:h.config.chart.animations.dynamicAnimation.speed}),b.add(C)}return b}renderSeries({hl:t,realIndex:e,pathFill:s,lineFill:a,j:r,i:i,columnGroupIndex:o,pathFrom:h,pathTo:d,strokeWidth:c,elSeries:u,x:b,y:g,y1:p,y2:x,series:f,barHeight:y,barWidth:m,barXPosition:v,barYPosition:w,elDataLabelsWrap:C,elGoalsMarkers:A,elBarShadows:I,visibleSeries:P,type:S,classes:k,fadeReveal:H=!1,noLabel:L}){var W,D,R,F,O,T,_;const j=this.w,Y=new X(this.w,this.ctx),B=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,Y);let V=!1;const E=this._pathToInterp;if(this._pathToInterp=null,u._bindingsDelegated||(u._bindingsDelegated=!0,Y.setupEventDelegation(u,`.apexcharts-${S}-area`)),!a){let t=function(t){const e=j.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:j.seriesData.series[t][r],dataPointIndex:r,w:j}):s};const s="function"==typeof j.globals.stroke.colors[e]?t(e):j.globals.stroke.colors[e];a=this.barOptions.distributed?j.globals.stroke.colors[r]:s}const $=j.config.chart.animations,Z=$.animateGradually;let q=0,K=0;if(Z&&!1!==Z.enabled&&!(j.globals.dataChanged&&this.isLayoutShift(e))){const t=j.globals.dataPoints||1,e=Z.delay||0,s=Math.min(e,.5*$.speed/Math.max(1,t));K=N({style:"sequential",index:r,baseDelay:s}),j.config.chart.stacked&&!j.globals.dataChanged&&(K+=i*s*.5);q=K/(e||1)}const U=new M(this).handleBarDataLabels({x:b,y:g,y1:p,y2:x,i:i,j:r,series:f,realIndex:e,columnGroupIndex:o,barHeight:y,barWidth:m,barXPosition:v,barYPosition:w,visibleSeries:P,hl:null==t?void 0:t.label,noLabel:L});if(K>0){const t=j.config.dataLabels;if((null==(W=t.animate)?void 0:W.enabled)||(null==(D=t.countUp)?void 0:D.enabled)){const t=String(Math.round(K));null==(F=null==(R=U.dataLabels)?void 0:R.node)||F.setAttribute("data:dlDelay",t),null==(T=null==(O=U.totalDataLabels)?void 0:O.node)||T.setAttribute("data:dlDelay",t)}}let J=!1;if(!j.globals.isBarHorizontal){const t=void 0===v?U.dataLabelsPos.dataLabelsX:v+m/2,s=Math.max(m,j.globals.barPadForNumericAxis);(t+s<0||t-s>j.layout.gridWidth)&&(this._wasOnScreen(e,r)?J=!0:V=!0)}const Q=j.config.series[e].data[r];Q&&Q.strokeColor&&(a=Q.strokeColor);const tt=s;if(this.isNullValue&&-1===j.globals.collapsingSeriesIndices.indexOf(e)&&(s="none"),!V){const o=!0===(null==(_=this.ctx.morphTypeChange)?void 0:_.isActive()),b=o?this.ctx.morphTypeChange.getSpeed():j.config.chart.animations.dynamicAnimation.speed,g=o&&this.ctx.morphTypeChange.claimsTargetMark(e,r);g&&(h=d,q=0);const f=B.renderPaths({i:i,j:r,realIndex:e,pathFrom:h,pathTo:d,stroke:a,strokeWidth:c,strokeLinecap:j.config.stroke.lineCap,fill:s,pathToInterp:E,animationDelay:q,initialSpeed:j.config.chart.animations.speed,dataChangeSpeed:b,className:`apexcharts-${S}-area${k?` ${k}`:""}`,chartType:S,bindEventsOnPaths:!1,fadeReveal:H});f.attr("clip-path",`url(#gridRectBarMask${j.globals.cuid})`),J&&f.node.classList.add("apexcharts-leaving");const v=this._shadow;v&&(this._shadow=null,new G(j,this.ctx).animatePathsGradually({el:v[0],fill:"none",pathFrom:v[1],pathTo:v[0].attr("d"),speed:b,delay:q})),g&&(f.node.setAttribute("opacity","0"),f.node.setAttribute("data-piece-hidden","1"));const w=j.config.forecastDataPoints;w.count>0&&r>=j.globals.dataPoints-w.count&&(f.node.setAttribute("stroke-dasharray",w.dashArray),f.node.setAttribute("stroke-width",w.strokeWidth),f.node.setAttribute("fill-opacity",w.fillOpacity)),void 0!==p&&void 0!==x&&(f.attr("data-range-y1",p),f.attr("data-range-y2",x));if(new z(this.w).setSelectionFilter(f,e,r),u.add(f),f.attr({cy:U.dataLabelsPos.bcy,cx:U.dataLabelsPos.bcx,j:r,val:j.seriesData.series[e][r],barHeight:y,barWidth:m,"data:pathKey":this._keys(e)[r]}),null==t||t.paint(f,{delay:q,delayMs:K,speed:b,fill:tt,elSeries:u,elBarShadows:I,labels:U.dataLabels,pathFrom:h,pathTo:d}),"canvas"===B.kind){j.globals.barCanvasCoords||(j.globals.barCanvasCoords={}),j.globals.barCanvasCoords[e]||(j.globals.barCanvasCoords[e]={});const t=j.globals.barCanvasCoords[e][r];let s=(null==t?void 0:t.bounds)||null;const a=f.bbox();(a.width>0||a.height>0)&&(s={left:Math.min(s?s.left:1/0,a.x),top:Math.min(s?s.top:1/0,a.y),right:Math.max(s?s.right:-1/0,a.x+a.width),bottom:Math.max(s?s.bottom:-1/0,a.y+a.height)}),j.globals.barCanvasCoords[e][r]=l(n({cx:U.dataLabelsPos.bcx,cy:U.dataLabelsPos.bcy,barWidth:m,type:S},void 0!==p&&void 0!==x&&{rangeY1:p,rangeY2:x}),{bounds:s})}null!==U.dataLabels&&C.add(U.dataLabels),U.totalDataLabels&&C.add(U.totalDataLabels),u.add(C),A&&u.add(A),I&&u.add(I)}return u}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:s,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:t.realIndex,j:d});s>0&&(e=this.seriesLen*e/s),c=i+e*this.visibleI,c-=e*a}else c=i+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return r=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(a=p.x1,r=p.x),g||(i+=o),g&&(i=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:r,y:i,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:r});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:u});t>0&&(r=this.seriesLen*r/t),g=e+r*this.visibleI,g-=r*s}else g=e+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][u],i,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:i,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,i,h,u,d),barXPosition:g,barWidth:r}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const r=this.w,i=Y(r);let o=s;return r.seriesData.seriesX[s].length||(o=r.globals.maxValsInArrayIndex),c.isNumber(r.seriesData.seriesX[o][a])&&(t=J.dataXToPx(r,r.seriesData.seriesX[o][a])-e*(i?1:this.seriesLen)/2),{barXPosition:t+(i?0:e*this.visibleI),x:t}}_wasOnScreen(t,e){if(!$(this.w))return!1;const s=this._prevKeyedPaths(t);return!!s&&s.has(this._keys(t)[e])}_keys(t){const e=this._keyCache||(this._keyCache={});return e[t]||(e[t]=q(this.w,t))}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const r=e.globals.previousPaths[a];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&(s=r)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s,a,r,i,o;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const n=this.w;let l=!1;if($(n)&&n.globals.previousPaths.length>0){const h=this._prevRecord(t),d=null!=(s=null==(e=n.seriesData.series[t])?void 0:e.length)?s:0,c=h&&this._prevKeyedPaths(t);if(h)if(c){const e=new Set(this._keys(t));l=(null!=(o=null==(i=null==(r=null==(a=n.globals.prevStreamFrame)?void 0:a.seriesY)?void 0:r[t])?void 0:i.length)?o:d)!==d||[...c.keys()].some(t=>!e.has(t))}else l=h.paths.length!==d;else l=d>0}return this._ltCache[t]=l,l}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=K(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const r=this.w;this._pathToInterp=null;const i=this._prevRecord(t);if(!i)return $(r)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(this._keys(t)[e]);s?o=s.d:n=!0}else void 0!==i.paths[e]?o=i.paths[e].d:n=!0;return o?this.cornerMorph(o,s,a):n&&$(r)?null:s}cornerMorph(t,e,s){const a=Q.pathCommandCount(t),r=Q.pathCommandCount(e);if(a===r)return t;const i=new X(this.w),o=t=>{const e=Q.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},n=a<r?o(t)>1:o(e)>1;if(a<r){const e=i.roundPathCorners(t,0);if(Q.pathCommandCount(e)===r){if(n&&s){const t=i.roundPathCorners(s,0);Q.pathCommandCount(t)===r&&(this._pathToInterp=t)}return e}}else{const s=i.roundPathCorners(e,0);if(Q.pathCommandCount(s)===a){if(this._pathToInterp=s,n){const e=Q.squareLike(t),s=e?i.roundPathCorners(e,0):null;if(s&&Q.pathCommandCount(s)===a)return s}return t}}return e}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const r=e.map(t=>t[0]),i=e.map(t=>t[1]);return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...i),maxY:Math.max(...i),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=Q.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:r,maxY:i,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,c,u;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[c,u]=l(o[1],r,i)):(c=Math.abs(o[1]-r)<=Math.abs(o[1]-i)?r:i,u=c===r?i:r,[h,d]=l(o[0],s,a));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const s=this._prevRecord(t);if(!s)return null;const a=this._prevKeyedPaths(t),r=a?a.get(this._keys(t)[e]):s.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[MmLlHhVvCcSsQqTtAaZz]/g);return e?e.length:0}}d.default.use({bar:Q,column:Q,barStacked:class extends Q{draw(t,e){const s=this.w;this.graphics=new X(this.w);const a=new j(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,e),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),i=this.ctx.highlightFilter;let o=0,h=0;const d=s.config.chart.animations,u=d.enabled&&d.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let b=!1;for(let a=0,d=0;a<t.length;a++,d++){const g=s.globals.comboCharts?e[a]:a,{groupIndex:p,columnGroupIndex:x}=this.barHelpers.getGroupIndex(g);this.groupCtx=this.stacks[p];const f=[],y=[],m=this.setSeriesAxis(g);let v=this.graphics.group({class:"apexcharts-series",seriesName:c.escapeString(s.seriesData.seriesNames[g]),rel:a+1,"data:realIndex":g});T.addCollapsedClassToSeries(this.w,v,g);const w=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":g});T.addCollapsedClassToSeries(this.w,w,g),(s.globals.collapsingSeriesIndices||[]).indexOf(g)>-1&&w.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),A=this.initialPositions(o,h,void 0,void 0,void 0,void 0,m),{xDivision:I,yDivision:P,zeroH:S,zeroW:k}=A;let H=A.barHeight,L=A.barWidth;h=A.y,o=A.x,s.globals.barHeight=H,s.globals.barWidth=L,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const r=this.barHelpers.getStrokeWidth(a,e,g),c={indexes:{i:a,j:e,realIndex:g,translationsIndex:m,bc:d},strokeWidth:r,x:o,y:h,elSeries:v,columnGroupIndex:x};let p=null;this.isHorizontal?(p=this.drawStackedBarPaths(l(n(n({},c),this.barHelpers.rows&&{y:A.y+this.barHelpers.barRow(g,e)*P}),{zeroW:k,barHeight:H,yDivision:P})),L=this.series[a][e]/this.invertedYRatio):(p=this.drawStackedColumnPaths(l(n({},c),{xDivision:I,barWidth:L,zeroH:S})),H=this.series[a][e]/this.yRatio[m]);const W=this.barHelpers.drawGoalLine({barXPosition:p.barXPosition,barYPosition:p.barYPosition,goalX:p.goalX,goalY:p.goalY,barHeight:H,barWidth:L});W&&C.add(W),h=p.y,o=p.x,f.push(o),y.push(h);const D=this.barHelpers.getPathFillColor(t,a,e,g);let R="";const X=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",F=this.cornerFlip(this.barHelpers.arrBorderRadius[g][e],s.seriesData.series[g][e]),O=u&&!F&&this.getPreviousFlip(g,e);(F||O)&&(R=X),O&&(R+=" apexcharts-flip-held",b=!0),v=this.renderSeries(l(n({hl:null==i?void 0:i.bar(this,{i:a,j:e,realIndex:g,translationsIndex:m,paths:p,zeroH:S,zeroW:k}),realIndex:g,pathFill:D.color},D.useRangeColor?{lineFill:D.color}:{}),{j:e,i:a,columnGroupIndex:x,pathFrom:p.pathFrom,pathTo:p.pathTo,strokeWidth:r,elSeries:v,x:o,y:h,series:t,barHeight:H,barWidth:L,barXPosition:p.barXPosition,elDataLabelsWrap:w,elGoalsMarkers:C,type:"bar",visibleSeries:x,classes:R}))}s.globals.seriesXvalues[g]=f,s.globals.seriesYvalues[g]=y,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),r.add(v)}return b&&this.settleHeldMirrors(r),r}cornerFlip(t,e){return"bottom"===t&&e>0||"top"===t&&e<0}settleHeldMirrors(t){const e=this.w;if(!E.isBrowser())return;const s=e.config.chart.animations,a=(s.dynamicAnimation.speed||0)+(s.speed||0)+100,r=(t?t.node:e.dom.baseEl).querySelectorAll(".apexcharts-flip-held");setTimeout(()=>{r.forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},a)}initialPositions(t,e,s,a,r,i,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,i=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),r=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:r,zeroW:i}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,columnGroupIndex:o,yDivision:n,elSeries:l}){var h,d;const c=this.w,u=i+o*e;let b;const g=t.i,p=t.j,x=t.realIndex,f=t.translationsIndex,y=null!=(d=null==(h=this.series[g])?void 0:h[p])?d:null,m=this.groupCtx,v=c.axisFlags.isXNumeric?c.seriesData.seriesX[x][p]:p,w=m.tops.get(v);if(w){const[t,e,s]=w,a=2*(this.isReversed?s:0);b=e<0?y>=0?t+s-a:t:y>=0?t:t-s+a}else b=a;r=b+y/this.invertedYRatio*(this.isReversed?-1:1);const C=this.barHelpers.getBarpaths({barYPosition:u,barHeight:e,x1:b,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:g,j:p,w:c});return this._setTop(v,w,m.xArrj[p],m.xArrjVal[p],m.xArrjF[p],x,p),this.barHelpers.barBackground({j:p,i:g,y1:u,y2:e,elSeries:l}),i+=n,{pathTo:C.pathTo,pathFrom:C.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,x,p,f),barXPosition:b,barYPosition:u,x:r,y:i}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,columnGroupIndex:o,elSeries:n}){var l,h,d;const c=this.w,u=t.i,b=t.j,g=t.bc,p=t.realIndex,x=t.translationsIndex,f=null!=(h=null==(l=this.series[u])?void 0:l[b])?h:null;if(c.axisFlags.isXNumeric){let t=c.seriesData.seriesX[p][b];t||(t=0),e=(t-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}const y=e+o*r;let m;const v=this.groupCtx,w=c.axisFlags.isXNumeric?c.seriesData.seriesX[p][b]:b,C=v.tops.get(w);if(C){const[t,e,s]=C;let a;e<0?a=f>=0?t-s+2*(this.isReversed?s:0):t:e>=0&&(a=f>=0?t:t+s-2*(this.isReversed?s:0)),void 0===a&&(a=c.layout.gridHeight),m=(null==(d=v.prevYF[0])?void 0:d.every(t=>0===t))&&v.prevYF.slice(1).every(t=>t.every(t=>isNaN(t)))?i:a}else m=i;s=m-f/this.yRatio[x]*(this.isReversed?-1:1);const A=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:r,y1:m,y2:s,yRatio:this.yRatio[x],strokeWidth:c.config.stroke.show?this.strokeWidth:0,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:u,j:b,w:c});return this._setTop(w,C,v.yArrj[b],v.yArrjVal[b],v.yArrjF[b],p,b),this.barHelpers.barBackground({bc:g,j:b,i:u,x1:y,x2:r,elSeries:n}),{pathTo:A.pathTo,pathFrom:A.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,i,p,b,x),barXPosition:y,x:c.axisFlags.isXNumeric?e:e+a,y:s}}_setTop(t,e,s,a,r,i,o){isNaN(s)||this.groupCtx.tops.set(t,[s,a,(e?e[2]:0)+r,(e?e[3]:0)+(this.w.seriesData.series[i][o]||0),e?Math.min(e[0],e[4]):1/0,e?Math.max(e[0],e[5]):-1/0])}},rangeBar:class extends Q{draw(t,e){var s,a,r,i,o,l;const h=this.w,d=new X(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=h.rangeData.seriesRangeStart,this.seriesRangeEnd=h.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t,e);const u=d.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let b=0;b<t.length;b++){let g,p;const x=h.globals.comboCharts?e[b]:b,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),y=d.group({class:"apexcharts-series",seriesName:c.escapeString(h.seriesData.seriesNames[x]),rel:b+1,"data:realIndex":x});T.addCollapsedClassToSeries(this.w,y,x),t[b].length>0&&(this.visibleI=this.visibleI+1);const m=this.setSeriesAxis(x);this.isHorizontal&&h.labelData.timescaleLabels.length&&(this.isReversed=!1);const v=this.barHelpers.initialPositions(x),{y:w,zeroW:C,x:A,zeroH:I}=v,P=null!=(s=v.yDivision)?s:0,S=null!=(a=v.xDivision)?a:0;p=w,g=A;const k=d.group({class:"apexcharts-datalabels","data:realIndex":x}),H=d.group({class:"apexcharts-rangebar-goals-markers"}),L=h.config.series[x].data;for(let e=0;e<h.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(b,e,x);let a=null!=(r=v.barWidth)?r:0,d=null!=(i=v.barHeight)?i:0;const c=this.seriesRangeStart[x][e],u=this.seriesRangeEnd[x][e];let w=null,A=null,W=null;const D={x:g,y:p,strokeWidth:s,elSeries:y};let R=this.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(R=1),void 0===(null==L?void 0:L[e]))break;if(this.isHorizontal){W=p+d*this.visibleI;const t=(P-d*R)/2;if(null!=(null==(o=L[e])?void 0:o.x)){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:W,srty:t,barHeight:d,yDivision:P,initPositions:v});d=s.barHeight,W=s.barYPosition}w=this.drawRangeBarPaths(n({indexes:{i:b,j:e,realIndex:x},barHeight:d,barYPosition:W,zeroW:C,yDivision:P,y1:c,y2:u},D)),a=w.barWidth}else{h.axisFlags.isXNumeric&&(g=(h.seriesData.seriesX[x][e]-h.globals.minX)/this.xRatio-a/2),A=g+a*this.visibleI;const t=(S-a*R)/2;if(null!=(null==(l=L[e])?void 0:l.x)){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:A,srtx:t,barWidth:a,xDivision:S,initPositions:v});a=s.barWidth,A=s.barXPosition}w=this.drawRangeColumnPaths(n({indexes:{i:b,j:e,realIndex:x,translationsIndex:m},barWidth:a,barXPosition:A,zeroH:I,xDivision:S},D)),d=w.barHeight,A=w.barXPosition}const X=this.barHelpers.drawGoalLine({barXPosition:A,barYPosition:W,goalX:w.goalX,goalY:w.goalY,barHeight:d,barWidth:a});X&&H.add(X),p=w.y,g=w.x;const F=this.barHelpers.getPathFillColor(t,b,e,x);this.renderSeries({realIndex:x,pathFill:F.color,lineFill:F.useRangeColor?F.color:h.globals.stroke.colors[x],j:e,i:b,x:g,y:p,y1:c,y2:u,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:s,elSeries:y,series:t,barHeight:d,barWidth:a,barXPosition:A,barYPosition:W,columnGroupIndex:f,elDataLabelsWrap:k,elGoalsMarkers:H,visibleSeries:this.visibleI,type:"rangebar"})}h.globals.previousPaths.length>0&&U({w:h,elSeries:y,record:this._prevRecord(x),newKeys:this._keys(x),isHorizontal:this.isHorizontal,speed:h.config.chart.animations.dynamicAnimation.speed}),u.add(y)}return u}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:r,srtx:i,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var c,u,b,g;const p=this.w;let x=[];const f=null==(u=null==(c=p.globals.seriesRangeName)?void 0:c[t])?void 0:u[e],y=null==(g=null==(b=p.config.series[t].data)?void 0:b[e])?void 0:g.x,m=Array.isArray(y)?y.join(" "):y,v=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(m),w=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===m&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?r+l*v:r+o*this.visibleI+l*v,w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][w].overlaps),x.indexOf(f)>-1&&(s+=(o=d.barHeight/x.length)*x.indexOf(f)))):(v>-1&&!p.axisFlags.isXNumeric&&(a=p.config.plotOptions.bar.rangeBarGroupRows?i+h*v:i+n*this.visibleI+h*v),w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][w].overlaps),x.indexOf(f)>-1&&(a+=(n=d.barWidth/x.length)*x.indexOf(f)))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:r,zeroH:i}){var o,n;const l=this.w,{i:h,j:d,realIndex:c,translationsIndex:u}=t,b=this.yRatio[u]*(this.isReversed?-1:1),g=this.getRangeValue(c,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=i-p/b,x=i-x/b):p=x=i;const y=Math.abs(x-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:d,w:l});if(f){const t=m.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(c,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:c,barWidth:a});e=t.x,r=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,i,c,d,u),barXPosition:r}}_keys(t){const e=this._keyCache||(this._keyCache={}),s=this.w.config.series[t].data;return e[t]||(e[t]=Z((s||[]).map((t,e)=>{var s;return"c:"+(null!=(s=null==t?void 0:t.x)?s:e)})))}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:r,barHeight:i,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,c=this.invertedYRatio*(this.isReversed?-1:1),u=this.preventBarOverflow(n+s/c),b=this.preventBarOverflow(n+a/c),g=this.getRangeValue(h,d),p=Math.abs(b-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:i,x1:u,x2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=g.start&&null!=g.end){const t=x.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:p,x:g.start<0&&g.end<0?u:b,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
5
+ "use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))r.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))i.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_Utils,u="__apexcharts_series_transforms__";function b(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[u][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[u]||(globalThis[u]={});const g="__apexcharts_row_sources__";function p(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[g][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function x(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function f(t,e){const s=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const o=t||{},{hidden:h}=o,d=((t,e)=>{var s={};for(var o in t)r.call(t,o)&&e.indexOf(o)<0&&(s[o]=t[o]);if(null!=t&&a)for(var o of a(t))e.indexOf(o)<0&&i.call(t,o)&&(s[o]=t[o]);return s})(o,["hidden"]);let c=d.data;if(Array.isArray(c)&&!c.length){const t=s.find(t=>t.index===e);t&&Array.isArray(t.data)&&(c=t.data)}return l(n({},d),{data:Array.isArray(c)?c.slice():c})})}globalThis[g]||(globalThis[g]={});function y(t,e){const s=t.length;if(0===s)return NaN;if(1===s)return t[0];const a=(s-1)*e,r=Math.floor(a),i=Math.ceil(a);return r===i?t[r]:t[r]+(t[i]-t[r])*(a-r)}function m(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e);let a=s[0],r=s[s.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(a=t,r=e)}if(!(r>a)){const t=Math.abs(a)>0?.05*Math.abs(a):.5;return{edges:[a-t,a+t],binWidth:2*t,rule:"single",capped:!1}}const o=r-a;let n,l;if("number"==typeof e.binWidth&&e.binWidth>0)n=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)n=o/Math.floor(e.bins),l="count";else{const t=function(t,e,s){const a=t.length,r=t=>e/Math.max(1,Math.ceil(t)),i=()=>r(Math.log2(a)+1);switch(s){case"sqrt":return{width:r(Math.sqrt(a)),rule:"sqrt"};case"rice":return{width:r(2*Math.cbrt(a)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}(t);return e>0?{width:3.49*e*Math.pow(a,-1/3),rule:"scott"}:{width:i(),rule:"sturges"}}case"fd":{const e=y(t,.75)-y(t,.25);return e>0?{width:2*e*Math.pow(a,-1/3),rule:"fd"}:{width:i(),rule:"sturges"}}case"auto":{const e=i(),s=y(t,.75)-y(t,.25);if(s<=0)return{width:e,rule:"sturges"};const r=2*s*Math.pow(a,-1/3);return r<e?{width:r,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:i(),rule:"sturges"}}}(s,o,"string"==typeof e.bins?e.bins:"auto");n=t.width,l=t.rule}(!Number.isFinite(n)||n<=0)&&(n=o);let h=Math.ceil(o/n);(!Number.isFinite(h)||h<1)&&(h=1);let d=!1;h>1e3&&(h=1e3,d=!0),n=o/h;const c=new Array(h+1);for(let t=0;t<=h;t++)c[t]=a+t*n;return c[h]=Math.max(c[h],r),{edges:c,binWidth:n,rule:l,capped:d}}function v(t,e){const s=e.length-1;if(!(t>=e[0])||t>e[s])return-1;if(t===e[s])return s-1;const a=(e[s]-e[0])/s;if(a>0){let r=Math.floor((t-e[0])/a);return r<0&&(r=0),r>s-1&&(r=s-1),t<e[r]?r--:t>=e[r+1]&&r++,r<0||r>s-1?-1:r}let r=0,i=s-1;for(;r<=i;){const s=r+i>>1;if(t<e[s])i=s-1;else{if(!(t>=e[s+1]))return s;r=s+1}}return-1}function w(t,e){const s=Math.max(0,e.length-1),a=new Array(s);for(let t=0;t<s;t++)a[t]=[];for(let s=0;s<t.length;s++){const r=v(t[s],e);r>=0&&a[r].push(t[s])}return a}function C(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=y(s,.25),r=y(s,.5),i=y(s,.75),o=i-a;let n=s[0],l=s[s.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=a-1.5*o,e=i+1.5*o;let r=0;for(;r<s.length&&s[r]<t;)r++;let d=s.length-1;for(;d>=0&&s[d]>e;)d--;r<=d&&(n=s[r],l=s[d],h=s.slice(0,r).concat(s.slice(d+1)))}return{summary:[n,a,r,i,l],outliers:h,iqr:o}}function I(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=s.length;let r=e.bandwidth;if(!("number"==typeof r&&r>0)){const t=function(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}(s),e=y(s,.75)-y(s,.25);r=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(a,-.2)}if(!isFinite(r)||r<=0){const t=s[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=s[0]-2*r,n=(s[a-1]+2*r-o)/(i-1),l=1/(a*r*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<i;t++){const e=o+t*n;let i=0;for(let t=0;t<a;t++){const a=(e-s[t])/r;i+=Math.exp(-.5*a*a)}h.push([e,i*l])}return{density:h,bandwidth:r}}function P(t){const e=[];if(!Array.isArray(t))return e;for(let s=0;s<t.length;s++){const a=t[s];let r=a;Array.isArray(a)?r=1===a.length?a[0]:a[1]:a&&"object"==typeof a&&(r=void 0!==a.y?a.y:a.x);const i=c.parseNumber(r);null!==i&&isFinite(i)&&e.push(i)}return e}function S(t,e,s,a,r,i,o){if(!Array.isArray(t))return t;const h=function(t,e){const s=t.statsDerived||(t.statsDerived={});return s[e]||(s[e]=new Map)}(e,s),d=[],u=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&t.type!==s)return t;let u=!1;const b=new Array(t.data.length).fill(null),g=t.data.map((t,n)=>{const l=e+":"+n,d=i(t);if(d&&!function(t,e,s){const a=(t.get(e)||{}).e;return!!a&&JSON.stringify(a.density||a.summary)===JSON.stringify(s)}(h,l,d))return t;const g=function(t,e){var s;if(!t||"object"!=typeof t||Array.isArray(t))return null;let a=null;if(Array.isArray(t.points)?a=t.points:Array.isArray(null==(s=t.y)?void 0:s.points)?a=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(a=t.y),!a)return null;const r=[];for(let t=0;t<a.length;t++){const e=c.parseNumber(a[t]);null!==e&&isFinite(e)&&r.push(e)}return r.length?r:null}(t,"violin"===s);if(!g)return t;const p=function(t,e,s,a,r){const i=JSON.stringify(a)+s;let o=t.get(e);return o&&o.s===i||t.set(e,o={s:i,e:r(s,a)}),o.e}(h,l,g,a,r);return p?(u=!0,b[n]=g,o(t,p,g)):t});return u&&(d[e]=b),u?l(n({},t),{data:g}):t});return function(t,e,s){if(!e.length)return;const a=[];for(let t=0;t<s;t++){const s=e[t];if(!s){a.push(null);continue}const r=[];for(const t of s)if(t)for(let e=0;e<t.length;e++)r.push(t[e]);a.push({values:r,byPoint:s})}t.seriesObservations=a}(e,d,t.length),u}function A(t,e,s){const a=s&&null!=s.maxRows?s.maxRows:3e3,r=function(t,e){let s=0,a=0;for(const e of t)s+=e.length,e.length>a&&(a=e.length);if(s<=e)return{clusters:t,stride:1,total:s,kept:s};const r=e=>{let s=0;for(const a of t)s+=Math.ceil(a.length/e);return s};let i=Math.max(2,Math.ceil(s/e));for(;i<a&&r(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let s=0;s<t.length;s+=i)e.push(t[s]);return o+=e.length,e}),stride:i,total:s,kept:o}}(e.map(t=>t.rows),a);r.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${r.total} rows to ${r.kept} (every ${r.stride}${2===r.stride?"nd":3===r.stride?"rd":"th"} row) to stay under maxRows=${a}. Raise maxRows to draw more.`);const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const s=i[t.realIndex]||i[0];return{name:t.name,data:r.clusters[e].map((a,r)=>n({id:`${t.realIndex}:${e}:${r}`,x:t.name,y:a},s?{fillColor:s}:{}))}})}function k(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function H(t){return(e,s)=>{var a;const r=t(e);if(!Array.isArray(r)||!r.length)return null;const i=e.globals?x(e.globals):[],o=e.globals&&((null==(a=e.globals.categoryLabels)?void 0:a.length)?e.globals.categoryLabels:e.globals.labels)||[],n=[];return r.forEach((t,s)=>{var a;if(-1!==i.indexOf(s))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(a=e.seriesData.seriesNames)?void 0:a[s]);t.forEach((t,e)=>{const a=null!=o[e]?String(o[e]):`#${e+1}`;n.push({name:r.length>1&&l?`${l} ${a}`:a,realIndex:s,rows:Array.isArray(t)?t.slice():[]})})}),n.length?A(e,n,s):null}}const L=H(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),W=H(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});b("histogram",function(t,e){var s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.histogramRawSeries||(r.histogramRawSeries=f(t,r));const i=r.histogramRawSeries,o=(null==(s=a.plotOptions)?void 0:s.histogram)||{},h=i.map(t=>P(null==t?void 0:t.data));let d=[];if(1===h.length)d=h[0];else for(const t of h)d=d.concat(t);const c=m(d,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!c)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:u,binWidth:b}=c,g=h.map(t=>function(t,e){const s=new Array(Math.max(0,e.length-1)).fill(0);for(let a=0;a<t.length;a++){const r=v(t[a],e);r>=0&&s[r]++}return s}(t,u));e.histogramData={edges:u,binWidth:b,counts:g,rule:c.rule,capped:c.capped};const p=x(r);return e.seriesObservations=h.map((t,e)=>({values:t,byPoint:-1!==p.indexOf(e)?[]:w(t,u)})),i.map((t,e)=>{if(-1!==p.indexOf(e))return l(n({},t),{data:[]});const s=function(t,e={}){let s=t.slice();if(e.cumulative){let t=0;s=s.map(e=>t+=e)}const a=t.reduce((t,e)=>t+e,0);if(a<=0)return s;if("relative"===e.normalize)return s.map(t=>t/a*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return s.map(e=>e/(a*t))}return s}(g[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:b}),a=[];for(let t=0;t<s.length;t++)a.push({x:(u[t]+u[t+1])/2,y:s[t]});return l(n({},t),{data:a})})}),b("boxPlot",function(t,e){var s,a;return S(t,e,"boxPlot",{whiskers:(null==(a=null==(s=e.config.plotOptions)?void 0:s.boxPlot)?void 0:a.whiskers)||"minmax"},C,t=>Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&t.y,(t,e,s)=>l(n({},t),{y:e.summary,points:s}))}),b("violin",function(t,e){var s,a;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.violin)?void 0:a.kde)||{};return S(t,e,"violin",{bandwidth:r.bandwidth,resolution:r.resolution},I,t=>{var e;return Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length&&t.y.density},(t,e,s)=>l(n({},t),{y:l(n({},t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{}),{density:e.density,points:s})}))}),p("histogram",function(t,e){const s=t.globals,a=t.histogramData,r=s&&s.histogramRawSeries;if(!a||!Array.isArray(a.edges)||a.edges.length<2)return null;if(!Array.isArray(r)||!r.length)return null;const i=x(s),o=a.edges,n=[];return r.forEach((e,s)=>{var a;if(-1!==i.indexOf(s))return;const l=w(P(e&&e.data),o),h=t.seriesData&&(null==(a=t.seriesData.seriesNames)?void 0:a[s])||(null==e?void 0:e.name);l.forEach((t,e)=>{const a=`${k(o[e])}-${k(o[e+1])}`;n.push({name:r.length>1&&h?`${h} ${a}`:a,realIndex:s,rows:t})})}),n.length?A(t,n,e):null}),p("boxPlot",L),p("violin",W);const R=d.__apex_Graphics,D=d.__apex_DataLabels,F=(t,e,s,a)=>{if("function"!=typeof t)return t;const r=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(r)?r:0};class X{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s,a,r,i,o;const{x:h,y:d,y1:c,y2:u,i:b,j:g,realIndex:p,columnGroupIndex:x,barHeight:f,barWidth:y,barXPosition:m,barYPosition:v,visibleSeries:w,hl:C,noLabel:I}=t,P=this.w,S=new R(this.barCtx.w);this.hlt=null==C?void 0:C.total;const A=P.waterfallData&&P.waterfallData.values,k=C&&null!=C.val?C.val:A&&A[p]&&null!=A[p][g]?A[p][g]:null,H=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[p]:this.barCtx.strokeWidth;let L,W;P.axisFlags.isXNumeric&&!P.globals.isBarHorizontal?(L=h+y*(w+1),W=d+f*(w+1)-H):(L=h+y*w,W=d+f*w);let D=null,X=null,O=h,M=d,T={};const _=P.config.dataLabels,j=this.barCtx.barOptions.dataLabels,Y=this.barCtx.barOptions.dataLabels.total;void 0!==v&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(W=v,M=v),void 0!==m&&this.barCtx.isVerticalGroupedRangeBar&&(L=m,O=m);const B=F(_.offsetX,P,p,g),z=F(_.offsetY,P,p,g),G=(null==C?void 0:C.hide)?void 0:null!==k?k:void 0!==u?[c,u]:"100%"===P.config.chart.stackType?P.globals.seriesPercent[p][g]:P.seriesData.series[p][g];let N,V={width:0,height:0};_.enabled&&(N=void 0===G?"":_.formatter(G,l(n({},P),{seriesIndex:p,dataPointIndex:g,w:P})),V=S.getTextRects(N,parseFloat(_.style.fontSize).toString(),_.style.fontFamily,void 0,!0,_.style.fontWeight));const E={x:null!=(e=null==C?void 0:C.x)?e:h,y:null!=(s=null==C?void 0:C.y)?s:d,neg:C&&null!=C.val?C.val<0:void 0,i:b,j:g,realIndex:p,columnGroupIndex:x,bcx:L,bcy:W,barHeight:null!=(a=null==C?void 0:C.barHeight)?a:f,barWidth:null!=(r=null==C?void 0:C.barWidth)?r:y,textRects:V,strokeWidth:H,dataLabelsX:O,dataLabelsY:M,dataLabelsConfig:_,barDataLabelsConfig:j,barTotalDataLabelsConfig:Y,offX:B,offY:z};if(T=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(E):this.calculateColumnsDataLabelsPosition(E),null!==k&&this.barCtx.isHorizontal&&"center"===j.position){const t=null==(o=null==(i=P.waterfallData.geometry)?void 0:i[p])?void 0:o[g];t&&t.horizontal&&(T.dataLabelsX=(t.levelStart+t.levelEnd)/2+B)}return D=I?null:this.drawCalculatedDataLabels({x:T.dataLabelsX,y:T.dataLabelsY,neg:E.neg,val:G,text:N,i:p,j:g,barWidth:E.barWidth,barHeight:E.barHeight,textRects:V,dataLabelsConfig:_}),P.config.chart.stacked&&Y.enabled&&!1!==this.hlt&&(X=this.drawTotalDataLabels({x:T.totalDataLabelsX,y:T.totalDataLabelsY,barWidth:y,barHeight:f,realIndex:p,j:g,textAnchor:T.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:p,j:g}),rawVal:this.getStackedTotalValue({realIndex:p,j:g}),dataLabelsConfig:_,barTotalDataLabelsConfig:Y})),{dataLabelsPos:T,dataLabels:D,totalDataLabels:X}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){if(this.hlt)return this.hlt.val;const s=this.w,a=this.xStackTop(t,e);if(a)return a[3];const r=this.getTotalGroupContext(t),i=s.seriesData.stackedSeriesTotalsByGroups;return r&&i&&i[r.groupIndex]?i[r.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}xStackTop(t,e){var s,a;const r=this.w;return r.axisFlags.isXNumeric&&(null==(a=null==(s=this.barCtx.stacks)?void 0:s[r.labelData.seriesGroupIndex[t]])?void 0:a.tops.get(r.seriesData.seriesX[t][e]))}totalRects(t,e){const s=this.barCtx.barOptions.dataLabels.total.style;return new R(this.w).getTextRects(this.getStackedTotalDataLabel({realIndex:t,j:e}),s.fontSize,s.fontFamily,void 0,!0,s.fontWeight)}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){var e;const s=this.w;let a,r,{j:i,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,strokeWidth:x,offX:f,offY:y}=t;const m=l;d=Math.abs(d);const v="vertical"===s.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:o,j:i});l-=x/2;const C=s.layout.gridWidth/s.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=s.axisFlags.isXNumeric?l-h/2+f:l-C+h/2+f,!s.config.chart.stacked&&w>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*w)),v){const t=2;u=u+c.height/2-x/2-t}const I=null!=(e=t.neg)?e:s.seriesData.series[o][i]<0;let P=n;switch(this.barCtx.isReversed&&(P=n+(I?d:-d)),g.position){case"center":b=v?I?P-d/2+y:P+d/2-y:I?P-d/2+c.height/2+y:P+d/2+c.height/2-y;break;case"bottom":b=v?I?P-d+y:P+d-y:I?P-d+c.height+x+y:P+d-c.height/2+x-y;break;case"top":b=v?I?P+y:P-y:I?P-c.height/2-y:P+c.height+y}let S=P;const A=this.getTotalGroupContext(o),k=this.xStackTop(o,i),H=k?[]:this.barCtx.stacks||[];if(k&&(S=I?Math.max(P,k[5]):Math.min(P,k[4])),H.forEach((t,e)=>{A&&e!==A.groupIndex||t.prevY.forEach(t=>{S=I?Math.max(t[i],S):Math.min(t[i],S)})}),this.hlt&&(S=this.hlt.edge),this.drawsStackedTotal(o)&&p.enabled){const t=this.totalRects(o,i).height;a=I?S+.77*t-y-p.offsetY:S-.3*t+y+p.offsetY;const e=C;r=m+(s.axisFlags.isXNumeric?-h/2:h/2-e)+p.offsetX}return s.config.chart.stacked||(b<0?b=0+x:b+c.height/3>s.layout.gridHeight&&(b=s.layout.gridHeight-x)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:b,totalDataLabelsX:r,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e,s;const a=this.w;let{x:r,j:i,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:x,offY:f}=t;const y=a.layout.gridHeight/a.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:o,j:i});let v,w,C;if(h=Math.abs(h),this.barCtx.isPyramid){v=n+l/2+f-(null!=(e=d.centerOffset)?e:0)}else v=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+f-3;!a.config.chart.stacked&&m>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=l*m);let I="start";const P=null!=(s=t.neg)?s:a.seriesData.series[o][i]<0;let S=r;if(this.barCtx.isReversed&&(S=r+(P?-h:h),I=P?"start":"end"),this.barCtx.isPyramid)c=a.layout.gridWidth/2+x;else switch(g.position){case"center":c=P?S+h/2-x:Math.max(d.width/2,S-h/2)+x;break;case"bottom":c=P?S+h-u-x:S-h+u+x;break;case"top":c=P?S-u-x:S-u+x}let A=S;const k=this.getTotalGroupContext(o),H=this.xStackTop(o,i),L=H?[]:this.barCtx.stacks||[];if(H&&(A=P?Math.min(S,H[4]):Math.max(S,H[5])),L.forEach((t,e)=>{k&&e!==k.groupIndex||t.prevX.forEach(t=>{A=P?Math.min(t[i],A):Math.max(t[i],A)})}),this.hlt&&(A=this.hlt.edge),this.drawsStackedTotal(o)&&p.enabled){const t=this.totalRects(o,i);P?(w=A-u-x-p.offsetX,I="end"):w=A+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),C=v-d.height/2+t.height/2+p.offsetY+u,a.globals.barGroups.length>1&&!k&&(C-=a.globals.barGroups.length/2*(l/2))}if(!a.config.chart.stacked){const t=P&&"middle"!==b.textAnchor?"start"===b.textAnchor?"end":"start":b.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const s=("vertical"===g.orientation?d.height:d.width)-e;c+s>a.layout.gridWidth-u&&(c=a.layout.gridWidth-s-u),c-e<u&&(c=e+u)}return{bcx:r,bcy:n,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:w,totalDataLabelsY:C,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,text:a,neg:r,i:i,j:o,textRects:h,barHeight:d,barWidth:c,dataLabelsConfig:u}){var b,g,p;const x=this.w;let f="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(f=`rotate(-90, ${t}, ${e})`);const y=new D(this.barCtx.w,this.barCtx.ctx),m=new R(this.barCtx.w),v=u.formatter;let w=null;const C=x.globals.collapsedSeriesIndices.indexOf(i)>-1,I=(x.globals.collapsingSeriesIndices||[]).indexOf(i)>-1,P=`${i}::${this.barCtx._keys(i)[o]}`;if(I){const t=null==(b=x.globals.prevDataLabels)?void 0:b.get(P);t&&isFinite(t.val)&&(s=t.val,a=void 0)}if(u.enabled&&(!C||I)){w=m.group({class:"apexcharts-data-labels",transform:f});const b=x.config.dataLabels;((null==(g=b.animate)?void 0:g.enabled)||(null==(p=b.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",P),w.node.setAttribute("data:dlJ",String(o)),"number"==typeof s&&isFinite(s)&&w.node.setAttribute("data:dlVal",String(s))),void 0===s?a="":void 0===a&&(a=v(s,l(n({},x),{seriesIndex:i,dataPointIndex:o,w:x}))),!s&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(a="");let C=u.textAnchor;"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(C="center"===x.config.plotOptions.bar.dataLabels.position?"middle":(null!=r?r:x.seriesData.series[i][o]<0)?"end":"start"),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<h.width&&(a=""),x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!I&&(this.barCtx.isHorizontal?h.width/1.6>Math.abs(c)&&(a=""):h.height/1.6>Math.abs(d)&&(a=""));const S=l(n({},u),{textAnchor:C});this.barCtx.isHorizontal&&s<0&&("start"===C?S.textAnchor="end":"end"===C&&(S.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:a,i:i,j:o,parent:w,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:r,j:i,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new R(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(r)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(r);c.node.setAttribute("data:dlTotalKey",`${t}::${this.barCtx._keys(r)[i]}`),c.node.setAttribute("data:dlTotalSeries",String(r)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const O=d.__apex_Series,M=d.__apex_Fill,T=d.__apex_CoreUtils;function _(t){var e,s,a,r,i,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(r=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:r.overlap)&&(null!=(n=null==(o=null==(i=t.seriesData)?void 0:i.series)?void 0:o.length)?n:0)>1)}class j{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t,e){const s=this.w;this.seriesIndex=e,this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let e=0;e<t.length;e++)if(t[e].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[e].length),s.axisFlags.isXNumeric)for(let a=0;a<t[e].length;a++)s.seriesData.seriesX[e][a]>s.globals.minX&&s.seriesData.seriesX[e][a]<s.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=s.globals.dataPoints;const a=s.labelData.labels;this.rows=s.globals.isBarHorizontal&&s.axisFlags.isXNumeric&&!this.barCtx.isRangeBar&&s.seriesData.seriesX.some(t=>null==t?void 0:t.some((t,e)=>t!==a[e]))?new Map(a.map((t,e)=>[t,e])):null,this.arrBorderRadius=this.createBorderRadiusArr(s.seriesData.series),c.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=this.seriesIndex,s=[];for(let a=0;a<t.length;a++){const r=t[a];e&&e.indexOf(a)<0||Array.isArray(r)&&r.length>0&&s.push(r.some((t,e)=>t<r[e-1])?r.filter(t=>t===+t).sort((t,e)=>t-e):r)}if(!s.length)return 0;const a=new Array(s.length).fill(0);let r=NaN,i=1/0;for(;;){let t=1/0,e=-1;for(let r=0;r<s.length;r++){const i=s[r];for(;a[r]<i.length&&"number"!=typeof i[a[r]];)a[r]++;if(a[r]>=i.length)continue;const o=i[a[r]];o==o?o<t&&(t=o,e=r):(a[r]++,r--)}if(-1===e)break;if(a[e]++,r==r){const e=t-r;e>0&&e<i&&(i=e)}r=t}return isFinite(i)?i:0}barRow(t,e){var s,a,r;return null!=(r=null==(a=this.rows)?void 0:a.get(null==(s=this.w.seriesData.seriesX[t])?void 0:s[e]))?r:e}initialPositions(t){const e=this.w;let s,a,r,i,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let u=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||_(e))&&(u=1),this.barCtx.isHorizontal)r=e.layout.gridHeight/d,o=r/u,o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(r-o*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(i=e/t),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+c.noExponents(i-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:r,xDivision:i,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.stacks=t.w.labelData.seriesGroups.map(()=>({prevY:[],prevX:[],prevYF:[],prevXF:[],prevYVal:[],prevXVal:[],tops:new Map}))}initializeStackedXYVars(t){t.stacks.forEach(t=>{t.xArrj=[],t.xArrjF=[],t.xArrjVal=[],t.yArrj=[],t.yArrjF=[],t.yArrjVal=[]})}getPathFillColor(t,e,s,a){var r;const i=this.w,o=new M(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(r=i.config.series[a].data[s])?void 0:r.fill),c=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:u,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(i.config.fill.type)?i.config.fill.type[a]:i.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const r=s.config.plotOptions.bar.dumbbell.connector;if(r.color)return null;const i=a.order[e];if(!i)return null;const o=s.globals.colors[i[0]],n=s.globals.colors[i[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:r.opacity,opacityTo:r.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===r.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,r=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(r);return e.length?[e]:[]}const i=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!r(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?i[t].push(e):o.push(e)}return o.length&&i.push(o),i.filter(t=>t.length>0)}createBorderRadiusArr(t){const e=this.w,s=!this.w.config.chart.stacked||e.config.plotOptions.bar.borderRadius<=0,a=t.length,r=Math.max(0,...t.map(t=>0|(null==t?void 0:t.length))),i=Array.from({length:a},()=>Array(r).fill(s?"top":"none"));if(s)return i;const o="last"===e.config.plotOptions.bar.borderRadiusWhenStacked,n=o?"top":"both",l=o?"bottom":"both",h=o?"none":"bottom",d=o?"none":"top";for(const e of this.getStackedSeriesIndices(a))for(let s=0;s<r;s++){const a=[],r=[];for(const i of e){const e=t[i][s];e>0?a.push(i):e<0&&r.push(i)}if(a.length>0&&0===r.length)if(1===a.length)i[a[0]][s]=n;else{const t=a[0],e=a[a.length-1];for(const r of a)i[r][s]=r===t?h:r===e?"top":"none"}else if(r.length>0&&0===a.length)if(1===r.length)i[r[0]][s]=l;else{const t=Math.min(...r),e=Math.max(...r);for(const a of r)i[a][s]=a===t?d:a===e?"bottom":"none"}else if(a.length>0&&r.length>0){const t=a[a.length-1];for(const e of a)i[e][s]=e===t?"top":"none";const e=Math.max(...r);for(const t of r)i[t][s]=t===e?"bottom":"none"}}return i}barBackground({j:t,i:e,x1:s,x2:a,y1:r,y2:i,elSeries:o}){const n=this.w,l=new R(this.barCtx.w),h=new O(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==r?r:0,void 0!==a?a:n.layout.gridWidth,void 0!==i?i:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}barRect({a:t,len:e,v1:s,v2:a,strokeWidth:r,realIndex:i,j:o,dir:n,horizontal:l}){const h=this.w,d=new R(h);(r=Array.isArray(r)?r[i]:r)||(r=0);const c=h.config.series[i].data[o],u=l?null==c?void 0:c.barHeightOffset:null==c?void 0:c.columnWidthOffset;u&&(t-=u/2,e+=u);const b=r/2,g=n*(this.barCtx.isReversed?-1:1),p="around"===h.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[i][o]?" Z":" z";let x,f,y,m,v,w;l?(y=t+b,m=t+e-b,x=s+.001+b*g,f=a+.001-b*g,v=d.line(x,m),w=d.move(x,y)+d.line(f,y)+d.line(f,m)+v+p):(x=t+b,f=t+e-b,y=s+.001-b*g,m=a+.001+b*g,v=d.line(f,y),w=d.move(x,y)+d.line(x,m)+d.line(f,m)+v+p);return{x1:x,x2:f,y1:y,y2:m,sl:v,closing:p,squarePathTo:w,pathTo:"none"!==this.arrBorderRadius[i][o]?d.roundPathCorners(w,h.config.plotOptions.bar.borderRadius):w,base:d.move(x,y)+d.line(x,y)+v+v+v+v+v+d.line(x,y)+p,strokeWidth:r,strokeCenter:b,direction:g}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:r,series:i,realIndex:o,i:n,j:l,w:h}){var d,c,u;const b=this.barRect({a:e,len:t,v1:s,v2:a,strokeWidth:r,realIndex:o,j:l,dir:i[n][l]>=0?1:-1}),{pathTo:g,squarePathTo:p,strokeCenter:x,direction:f}=b;s=b.y1,a=b.y2;let y=null;const m=null==(c=null==(d=this.barCtx.ctx)?void 0:d.morphTypeChange)?void 0:c.getInitialPathFor(o,l);if(m?y=m:h.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(o,l,g,p)),null==y&&(y=b.base),h.config.chart.stacked){const t=this.barCtx.groupCtx;t.yArrj.push(a-x*f),t.yArrjF.push(Math.abs(s-a+b.strokeWidth*f)),t.yArrjVal.push(null!=(u=this.barCtx.series[n][l])?u:null)}return{pathTo:g,pathFrom:y,drawnBox:{x1:b.x1,x2:b.x2,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:r,realIndex:i,strokeWidth:o,w:n}){var l,h;const d=new R(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,b=u(s[a][r]),g=r===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let x;x=g?"taper"===p?0:b:u(s[a][r+1]);const f=o/2,y=t+f,m=t+e-f,v=c-b,w=c+b,C=c-x,I=c+x,P=d.move(v,y)+d.line(w,y)+d.line(I,m)+d.line(C,m)+" Z";let S=null;const A=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return A?S=A:n.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(i,r,P)),null==S&&(S=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:P,pathFrom:S,x:w,x1:v,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,r=t.map(t=>Math.abs(Number(t)||0)),i=r.reduce((t,e)=>t+e,0);if(0===i||s<=0)return r.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<r.length;t++){const e=n/i;n+=r[t];const a=n/i,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:r,j:i,strokeWidth:o,w:n}){var l,h;const d=new R(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,b=t+u,g=t+e-u,p=c-s,x=c+s,f=c-a,y=c+a,m=d.move(p,b)+d.line(x,b)+d.line(y,g)+d.line(f,g)+" Z";let v=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return w?v=w:n.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(r,i,m)),null==v&&(v=d.move(c,b)+d.line(c,b)+d.line(c,g)+d.line(c,g)+" Z"),{pathTo:m,pathFrom:v,x:x,x1:p,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:r,series:i,realIndex:o,i:n,j:l,w:h}){var d,c,u;const b=new R(this.barCtx.w),g=this.barRect({a:t,len:e,v1:s,v2:a,strokeWidth:r,realIndex:o,j:l,dir:i[n][l]>=0?1:-1,horizontal:!0}),{y1:p,y2:x,sl:f,closing:y,squarePathTo:m,pathTo:v,strokeCenter:w,direction:C}=g;s=g.x1,a=g.x2;const I=this.barCtx.isFunnel,P=I?(s+a)/2:s;let S=null;const A=null==(c=null==(d=this.barCtx.ctx)?void 0:d.morphTypeChange)?void 0:c.getInitialPathFor(o,l);if(A?S=A:h.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(o,l,v,m)),null==S){const t=I?b.line(P,x):f;S=b.move(P,p)+b.line(P,p)+t+t+t+t+t+b.line(P,p)+y}if(h.config.chart.stacked){const t=this.barCtx.groupCtx;t.xArrj.push(a+w*C),t.xArrjF.push(Math.abs(s-a-g.strokeWidth*C)),t.xArrjVal.push(null!=(u=this.barCtx.series[n][l])?u:null)}return{pathTo:v,pathFrom:S,drawnBox:{x1:s,x2:a,y1:p,y2:x}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let r=a?e:null;return null!=t&&(r=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),r}getGoalValues(t,e,s,a,r,i){const o=this.w,h=[],d=(r,n)=>{o.globals.invalidLogScale||(r=new T(o).getLogValAtSeriesIndex(r,a)),h.push({[t]:"x"===t?this.getXForValue(r,e,!1):this.getYForValue(r,s,i,!1),attrs:n})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][r]&&Array.isArray(o.seriesData.seriesGoals[a][r])&&o.seriesData.seriesGoals[a][r].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,r);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let i=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[i].value&&(i=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!c.enabled||e!==i&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,r,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===i&&i!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],r=s.dumbbellData;if(r&&"series"===r.form){const t=r.values[e]||[];for(let e=0;e<t.length;e++){const i=t[e];null!==i&&-1===r.hidden.indexOf(e)&&a.push({value:i,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const i=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(i[t])?i[t][e]:i[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const r=this.w,i=r.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof i.formatter)return i.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:r});const o=this.barCtx.isHorizontal?r.formatters.xLabelFormatter:r.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,r):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:r,barHeight:i}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new R(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:i/2,a=e+s+i/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+s+r/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new R(s),r=s.config.plotOptions.bar.dumbbell.dataLabels,i=e.markerSize/2+r.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?i*o:0),y:e.y-(e.horizontal?0:i*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:r}){const i=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:u}=e,b=l+e.barHeight,g=new R(this.barCtx.w),p=new c,x=g.move(n,b)+g.line(o,b)+g.line(h,u)+g.line(d,u)+g.line(n,b)+("around"===i.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][r]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,c.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let r=0,i=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.seriesData.series[s][e];o&&r++,s<t&&!o&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(t){var e;return null!=(e=this.w.labelData.seriesGroupIndex[t])?e:-1}getGroupIndex(t){const e=this.getSeriesGroupIndex(t),s=this.barCtx.columnGroupIndices;let a=s.indexOf(e);return a<0&&(s.push(e),a=s.length-1),{groupIndex:e,columnGroupIndex:a}}}const Y=d.__apex_Filters,B=d.__apex_Animations,z=d.__apex_Animations_computeStagger,G=d.__apex_BrowserAPIs_BrowserAPIs,N=d.__apex_Environment_Environment;function V(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(N.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function E(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function $(t,e,s=0|(s=>null==(s=t.seriesData.series[e])?void 0:s.length)()){return E(Array.from({length:s},(s,a)=>function(t,e,s){var a,r,i,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(i=null==(r=t.seriesData)?void 0:r.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(t,e,a)))}function Z(t,e,s=!1,a=!1){var r,i;if(!V(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(r=o.seriesY)?void 0:r[e],l=null==(i=t.seriesData.series)?void 0:i[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=E(n.map((t,s)=>function(t,e,s){var a,r;if(t.isXNumeric){const r=null==(a=t.seriesX)?void 0:a[e];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const i=null==(r=t.labels)?void 0:r[s];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+s}(o,e,s))),d=$(t,e),c=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),r=new Set;let i=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!r.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(r.add(l),l<i&&(o=!1),i=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)r.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function q({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:r,speed:i}){var o;if(!V(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new R(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(a=>{let o=a.fill||d||"#c8c8c8";0===String(o).indexOf("url(")&&(o=d||"#c8c8c8");const n=h.drawPath({d:a.d,stroke:"none",strokeWidth:0,fill:o,fillOpacity:1,classes:"apexcharts-bar-ghost"}),l=n.node;l.setAttribute("pointer-events","none"),n.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(l,e.node.firstChild);const c=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(a.d);let u=r?"left center":"center bottom";try{const t=l.getBBox();c&&t&&(u=r?Math.abs(c.x-t.x)<=Math.abs(c.x-(t.x+t.width))?"left center":"right center":Math.abs(c.y-(t.y+t.height))<=Math.abs(c.y-t.y)?"center bottom":"center top")}catch(t){}const b=l.style;b.transformBox="fill-box",b.transformOrigin=u,l.setAttribute("data:ghostKey",`${s.realIndex}::${a.key}`);try{const t=l.getBBox(),e=r?u.startsWith("left")?t.x:t.x+t.width:u.endsWith("bottom")?t.y+t.height:t.y;isFinite(e)&&l.setAttribute("data:ghostEdge",String(e))}catch(t){}const g=Math.max(1,i||1),p=performance.now(),x=e=>{if(t.globals.isDestroyed||!l.parentNode)return;const s=Math.max(0,Math.min(1,(e-p)/g)),a=1-Math.pow(1-s,3),i=1-a;b.transform=r?`scaleX(${i})`:`scaleY(${i})`,b.opacity=String(1-a),s<1?G.requestAnimationFrame(x):l.parentNode.removeChild(l)};G.requestAnimationFrame(x)})}class K{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/K.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*K.xRatio(t)}static plotRect(t){var e,s,a;const r=(null==(e=t.dom.Paper)?void 0:e.node)||(null==(s=t.dom.baseEl)?void 0:s.querySelector(".apexcharts-svg")),i=(null==(a=r||t.dom.elWrap)?void 0:a.getBoundingClientRect())||{left:0,top:0,width:0},o=(r&&t.globals.svgWidth?i.width/t.globals.svgWidth:1)||1;return{left:i.left+t.layout.translateX*o,top:i.top+t.layout.translateY*o,width:t.layout.gridWidth*o,height:t.layout.gridHeight*o,zoom:o}}static screenXToPlotPx(t,e,s=K.plotRect(t)){return(e-s.left)/s.zoom}}class U{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new O(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const r=a.getBarSeriesIndices(),i=new T(this.w);this.stackedSeriesTotals=i.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===r.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new j(this)}setSeriesAxis(t){var e;return this.yRatio.length>1&&(this.yaxisIndex=this.w.globals.seriesYAxisReverseMap[t],this.translationsIndex=t),this.isReversed=null==(e=this.w.config.yaxis[this.yaxisIndex])?void 0:e.reversed,this.translationsIndex}draw(t,e){var s,a,r,i,o;const h=this.w,d=new R(this.w),u=new T(this.w);t=u.getLogSeries(t),this.series=t,this.yRatio=u.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,e);const b=d.group({class:"apexcharts-bar-series apexcharts-plot-series"}),g=this.ctx.highlightFilter;h.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let u=0,p=0;u<t.length;u++,p++){let x,f;const y=[],m=[],v=h.globals.comboCharts?e[u]:u,{columnGroupIndex:w}=this.barHelpers.getGroupIndex(v),C=d.group({class:"apexcharts-series",rel:u+1,seriesName:c.escapeString(h.seriesData.seriesNames[v]),"data:realIndex":v});O.addCollapsedClassToSeries(this.w,C,v),t[u].length>0&&(this.visibleI=this.visibleI+1);const I=this.setSeriesAxis(v);this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[u]));const P=this.barHelpers.initialPositions(v),{y:S,yDivision:A,zeroW:k,x:H,xDivision:L,zeroH:W}=P;let R=P.barHeight,D=P.barWidth;f=S,x=H,this.isHorizontal||m.push(x+(null!=D?D:0)/2);const F=d.group({class:"apexcharts-datalabels","data:realIndex":v}),X=h.config.dataLabels,M=!(null==(s=X.animate)?void 0:s.enabled)&&this.isLengthTransition(v);h.globals.dataChanged&&!M&&!(!(null==(a=X.animate)?void 0:a.enabled)&&!(null==(r=X.countUp)?void 0:r.enabled))||(h.globals.delayedElements.push({el:F.node,holdUntilComplete:M}),F.node.classList.add("apexcharts-element-hidden"));const T=d.group({class:"apexcharts-bar-goals-markers"}),_=d.group({class:"apexcharts-bar-shadows"}),j=this.ctx,B=j._barShadows,z=j._barShadows=[],G=h.globals.dataChanged&&h.globals.shouldAnimate&&h.config.chart.animations.dynamicAnimation.enabled&&(null==B?void 0:B.length)===t[u].length-1;G||(h.globals.delayedElements.push({el:_.node}),_.node.classList.add("apexcharts-element-hidden"));for(let e=0;e<t[u].length;e++){const s=this.barHelpers.getStrokeWidth(u,e,v);let a=null;const r={indexes:{i:u,j:e,realIndex:v,translationsIndex:I,bc:p},x:x,y:f,strokeWidth:s,elSeries:C};this.isHorizontal?(a=this.drawBarPaths(l(n(n({},r),this.barHelpers.rows&&{y:S+this.barHelpers.barRow(v,e)*A}),{barHeight:R,zeroW:k,yDivision:A})),D=this.series[u][e]/this.invertedYRatio):(a=this.drawColumnPaths(l(n({},r),{xDivision:L,barWidth:D,zeroH:W})),R=this.series[u][e]/this.yRatio[I]);const d=this.barHelpers.getPathFillColor(t,u,e,v);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(i=h.config.plotOptions.funnel)?void 0:i.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof d.color&&-1===(null==(o=d.color)?void 0:o.indexOf("url"))?d.color:c.hexToRgba(h.globals.colors[u]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:v,j:e});if(_.add(t),z.push(t),this._shadow=G&&[t,B[e-1].attr("d")],h.config.chart.dropShadow.enabled){new Y(this.w).dropShadow(t,h.config.chart.dropShadow,v)}}this.pathArr.push(a);const b=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:R,barWidth:D});b&&T.add(b),f=a.y,x=a.x,e>0&&m.push(x+(null!=D?D:0)/2),y.push(f),this.renderSeries(l(n({hl:null==g?void 0:g.bar(this,{i:u,j:e,realIndex:v,translationsIndex:I,paths:a,zeroH:W,zeroW:k}),realIndex:v,pathFill:d.color},d.useRangeColor?{lineFill:d.color}:{}),{j:e,i:u,columnGroupIndex:w,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:s,elSeries:C,x:x,y:f,series:t,barHeight:Math.abs(a.barHeight?a.barHeight:R),barWidth:Math.abs(a.barWidth?a.barWidth:D),barXPosition:a.barXPosition,elDataLabelsWrap:F,elGoalsMarkers:T,elBarShadows:_,visibleSeries:this.visibleI,type:"bar"}))}h.globals.seriesXvalues[v]=m,h.globals.seriesYvalues[v]=y,h.globals.previousPaths.length>0&&q({w:h,elSeries:C,record:this._prevRecord(v),newKeys:this._keys(v),isHorizontal:this.isHorizontal,speed:h.config.chart.animations.dynamicAnimation.speed}),b.add(C)}return b}renderSeries({hl:t,realIndex:e,pathFill:s,lineFill:a,j:r,i:i,columnGroupIndex:o,pathFrom:h,pathTo:d,strokeWidth:c,elSeries:u,x:b,y:g,y1:p,y2:x,series:f,barHeight:y,barWidth:m,barXPosition:v,barYPosition:w,elDataLabelsWrap:C,elGoalsMarkers:I,elBarShadows:P,visibleSeries:S,type:A,classes:k,fadeReveal:H=!1,noLabel:L}){var W,D,F,O,M,T,_;const j=this.w,G=new R(this.w,this.ctx),N=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,G);let V=!1;const E=this._pathToInterp;if(this._pathToInterp=null,u._bindingsDelegated||(u._bindingsDelegated=!0,G.setupEventDelegation(u,`.apexcharts-${A}-area`)),!a){let t=function(t){const e=j.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:j.seriesData.series[t][r],dataPointIndex:r,w:j}):s};const s="function"==typeof j.globals.stroke.colors[e]?t(e):j.globals.stroke.colors[e];a=this.barOptions.distributed?j.globals.stroke.colors[r]:s}const $=j.config.chart.animations,Z=$.animateGradually;let q=0,K=0;if(Z&&!1!==Z.enabled&&!(j.globals.dataChanged&&this.isLayoutShift(e))){const t=j.globals.dataPoints||1,e=Z.delay||0,s=Math.min(e,.5*$.speed/Math.max(1,t));K=z({style:"sequential",index:r,baseDelay:s}),j.config.chart.stacked&&!j.globals.dataChanged&&(K+=i*s*.5);q=K/(e||1)}const U=new X(this).handleBarDataLabels({x:b,y:g,y1:p,y2:x,i:i,j:r,series:f,realIndex:e,columnGroupIndex:o,barHeight:y,barWidth:m,barXPosition:v,barYPosition:w,visibleSeries:S,hl:null==t?void 0:t.label,noLabel:L});if(K>0){const t=j.config.dataLabels;if((null==(W=t.animate)?void 0:W.enabled)||(null==(D=t.countUp)?void 0:D.enabled)){const t=String(Math.round(K));null==(O=null==(F=U.dataLabels)?void 0:F.node)||O.setAttribute("data:dlDelay",t),null==(T=null==(M=U.totalDataLabels)?void 0:M.node)||T.setAttribute("data:dlDelay",t)}}let J=!1;if(!j.globals.isBarHorizontal){const t=void 0===v?U.dataLabelsPos.dataLabelsX:v+m/2,s=Math.max(m,j.globals.barPadForNumericAxis);(t+s<0||t-s>j.layout.gridWidth)&&(this._wasOnScreen(e,r)?J=!0:V=!0)}const Q=j.config.series[e].data[r];Q&&Q.strokeColor&&(a=Q.strokeColor);const tt=s;if(this.isNullValue&&-1===j.globals.collapsingSeriesIndices.indexOf(e)&&(s="none"),!V){const o=!0===(null==(_=this.ctx.morphTypeChange)?void 0:_.isActive()),b=o?this.ctx.morphTypeChange.getSpeed():j.config.chart.animations.dynamicAnimation.speed,g=o&&this.ctx.morphTypeChange.claimsTargetMark(e,r);g&&(h=d,q=0);const f=N.renderPaths({i:i,j:r,realIndex:e,pathFrom:h,pathTo:d,stroke:a,strokeWidth:c,strokeLinecap:j.config.stroke.lineCap,fill:s,pathToInterp:E,animationDelay:q,initialSpeed:j.config.chart.animations.speed,dataChangeSpeed:b,className:`apexcharts-${A}-area${k?` ${k}`:""}`,chartType:A,bindEventsOnPaths:!1,fadeReveal:H});f.attr("clip-path",`url(#gridRectBarMask${j.globals.cuid})`),J&&f.node.classList.add("apexcharts-leaving");const v=this._shadow;v&&(this._shadow=null,new B(j,this.ctx).animatePathsGradually({el:v[0],fill:"none",pathFrom:v[1],pathTo:v[0].attr("d"),speed:b,delay:q})),g&&(f.node.setAttribute("opacity","0"),f.node.setAttribute("data-piece-hidden","1"));const w=j.config.forecastDataPoints;w.count>0&&r>=j.globals.dataPoints-w.count&&(f.node.setAttribute("stroke-dasharray",w.dashArray),f.node.setAttribute("stroke-width",w.strokeWidth),f.node.setAttribute("fill-opacity",w.fillOpacity)),void 0!==p&&void 0!==x&&(f.attr("data-range-y1",p),f.attr("data-range-y2",x));if(new Y(this.w).setSelectionFilter(f,e,r),u.add(f),f.attr({cy:U.dataLabelsPos.bcy,cx:U.dataLabelsPos.bcx,j:r,val:j.seriesData.series[e][r],barHeight:y,barWidth:m,"data:pathKey":this._keys(e)[r]}),null==t||t.paint(f,{delay:q,delayMs:K,speed:b,fill:tt,elSeries:u,elBarShadows:P,labels:U.dataLabels,pathFrom:h,pathTo:d}),"canvas"===N.kind){j.globals.barCanvasCoords||(j.globals.barCanvasCoords={}),j.globals.barCanvasCoords[e]||(j.globals.barCanvasCoords[e]={});const t=j.globals.barCanvasCoords[e][r];let s=(null==t?void 0:t.bounds)||null;const a=f.bbox();(a.width>0||a.height>0)&&(s={left:Math.min(s?s.left:1/0,a.x),top:Math.min(s?s.top:1/0,a.y),right:Math.max(s?s.right:-1/0,a.x+a.width),bottom:Math.max(s?s.bottom:-1/0,a.y+a.height)}),j.globals.barCanvasCoords[e][r]=l(n({cx:U.dataLabelsPos.bcx,cy:U.dataLabelsPos.bcy,barWidth:m,type:A},void 0!==p&&void 0!==x&&{rangeY1:p,rangeY2:x}),{bounds:s})}null!==U.dataLabels&&C.add(U.dataLabels),U.totalDataLabels&&C.add(U.totalDataLabels),u.add(C),I&&u.add(I),P&&u.add(P)}return u}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:s,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:t.realIndex,j:d});s>0&&(e=this.seriesLen*e/s),c=i+e*this.visibleI,c-=e*a}else c=i+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return r=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(a=p.x1,r=p.x),g||(i+=o),g&&(i=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:r,y:i,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:r});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:u});t>0&&(r=this.seriesLen*r/t),g=e+r*this.visibleI,g-=r*s}else g=e+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][u],i,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:i,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,i,h,u,d),barXPosition:g,barWidth:r}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const r=this.w,i=_(r);let o=s;return r.seriesData.seriesX[s].length||(o=r.globals.maxValsInArrayIndex),c.isNumber(r.seriesData.seriesX[o][a])&&(t=K.dataXToPx(r,r.seriesData.seriesX[o][a])-e*(i?1:this.seriesLen)/2),{barXPosition:t+(i?0:e*this.visibleI),x:t}}_wasOnScreen(t,e){if(!V(this.w))return!1;const s=this._prevKeyedPaths(t);return!!s&&s.has(this._keys(t)[e])}_keys(t){const e=this._keyCache||(this._keyCache={});return e[t]||(e[t]=$(this.w,t))}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const r=e.globals.previousPaths[a];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&(s=r)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s,a,r,i,o;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const n=this.w;let l=!1;if(V(n)&&n.globals.previousPaths.length>0){const h=this._prevRecord(t),d=null!=(s=null==(e=n.seriesData.series[t])?void 0:e.length)?s:0,c=h&&this._prevKeyedPaths(t);if(h)if(c){const e=new Set(this._keys(t));l=(null!=(o=null==(i=null==(r=null==(a=n.globals.prevStreamFrame)?void 0:a.seriesY)?void 0:r[t])?void 0:i.length)?o:d)!==d||[...c.keys()].some(t=>!e.has(t))}else l=h.paths.length!==d;else l=d>0}return this._ltCache[t]=l,l}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=Z(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const r=this.w;this._pathToInterp=null;const i=this._prevRecord(t);if(!i)return V(r)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(this._keys(t)[e]);s?o=s.d:n=!0}else void 0!==i.paths[e]?o=i.paths[e].d:n=!0;return o?this.cornerMorph(o,s,a):n&&V(r)?null:s}cornerMorph(t,e,s){const a=U.pathCommandCount(t),r=U.pathCommandCount(e);if(a===r)return t;const i=new R(this.w),o=t=>{const e=U.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},n=a<r?o(t)>1:o(e)>1;if(a<r){const e=i.roundPathCorners(t,0);if(U.pathCommandCount(e)===r){if(n&&s){const t=i.roundPathCorners(s,0);U.pathCommandCount(t)===r&&(this._pathToInterp=t)}return e}}else{const s=i.roundPathCorners(e,0);if(U.pathCommandCount(s)===a){if(this._pathToInterp=s,n){const e=U.squareLike(t),s=e?i.roundPathCorners(e,0):null;if(s&&U.pathCommandCount(s)===a)return s}return t}}return e}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const r=e.map(t=>t[0]),i=e.map(t=>t[1]);return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...i),maxY:Math.max(...i),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=U.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:r,maxY:i,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,c,u;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[c,u]=l(o[1],r,i)):(c=Math.abs(o[1]-r)<=Math.abs(o[1]-i)?r:i,u=c===r?i:r,[h,d]=l(o[0],s,a));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const s=this._prevRecord(t);if(!s)return null;const a=this._prevKeyedPaths(t),r=a?a.get(this._keys(t)[e]):s.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[MmLlHhVvCcSsQqTtAaZz]/g);return e?e.length:0}}d.default.use({bar:U,column:U,barStacked:class extends U{draw(t,e){const s=this.w;this.graphics=new R(this.w);const a=new T(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,e),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),i=this.ctx.highlightFilter;let o=0,h=0;const d=s.config.chart.animations,u=d.enabled&&d.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let b=!1;for(let a=0,d=0;a<t.length;a++,d++){const g=s.globals.comboCharts?e[a]:a,{groupIndex:p,columnGroupIndex:x}=this.barHelpers.getGroupIndex(g);this.groupCtx=this.stacks[p];const f=[],y=[],m=this.setSeriesAxis(g);let v=this.graphics.group({class:"apexcharts-series",seriesName:c.escapeString(s.seriesData.seriesNames[g]),rel:a+1,"data:realIndex":g});O.addCollapsedClassToSeries(this.w,v,g);const w=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":g});O.addCollapsedClassToSeries(this.w,w,g),(s.globals.collapsingSeriesIndices||[]).indexOf(g)>-1&&w.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),I=this.initialPositions(o,h,void 0,void 0,void 0,void 0,m),{xDivision:P,yDivision:S,zeroH:A,zeroW:k}=I;let H=I.barHeight,L=I.barWidth;h=I.y,o=I.x,s.globals.barHeight=H,s.globals.barWidth=L,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>A),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const r=this.barHelpers.getStrokeWidth(a,e,g),c={indexes:{i:a,j:e,realIndex:g,translationsIndex:m,bc:d},strokeWidth:r,x:o,y:h,elSeries:v,columnGroupIndex:x};let p=null;this.isHorizontal?(p=this.drawStackedBarPaths(l(n(n({},c),this.barHelpers.rows&&{y:I.y+this.barHelpers.barRow(g,e)*S}),{zeroW:k,barHeight:H,yDivision:S})),L=this.series[a][e]/this.invertedYRatio):(p=this.drawStackedColumnPaths(l(n({},c),{xDivision:P,barWidth:L,zeroH:A})),H=this.series[a][e]/this.yRatio[m]);const W=this.barHelpers.drawGoalLine({barXPosition:p.barXPosition,barYPosition:p.barYPosition,goalX:p.goalX,goalY:p.goalY,barHeight:H,barWidth:L});W&&C.add(W),h=p.y,o=p.x,f.push(o),y.push(h);const R=this.barHelpers.getPathFillColor(t,a,e,g);let D="";const F=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",X=this.cornerFlip(this.barHelpers.arrBorderRadius[g][e],s.seriesData.series[g][e]),O=u&&!X&&this.getPreviousFlip(g,e);(X||O)&&(D=F),O&&(D+=" apexcharts-flip-held",b=!0),v=this.renderSeries(l(n({hl:null==i?void 0:i.bar(this,{i:a,j:e,realIndex:g,translationsIndex:m,paths:p,zeroH:A,zeroW:k}),realIndex:g,pathFill:R.color},R.useRangeColor?{lineFill:R.color}:{}),{j:e,i:a,columnGroupIndex:x,pathFrom:p.pathFrom,pathTo:p.pathTo,strokeWidth:r,elSeries:v,x:o,y:h,series:t,barHeight:H,barWidth:L,barXPosition:p.barXPosition,elDataLabelsWrap:w,elGoalsMarkers:C,type:"bar",visibleSeries:x,classes:D}))}s.globals.seriesXvalues[g]=f,s.globals.seriesYvalues[g]=y,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),r.add(v)}return b&&this.settleHeldMirrors(r),r}cornerFlip(t,e){return"bottom"===t&&e>0||"top"===t&&e<0}settleHeldMirrors(t){const e=this.w;if(!N.isBrowser())return;const s=e.config.chart.animations,a=(s.dynamicAnimation.speed||0)+(s.speed||0)+100,r=(t?t.node:e.dom.baseEl).querySelectorAll(".apexcharts-flip-held");setTimeout(()=>{r.forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},a)}initialPositions(t,e,s,a,r,i,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,i=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),r=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:r,zeroW:i}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,columnGroupIndex:o,yDivision:n,elSeries:l}){var h,d;const c=this.w,u=i+o*e;let b;const g=t.i,p=t.j,x=t.realIndex,f=t.translationsIndex,y=null!=(d=null==(h=this.series[g])?void 0:h[p])?d:null,m=this.groupCtx,v=c.axisFlags.isXNumeric?c.seriesData.seriesX[x][p]:p,w=m.tops.get(v);if(w){const[t,e,s]=w,a=2*(this.isReversed?s:0);b=e<0?y>=0?t+s-a:t:y>=0?t:t-s+a}else b=a;r=b+y/this.invertedYRatio*(this.isReversed?-1:1);const C=this.barHelpers.getBarpaths({barYPosition:u,barHeight:e,x1:b,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:g,j:p,w:c});return this._setTop(v,w,m.xArrj[p],m.xArrjVal[p],m.xArrjF[p],x,p),this.barHelpers.barBackground({j:p,i:g,y1:u,y2:e,elSeries:l}),i+=n,{pathTo:C.pathTo,pathFrom:C.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,x,p,f),barXPosition:b,barYPosition:u,x:r,y:i}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,columnGroupIndex:o,elSeries:n}){var l,h,d;const c=this.w,u=t.i,b=t.j,g=t.bc,p=t.realIndex,x=t.translationsIndex,f=null!=(h=null==(l=this.series[u])?void 0:l[b])?h:null;if(c.axisFlags.isXNumeric){let t=c.seriesData.seriesX[p][b];t||(t=0),e=(t-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}const y=e+o*r;let m;const v=this.groupCtx,w=c.axisFlags.isXNumeric?c.seriesData.seriesX[p][b]:b,C=v.tops.get(w);if(C){const[t,e,s]=C;let a;e<0?a=f>=0?t-s+2*(this.isReversed?s:0):t:e>=0&&(a=f>=0?t:t+s-2*(this.isReversed?s:0)),void 0===a&&(a=c.layout.gridHeight),m=(null==(d=v.prevYF[0])?void 0:d.every(t=>0===t))&&v.prevYF.slice(1).every(t=>t.every(t=>isNaN(t)))?i:a}else m=i;s=m-f/this.yRatio[x]*(this.isReversed?-1:1);const I=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:r,y1:m,y2:s,yRatio:this.yRatio[x],strokeWidth:c.config.stroke.show?this.strokeWidth:0,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:u,j:b,w:c});return this._setTop(w,C,v.yArrj[b],v.yArrjVal[b],v.yArrjF[b],p,b),this.barHelpers.barBackground({bc:g,j:b,i:u,x1:y,x2:r,elSeries:n}),{pathTo:I.pathTo,pathFrom:I.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,i,p,b,x),barXPosition:y,x:c.axisFlags.isXNumeric?e:e+a,y:s}}_setTop(t,e,s,a,r,i,o){isNaN(s)||this.groupCtx.tops.set(t,[s,a,(e?e[2]:0)+r,(e?e[3]:0)+(this.w.seriesData.series[i][o]||0),e?Math.min(e[0],e[4]):1/0,e?Math.max(e[0],e[5]):-1/0])}},rangeBar:class extends U{draw(t,e){var s,a,r,i,o,l;const h=this.w,d=new R(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=h.rangeData.seriesRangeStart,this.seriesRangeEnd=h.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t,e);const u=d.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let b=0;b<t.length;b++){let g,p;const x=h.globals.comboCharts?e[b]:b,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),y=d.group({class:"apexcharts-series",seriesName:c.escapeString(h.seriesData.seriesNames[x]),rel:b+1,"data:realIndex":x});O.addCollapsedClassToSeries(this.w,y,x),t[b].length>0&&(this.visibleI=this.visibleI+1);const m=this.setSeriesAxis(x);this.isHorizontal&&h.labelData.timescaleLabels.length&&(this.isReversed=!1);const v=this.barHelpers.initialPositions(x),{y:w,zeroW:C,x:I,zeroH:P}=v,S=null!=(s=v.yDivision)?s:0,A=null!=(a=v.xDivision)?a:0;p=w,g=I;const k=d.group({class:"apexcharts-datalabels","data:realIndex":x}),H=d.group({class:"apexcharts-rangebar-goals-markers"}),L=h.config.series[x].data;for(let e=0;e<h.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(b,e,x);let a=null!=(r=v.barWidth)?r:0,d=null!=(i=v.barHeight)?i:0;const c=this.seriesRangeStart[x][e],u=this.seriesRangeEnd[x][e];let w=null,I=null,W=null;const R={x:g,y:p,strokeWidth:s,elSeries:y};let D=this.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(D=1),void 0===(null==L?void 0:L[e]))break;if(this.isHorizontal){W=p+d*this.visibleI;const t=(S-d*D)/2;if(null!=(null==(o=L[e])?void 0:o.x)){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:W,srty:t,barHeight:d,yDivision:S,initPositions:v});d=s.barHeight,W=s.barYPosition}w=this.drawRangeBarPaths(n({indexes:{i:b,j:e,realIndex:x},barHeight:d,barYPosition:W,zeroW:C,yDivision:S,y1:c,y2:u},R)),a=w.barWidth}else{h.axisFlags.isXNumeric&&(g=(h.seriesData.seriesX[x][e]-h.globals.minX)/this.xRatio-a/2),I=g+a*this.visibleI;const t=(A-a*D)/2;if(null!=(null==(l=L[e])?void 0:l.x)){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:I,srtx:t,barWidth:a,xDivision:A,initPositions:v});a=s.barWidth,I=s.barXPosition}w=this.drawRangeColumnPaths(n({indexes:{i:b,j:e,realIndex:x,translationsIndex:m},barWidth:a,barXPosition:I,zeroH:P,xDivision:A},R)),d=w.barHeight,I=w.barXPosition}const F=this.barHelpers.drawGoalLine({barXPosition:I,barYPosition:W,goalX:w.goalX,goalY:w.goalY,barHeight:d,barWidth:a});F&&H.add(F),p=w.y,g=w.x;const X=this.barHelpers.getPathFillColor(t,b,e,x);this.renderSeries({realIndex:x,pathFill:X.color,lineFill:X.useRangeColor?X.color:h.globals.stroke.colors[x],j:e,i:b,x:g,y:p,y1:c,y2:u,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:s,elSeries:y,series:t,barHeight:d,barWidth:a,barXPosition:I,barYPosition:W,columnGroupIndex:f,elDataLabelsWrap:k,elGoalsMarkers:H,visibleSeries:this.visibleI,type:"rangebar"})}h.globals.previousPaths.length>0&&q({w:h,elSeries:y,record:this._prevRecord(x),newKeys:this._keys(x),isHorizontal:this.isHorizontal,speed:h.config.chart.animations.dynamicAnimation.speed}),u.add(y)}return u}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:r,srtx:i,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var c,u,b,g;const p=this.w;let x=[];const f=null==(u=null==(c=p.globals.seriesRangeName)?void 0:c[t])?void 0:u[e],y=null==(g=null==(b=p.config.series[t].data)?void 0:b[e])?void 0:g.x,m=Array.isArray(y)?y.join(" "):y,v=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(m),w=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===m&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?r+l*v:r+o*this.visibleI+l*v,w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][w].overlaps),x.indexOf(f)>-1&&(s+=(o=d.barHeight/x.length)*x.indexOf(f)))):(v>-1&&!p.axisFlags.isXNumeric&&(a=p.config.plotOptions.bar.rangeBarGroupRows?i+h*v:i+n*this.visibleI+h*v),w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][w].overlaps),x.indexOf(f)>-1&&(a+=(n=d.barWidth/x.length)*x.indexOf(f)))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:r,zeroH:i}){var o,n;const l=this.w,{i:h,j:d,realIndex:c,translationsIndex:u}=t,b=this.yRatio[u]*(this.isReversed?-1:1),g=this.getRangeValue(c,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=i-p/b,x=i-x/b):p=x=i;const y=Math.abs(x-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:d,w:l});if(f){const t=m.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(c,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:c,barWidth:a});e=t.x,r=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,i,c,d,u),barXPosition:r}}_keys(t){const e=this._keyCache||(this._keyCache={}),s=this.w.config.series[t].data;return e[t]||(e[t]=E((s||[]).map((t,e)=>{var s;return"c:"+(null!=(s=null==t?void 0:t.x)?s:e)})))}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:r,barHeight:i,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,c=this.invertedYRatio*(this.isReversed?-1:1),u=this.preventBarOverflow(n+s/c),b=this.preventBarOverflow(n+a/c),g=this.getRangeValue(h,d),p=Math.abs(b-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:i,x1:u,x2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=g.start&&null!=g.end){const t=x.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:p,x:g.start<0&&g.end<0?u:b,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  /*!
33
- * ApexCharts v8.3.0
33
+ * ApexCharts v8.3.1
34
34
  * (c) 2018-2026 ApexCharts
35
35
  */
36
36
  import * as _core from "apexcharts/core";
@@ -332,24 +332,18 @@ function observationsOf(d, allowFlatY) {
332
332
  return out.length ? out : null;
333
333
  }
334
334
  function derivedStats(w, kind) {
335
- var _a, _b;
336
- const all = (_a = w.statsDerived) != null ? _a : w.statsDerived = {};
337
- return (_b = all[kind]) != null ? _b : all[kind] = /* @__PURE__ */ new Map();
335
+ const all = w.statsDerived || (w.statsDerived = {});
336
+ return all[kind] || (all[kind] = /* @__PURE__ */ new Map());
337
+ }
338
+ function deriveStat(derived, key, values, opts, fn) {
339
+ const s = JSON.stringify(opts) + values;
340
+ let hit = derived.get(key);
341
+ if (!hit || hit.s !== s) derived.set(key, hit = { s, e: fn(values, opts) });
342
+ return hit.e;
338
343
  }
339
344
  function isDerived(derived, key, value) {
340
- const ours = derived.get(key);
341
- if (!ours || !Array.isArray(value) || ours.length !== value.length) {
342
- return false;
343
- }
344
- for (let k2 = 0; k2 < value.length; k2++) {
345
- const a = ours[k2];
346
- const b = value[k2];
347
- if (a === b) continue;
348
- if (!Array.isArray(a) || !Array.isArray(b) || a[0] !== b[0] || a[1] !== b[1]) {
349
- return false;
350
- }
351
- }
352
- return true;
345
+ const e = (derived.get(key) || {}).e;
346
+ return !!e && JSON.stringify(e.density || e.summary) === JSON.stringify(value);
353
347
  }
354
348
  function histogramValues(data) {
355
349
  const out = [];
@@ -430,62 +424,61 @@ function histogramTransform(ser, w) {
430
424
  }
431
425
  function boxPlotTransform(ser, w) {
432
426
  var _a, _b;
433
- if (!Array.isArray(ser)) return ser;
434
- const whiskers = ((_b = (_a = w.config.plotOptions) == null ? void 0 : _a.boxPlot) == null ? void 0 : _b.whiskers) || "minmax";
435
- const derived = derivedStats(w, "boxPlot");
436
- const observed = [];
437
- const out = ser.map((s, i) => {
438
- if (!Array.isArray(s == null ? void 0 : s.data) || s.type && s.type !== "boxPlot") return s;
439
- let touched = false;
440
- const byPoint = new Array(s.data.length).fill(null);
441
- const data = s.data.map((d, j) => {
442
- const key = i + ":" + j;
443
- if (Array.isArray(d == null ? void 0 : d.y) && d.y.length === 5 && !isDerived(derived, key, d.y)) {
444
- return d;
445
- }
446
- const values = observationsOf(d, false);
447
- if (!values) return d;
448
- const summary = fiveNumberSummary(values, { whiskers });
449
- if (!summary) return d;
450
- touched = true;
451
- byPoint[j] = values;
452
- derived.set(key, summary.summary);
453
- return __spreadProps(__spreadValues({}, d), { y: summary.summary, points: values });
454
- });
455
- if (touched) observed[i] = byPoint;
456
- return touched ? __spreadProps(__spreadValues({}, s), { data }) : s;
457
- });
458
- recordObservations(w, observed, ser.length);
459
- return out;
427
+ return sampleTransform(
428
+ ser,
429
+ w,
430
+ "boxPlot",
431
+ { whiskers: ((_b = (_a = w.config.plotOptions) == null ? void 0 : _a.boxPlot) == null ? void 0 : _b.whiskers) || "minmax" },
432
+ fiveNumberSummary,
433
+ (d) => Array.isArray(d == null ? void 0 : d.y) && d.y.length === 5 && d.y,
434
+ (d, est, values) => __spreadProps(__spreadValues({}, d), {
435
+ y: est.summary,
436
+ points: values
437
+ })
438
+ );
460
439
  }
461
440
  function violinTransform(ser, w) {
462
441
  var _a, _b;
463
- if (!Array.isArray(ser)) return ser;
464
442
  const kde = ((_b = (_a = w.config.plotOptions) == null ? void 0 : _a.violin) == null ? void 0 : _b.kde) || {};
465
- const derived = derivedStats(w, "violin");
443
+ return sampleTransform(
444
+ ser,
445
+ w,
446
+ "violin",
447
+ { bandwidth: kde.bandwidth, resolution: kde.resolution },
448
+ kernelDensity,
449
+ (d) => {
450
+ var _a2;
451
+ return Array.isArray((_a2 = d == null ? void 0 : d.y) == null ? void 0 : _a2.density) && d.y.density.length && d.y.density;
452
+ },
453
+ (d, est, values) => __spreadProps(__spreadValues({}, d), {
454
+ // Keep the rest of an object `y`: a summary given with the points still
455
+ // draws the box lane.
456
+ y: __spreadProps(__spreadValues({}, d.y && typeof d.y === "object" && !Array.isArray(d.y) ? d.y : {}), {
457
+ density: est.density,
458
+ points: values
459
+ })
460
+ })
461
+ );
462
+ }
463
+ function sampleTransform(ser, w, type, opts, fn, statOf, write) {
464
+ if (!Array.isArray(ser)) return ser;
465
+ const derived = derivedStats(w, type);
466
466
  const observed = [];
467
467
  const out = ser.map((s, i) => {
468
- if (!Array.isArray(s == null ? void 0 : s.data) || s.type && s.type !== "violin") return s;
468
+ if (!Array.isArray(s == null ? void 0 : s.data) || s.type && s.type !== type) return s;
469
469
  let touched = false;
470
470
  const byPoint = new Array(s.data.length).fill(null);
471
471
  const data = s.data.map((d, j) => {
472
- var _a2;
473
472
  const key = i + ":" + j;
474
- if (Array.isArray((_a2 = d == null ? void 0 : d.y) == null ? void 0 : _a2.density) && d.y.density.length && !isDerived(derived, key, d.y.density)) {
475
- return d;
476
- }
477
- const values = observationsOf(d, true);
473
+ const stat = statOf(d);
474
+ if (stat && !isDerived(derived, key, stat)) return d;
475
+ const values = observationsOf(d, type === "violin");
478
476
  if (!values) return d;
479
- const est = kernelDensity(values, {
480
- bandwidth: kde.bandwidth,
481
- resolution: kde.resolution
482
- });
477
+ const est = deriveStat(derived, key, values, opts, fn);
483
478
  if (!est) return d;
484
479
  touched = true;
485
480
  byPoint[j] = values;
486
- const rest = d.y && typeof d.y === "object" && !Array.isArray(d.y) ? d.y : {};
487
- derived.set(key, est.density);
488
- return __spreadProps(__spreadValues({}, d), { y: __spreadProps(__spreadValues({}, rest), { density: est.density, points: values }) });
481
+ return write(d, est, values);
489
482
  });
490
483
  if (touched) observed[i] = byPoint;
491
484
  return touched ? __spreadProps(__spreadValues({}, s), { data }) : s;
@@ -2774,22 +2767,55 @@ class AxisMapping {
2774
2767
  return w.globals.minX + px * AxisMapping.xRatio(w);
2775
2768
  }
2776
2769
  /**
2777
- * Client (screen) x -> pixels from the plot origin. The origin is the svg
2778
- * element's left edge plus `translateX`, never the `.apexcharts-grid` box
2779
- * (fact 2 above), so the result does not depend on what the grid happens to
2780
- * render. `svgWidth` is the unscaled width the svg was drawn at, so the ratio
2781
- * against the measured one is the CSS zoom of any container the chart sits in.
2770
+ * The plot area on screen, in client px: its corner is where the plot's
2771
+ * group is translated to (translateX, translateY into the svg), and it is
2772
+ * gridWidth by gridHeight. The one screen-to-plot measurement: the tooltip,
2773
+ * zoom, selection and every other pointer reader map through it, so x and y
2774
+ * cannot disagree under CSS zoom.
2775
+ *
2776
+ * Never the `.apexcharts-grid` group's box: a group measures to the union
2777
+ * of what it happens to draw (fact 2 above). The plot's outline starts a
2778
+ * pixel down (`Grid.drawGridArea`), so unless gridlines or row bands reach
2779
+ * the top edge the box starts a pixel below the plot, and on a numeric-x bar
2780
+ * chart the horizontal gridlines run `barPadForNumericAxis` out past both
2781
+ * sides.
2782
+ *
2783
+ * `zoom` is the CSS zoom of any container the chart sits in (screen px per
2784
+ * plot px): the measured svg width over `svgWidth`, the unscaled width it
2785
+ * was drawn at. A distance measured on screen from this corner is divided
2786
+ * by it to land in plot px, the space the series are laid out and painted in.
2787
+ * With nothing mounted to measure, screen px are taken as svg px.
2788
+ *
2789
+ * @param {import('../types/internal').ChartStateW} w
2790
+ * @returns {{ left: number, top: number, width: number, height: number, zoom: number }}
2791
+ */
2792
+ static plotRect(w) {
2793
+ var _a, _b, _c;
2794
+ const svg = ((_a = w.dom.Paper) == null ? void 0 : _a.node) || ((_b = w.dom.baseEl) == null ? void 0 : _b.querySelector(".apexcharts-svg"));
2795
+ const box = ((_c = svg || w.dom.elWrap) == null ? void 0 : _c.getBoundingClientRect()) || {
2796
+ left: 0,
2797
+ top: 0,
2798
+ width: 0
2799
+ };
2800
+ const zoom = (svg && w.globals.svgWidth ? box.width / w.globals.svgWidth : 1) || 1;
2801
+ return {
2802
+ left: box.left + w.layout.translateX * zoom,
2803
+ top: box.top + w.layout.translateY * zoom,
2804
+ width: w.layout.gridWidth * zoom,
2805
+ height: w.layout.gridHeight * zoom,
2806
+ zoom
2807
+ };
2808
+ }
2809
+ /**
2810
+ * Client (screen) x -> pixels from the plot origin of {@link plotRect}.
2811
+ * Pass the rect when the caller has already measured it.
2782
2812
  * @param {import('../types/internal').ChartStateW} w
2783
2813
  * @param {number} screenX
2814
+ * @param {{ left: number, zoom: number }} [plot]
2784
2815
  * @returns {number}
2785
2816
  */
2786
- static screenXToPlotPx(w, screenX) {
2787
- const baseEl = w.dom.baseEl;
2788
- const svg = baseEl && baseEl.querySelector(".apexcharts-svg");
2789
- if (!svg) return screenX - w.layout.translateX;
2790
- const svgRect = svg.getBoundingClientRect();
2791
- const zoom = w.globals.svgWidth ? svgRect.width / w.globals.svgWidth : 1;
2792
- return (screenX - svgRect.left) / (zoom || 1) - w.layout.translateX;
2817
+ static screenXToPlotPx(w, screenX, plot = AxisMapping.plotRect(w)) {
2818
+ return (screenX - plot.left) / plot.zoom;
2793
2819
  }
2794
2820
  }
2795
2821
  function seriesEmitter(ctx, graphics) {