apexcharts 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/LICENSE +30 -11
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +545 -463
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.esm.js +1149 -801
  6. package/dist/apexcharts.js +684 -254
  7. package/dist/apexcharts.min.js +2 -2
  8. package/dist/apexcharts.ssr.common.js +2 -2
  9. package/dist/apexcharts.ssr.esm.js +684 -254
  10. package/dist/area.common.js +1 -1
  11. package/dist/area.esm.js +1 -1
  12. package/dist/bar.common.js +2 -2
  13. package/dist/bar.esm.js +20 -10
  14. package/dist/bar.js +2 -2
  15. package/dist/boxPlot.common.js +2 -2
  16. package/dist/boxPlot.esm.js +20 -10
  17. package/dist/bubble.common.js +1 -1
  18. package/dist/bubble.esm.js +1 -1
  19. package/dist/candlestick.common.js +2 -2
  20. package/dist/candlestick.esm.js +20 -10
  21. package/dist/candlestick.js +2 -2
  22. package/dist/column.common.js +2 -2
  23. package/dist/column.esm.js +20 -10
  24. package/dist/core.common.js +2 -2
  25. package/dist/core.esm.js +545 -463
  26. package/dist/donut.common.js +1 -1
  27. package/dist/donut.esm.js +1 -1
  28. package/dist/dumbbell.common.js +2 -2
  29. package/dist/dumbbell.esm.js +20 -10
  30. package/dist/features/all.common.js +2 -2
  31. package/dist/features/all.esm.js +364 -26
  32. package/dist/features/annotations.common.js +1 -1
  33. package/dist/features/annotations.esm.js +1 -1
  34. package/dist/features/annotations.js +1 -1
  35. package/dist/features/context-menu.common.js +1 -1
  36. package/dist/features/context-menu.esm.js +1 -1
  37. package/dist/features/context-menu.js +1 -1
  38. package/dist/features/drilldown.common.js +1 -1
  39. package/dist/features/drilldown.esm.js +1 -1
  40. package/dist/features/drilldown.js +1 -1
  41. package/dist/features/dumbbell.common.js +1 -1
  42. package/dist/features/dumbbell.esm.js +1 -1
  43. package/dist/features/dumbbell.js +1 -1
  44. package/dist/features/exports.common.js +2 -2
  45. package/dist/features/exports.esm.js +12 -14
  46. package/dist/features/exports.js +2 -2
  47. package/dist/features/facet.common.js +1 -1
  48. package/dist/features/facet.esm.js +1 -1
  49. package/dist/features/facet.js +1 -1
  50. package/dist/features/history.common.js +1 -1
  51. package/dist/features/history.esm.js +1 -1
  52. package/dist/features/history.js +1 -1
  53. package/dist/features/ink.common.js +1 -1
  54. package/dist/features/ink.esm.js +1 -1
  55. package/dist/features/ink.js +1 -1
  56. package/dist/features/keyboard.common.js +2 -2
  57. package/dist/features/keyboard.esm.js +14 -1
  58. package/dist/features/keyboard.js +2 -2
  59. package/dist/features/legend.common.js +1 -1
  60. package/dist/features/legend.esm.js +1 -1
  61. package/dist/features/legend.js +1 -1
  62. package/dist/features/link.common.js +1 -1
  63. package/dist/features/link.esm.js +38 -38
  64. package/dist/features/link.js +1 -1
  65. package/dist/features/marks.common.js +1 -1
  66. package/dist/features/marks.esm.js +1 -1
  67. package/dist/features/marks.js +1 -1
  68. package/dist/features/measure.common.js +1 -1
  69. package/dist/features/measure.esm.js +1 -1
  70. package/dist/features/measure.js +1 -1
  71. package/dist/features/morph.common.js +1 -1
  72. package/dist/features/morph.esm.js +1 -1
  73. package/dist/features/morph.js +1 -1
  74. package/dist/features/perspectives.common.js +1 -1
  75. package/dist/features/perspectives.esm.js +11 -11
  76. package/dist/features/perspectives.js +1 -1
  77. package/dist/features/raincloud.common.js +1 -1
  78. package/dist/features/raincloud.esm.js +1 -1
  79. package/dist/features/raincloud.js +1 -1
  80. package/dist/features/renderer-canvas.common.js +1 -1
  81. package/dist/features/renderer-canvas.esm.js +1 -1
  82. package/dist/features/renderer-canvas.js +1 -1
  83. package/dist/features/stats.common.js +1 -1
  84. package/dist/features/stats.esm.js +1 -1
  85. package/dist/features/stats.js +1 -1
  86. package/dist/features/storyboard.common.js +1 -1
  87. package/dist/features/storyboard.esm.js +11 -11
  88. package/dist/features/storyboard.js +1 -1
  89. package/dist/features/streamgraph.common.js +1 -1
  90. package/dist/features/streamgraph.esm.js +1 -1
  91. package/dist/features/streamgraph.js +1 -1
  92. package/dist/features/toolbar.common.js +2 -2
  93. package/dist/features/toolbar.esm.js +172 -25
  94. package/dist/features/toolbar.js +2 -2
  95. package/dist/features/trellis.common.js +1 -1
  96. package/dist/features/trellis.esm.js +1 -1
  97. package/dist/features/trellis.js +1 -1
  98. package/dist/features/waterfall.common.js +1 -1
  99. package/dist/features/waterfall.esm.js +1 -1
  100. package/dist/features/waterfall.js +1 -1
  101. package/dist/features/weave.common.js +2 -2
  102. package/dist/features/weave.esm.js +180 -2
  103. package/dist/features/weave.js +2 -2
  104. package/dist/heatmap.common.js +1 -1
  105. package/dist/heatmap.esm.js +1 -1
  106. package/dist/heatmap.js +1 -1
  107. package/dist/histogram.common.js +2 -2
  108. package/dist/histogram.esm.js +20 -10
  109. package/dist/line.common.js +1 -1
  110. package/dist/line.esm.js +1 -1
  111. package/dist/line.js +1 -1
  112. package/dist/pictograms.common.js +1 -1
  113. package/dist/pictograms.esm.js +1 -1
  114. package/dist/pictograms.js +1 -1
  115. package/dist/pie.common.js +1 -1
  116. package/dist/pie.esm.js +1 -1
  117. package/dist/pie.js +1 -1
  118. package/dist/polarArea.common.js +1 -1
  119. package/dist/polarArea.esm.js +1 -1
  120. package/dist/radar.common.js +1 -1
  121. package/dist/radar.esm.js +1 -1
  122. package/dist/radar.js +1 -1
  123. package/dist/radialBar.common.js +1 -1
  124. package/dist/radialBar.esm.js +1 -1
  125. package/dist/radialBar.js +1 -1
  126. package/dist/raincloud.common.js +2 -2
  127. package/dist/raincloud.esm.js +20 -10
  128. package/dist/rangeArea.common.js +1 -1
  129. package/dist/rangeArea.esm.js +1 -1
  130. package/dist/rangeBar.common.js +2 -2
  131. package/dist/rangeBar.esm.js +20 -10
  132. package/dist/scatter.common.js +1 -1
  133. package/dist/scatter.esm.js +1 -1
  134. package/dist/streamgraph.common.js +1 -1
  135. package/dist/streamgraph.esm.js +1 -1
  136. package/dist/sunburst.common.js +1 -1
  137. package/dist/sunburst.esm.js +1 -1
  138. package/dist/sunburst.js +1 -1
  139. package/dist/treemap.common.js +1 -1
  140. package/dist/treemap.esm.js +1 -1
  141. package/dist/treemap.js +1 -1
  142. package/dist/unit-shapes.common.js +1 -1
  143. package/dist/unit-shapes.esm.js +1 -1
  144. package/dist/unit-shapes.js +1 -1
  145. package/dist/unit.common.js +1 -1
  146. package/dist/unit.esm.js +79 -79
  147. package/dist/unit.js +1 -1
  148. package/dist/violin.common.js +2 -2
  149. package/dist/violin.esm.js +20 -10
  150. package/dist/violin.js +2 -2
  151. package/dist/waterfall.common.js +2 -2
  152. package/dist/waterfall.esm.js +20 -10
  153. package/package.json +2 -2
  154. package/src/apexcharts.js +39 -15
  155. package/src/charts/common/bar/Helpers.js +31 -12
  156. package/src/modules/Data.js +8 -2
  157. package/src/modules/Exports.js +14 -12
  158. package/src/modules/Formatters.js +24 -1
  159. package/src/modules/Range.js +28 -1
  160. package/src/modules/Toolbar.js +112 -2
  161. package/src/modules/ZoomPanSelection.js +85 -7
  162. package/src/modules/accessibility/KeyboardNavigation.js +14 -0
  163. package/src/modules/axes/YAxis.js +12 -15
  164. package/src/modules/helpers/UpdateHelpers.js +25 -8
  165. package/src/modules/settings/Globals.js +5 -10
  166. package/src/modules/settings/Options.js +15 -0
  167. package/src/modules/weave/PluginAPI.js +57 -1
  168. package/src/modules/weave/WeaveHost.js +148 -0
  169. package/src/ssr/DOMShim.js +50 -0
  170. package/src/types/internal.d.ts +1 -1
  171. package/src/utils/Utils.js +6 -9
  172. package/types/apexcharts.d.ts +17 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v7.2.0
2
+ * ApexCharts v7.4.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))r.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))i.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_Utils,u="__apexcharts_series_transforms__";function b(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[u][t]=e)}globalThis[u]||(globalThis[u]={});const g="__apexcharts_row_sources__";function p(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[g][t]=e)}globalThis[g]||(globalThis[g]={});function x(t,e){const s=t.length;if(0===s)return NaN;if(1===s)return t[0];const a=(s-1)*e,r=Math.floor(a),i=Math.ceil(a);return r===i?t[r]:t[r]+(t[i]-t[r])*(a-r)}function f(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}function y(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e);let a=s[0],r=s[s.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);isFinite(t)&&isFinite(e)&&e>t&&(a=t,r=e)}if(!(r>a)){const t=Math.abs(a)>0?.05*Math.abs(a):.5;return{edges:[a-t,a+t],binWidth:2*t,rule:"single",capped:!1}}const o=r-a;let n,l;if("number"==typeof e.binWidth&&e.binWidth>0)n=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)n=o/Math.floor(e.bins),l="count";else{const t=function(t,e,s){const a=t.length,r=t=>e/Math.max(1,Math.ceil(t));switch(s){case"sqrt":return{width:r(Math.sqrt(a)),rule:"sqrt"};case"rice":return{width:r(2*Math.cbrt(a)),rule:"rice"};case"scott":{const e=f(t);return e>0?{width:3.49*e*Math.pow(a,-1/3),rule:"scott"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"fd":{const e=x(t,.75)-x(t,.25);return e>0?{width:2*e*Math.pow(a,-1/3),rule:"fd"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"auto":{const e=r(Math.log2(a)+1),s=x(t,.75)-x(t,.25);if(s<=0)return{width:e,rule:"sturges"};const i=2*s*Math.pow(a,-1/3);return i<e?{width:i,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:r(Math.log2(a)+1),rule:"sturges"}}}(s,o,"string"==typeof e.bins?e.bins:"auto");n=t.width,l=t.rule}(!isFinite(n)||n<=0)&&(n=o);let h=Math.ceil(o/n);(!isFinite(h)||h<1)&&(h=1);let d=!1;h>1e3&&(h=1e3,n=o/h,d=!0),n=o/h;const c=new Array(h+1);for(let t=0;t<=h;t++)c[t]=a+t*n;return c[h]=Math.max(c[h],r),{edges:c,binWidth:n,rule:l,capped:d}}function m(t,e){const s=e.length-1;if(!(t>=e[0])||t>e[s])return-1;if(t===e[s])return s-1;const a=(e[s]-e[0])/s;if(a>0){let r=Math.floor((t-e[0])/a);return r<0&&(r=0),r>s-1&&(r=s-1),t<e[r]?r--:t>=e[r+1]&&r++,r<0||r>s-1?-1:r}let r=0,i=s-1;for(;r<=i;){const s=r+i>>1;if(t<e[s])i=s-1;else{if(!(t>=e[s+1]))return s;r=s+1}}return-1}function v(t,e){var s;if(!t||"object"!=typeof t||Array.isArray(t))return null;let a=null;if(Array.isArray(t.points)?a=t.points:Array.isArray(null==(s=t.y)?void 0:s.points)?a=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(a=t.y),!a)return null;const r=[];for(let t=0;t<a.length;t++){const e=c.parseNumber(a[t]);null!==e&&isFinite(e)&&r.push(e)}return r.length?r:null}function C(t){const e=[];if(!Array.isArray(t))return e;for(let s=0;s<t.length;s++){const a=t[s];let r=a;Array.isArray(a)?r=1===a.length?a[0]:a[1]:a&&"object"==typeof a&&(r=void 0!==a.y?a.y:a.x);const i=c.parseNumber(r);null!==i&&isFinite(i)&&e.push(i)}return e}const w=new WeakSet;function I(t,e,s){const a=s&&null!=s.maxRows?s.maxRows:3e3,r=function(t,e){let s=0,a=0;for(const e of t)s+=e.length,e.length>a&&(a=e.length);if(s<=e)return{clusters:t,stride:1,total:s,kept:s};const r=e=>{let s=0;for(const a of t)s+=Math.ceil(a.length/e);return s};let i=Math.max(2,Math.ceil(s/e));for(;i<a&&r(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let s=0;s<t.length;s+=i)e.push(t[s]);return o+=e.length,e}),stride:i,total:s,kept:o}}(e.map(t=>t.rows),a);r.stride;const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const s=i[t.realIndex]||i[0];return{name:t.name,data:r.clusters[e].map((a,r)=>n({id:`${t.realIndex}:${e}:${r}`,x:t.name,y:a},s?{fillColor:s}:{}))}})}function P(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function A(t){return(e,s)=>{var a;const r=t(e);if(!Array.isArray(r)||!r.length)return null;const i=e.globals&&e.globals.collapsedSeriesIndices||[],o=e.globals&&((null==(a=e.globals.categoryLabels)?void 0:a.length)?e.globals.categoryLabels:e.globals.labels)||[],n=[];return r.forEach((t,s)=>{var a;if(-1!==i.indexOf(s))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(a=e.seriesData.seriesNames)?void 0:a[s]);t.forEach((t,e)=>{const a=null!=o[e]?String(o[e]):`#${e+1}`;n.push({name:r.length>1&&l?`${l} ${a}`:a,realIndex:s,rows:Array.isArray(t)?t.slice():[]})})}),n.length?I(e,n,s):null}}const S=A(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),L=A(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});b("histogram",function(t,e){var s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.histogramRawSeries||(r.histogramRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const i=r.histogramRawSeries,o=(null==(s=a.plotOptions)?void 0:s.histogram)||{},h=i.map(t=>C(null==t?void 0:t.data));let d=[];if(1===h.length)d=h[0];else for(const t of h)d=d.concat(t);const c=y(d,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!c)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:u,binWidth:b}=c,g=h.map(t=>function(t,e){const s=new Array(Math.max(0,e.length-1)).fill(0);for(let a=0;a<t.length;a++){const r=m(t[a],e);r>=0&&s[r]++}return s}(t,u));e.histogramData={edges:u,binWidth:b,counts:g,rule:c.rule,capped:c.capped};const p=r.collapsedSeriesIndices||[];return i.map((t,e)=>{if(-1!==p.indexOf(e))return l(n({},t),{data:[]});const s=function(t,e={}){let s=t.slice();if(e.cumulative){let t=0;s=s.map(e=>t+=e)}const a=t.reduce((t,e)=>t+e,0);if(a<=0)return s;if("relative"===e.normalize)return s.map(t=>t/a*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return s.map(e=>e/(a*t))}return s}(g[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:b}),a=[];for(let t=0;t<s.length;t++)a.push({x:(u[t]+u[t+1])/2,y:s[t]});return l(n({},t),{data:a})})}),b("boxPlot",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.boxPlot)?void 0:a.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!w.has(t))return t;const s=v(t,!1);if(!s)return t;const a=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=x(s,.25),r=x(s,.5),i=x(s,.75),o=i-a;let n=s[0],l=s[s.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=a-1.5*o,e=i+1.5*o;let r=0;for(;r<s.length&&s[r]<t;)r++;let d=s.length-1;for(;d>=0&&s[d]>e;)d--;r<=d&&(n=s[r],l=s[d],h=s.slice(0,r).concat(s.slice(d+1)))}return{summary:[n,a,r,i,l],outliers:h,iqr:o}}(s,{whiskers:r});if(!a)return t;e=!0;const i=l(n({},t),{y:a.summary,points:s});return w.add(i),i});return e?l(n({},t),{data:s}):t})}),b("violin",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.violin)?void 0:a.kde)||{};return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{var s;if(Array.isArray(null==(s=null==t?void 0:t.y)?void 0:s.density)&&t.y.density.length&&!w.has(t))return t;const a=v(t,!0);if(!a)return t;const i=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=s.length;let r=e.bandwidth;if(!("number"==typeof r&&r>0)){const t=f(s),e=x(s,.75)-x(s,.25);r=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(a,-.2)}if(!isFinite(r)||r<=0){const t=s[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=s[0]-2*r,n=(s[a-1]+2*r-o)/(i-1),l=1/(a*r*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<i;t++){const e=o+t*n;let i=0;for(let t=0;t<a;t++){const a=(e-s[t])/r;i+=Math.exp(-.5*a*a)}h.push([e,i*l])}return{density:h,bandwidth:r}}(a,{bandwidth:r.bandwidth,resolution:r.resolution});if(!i)return t;e=!0;const o=l(n({},t),{y:{density:i.density,points:a}});return w.add(o),o});return e?l(n({},t),{data:s}):t})}),p("histogram",function(t,e){const s=t.globals,a=t.histogramData,r=s&&s.histogramRawSeries;if(!a||!Array.isArray(a.edges)||a.edges.length<2)return null;if(!Array.isArray(r)||!r.length)return null;const i=s&&s.collapsedSeriesIndices||[],o=a.edges,n=[];return r.forEach((e,s)=>{var a;if(-1!==i.indexOf(s))return;const l=function(t,e){const s=Math.max(0,e.length-1),a=new Array(s);for(let t=0;t<s;t++)a[t]=[];for(let s=0;s<t.length;s++){const r=m(t[s],e);r>=0&&a[r].push(t[s])}return a}(C(e&&e.data),o),h=t.seriesData&&(null==(a=t.seriesData.seriesNames)?void 0:a[s])||(null==e?void 0:e.name);l.forEach((t,e)=>{const a=`${P(o[e])}-${P(o[e+1])}`;n.push({name:r.length>1&&h?`${h} ${a}`:a,realIndex:s,rows:t})})}),n.length?I(t,n,e):null}),p("boxPlot",S),p("violin",L);const D=d.__apex_Graphics,H=d.__apex_DataLabels,k=(t,e,s,a)=>{if("function"!=typeof t)return t;const r=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(r)?r:0},R=d.__apex_BrowserAPIs_BrowserAPIs,W=d.__apex_Environment_Environment;function X(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(W.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function F(t,e,s){var a,r,i,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(i=null==(r=t.seriesData)?void 0:r.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}function O(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Y(t,e,s=!1,a=!1){var r,i;if(!X(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(r=o.seriesY)?void 0:r[e],l=null==(i=t.seriesData.series)?void 0:i[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=O(n.map((t,s)=>function(t,e,s){var a,r;if(t.isXNumeric){const r=null==(a=t.seriesX)?void 0:a[e];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const i=null==(r=t.labels)?void 0:r[s];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+s}(o,e,s))),d=O(l.map((s,a)=>F(t,e,a))),c=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),r=new Set;let i=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!r.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(r.add(l),l<i&&(o=!1),i=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)r.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function M({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:r,speed:i}){var o;if(!X(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new D(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(s=>{let a=s.fill||d||"#c8c8c8";0===String(a).indexOf("url(")&&(a=d||"#c8c8c8");const o=h.drawPath({d:s.d,stroke:"none",strokeWidth:0,fill:a,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(s.d);let c=r?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=r?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const u=n.style;u.transformBox="fill-box",u.transformOrigin=c;const b=Math.max(1,i||1),g=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-g)/b)),a=1-Math.pow(1-s,3),i=1-a;u.transform=r?`scaleX(${i})`:`scaleY(${i})`,u.opacity=String(1-a),s<1?R.requestAnimationFrame(p):n.parentNode.removeChild(n)};R.requestAnimationFrame(p)})}class T{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s;const{x:a,y:r,y1:i,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:u,barHeight:b,barWidth:g,barXPosition:p,barYPosition:x,visibleSeries:f}=t,y=this.w,m=new D(this.barCtx.w),v=y.waterfallData&&y.waterfallData.values,C=v&&v[c]&&null!=v[c][d]?v[c][d]:null,w=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let I,P;y.axisFlags.isXNumeric&&!y.globals.isBarHorizontal?(I=a+g*(f+1),P=r+b*(f+1)-w):(I=a+g*f,P=r+b*f);let A=null,S=null,L=a,H=r,R={};const W=y.config.dataLabels,X=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==x&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(P=x,H=x),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(I=p,L=p);const O=k(W.offsetX,y,c,d),Y=k(W.offsetY,y,c,d);let M={width:0,height:0};if(y.config.dataLabels.enabled){const t=null!==C?C:y.seriesData.series[c][d];M=m.getTextRects(y.config.dataLabels.formatter?y.config.dataLabels.formatter(t,l(n({},y),{seriesIndex:c,dataPointIndex:d,w:y})):y.formatters.yLabelFormatters[0](t),parseFloat(W.style.fontSize).toString(),W.style.fontFamily,void 0,!0,W.style.fontWeight)}const T={x:a,y:r,i:h,j:d,realIndex:c,columnGroupIndex:u,bcx:I,bcy:P,barHeight:b,barWidth:g,textRects:M,strokeWidth:w,dataLabelsX:L,dataLabelsY:H,dataLabelsConfig:W,barDataLabelsConfig:X,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(R=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==C&&this.barCtx.isHorizontal&&"center"===X.position){const t=null==(s=null==(e=y.waterfallData.geometry)?void 0:e[c])?void 0:s[d];t&&t.horizontal&&(R.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return A=this.drawCalculatedDataLabels({x:R.dataLabelsX,y:R.dataLabelsY,val:null!==C?C:this.barCtx.isRangeBar?[i,o]:"100%"===y.config.chart.stackType?y.globals.seriesPercent[c][d]:y.seriesData.series[c][d],i:c,j:d,barWidth:g,barHeight:b,textRects:M,dataLabelsConfig:W}),y.config.chart.stacked&&F.enabled&&(S=this.drawTotalDataLabels({x:R.totalDataLabelsX,y:R.totalDataLabelsY,barWidth:g,barHeight:b,realIndex:c,j:d,textAnchor:R.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:W,barTotalDataLabelsConfig:F})),{dataLabelsPos:R,dataLabels:A,totalDataLabels:S}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,a=this.getTotalGroupContext(t),r=s.seriesData.stackedSeriesTotalsByGroups;return a&&r&&r[a.groupIndex]?r[a.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,a,{i:r,j:i,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:b,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,strokeWidth:f,offX:y,offY:m}=t;const v=l;d=Math.abs(d);const C="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});l-=f/2;const I=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+y:l-I+h/2+y,!e.config.chart.stacked&&w>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*w)),C){const t=2;u=u+c.height/2-f/2-t}const P=e.seriesData.series[r][i]<0;let A=n;switch(this.barCtx.isReversed&&(A=n+(P?d:-d)),p.position){case"center":b=C?P?A-d/2+m:A+d/2-m:P?A-d/2+c.height/2+m:A+d/2+c.height/2-m;break;case"bottom":b=C?P?A-d+m:A+d-m:P?A-d+c.height+f+m:A+d-c.height/2+f-m;break;case"top":b=C?P?A+m:A-m:P?A-c.height/2-m:A+c.height+m}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{S=P?Math.max(t[i],S):Math.min(t[i],S)})}),this.drawsStackedTotal(o)&&x.enabled){const t=18,r=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),g.fontSize);s=P?S-r.height/2-m-x.offsetY+t:S+r.height+m+x.offsetY-t;const n=I;a=v+(e.axisFlags.isXNumeric?-h/2:h/2-n)+x.offsetX}return e.config.chart.stacked||(b<0?b=0+f:b+c.height/3>e.layout.gridHeight&&(b=e.layout.gridHeight-f)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:b,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:r,j:i,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:x,offY:f}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});let v,C,w;if(h=Math.abs(h),this.barCtx.isPyramid){v=n+l/2+f-(null!=(e=d.centerOffset)?e:0)}else v=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+f-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=l*m);let I="start";const P=s.seriesData.series[r][i]<0;let A=a;if(this.barCtx.isReversed&&(A=a+(P?-h:h),I=P?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+x;else switch(g.position){case"center":c=P?A+h/2-x:Math.max(d.width/2,A-h/2)+x;break;case"bottom":c=P?A+h-u-x:A-h+u+x;break;case"top":c=P?A-u-x:A-u+x}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{S=P?Math.min(t[i],S):Math.max(t[i],S)})}),this.drawsStackedTotal(o)&&p.enabled){const t=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),b.fontSize);P?(C=S-u-x-p.offsetX,I="end"):C=S+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),w=v-d.height/2+t.height/2+p.offsetY+u,s.globals.barGroups.length>1&&!L&&(w-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=P&&"middle"!==b.textAnchor?"start"===b.textAnchor?"end":"start":b.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===g.orientation?d.height:d.width)-e;c+a>s.layout.gridWidth-u&&(c=s.layout.gridWidth-a-u),c-e<u&&(c=e+u)}return{bcx:a,bcy:n,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:C,totalDataLabelsY:w,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:r,textRects:i,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,u,b;const g=this.w;let p="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(p=`rotate(-90, ${t}, ${e})`);const x=new H(this.barCtx.w,this.barCtx.ctx),f=new D(this.barCtx.w),y=d.formatter;let m=null;const v=g.globals.collapsedSeriesIndices.indexOf(a)>-1,C=(g.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(C){const t=null==(c=g.globals.prevDataLabels)?void 0:c.get(`${a}::${F(g,a,r)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!v||C)){m=f.group({class:"apexcharts-data-labels",transform:p});const c=g.config.dataLabels;((null==(u=c.animate)?void 0:u.enabled)||(null==(b=c.countUp)?void 0:b.enabled))&&(m.node.setAttribute("data:dlKey",`${a}::${F(g,a,r)}`),m.node.setAttribute("data:dlJ",String(r)),"number"==typeof s&&isFinite(s)&&m.node.setAttribute("data:dlVal",String(s)));let v="";void 0!==s&&(v=y(s,l(n({},g),{seriesIndex:a,dataPointIndex:r,w:g}))),!s&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v="");const w=g.seriesData.series[a][r]<0,I=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=w?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=w?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<f.getTextRects(v,parseFloat(d.style.fontSize).toString()).width&&(v="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!C&&(this.barCtx.isHorizontal?i.width/1.6>Math.abs(h)&&(v=""):i.height/1.6>Math.abs(o)&&(v=""));const P=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?P.textAnchor="end":"end"===d.textAnchor&&(P.textAnchor="start")),x.plotDataLabelsText({x:t,y:e,text:v,i:a,j:r,parent:m,dataLabelsConfig:P,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:r,j:i,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new D(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(r)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(r);c.node.setAttribute("data:dlTotalKey",`${t}::${F(this.w,r,i)}`),c.node.setAttribute("data:dlTotalSeries",String(r)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const B=d.__apex_Series,j=d.__apex_Fill;function z(t){var e,s,a,r,i,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(r=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:r.overlap)&&(null!=(n=null==(o=null==(i=t.seriesData)?void 0:i.series)?void 0:o.length)?n:0)>1)}class G{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let a=0;a<t[s].length;a++)e.seriesData.seriesX[s][a]>e.globals.minX&&e.seriesData.seriesX[s][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),c.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let s=0;s<t.length;s++){const a=t[s];Array.isArray(a)&&a.length>0&&e.push(a)}if(!e.length)return 0;const s=new Array(e.length).fill(0);let a=NaN,r=1/0;for(;;){let t=1/0,i=-1;for(let a=0;a<e.length;a++){const r=e[a];for(;s[a]<r.length&&"number"!=typeof r[s[a]];)s[a]++;if(s[a]>=r.length)continue;const o=r[s[a]];o==o?o<t&&(t=o,i=a):(s[a]++,a--)}if(-1===i)break;if(s[i]++,a==a){const e=t-a;e>0&&e<r&&(r=e)}a=t}return isFinite(r)?r:0}initialPositions(t){const e=this.w;let s,a,r,i,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let u=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||z(e))&&(u=1),this.barCtx.isHorizontal)r=e.layout.gridHeight/d,o=r/u,e.axisFlags.isXNumeric&&(r=e.layout.gridHeight/this.barCtx.totalItems,o=r/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(r-o*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(i=e/t),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+c.noExponents(i-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:r,xDivision:i,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,a){var r;const i=this.w,o=new j(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(r=i.config.series[e].data[s])?void 0:r.fill),c=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:u,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(i.config.fill.type)?i.config.fill.type[a]:i.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const r=s.config.plotOptions.bar.dumbbell.connector;if(r.color)return null;const i=a.order[e];if(!i)return null;const o=s.globals.colors[i[0]],n=s.globals.colors[i[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:r.opacity,opacityTo:r.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===r.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,r=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(r);return e.length?[e]:[]}const i=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!r(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?i[t].push(e):o.push(e)}return o.length&&i.push(o),i.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const s=this.w,a=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,r=t.length,i=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:r},()=>Array(i).fill(a?"top":"none"));if(a)return o;const n="bar"===this.w.config.chart.type&&1===i,l=n?"top":"both",h=n?"top":"bottom";for(const e of this.getStackedSeriesIndices(r))for(let s=0;s<i;s++){const a=[],r=[];for(const i of e){const e=t[i][s];e>0?a.push(i):e<0&&r.push(i)}if(a.length>0&&0===r.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const r of a)o[r][s]=r===t?h:r===e?"top":"none"}else if(r.length>0&&0===a.length)if(1===r.length)o[r[0]][s]="both";else{const t=Math.max(...r),e=Math.min(...r);for(const a of r)o[a][s]=a===t?"bottom":a===e?"top":"none"}else if(a.length>0&&r.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...r);for(const t of r)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:r,y2:i,elSeries:o}){const n=this.w,l=new D(this.barCtx.w),h=new B(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==r?r:0,void 0!==a?a:n.layout.gridWidth,void 0!==i?i:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.columnWidthOffset)&&(f=e-c.config.series[l].data[d].columnWidthOffset/2,x=t+c.config.series[l].data[d].columnWidthOffset);const y=r/2,m=f+y,v=f+x-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001-y*C,a+=.001+y*C;const w=p.line(v,s),I="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",P=p.move(m,s)+p.line(m,a)+p.line(v,a)+w+I;let A=P;"none"!==this.arrBorderRadius[l][d]&&(A=p.roundPathCorners(A,c.config.plotOptions.bar.borderRadius));let S=null;const L=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(L?S=L:c.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(l,d,A,P)),null==S&&(S=p.move(m,s)+p.line(m,s)+w+w+w+w+w+p.line(m,s)+I),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*C),t.yArrjF.push(Math.abs(s-a+r*C)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:A,pathFrom:S,drawnBox:{x1:m,x2:v,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:r,realIndex:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,b=u(s[a][r]),g=r===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let x;x=g?"taper"===p?0:b:u(s[a][r+1]);const f=o/2,y=t+f,m=t+e-f,v=c-b,C=c+b,w=c-x,I=c+x,P=d.move(v,y)+d.line(C,y)+d.line(I,m)+d.line(w,m)+" Z";let A=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return S?A=S:n.globals.previousPaths.length>0&&(A=this.barCtx.getPreviousPath(i,r,P)),null==A&&(A=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:P,pathFrom:A,x:C,x1:v,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,r=t.map(t=>Math.abs(Number(t)||0)),i=r.reduce((t,e)=>t+e,0);if(0===i||s<=0)return r.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<r.length;t++){const e=n/i;n+=r[t];const a=n/i,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:r,j:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,b=t+u,g=t+e-u,p=c-s,x=c+s,f=c-a,y=c+a,m=d.move(p,b)+d.line(x,b)+d.line(y,g)+d.line(f,g)+" Z";let v=null;const C=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return C?v=C:n.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(r,i,m)),null==v&&(v=d.move(c,b)+d.line(c,b)+d.line(c,g)+d.line(c,g)+" Z"),{pathTo:m,pathFrom:v,x:x,x1:p,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.barHeightOffset)&&(x=t-c.config.series[l].data[d].barHeightOffset/2,f=e+c.config.series[l].data[d].barHeightOffset);const y=r/2,m=x+y,v=x+f-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001+y*C,a+=.001-y*C;const w=this.barCtx.isFunnel,I=w?(s+a)/2:s,P=p.line(s,v),A="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=p.move(s,m)+p.line(a,m)+p.line(a,v)+P+A;let L=S;"none"!==this.arrBorderRadius[l][d]&&(L=p.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let H=null;const k=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(k?H=k:c.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(l,d,L,S)),null==H){const t=w?p.line(I,v):P;H=p.move(I,m)+p.line(I,m)+t+t+t+t+t+p.line(I,m)+A}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*C),t.xArrjF.push(Math.abs(s-a-r*C)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:H,drawnBox:{x1:s,x2:a,y1:m,y2:v}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let r=a?e:null;return null!=t&&(r=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),r}getGoalValues(t,e,s,a,r,i){const o=this.w,h=[],d=(a,r)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,i,!1),attrs:r})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][r]&&Array.isArray(o.seriesData.seriesGoals[a][r])&&o.seriesData.seriesGoals[a][r].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,r);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let i=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[i].value&&(i=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!c.enabled||e!==i&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,r,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===i&&i!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],r=s.dumbbellData;if(r&&"series"===r.form){const t=r.values[e]||[];for(let e=0;e<t.length;e++){const i=t[e];null!==i&&-1===r.hidden.indexOf(e)&&a.push({value:i,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const i=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(i[t])?i[t][e]:i[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const r=this.w,i=r.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof i.formatter)return i.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:r});const o=this.barCtx.isHorizontal?r.formatters.xLabelFormatter:r.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,r):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:r,barHeight:i}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new D(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:i/2,a=e+s+i/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+s+r/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new D(s),r=s.config.plotOptions.bar.dumbbell.dataLabels,i=e.markerSize/2+r.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?i*o:0),y:e.y-(e.horizontal?0:i*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:r}){const i=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:u}=e,b=l+e.barHeight,g=new D(this.barCtx.w),p=new c,x=g.move(n,b)+g.line(o,b)+g.line(h,u)+g.line(d,u)+g.line(n,b)+("around"===i.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][r]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,c.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let r=0,i=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.globals.seriesPercent[s][e];o&&r++,s<t&&0===o&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),a=this.barCtx.columnGroupIndices;let r=a.indexOf(s);return r<0&&(a.push(s),r=a.length-1),{groupIndex:s,columnGroupIndex:r}}}const _=d.__apex_CoreUtils,N=d.__apex_Filters,V=d.__apex_Animations_computeStagger;class E{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/E.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*E.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const r=a.getBoundingClientRect(),i=t.globals.svgWidth?r.width/t.globals.svgWidth:1;return(e-r.left)/(i||1)-t.layout.translateX}}class ${constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new B(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const r=a.getBarSeriesIndices(),i=new _(this.w);this.stackedSeriesTotals=i.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===r.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new G(this)}draw(t,e){var s,a,r;const i=this.w,o=new D(this.w),h=new _(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,u=0;h<t.length;h++,u++){let b,g;const p=[],x=[],f=i.globals.comboCharts?e[h]:h,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(f),m=o.group({class:"apexcharts-series",rel:h+1,seriesName:c.escapeString(i.seriesData.seriesNames[f]),"data:realIndex":f});B.addCollapsedClassToSeries(this.w,m,f),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f],this.translationsIndex=f);const v=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const C=this.barHelpers.initialPositions(f),{y:w,yDivision:I,zeroW:P,x:A,xDivision:S,zeroH:L}=C;let D=C.barHeight,H=C.barWidth;g=w,b=A,this.isHorizontal||x.push(b+(null!=H?H:0)/2);const k=o.group({class:"apexcharts-datalabels","data:realIndex":f});i.globals.delayedElements.push({el:k.node,holdUntilComplete:!(null==(s=i.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(f)}),k.node.classList.add("apexcharts-element-hidden");const R=o.group({class:"apexcharts-bar-goals-markers"}),W=o.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:W.node}),W.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,f);let o=null;const d={indexes:{i:h,j:e,realIndex:f,translationsIndex:v,bc:u},x:b,y:g,strokeWidth:s,elSeries:m};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:D,zeroW:P,yDivision:I})),H=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:S,barWidth:H,zeroH:L})),D=this.series[h][e]/this.yRatio[v]);const C=this.barHelpers.getPathFillColor(t,h,e,f);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=i.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof C.color&&-1===(null==(r=C.color)?void 0:r.indexOf("url"))?C.color:c.hexToRgba(i.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:f,j:e});if(W.add(t),i.config.chart.dropShadow.enabled){new N(this.w).dropShadow(t,i.config.chart.dropShadow,f)}}this.pathArr.push(o);const w=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:D,barWidth:H});w&&R.add(w),g=o.y,b=o.x,e>0&&x.push(b+(null!=H?H:0)/2),p.push(g),this.renderSeries(l(n({realIndex:f,pathFill:C.color},C.useRangeColor?{lineFill:C.color}:{}),{j:e,i:h,columnGroupIndex:y,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:m,x:b,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:D),barWidth:Math.abs(o.barWidth?o.barWidth:H),elDataLabelsWrap:k,elGoalsMarkers:R,elBarShadows:W,visibleSeries:this.visibleI,type:"bar"}))}if(i.globals.seriesXvalues[f]=x,i.globals.seriesYvalues[f]=p,i.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(F(i,f,s));M({w:i,elSeries:m,record:this._prevRecord(f),newKeys:e,isHorizontal:this.isHorizontal,speed:i.config.chart.animations.dynamicAnimation.speed})}d.add(m)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:r,columnGroupIndex:i,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:u,y2:b,series:g,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,elDataLabelsWrap:m,elGoalsMarkers:v,elBarShadows:C,visibleSeries:w,type:I,classes:P}){var A,S,L,H,k,R,W;const X=this.w,O=new D(this.w,this.ctx),Y=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,O);let M=!1;const B=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,O.setupEventDelegation(h,`.apexcharts-${I}-area`)),!s){let e=function(t){const e=X.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:X.seriesData.series[t][a],dataPointIndex:a,w:X}):s};const r="function"==typeof X.globals.stroke.colors[t]?e(t):X.globals.stroke.colors[t];s=this.barOptions.distributed?X.globals.stroke.colors[a]:r}const j=X.config.chart.animations,z=j.animateGradually;let G=0,_=0;if(z&&!1!==z.enabled&&!(X.globals.dataChanged&&this.isLayoutShift(t))){const t=X.globals.dataPoints||1,e=z.delay||0,s=Math.min(e,.5*j.speed/Math.max(1,t));_=V({style:"sequential",index:a,baseDelay:s}),X.config.chart.stacked&&!X.globals.dataChanged&&(_+=r*s*.5);G=_/(e||1)}const E=new T(this).handleBarDataLabels({x:d,y:c,y1:u,y2:b,i:r,j:a,series:g,realIndex:t,columnGroupIndex:i,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,visibleSeries:w});if(_>0){const t=X.config.dataLabels;if((null==(A=t.animate)?void 0:A.enabled)||(null==(S=t.countUp)?void 0:S.enabled)){const t=String(Math.round(_));null==(H=null==(L=E.dataLabels)?void 0:L.node)||H.setAttribute("data:dlDelay",t),null==(R=null==(k=E.totalDataLabels)?void 0:k.node)||R.setAttribute("data:dlDelay",t)}}if(X.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(x,X.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(x,X.globals.barPadForNumericAxis)>X.layout.gridWidth)&&(M=!0),X.config.series[r].data[a]&&X.config.series[r].data[a].strokeColor&&(s=X.config.series[r].data[a].strokeColor),this.isNullValue&&-1===X.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!M){const i=!0===(null==(W=this.ctx.morphTypeChange)?void 0:W.isActive()),d=i?this.ctx.morphTypeChange.getSpeed():X.config.chart.animations.dynamicAnimation.speed,c=i&&this.ctx.morphTypeChange.claimsTargetMark(t,a);c&&(o=n,G=0);const g=Y.renderPaths({i:r,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:X.config.stroke.lineCap,fill:e,pathToInterp:B,animationDelay:G,initialSpeed:X.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${I}-area${P?` ${P}`:""}`,chartType:I,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${X.globals.cuid})`),c&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const f=X.config.forecastDataPoints;f.count>0&&a>=X.globals.dataPoints-f.count&&(g.node.setAttribute("stroke-dasharray",f.dashArray),g.node.setAttribute("stroke-width",f.strokeWidth),g.node.setAttribute("fill-opacity",f.fillOpacity)),void 0!==u&&void 0!==b&&(g.attr("data-range-y1",u),g.attr("data-range-y2",b));new N(this.w).setSelectionFilter(g,t,a),h.add(g),g.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:X.seriesData.series[r][a],barHeight:p,barWidth:x,"data:pathKey":F(X,t,a)}),"canvas"===Y.kind&&(X.globals.barCanvasCoords||(X.globals.barCanvasCoords={}),X.globals.barCanvasCoords[t]||(X.globals.barCanvasCoords[t]={}),X.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:x}),null!==E.dataLabels&&m.add(E.dataLabels),E.totalDataLabels&&m.add(E.totalDataLabels),h.add(m),v&&h.add(v),C&&h.add(C)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.axisFlags.isXNumeric)c=(i=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),c=i+e*this.visibleI,c-=e*s}else c=i+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return r=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(a=p.x1,r=p.x),l.axisFlags.isXNumeric||g||(i+=o),g&&(i=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:r,y:i,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:r});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:c,j:u});t>0&&(r=this.seriesLen*r/t),g=e+r*this.visibleI,g-=r*s}else g=e+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][u],i,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:i,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,i,h,u,d),barXPosition:g,barWidth:r}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const r=this.w;let i=s;return r.seriesData.seriesX[s].length||(i=r.globals.maxValsInArrayIndex),c.isNumber(r.seriesData.seriesX[i][a])&&(t=E.dataXToPx(r,r.seriesData.seriesX[i][a])-e*this.seriesLen/2),{barXPosition:t+(z(r)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const r=e.globals.previousPaths[a];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&(s=r)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const a=this.w;let r=!1;if(X(a)&&a.globals.previousPaths.length>0){const i=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(i)if(i.paths.length!==o)r=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(F(a,t,s))){r=!0;break}}else r=o>0}return this._ltCache[t]=r,r}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=Y(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const r=this.w;this._pathToInterp=null;const i=this._prevRecord(t);if(!i)return X(r)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(F(r,t,e));s?o=s.d:n=!0}else void 0!==i.paths[e]?o=i.paths[e].d:n=!0;if(o){const t=$.pathCommandCount(o),e=$.pathCommandCount(s);if(t===e)return o;const i=new D(r),n=t=>{const e=$.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(s)>1;if(t<e){const t=i.roundPathCorners(o,0);if($.pathCommandCount(t)===e){if(l&&a){const t=i.roundPathCorners(a,0);$.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=i.roundPathCorners(s,0);if($.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=$.squareLike(o),s=e?i.roundPathCorners(e,0):null;if(s&&$.pathCommandCount(s)===t)return s}return o}}}return n&&X(r)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const r=e.map(t=>t[0]),i=e.map(t=>t[1]);return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...i),maxY:Math.max(...i),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=$.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:r,maxY:i,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,c,u;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[c,u]=l(o[1],r,i)):(c=Math.abs(o[1]-r)<=Math.abs(o[1]-i)?r:i,u=c===r?i:r,[h,d]=l(o[0],s,a));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const r=this._prevKeyedPaths(t),i=r?r.get(F(s,t,e)):a.paths[e];return i?!!i.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}d.default.use({bar:$,column:$,barStacked:class extends ${draw(t,e){const s=this.w;this.graphics=new D(this.w),this.bar=new $(this.w,this.ctx,this.xyRatios);const a=new _(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let i=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let u=!1;for(let a=0,h=0;a<t.length;a++,h++){const b=s.globals.comboCharts?e[a]:a,{groupIndex:g,columnGroupIndex:p}=this.barHelpers.getGroupIndex(b);this.groupCtx=this[s.labelData.seriesGroups[g]];const x=[],f=[];let y=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],y=b),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let m=this.graphics.group({class:"apexcharts-series",seriesName:c.escapeString(s.seriesData.seriesNames[b]),rel:a+1,"data:realIndex":b});B.addCollapsedClassToSeries(this.w,m,b);const v=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":b});B.addCollapsedClassToSeries(this.w,v,b),(s.globals.collapsingSeriesIndices||[]).indexOf(b)>-1&&v.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(i,o,void 0,void 0,void 0,void 0,y),{xDivision:I,yDivision:P,zeroH:A,zeroW:S}=w;let L=w.barHeight,D=w.barWidth;o=w.y,i=w.x,s.globals.barHeight=L,s.globals.barWidth=D,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>A),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const r=this.barHelpers.getStrokeWidth(a,e,b),c={indexes:{i:a,j:e,realIndex:b,translationsIndex:y,bc:h},strokeWidth:r,x:i,y:o,elSeries:m,columnGroupIndex:p,seriesGroup:s.labelData.seriesGroups[g]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},c),{zeroW:S,barHeight:L,yDivision:P})),D=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},c),{xDivision:I,barWidth:D,zeroH:A})),L=this.series[a][e]/this.yRatio[y]);const H=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:L,barWidth:D});H&&C.add(H),o=w.y,i=w.x,x.push(i),f.push(o);const k=this.barHelpers.getPathFillColor(t,a,e,b);let R="";const W=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",X="bottom"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]>0||"top"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]<0,F=d&&!X&&this.getPreviousFlip(b,e);(X||F)&&(R=W),F&&(R+=" apexcharts-flip-held",u=!0),m=this.renderSeries(l(n({realIndex:b,pathFill:k.color},k.useRangeColor?{lineFill:k.color}:{}),{j:e,i:a,columnGroupIndex:p,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:r,elSeries:m,x:i,y:o,series:t,barHeight:L,barWidth:D,elDataLabelsWrap:v,elGoalsMarkers:C,type:"bar",visibleSeries:p,classes:R}))}s.globals.seriesXvalues[b]=x,s.globals.seriesYvalues[b]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),r.add(m)}return u&&this.settleHeldMirrors(),r}settleHeldMirrors(){const t=this.w;if(!W.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&c.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}initialPositions(t,e,s,a,r,i,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,i=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),r=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:r,zeroW:i}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,c,u,b,g;const p=this.w,x=i+o*e;let f;const y=t.i,m=t.j,v=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][m];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][m]<0?t=(null==(d=this.series[y])?void 0:d[m])>=0?this.groupCtx.prevX[I-1][m]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][m]:this.groupCtx.prevXVal[I-1][m]>=0&&(t=(null==(c=this.series[y])?void 0:c[m])>=0?this.groupCtx.prevX[I-1][m]:this.groupCtx.prevX[I-1][m]-w+2*(this.isReversed?w:0)),f=t}else f=a;r=null===(null==(u=this.series[y])?void 0:u[m])?f:f+(null==(b=this.series[y])?void 0:b[m])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[y])?void 0:g[m])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:y,j:m,w:p});return this.barHelpers.barBackground({j:m,i:y,y1:x,y2:e,elSeries:h}),i+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,v,m,C),barXPosition:f,barYPosition:x,x:r,y:i}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,c,u,b,g,p,x,f;const y=this.w,m=t.i,v=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(y.axisFlags.isXNumeric){let t=y.seriesData.seriesX[w][v];t||(t=0),e=(t-y.globals.minX)/this.xRatio-r/2*y.globals.barGroups.length}const P=e+o*r;let A,S=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)S+=isNaN(this.groupCtx.prevYF[t][v])?0:this.groupCtx.prevYF[t][v];const L=this.groupCtx.prevY.length;if(L>0&&!y.axisFlags.isXNumeric||L>0&&y.axisFlags.isXNumeric&&y.seriesData.seriesX[w-1][v]===y.seriesData.seriesX[w][v]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[v])){e=this.groupCtx.prevY[L-t][v];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[L-a])?void 0:d[v])<0){t=(null==(c=this.series[m])?void 0:c[v])>=0?e-S+2*(this.isReversed?S:0):e;break}if((null==(u=this.groupCtx.prevYVal[L-a])?void 0:u[v])>=0){t=(null==(b=this.series[m])?void 0:b[v])>=0?e:e+S-2*(this.isReversed?S:0);break}}void 0===t&&(t=y.layout.gridHeight),A=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?i:t}else A=i;s=(null==(p=this.series[m])?void 0:p[v])?A-(null==(x=this.series[m])?void 0:x[v])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[m])?void 0:f[v])/this.yRatio[I]:0):A;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:r,y1:A,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:m,j:v,w:y});return this.barHelpers.barBackground({bc:C,j:v,i:m,x1:P,x2:r,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,i,w,v,0),barXPosition:P,x:y.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends ${draw(t,e){var s,a,r,i,o,l,h,d,u;const b=this.w,g=new D(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=b.rangeData.seriesRangeStart,this.seriesRangeEnd=b.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let x=0;x<t.length;x++){let f,y;const m=b.globals.comboCharts?e[x]:x,{columnGroupIndex:v}=this.barHelpers.getGroupIndex(m),C=g.group({class:"apexcharts-series",seriesName:c.escapeString(b.seriesData.seriesNames[m]),rel:x+1,"data:realIndex":m});B.addCollapsedClassToSeries(this.w,C,m),t[x].length>0&&(this.visibleI=this.visibleI+1);let w=0;this.yRatio.length>1&&(this.yaxisIndex=b.globals.seriesYAxisReverseMap[m][0],w=m);const I=this.barHelpers.initialPositions(m),{y:P,zeroW:A,x:S,zeroH:L}=I;let D=null!=(s=I.barWidth)?s:0,H=null!=(a=I.barHeight)?a:0;const k=null!=(r=I.yDivision)?r:0,R=null!=(i=I.xDivision)?i:0;y=P,f=S;const W=g.group({class:"apexcharts-datalabels","data:realIndex":m}),X=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<b.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(x,e,m),a=this.seriesRangeStart[x][e],r=this.seriesRangeEnd[x][e];let i=null,c=null,g=null;const p={x:f,y:y,strokeWidth:s,elSeries:C};let P=this.seriesLen;if(b.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=b.config.series[x].data)?void 0:o[e]))break;if(this.isHorizontal){g=y+H*this.visibleI;const t=(k-H*P)/2;if(null==(h=null==(l=b.config.series[x].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:g,srty:t,barHeight:H,yDivision:k,initPositions:I});H=s.barHeight,g=s.barYPosition}i=this.drawRangeBarPaths(n({indexes:{i:x,j:e,realIndex:m},barHeight:H,barYPosition:g,zeroW:A,yDivision:k,y1:a,y2:r},p)),D=i.barWidth}else{b.axisFlags.isXNumeric&&(f=(b.seriesData.seriesX[x][e]-b.globals.minX)/this.xRatio-D/2),c=f+D*this.visibleI;const t=(R-D*P)/2;if(null==(u=null==(d=b.config.series[x].data)?void 0:d[e])?void 0:u.x){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:c,srtx:t,barWidth:D,xDivision:R,initPositions:I});D=s.barWidth,c=s.barXPosition}i=this.drawRangeColumnPaths(n({indexes:{i:x,j:e,realIndex:m,translationsIndex:w},barWidth:D,barXPosition:c,zeroH:L,xDivision:R},p)),H=i.barHeight}const S=this.barHelpers.drawGoalLine({barXPosition:i.barXPosition,barYPosition:g,goalX:i.goalX,goalY:i.goalY,barHeight:H,barWidth:D});S&&X.add(S),y=i.y,f=i.x;const F=this.barHelpers.getPathFillColor(t,x,e,m);this.renderSeries({realIndex:m,pathFill:F.color,lineFill:F.useRangeColor?F.color:b.globals.stroke.colors[m],j:e,i:x,x:f,y:y,y1:a,y2:r,pathFrom:i.pathFrom,pathTo:i.pathTo,strokeWidth:s,elSeries:C,series:t,barHeight:H,barWidth:D,barXPosition:c,barYPosition:g,columnGroupIndex:v,elDataLabelsWrap:W,elGoalsMarkers:X,visibleSeries:this.visibleI,type:"rangebar"})}p.add(C)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:r,srtx:i,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var c,u,b,g;const p=this.w;let x=[];const f=null==(u=null==(c=p.globals.seriesRangeName)?void 0:c[t])?void 0:u[e],y=null==(g=null==(b=p.config.series[t].data)?void 0:b[e])?void 0:g.x,m=Array.isArray(y)?y.join(" "):y,v=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(m),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===m&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?r+l*v:r+o*this.visibleI+l*v,C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(s=(o=d.barHeight/x.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+x.indexOf(f))+l*v))):(v>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?i+h*v:i+n*this.visibleI+h*v),C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(a=(n=d.barWidth/x.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(f))+h*v))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:r,zeroH:i}){var o,n;const l=this.w,{i:h,j:d,realIndex:c,translationsIndex:u}=t,b=this.yRatio[u],g=this.getRangeValue(c,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=i-p/b,x=i-x/b):p=i;const y=Math.abs(x-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:d,w:l});if(f){const t=m.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(c,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:c,barWidth:a});e=t.x,r=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,i,c,d,u),barXPosition:r}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:r,barHeight:i,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,c=this.preventBarOverflow(n+s/this.invertedYRatio),u=this.preventBarOverflow(n+a/this.invertedYRatio),b=this.getRangeValue(h,d),g=Math.abs(u-c),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:i,x1:c,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=b.start&&null!=b.end){const t=p.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=r),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:b.start<0&&b.end<0?c:u,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
5
+ "use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))r.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))i.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_Utils,u="__apexcharts_series_transforms__";function b(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[u][t]=e)}globalThis[u]||(globalThis[u]={});const g="__apexcharts_row_sources__";function p(t,e){t&&"string"==typeof t&&"function"==typeof e&&(globalThis[g][t]=e)}globalThis[g]||(globalThis[g]={});function x(t,e){const s=t.length;if(0===s)return NaN;if(1===s)return t[0];const a=(s-1)*e,r=Math.floor(a),i=Math.ceil(a);return r===i?t[r]:t[r]+(t[i]-t[r])*(a-r)}function f(t){const e=t.length;if(e<2)return 0;let s=0;for(let a=0;a<e;a++)s+=t[a];const a=s/e;let r=0;for(let s=0;s<e;s++){const e=t[s]-a;r+=e*e}return Math.sqrt(r/e)}function y(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e);let a=s[0],r=s[s.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);isFinite(t)&&isFinite(e)&&e>t&&(a=t,r=e)}if(!(r>a)){const t=Math.abs(a)>0?.05*Math.abs(a):.5;return{edges:[a-t,a+t],binWidth:2*t,rule:"single",capped:!1}}const o=r-a;let n,l;if("number"==typeof e.binWidth&&e.binWidth>0)n=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)n=o/Math.floor(e.bins),l="count";else{const t=function(t,e,s){const a=t.length,r=t=>e/Math.max(1,Math.ceil(t));switch(s){case"sqrt":return{width:r(Math.sqrt(a)),rule:"sqrt"};case"rice":return{width:r(2*Math.cbrt(a)),rule:"rice"};case"scott":{const e=f(t);return e>0?{width:3.49*e*Math.pow(a,-1/3),rule:"scott"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"fd":{const e=x(t,.75)-x(t,.25);return e>0?{width:2*e*Math.pow(a,-1/3),rule:"fd"}:{width:r(Math.log2(a)+1),rule:"sturges"}}case"auto":{const e=r(Math.log2(a)+1),s=x(t,.75)-x(t,.25);if(s<=0)return{width:e,rule:"sturges"};const i=2*s*Math.pow(a,-1/3);return i<e?{width:i,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:r(Math.log2(a)+1),rule:"sturges"}}}(s,o,"string"==typeof e.bins?e.bins:"auto");n=t.width,l=t.rule}(!isFinite(n)||n<=0)&&(n=o);let h=Math.ceil(o/n);(!isFinite(h)||h<1)&&(h=1);let d=!1;h>1e3&&(h=1e3,n=o/h,d=!0),n=o/h;const c=new Array(h+1);for(let t=0;t<=h;t++)c[t]=a+t*n;return c[h]=Math.max(c[h],r),{edges:c,binWidth:n,rule:l,capped:d}}function m(t,e){const s=e.length-1;if(!(t>=e[0])||t>e[s])return-1;if(t===e[s])return s-1;const a=(e[s]-e[0])/s;if(a>0){let r=Math.floor((t-e[0])/a);return r<0&&(r=0),r>s-1&&(r=s-1),t<e[r]?r--:t>=e[r+1]&&r++,r<0||r>s-1?-1:r}let r=0,i=s-1;for(;r<=i;){const s=r+i>>1;if(t<e[s])i=s-1;else{if(!(t>=e[s+1]))return s;r=s+1}}return-1}function v(t,e){var s;if(!t||"object"!=typeof t||Array.isArray(t))return null;let a=null;if(Array.isArray(t.points)?a=t.points:Array.isArray(null==(s=t.y)?void 0:s.points)?a=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(a=t.y),!a)return null;const r=[];for(let t=0;t<a.length;t++){const e=c.parseNumber(a[t]);null!==e&&isFinite(e)&&r.push(e)}return r.length?r:null}function C(t){const e=[];if(!Array.isArray(t))return e;for(let s=0;s<t.length;s++){const a=t[s];let r=a;Array.isArray(a)?r=1===a.length?a[0]:a[1]:a&&"object"==typeof a&&(r=void 0!==a.y?a.y:a.x);const i=c.parseNumber(r);null!==i&&isFinite(i)&&e.push(i)}return e}const w=new WeakSet;function I(t,e,s){const a=s&&null!=s.maxRows?s.maxRows:3e3,r=function(t,e){let s=0,a=0;for(const e of t)s+=e.length,e.length>a&&(a=e.length);if(s<=e)return{clusters:t,stride:1,total:s,kept:s};const r=e=>{let s=0;for(const a of t)s+=Math.ceil(a.length/e);return s};let i=Math.max(2,Math.ceil(s/e));for(;i<a&&r(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let s=0;s<t.length;s+=i)e.push(t[s]);return o+=e.length,e}),stride:i,total:s,kept:o}}(e.map(t=>t.rows),a);r.stride;const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const s=i[t.realIndex]||i[0];return{name:t.name,data:r.clusters[e].map((a,r)=>n({id:`${t.realIndex}:${e}:${r}`,x:t.name,y:a},s?{fillColor:s}:{}))}})}function P(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function A(t){return(e,s)=>{var a;const r=t(e);if(!Array.isArray(r)||!r.length)return null;const i=e.globals&&e.globals.collapsedSeriesIndices||[],o=e.globals&&((null==(a=e.globals.categoryLabels)?void 0:a.length)?e.globals.categoryLabels:e.globals.labels)||[],n=[];return r.forEach((t,s)=>{var a;if(-1!==i.indexOf(s))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(a=e.seriesData.seriesNames)?void 0:a[s]);t.forEach((t,e)=>{const a=null!=o[e]?String(o[e]):`#${e+1}`;n.push({name:r.length>1&&l?`${l} ${a}`:a,realIndex:s,rows:Array.isArray(t)?t.slice():[]})})}),n.length?I(e,n,s):null}}const S=A(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),L=A(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});b("histogram",function(t,e){var s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.histogramRawSeries||(r.histogramRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const i=r.histogramRawSeries,o=(null==(s=a.plotOptions)?void 0:s.histogram)||{},h=i.map(t=>C(null==t?void 0:t.data));let d=[];if(1===h.length)d=h[0];else for(const t of h)d=d.concat(t);const c=y(d,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!c)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:u,binWidth:b}=c,g=h.map(t=>function(t,e){const s=new Array(Math.max(0,e.length-1)).fill(0);for(let a=0;a<t.length;a++){const r=m(t[a],e);r>=0&&s[r]++}return s}(t,u));e.histogramData={edges:u,binWidth:b,counts:g,rule:c.rule,capped:c.capped};const p=r.collapsedSeriesIndices||[];return i.map((t,e)=>{if(-1!==p.indexOf(e))return l(n({},t),{data:[]});const s=function(t,e={}){let s=t.slice();if(e.cumulative){let t=0;s=s.map(e=>t+=e)}const a=t.reduce((t,e)=>t+e,0);if(a<=0)return s;if("relative"===e.normalize)return s.map(t=>t/a*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return s.map(e=>e/(a*t))}return s}(g[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:b}),a=[];for(let t=0;t<s.length;t++)a.push({x:(u[t]+u[t+1])/2,y:s[t]});return l(n({},t),{data:a})})}),b("boxPlot",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.boxPlot)?void 0:a.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!w.has(t))return t;const s=v(t,!1);if(!s)return t;const a=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=x(s,.25),r=x(s,.5),i=x(s,.75),o=i-a;let n=s[0],l=s[s.length-1],h=[];if("tukey"===e.whiskers&&o>0){const t=a-1.5*o,e=i+1.5*o;let r=0;for(;r<s.length&&s[r]<t;)r++;let d=s.length-1;for(;d>=0&&s[d]>e;)d--;r<=d&&(n=s[r],l=s[d],h=s.slice(0,r).concat(s.slice(d+1)))}return{summary:[n,a,r,i,l],outliers:h,iqr:o}}(s,{whiskers:r});if(!a)return t;e=!0;const i=l(n({},t),{y:a.summary,points:s});return w.add(i),i});return e?l(n({},t),{data:s}):t})}),b("violin",function(t,e){var s,a;if(!Array.isArray(t))return t;const r=(null==(a=null==(s=e.config.plotOptions)?void 0:s.violin)?void 0:a.kde)||{};return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const s=t.data.map(t=>{var s;if(Array.isArray(null==(s=null==t?void 0:t.y)?void 0:s.density)&&t.y.density.length&&!w.has(t))return t;const a=v(t,!0);if(!a)return t;const i=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const s=t.slice().sort((t,e)=>t-e),a=s.length;let r=e.bandwidth;if(!("number"==typeof r&&r>0)){const t=f(s),e=x(s,.75)-x(s,.25);r=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(a,-.2)}if(!isFinite(r)||r<=0){const t=s[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=s[0]-2*r,n=(s[a-1]+2*r-o)/(i-1),l=1/(a*r*Math.sqrt(2*Math.PI)),h=[];for(let t=0;t<i;t++){const e=o+t*n;let i=0;for(let t=0;t<a;t++){const a=(e-s[t])/r;i+=Math.exp(-.5*a*a)}h.push([e,i*l])}return{density:h,bandwidth:r}}(a,{bandwidth:r.bandwidth,resolution:r.resolution});if(!i)return t;e=!0;const o=l(n({},t),{y:{density:i.density,points:a}});return w.add(o),o});return e?l(n({},t),{data:s}):t})}),p("histogram",function(t,e){const s=t.globals,a=t.histogramData,r=s&&s.histogramRawSeries;if(!a||!Array.isArray(a.edges)||a.edges.length<2)return null;if(!Array.isArray(r)||!r.length)return null;const i=s&&s.collapsedSeriesIndices||[],o=a.edges,n=[];return r.forEach((e,s)=>{var a;if(-1!==i.indexOf(s))return;const l=function(t,e){const s=Math.max(0,e.length-1),a=new Array(s);for(let t=0;t<s;t++)a[t]=[];for(let s=0;s<t.length;s++){const r=m(t[s],e);r>=0&&a[r].push(t[s])}return a}(C(e&&e.data),o),h=t.seriesData&&(null==(a=t.seriesData.seriesNames)?void 0:a[s])||(null==e?void 0:e.name);l.forEach((t,e)=>{const a=`${P(o[e])}-${P(o[e+1])}`;n.push({name:r.length>1&&h?`${h} ${a}`:a,realIndex:s,rows:t})})}),n.length?I(t,n,e):null}),p("boxPlot",S),p("violin",L);const D=d.__apex_Graphics,H=d.__apex_DataLabels,k=(t,e,s,a)=>{if("function"!=typeof t)return t;const r=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(r)?r:0},R=d.__apex_BrowserAPIs_BrowserAPIs,W=d.__apex_Environment_Environment;function X(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(W.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function F(t,e,s){var a,r,i,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(i=null==(r=t.seriesData)?void 0:r.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}function O(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Y(t,e,s=!1,a=!1){var r,i;if(!X(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(r=o.seriesY)?void 0:r[e],l=null==(i=t.seriesData.series)?void 0:i[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=O(n.map((t,s)=>function(t,e,s){var a,r;if(t.isXNumeric){const r=null==(a=t.seriesX)?void 0:a[e];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const i=null==(r=t.labels)?void 0:r[s];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+s}(o,e,s))),d=O(l.map((s,a)=>F(t,e,a))),c=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),r=new Set;let i=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!r.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(r.add(l),l<i&&(o=!1),i=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)r.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function M({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:r,speed:i}){var o;if(!X(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new D(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(s=>{let a=s.fill||d||"#c8c8c8";0===String(a).indexOf("url(")&&(a=d||"#c8c8c8");const o=h.drawPath({d:s.d,stroke:"none",strokeWidth:0,fill:a,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(s.d);let c=r?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=r?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const u=n.style;u.transformBox="fill-box",u.transformOrigin=c;const b=Math.max(1,i||1),g=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-g)/b)),a=1-Math.pow(1-s,3),i=1-a;u.transform=r?`scaleX(${i})`:`scaleY(${i})`,u.opacity=String(1-a),s<1?R.requestAnimationFrame(p):n.parentNode.removeChild(n)};R.requestAnimationFrame(p)})}class T{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s;const{x:a,y:r,y1:i,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:u,barHeight:b,barWidth:g,barXPosition:p,barYPosition:x,visibleSeries:f}=t,y=this.w,m=new D(this.barCtx.w),v=y.waterfallData&&y.waterfallData.values,C=v&&v[c]&&null!=v[c][d]?v[c][d]:null,w=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let I,P;y.axisFlags.isXNumeric&&!y.globals.isBarHorizontal?(I=a+g*(f+1),P=r+b*(f+1)-w):(I=a+g*f,P=r+b*f);let A=null,S=null,L=a,H=r,R={};const W=y.config.dataLabels,X=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==x&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(P=x,H=x),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(I=p,L=p);const O=k(W.offsetX,y,c,d),Y=k(W.offsetY,y,c,d);let M={width:0,height:0};if(y.config.dataLabels.enabled){const t=null!==C?C:y.seriesData.series[c][d];M=m.getTextRects(y.config.dataLabels.formatter?y.config.dataLabels.formatter(t,l(n({},y),{seriesIndex:c,dataPointIndex:d,w:y})):y.formatters.yLabelFormatters[0](t),parseFloat(W.style.fontSize).toString(),W.style.fontFamily,void 0,!0,W.style.fontWeight)}const T={x:a,y:r,i:h,j:d,realIndex:c,columnGroupIndex:u,bcx:I,bcy:P,barHeight:b,barWidth:g,textRects:M,strokeWidth:w,dataLabelsX:L,dataLabelsY:H,dataLabelsConfig:W,barDataLabelsConfig:X,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(R=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==C&&this.barCtx.isHorizontal&&"center"===X.position){const t=null==(s=null==(e=y.waterfallData.geometry)?void 0:e[c])?void 0:s[d];t&&t.horizontal&&(R.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return A=this.drawCalculatedDataLabels({x:R.dataLabelsX,y:R.dataLabelsY,val:null!==C?C:this.barCtx.isRangeBar?[i,o]:"100%"===y.config.chart.stackType?y.globals.seriesPercent[c][d]:y.seriesData.series[c][d],i:c,j:d,barWidth:g,barHeight:b,textRects:M,dataLabelsConfig:W}),y.config.chart.stacked&&F.enabled&&(S=this.drawTotalDataLabels({x:R.totalDataLabelsX,y:R.totalDataLabelsY,barWidth:g,barHeight:b,realIndex:c,j:d,textAnchor:R.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:W,barTotalDataLabelsConfig:F})),{dataLabelsPos:R,dataLabels:A,totalDataLabels:S}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,a=this.getTotalGroupContext(t),r=s.seriesData.stackedSeriesTotalsByGroups;return a&&r&&r[a.groupIndex]?r[a.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,a,{i:r,j:i,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:u,dataLabelsY:b,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,strokeWidth:f,offX:y,offY:m}=t;const v=l;d=Math.abs(d);const C="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});l-=f/2;const I=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+y:l-I+h/2+y,!e.config.chart.stacked&&w>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*w)),C){const t=2;u=u+c.height/2-f/2-t}const P=e.seriesData.series[r][i]<0;let A=n;switch(this.barCtx.isReversed&&(A=n+(P?d:-d)),p.position){case"center":b=C?P?A-d/2+m:A+d/2-m:P?A-d/2+c.height/2+m:A+d/2+c.height/2-m;break;case"bottom":b=C?P?A-d+m:A+d-m:P?A-d+c.height+f+m:A+d-c.height/2+f-m;break;case"top":b=C?P?A+m:A-m:P?A-c.height/2-m:A+c.height+m}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{S=P?Math.max(t[i],S):Math.min(t[i],S)})}),this.drawsStackedTotal(o)&&x.enabled){const t=18,r=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),g.fontSize);s=P?S-r.height/2-m-x.offsetY+t:S+r.height+m+x.offsetY-t;const n=I;a=v+(e.axisFlags.isXNumeric?-h/2:h/2-n)+x.offsetX}return e.config.chart.stacked||(b<0?b=0+f:b+c.height/3>e.layout.gridHeight&&(b=e.layout.gridHeight-f)),{bcx:l,bcy:n,dataLabelsX:u,dataLabelsY:b,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:r,j:i,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:u,dataLabelsConfig:b,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:x,offY:f}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});let v,C,w;if(h=Math.abs(h),this.barCtx.isPyramid){v=n+l/2+f-(null!=(e=d.centerOffset)?e:0)}else v=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+f-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=l*m);let I="start";const P=s.seriesData.series[r][i]<0;let A=a;if(this.barCtx.isReversed&&(A=a+(P?-h:h),I=P?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+x;else switch(g.position){case"center":c=P?A+h/2-x:Math.max(d.width/2,A-h/2)+x;break;case"bottom":c=P?A+h-u-x:A-h+u+x;break;case"top":c=P?A-u-x:A-u+x}let S=A;const L=this.getTotalGroupContext(o);if((L?[L.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{S=P?Math.min(t[i],S):Math.max(t[i],S)})}),this.drawsStackedTotal(o)&&p.enabled){const t=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),b.fontSize);P?(C=S-u-x-p.offsetX,I="end"):C=S+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),w=v-d.height/2+t.height/2+p.offsetY+u,s.globals.barGroups.length>1&&!L&&(w-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=P&&"middle"!==b.textAnchor?"start"===b.textAnchor?"end":"start":b.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===g.orientation?d.height:d.width)-e;c+a>s.layout.gridWidth-u&&(c=s.layout.gridWidth-a-u),c-e<u&&(c=e+u)}return{bcx:a,bcy:n,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:C,totalDataLabelsY:w,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:r,textRects:i,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,u,b;const g=this.w;let p="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(p=`rotate(-90, ${t}, ${e})`);const x=new H(this.barCtx.w,this.barCtx.ctx),f=new D(this.barCtx.w),y=d.formatter;let m=null;const v=g.globals.collapsedSeriesIndices.indexOf(a)>-1,C=(g.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(C){const t=null==(c=g.globals.prevDataLabels)?void 0:c.get(`${a}::${F(g,a,r)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!v||C)){m=f.group({class:"apexcharts-data-labels",transform:p});const c=g.config.dataLabels;((null==(u=c.animate)?void 0:u.enabled)||(null==(b=c.countUp)?void 0:b.enabled))&&(m.node.setAttribute("data:dlKey",`${a}::${F(g,a,r)}`),m.node.setAttribute("data:dlJ",String(r)),"number"==typeof s&&isFinite(s)&&m.node.setAttribute("data:dlVal",String(s)));let v="";void 0!==s&&(v=y(s,l(n({},g),{seriesIndex:a,dataPointIndex:r,w:g}))),!s&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v="");const w=g.seriesData.series[a][r]<0,I=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=w?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=w?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<f.getTextRects(v,parseFloat(d.style.fontSize).toString()).width&&(v="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!C&&(this.barCtx.isHorizontal?i.width/1.6>Math.abs(h)&&(v=""):i.height/1.6>Math.abs(o)&&(v=""));const P=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?P.textAnchor="end":"end"===d.textAnchor&&(P.textAnchor="start")),x.plotDataLabelsText({x:t,y:e,text:v,i:a,j:r,parent:m,dataLabelsConfig:P,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:r,j:i,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new D(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(r)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(r);c.node.setAttribute("data:dlTotalKey",`${t}::${F(this.w,r,i)}`),c.node.setAttribute("data:dlTotalSeries",String(r)),"number"==typeof a&&isFinite(a)&&c.node.setAttribute("data:dlTotalVal",String(a))}}return c}}const B=d.__apex_Series,j=d.__apex_Fill;function z(t){var e,s,a,r,i,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(r=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:r.overlap)&&(null!=(n=null==(o=null==(i=t.seriesData)?void 0:i.series)?void 0:o.length)?n:0)>1)}class G{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let a=0;a<t[s].length;a++)e.seriesData.seriesX[s][a]>e.globals.minX&&e.seriesData.seriesX[s][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),c.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let s=0;s<t.length;s++){const a=t[s];Array.isArray(a)&&a.length>0&&e.push(a)}if(!e.length)return 0;const s=new Array(e.length).fill(0);let a=NaN,r=1/0;for(;;){let t=1/0,i=-1;for(let a=0;a<e.length;a++){const r=e[a];for(;s[a]<r.length&&"number"!=typeof r[s[a]];)s[a]++;if(s[a]>=r.length)continue;const o=r[s[a]];o==o?o<t&&(t=o,i=a):(s[a]++,a--)}if(-1===i)break;if(s[i]++,a==a){const e=t-a;e>0&&e<r&&(r=e)}a=t}return isFinite(r)?r:0}initialPositions(t){const e=this.w;let s,a,r,i,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let u=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||z(e))&&(u=1),this.barCtx.isHorizontal)r=e.layout.gridHeight/d,o=r/u,e.axisFlags.isXNumeric&&(r=e.layout.gridHeight/this.barCtx.totalItems,o=r/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(r-o*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(i=e/t),n=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+c.noExponents(i-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:r,xDivision:i,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,a){var r;const i=this.w,o=new j(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(r=i.config.series[e].data[s])?void 0:r.fill),c=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:u,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(i.config.fill.type)?i.config.fill.type[a]:i.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const r=s.config.plotOptions.bar.dumbbell.connector;if(r.color)return null;const i=a.order[e];if(!i)return null;const o=s.globals.colors[i[0]],n=s.globals.colors[i[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:r.opacity,opacityTo:r.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===r.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,r=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(r);return e.length?[e]:[]}const i=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!r(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?i[t].push(e):o.push(e)}return o.length&&i.push(o),i.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const s=this.w,a=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,r=t.length,i=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:r},()=>Array(i).fill(a?"top":"none"));if(a)return o;const n="last"===s.config.plotOptions.bar.borderRadiusWhenStacked,l=n?"top":"both",h=n?"bottom":"both",d=n?"none":"bottom",c=n?"none":"top";for(const e of this.getStackedSeriesIndices(r))for(let s=0;s<i;s++){const a=[],r=[];for(const i of e){const e=t[i][s];e>0?a.push(i):e<0&&r.push(i)}if(a.length>0&&0===r.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const r of a)o[r][s]=r===t?d:r===e?"top":"none"}else if(r.length>0&&0===a.length)if(1===r.length)o[r[0]][s]=h;else{const t=Math.min(...r),e=Math.max(...r);for(const a of r)o[a][s]=a===t?c:a===e?"bottom":"none"}else if(a.length>0&&r.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...r);for(const t of r)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:r,y2:i,elSeries:o}){const n=this.w,l=new D(this.barCtx.w),h=new B(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==r?r:0,void 0!==a?a:n.layout.gridWidth,void 0!==i?i:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.columnWidthOffset)&&(f=e-c.config.series[l].data[d].columnWidthOffset/2,x=t+c.config.series[l].data[d].columnWidthOffset);const y=r/2,m=f+y,v=f+x-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001-y*C,a+=.001+y*C;const w=p.line(v,s),I="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",P=p.move(m,s)+p.line(m,a)+p.line(v,a)+w+I;let A=P;"none"!==this.arrBorderRadius[l][d]&&(A=p.roundPathCorners(A,c.config.plotOptions.bar.borderRadius));let S=null;const L=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(L?S=L:c.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(l,d,A,P)),null==S&&(S=p.move(m,s)+p.line(m,s)+w+w+w+w+w+p.line(m,s)+I),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*C),t.yArrjF.push(Math.abs(s-a+r*C)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:A,pathFrom:S,drawnBox:{x1:m,x2:v,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:r,realIndex:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,b=u(s[a][r]),g=r===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let x;x=g?"taper"===p?0:b:u(s[a][r+1]);const f=o/2,y=t+f,m=t+e-f,v=c-b,C=c+b,w=c-x,I=c+x,P=d.move(v,y)+d.line(C,y)+d.line(I,m)+d.line(w,m)+" Z";let A=null;const S=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return S?A=S:n.globals.previousPaths.length>0&&(A=this.barCtx.getPreviousPath(i,r,P)),null==A&&(A=d.move(c,y)+d.line(c,y)+d.line(c,m)+d.line(c,m)+" Z"),{pathTo:P,pathFrom:A,x:C,x1:v,barXPosition:c}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,r=t.map(t=>Math.abs(Number(t)||0)),i=r.reduce((t,e)=>t+e,0);if(0===i||s<=0)return r.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<r.length;t++){const e=n/i;n+=r[t];const a=n/i,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:r,j:i,strokeWidth:o,w:n}){var l,h;const d=new D(this.barCtx.w),c=n.layout.gridWidth/2,u=o/2,b=t+u,g=t+e-u,p=c-s,x=c+s,f=c-a,y=c+a,m=d.move(p,b)+d.line(x,b)+d.line(y,g)+d.line(f,g)+" Z";let v=null;const C=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return C?v=C:n.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(r,i,m)),null==v&&(v=d.move(c,b)+d.line(c,b)+d.line(c,g)+d.line(c,g)+" Z"),{pathTo:m,pathFrom:v,x:x,x1:p,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:r,isReversed:i,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var u,b,g;const p=new D(this.barCtx.w);(r=Array.isArray(r)?r[l]:r)||(r=0);let x=t,f=e;(null==(u=c.config.series[l].data[d])?void 0:u.barHeightOffset)&&(x=t-c.config.series[l].data[d].barHeightOffset/2,f=e+c.config.series[l].data[d].barHeightOffset);const y=r/2,m=x+y,v=x+f-y,C=(o[h][d]>=0?1:-1)*(i?-1:1);s+=.001+y*C,a+=.001-y*C;const w=this.barCtx.isFunnel,I=w?(s+a)/2:s,P=p.line(s,v),A="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=p.move(s,m)+p.line(a,m)+p.line(a,v)+P+A;let L=S;"none"!==this.arrBorderRadius[l][d]&&(L=p.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let H=null;const k=null==(g=null==(b=this.barCtx.ctx)?void 0:b.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(k?H=k:c.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(l,d,L,S)),null==H){const t=w?p.line(I,v):P;H=p.move(I,m)+p.line(I,m)+t+t+t+t+t+p.line(I,m)+A}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*C),t.xArrjF.push(Math.abs(s-a-r*C)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:H,drawnBox:{x1:s,x2:a,y1:m,y2:v}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let r=a?e:null;return null!=t&&(r=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),r}getGoalValues(t,e,s,a,r,i){const o=this.w,h=[],d=(a,r)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,i,!1),attrs:r})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][r]&&Array.isArray(o.seriesData.seriesGoals[a][r])&&o.seriesData.seriesGoals[a][r].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,r);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let i=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[i].value&&(i=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!c.enabled||e!==i&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,r,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===i&&i!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],r=s.dumbbellData;if(r&&"series"===r.form){const t=r.values[e]||[];for(let e=0;e<t.length;e++){const i=t[e];null!==i&&-1===r.hidden.indexOf(e)&&a.push({value:i,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const i=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(i[t])?i[t][e]:i[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const r=this.w,i=r.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof i.formatter)return i.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:r});const o=this.barCtx.isHorizontal?r.formatters.xLabelFormatter:r.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,r):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:r,barHeight:i}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new D(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:i/2,a=e+s+i/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+s+r/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new D(s),r=s.config.plotOptions.bar.dumbbell.dataLabels,i=e.markerSize/2+r.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?i*o:0),y:e.y-(e.horizontal?0:i*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:r}){const i=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:u}=e,b=l+e.barHeight,g=new D(this.barCtx.w),p=new c,x=g.move(n,b)+g.line(o,b)+g.line(h,u)+g.line(d,u)+g.line(n,b)+("around"===i.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][r]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,c.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let r=0,i=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.globals.seriesPercent[s][e];o&&r++,s<t&&0===o&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),a=this.barCtx.columnGroupIndices;let r=a.indexOf(s);return r<0&&(a.push(s),r=a.length-1),{groupIndex:s,columnGroupIndex:r}}}const _=d.__apex_CoreUtils,N=d.__apex_Filters,V=d.__apex_Animations_computeStagger;class E{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/E.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*E.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const r=a.getBoundingClientRect(),i=t.globals.svgWidth?r.width/t.globals.svgWidth:1;return(e-r.left)/(i||1)-t.layout.translateX}}class ${constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new B(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const r=a.getBarSeriesIndices(),i=new _(this.w);this.stackedSeriesTotals=i.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===r.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new G(this)}draw(t,e){var s,a,r;const i=this.w,o=new D(this.w),h=new _(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,u=0;h<t.length;h++,u++){let b,g;const p=[],x=[],f=i.globals.comboCharts?e[h]:h,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(f),m=o.group({class:"apexcharts-series",rel:h+1,seriesName:c.escapeString(i.seriesData.seriesNames[f]),"data:realIndex":f});B.addCollapsedClassToSeries(this.w,m,f),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f],this.translationsIndex=f);const v=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const C=this.barHelpers.initialPositions(f),{y:w,yDivision:I,zeroW:P,x:A,xDivision:S,zeroH:L}=C;let D=C.barHeight,H=C.barWidth;g=w,b=A,this.isHorizontal||x.push(b+(null!=H?H:0)/2);const k=o.group({class:"apexcharts-datalabels","data:realIndex":f});i.globals.delayedElements.push({el:k.node,holdUntilComplete:!(null==(s=i.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(f)}),k.node.classList.add("apexcharts-element-hidden");const R=o.group({class:"apexcharts-bar-goals-markers"}),W=o.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:W.node}),W.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,f);let o=null;const d={indexes:{i:h,j:e,realIndex:f,translationsIndex:v,bc:u},x:b,y:g,strokeWidth:s,elSeries:m};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:D,zeroW:P,yDivision:I})),H=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:S,barWidth:H,zeroH:L})),D=this.series[h][e]/this.yRatio[v]);const C=this.barHelpers.getPathFillColor(t,h,e,f);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=i.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof C.color&&-1===(null==(r=C.color)?void 0:r.indexOf("url"))?C.color:c.hexToRgba(i.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:f,j:e});if(W.add(t),i.config.chart.dropShadow.enabled){new N(this.w).dropShadow(t,i.config.chart.dropShadow,f)}}this.pathArr.push(o);const w=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:D,barWidth:H});w&&R.add(w),g=o.y,b=o.x,e>0&&x.push(b+(null!=H?H:0)/2),p.push(g),this.renderSeries(l(n({realIndex:f,pathFill:C.color},C.useRangeColor?{lineFill:C.color}:{}),{j:e,i:h,columnGroupIndex:y,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:m,x:b,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:D),barWidth:Math.abs(o.barWidth?o.barWidth:H),elDataLabelsWrap:k,elGoalsMarkers:R,elBarShadows:W,visibleSeries:this.visibleI,type:"bar"}))}if(i.globals.seriesXvalues[f]=x,i.globals.seriesYvalues[f]=p,i.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(F(i,f,s));M({w:i,elSeries:m,record:this._prevRecord(f),newKeys:e,isHorizontal:this.isHorizontal,speed:i.config.chart.animations.dynamicAnimation.speed})}d.add(m)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:r,columnGroupIndex:i,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:u,y2:b,series:g,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,elDataLabelsWrap:m,elGoalsMarkers:v,elBarShadows:C,visibleSeries:w,type:I,classes:P}){var A,S,L,H,k,R,W;const X=this.w,O=new D(this.w,this.ctx),Y=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,O);let M=!1;const B=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,O.setupEventDelegation(h,`.apexcharts-${I}-area`)),!s){let e=function(t){const e=X.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:X.seriesData.series[t][a],dataPointIndex:a,w:X}):s};const r="function"==typeof X.globals.stroke.colors[t]?e(t):X.globals.stroke.colors[t];s=this.barOptions.distributed?X.globals.stroke.colors[a]:r}const j=X.config.chart.animations,z=j.animateGradually;let G=0,_=0;if(z&&!1!==z.enabled&&!(X.globals.dataChanged&&this.isLayoutShift(t))){const t=X.globals.dataPoints||1,e=z.delay||0,s=Math.min(e,.5*j.speed/Math.max(1,t));_=V({style:"sequential",index:a,baseDelay:s}),X.config.chart.stacked&&!X.globals.dataChanged&&(_+=r*s*.5);G=_/(e||1)}const E=new T(this).handleBarDataLabels({x:d,y:c,y1:u,y2:b,i:r,j:a,series:g,realIndex:t,columnGroupIndex:i,barHeight:p,barWidth:x,barXPosition:f,barYPosition:y,visibleSeries:w});if(_>0){const t=X.config.dataLabels;if((null==(A=t.animate)?void 0:A.enabled)||(null==(S=t.countUp)?void 0:S.enabled)){const t=String(Math.round(_));null==(H=null==(L=E.dataLabels)?void 0:L.node)||H.setAttribute("data:dlDelay",t),null==(R=null==(k=E.totalDataLabels)?void 0:k.node)||R.setAttribute("data:dlDelay",t)}}if(X.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(x,X.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(x,X.globals.barPadForNumericAxis)>X.layout.gridWidth)&&(M=!0),X.config.series[r].data[a]&&X.config.series[r].data[a].strokeColor&&(s=X.config.series[r].data[a].strokeColor),this.isNullValue&&-1===X.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!M){const i=!0===(null==(W=this.ctx.morphTypeChange)?void 0:W.isActive()),d=i?this.ctx.morphTypeChange.getSpeed():X.config.chart.animations.dynamicAnimation.speed,c=i&&this.ctx.morphTypeChange.claimsTargetMark(t,a);c&&(o=n,G=0);const g=Y.renderPaths({i:r,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:X.config.stroke.lineCap,fill:e,pathToInterp:B,animationDelay:G,initialSpeed:X.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${I}-area${P?` ${P}`:""}`,chartType:I,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${X.globals.cuid})`),c&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const f=X.config.forecastDataPoints;f.count>0&&a>=X.globals.dataPoints-f.count&&(g.node.setAttribute("stroke-dasharray",f.dashArray),g.node.setAttribute("stroke-width",f.strokeWidth),g.node.setAttribute("fill-opacity",f.fillOpacity)),void 0!==u&&void 0!==b&&(g.attr("data-range-y1",u),g.attr("data-range-y2",b));new N(this.w).setSelectionFilter(g,t,a),h.add(g),g.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:X.seriesData.series[r][a],barHeight:p,barWidth:x,"data:pathKey":F(X,t,a)}),"canvas"===Y.kind&&(X.globals.barCanvasCoords||(X.globals.barCanvasCoords={}),X.globals.barCanvasCoords[t]||(X.globals.barCanvasCoords[t]={}),X.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:x}),null!==E.dataLabels&&m.add(E.dataLabels),E.totalDataLabels&&m.add(E.totalDataLabels),h.add(m),v&&h.add(v),C&&h.add(C)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.axisFlags.isXNumeric)c=(i=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),c=i+e*this.visibleI,c-=e*s}else c=i+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return r=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(a=p.x1,r=p.x),l.axisFlags.isXNumeric||g||(i+=o),g&&(i=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:r,y:i,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:r});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:c,j:u});t>0&&(r=this.seriesLen*r/t),g=e+r*this.visibleI,g-=r*s}else g=e+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][u],i,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:i,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-r*this.visibleI,x2:r*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,i,h,u,d),barXPosition:g,barWidth:r}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const r=this.w;let i=s;return r.seriesData.seriesX[s].length||(i=r.globals.maxValsInArrayIndex),c.isNumber(r.seriesData.seriesX[i][a])&&(t=E.dataXToPx(r,r.seriesData.seriesX[i][a])-e*this.seriesLen/2),{barXPosition:t+(z(r)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const r=e.globals.previousPaths[a];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&(s=r)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const a=this.w;let r=!1;if(X(a)&&a.globals.previousPaths.length>0){const i=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(i)if(i.paths.length!==o)r=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(F(a,t,s))){r=!0;break}}else r=o>0}return this._ltCache[t]=r,r}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=Y(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const r=this.w;this._pathToInterp=null;const i=this._prevRecord(t);if(!i)return X(r)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(F(r,t,e));s?o=s.d:n=!0}else void 0!==i.paths[e]?o=i.paths[e].d:n=!0;if(o){const t=$.pathCommandCount(o),e=$.pathCommandCount(s);if(t===e)return o;const i=new D(r),n=t=>{const e=$.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(s)>1;if(t<e){const t=i.roundPathCorners(o,0);if($.pathCommandCount(t)===e){if(l&&a){const t=i.roundPathCorners(a,0);$.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=i.roundPathCorners(s,0);if($.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=$.squareLike(o),s=e?i.roundPathCorners(e,0):null;if(s&&$.pathCommandCount(s)===t)return s}return o}}}return n&&X(r)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const r=e.map(t=>t[0]),i=e.map(t=>t[1]);return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...i),maxY:Math.max(...i),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=$.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:r,maxY:i,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,c,u;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[c,u]=l(o[1],r,i)):(c=Math.abs(o[1]-r)<=Math.abs(o[1]-i)?r:i,u=c===r?i:r,[h,d]=l(o[0],s,a));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const r=this._prevKeyedPaths(t),i=r?r.get(F(s,t,e)):a.paths[e];return i?!!i.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}d.default.use({bar:$,column:$,barStacked:class extends ${draw(t,e){const s=this.w;this.graphics=new D(this.w),this.bar=new $(this.w,this.ctx,this.xyRatios);const a=new _(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let i=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let u=!1;for(let a=0,h=0;a<t.length;a++,h++){const b=s.globals.comboCharts?e[a]:a,{groupIndex:g,columnGroupIndex:p}=this.barHelpers.getGroupIndex(b);this.groupCtx=this[s.labelData.seriesGroups[g]];const x=[],f=[];let y=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],y=b),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let m=this.graphics.group({class:"apexcharts-series",seriesName:c.escapeString(s.seriesData.seriesNames[b]),rel:a+1,"data:realIndex":b});B.addCollapsedClassToSeries(this.w,m,b);const v=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":b});B.addCollapsedClassToSeries(this.w,v,b),(s.globals.collapsingSeriesIndices||[]).indexOf(b)>-1&&v.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(i,o,void 0,void 0,void 0,void 0,y),{xDivision:I,yDivision:P,zeroH:A,zeroW:S}=w;let L=w.barHeight,D=w.barWidth;o=w.y,i=w.x,s.globals.barHeight=L,s.globals.barWidth=D,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>A),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const r=this.barHelpers.getStrokeWidth(a,e,b),c={indexes:{i:a,j:e,realIndex:b,translationsIndex:y,bc:h},strokeWidth:r,x:i,y:o,elSeries:m,columnGroupIndex:p,seriesGroup:s.labelData.seriesGroups[g]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},c),{zeroW:S,barHeight:L,yDivision:P})),D=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},c),{xDivision:I,barWidth:D,zeroH:A})),L=this.series[a][e]/this.yRatio[y]);const H=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:L,barWidth:D});H&&C.add(H),o=w.y,i=w.x,x.push(i),f.push(o);const k=this.barHelpers.getPathFillColor(t,a,e,b);let R="";const W=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",X="bottom"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]>0||"top"===this.barHelpers.arrBorderRadius[b][e]&&s.seriesData.series[b][e]<0,F=d&&!X&&this.getPreviousFlip(b,e);(X||F)&&(R=W),F&&(R+=" apexcharts-flip-held",u=!0),m=this.renderSeries(l(n({realIndex:b,pathFill:k.color},k.useRangeColor?{lineFill:k.color}:{}),{j:e,i:a,columnGroupIndex:p,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:r,elSeries:m,x:i,y:o,series:t,barHeight:L,barWidth:D,elDataLabelsWrap:v,elGoalsMarkers:C,type:"bar",visibleSeries:p,classes:R}))}s.globals.seriesXvalues[b]=x,s.globals.seriesYvalues[b]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),r.add(m)}return u&&this.settleHeldMirrors(),r}settleHeldMirrors(){const t=this.w;if(!W.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&c.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}initialPositions(t,e,s,a,r,i,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,i=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),r=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:r,zeroW:i}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:r,y:i,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,c,u,b,g;const p=this.w,x=i+o*e;let f;const y=t.i,m=t.j,v=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][m];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][m]<0?t=(null==(d=this.series[y])?void 0:d[m])>=0?this.groupCtx.prevX[I-1][m]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][m]:this.groupCtx.prevXVal[I-1][m]>=0&&(t=(null==(c=this.series[y])?void 0:c[m])>=0?this.groupCtx.prevX[I-1][m]:this.groupCtx.prevX[I-1][m]-w+2*(this.isReversed?w:0)),f=t}else f=a;r=null===(null==(u=this.series[y])?void 0:u[m])?f:f+(null==(b=this.series[y])?void 0:b[m])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[y])?void 0:g[m])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:r,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:y,j:m,w:p});return this.barHelpers.barBackground({j:m,i:y,y1:x,y2:e,elSeries:h}),i+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,v,m,C),barXPosition:f,barYPosition:x,x:r,y:i}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:r,zeroH:i,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,c,u,b,g,p,x,f;const y=this.w,m=t.i,v=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(y.axisFlags.isXNumeric){let t=y.seriesData.seriesX[w][v];t||(t=0),e=(t-y.globals.minX)/this.xRatio-r/2*y.globals.barGroups.length}const P=e+o*r;let A,S=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)S+=isNaN(this.groupCtx.prevYF[t][v])?0:this.groupCtx.prevYF[t][v];const L=this.groupCtx.prevY.length;if(L>0&&!y.axisFlags.isXNumeric||L>0&&y.axisFlags.isXNumeric&&y.seriesData.seriesX[w-1][v]===y.seriesData.seriesX[w][v]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[v])){e=this.groupCtx.prevY[L-t][v];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[L-a])?void 0:d[v])<0){t=(null==(c=this.series[m])?void 0:c[v])>=0?e-S+2*(this.isReversed?S:0):e;break}if((null==(u=this.groupCtx.prevYVal[L-a])?void 0:u[v])>=0){t=(null==(b=this.series[m])?void 0:b[v])>=0?e:e+S-2*(this.isReversed?S:0);break}}void 0===t&&(t=y.layout.gridHeight),A=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?i:t}else A=i;s=(null==(p=this.series[m])?void 0:p[v])?A-(null==(x=this.series[m])?void 0:x[v])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[m])?void 0:f[v])/this.yRatio[I]:0):A;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:r,y1:A,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:m,j:v,w:y});return this.barHelpers.barBackground({bc:C,j:v,i:m,x1:P,x2:r,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,i,w,v,0),barXPosition:P,x:y.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends ${draw(t,e){var s,a,r,i,o,l,h,d,u;const b=this.w,g=new D(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=b.rangeData.seriesRangeStart,this.seriesRangeEnd=b.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let x=0;x<t.length;x++){let f,y;const m=b.globals.comboCharts?e[x]:x,{columnGroupIndex:v}=this.barHelpers.getGroupIndex(m),C=g.group({class:"apexcharts-series",seriesName:c.escapeString(b.seriesData.seriesNames[m]),rel:x+1,"data:realIndex":m});B.addCollapsedClassToSeries(this.w,C,m),t[x].length>0&&(this.visibleI=this.visibleI+1);let w=0;this.yRatio.length>1&&(this.yaxisIndex=b.globals.seriesYAxisReverseMap[m][0],w=m);const I=this.barHelpers.initialPositions(m),{y:P,zeroW:A,x:S,zeroH:L}=I;let D=null!=(s=I.barWidth)?s:0,H=null!=(a=I.barHeight)?a:0;const k=null!=(r=I.yDivision)?r:0,R=null!=(i=I.xDivision)?i:0;y=P,f=S;const W=g.group({class:"apexcharts-datalabels","data:realIndex":m}),X=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<b.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(x,e,m),a=this.seriesRangeStart[x][e],r=this.seriesRangeEnd[x][e];let i=null,c=null,g=null;const p={x:f,y:y,strokeWidth:s,elSeries:C};let P=this.seriesLen;if(b.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=b.config.series[x].data)?void 0:o[e]))break;if(this.isHorizontal){g=y+H*this.visibleI;const t=(k-H*P)/2;if(null==(h=null==(l=b.config.series[x].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:g,srty:t,barHeight:H,yDivision:k,initPositions:I});H=s.barHeight,g=s.barYPosition}i=this.drawRangeBarPaths(n({indexes:{i:x,j:e,realIndex:m},barHeight:H,barYPosition:g,zeroW:A,yDivision:k,y1:a,y2:r},p)),D=i.barWidth}else{b.axisFlags.isXNumeric&&(f=(b.seriesData.seriesX[x][e]-b.globals.minX)/this.xRatio-D/2),c=f+D*this.visibleI;const t=(R-D*P)/2;if(null==(u=null==(d=b.config.series[x].data)?void 0:d[e])?void 0:u.x){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:c,srtx:t,barWidth:D,xDivision:R,initPositions:I});D=s.barWidth,c=s.barXPosition}i=this.drawRangeColumnPaths(n({indexes:{i:x,j:e,realIndex:m,translationsIndex:w},barWidth:D,barXPosition:c,zeroH:L,xDivision:R},p)),H=i.barHeight}const S=this.barHelpers.drawGoalLine({barXPosition:i.barXPosition,barYPosition:g,goalX:i.goalX,goalY:i.goalY,barHeight:H,barWidth:D});S&&X.add(S),y=i.y,f=i.x;const F=this.barHelpers.getPathFillColor(t,x,e,m);this.renderSeries({realIndex:m,pathFill:F.color,lineFill:F.useRangeColor?F.color:b.globals.stroke.colors[m],j:e,i:x,x:f,y:y,y1:a,y2:r,pathFrom:i.pathFrom,pathTo:i.pathTo,strokeWidth:s,elSeries:C,series:t,barHeight:H,barWidth:D,barXPosition:c,barYPosition:g,columnGroupIndex:v,elDataLabelsWrap:W,elGoalsMarkers:X,visibleSeries:this.visibleI,type:"rangebar"})}p.add(C)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:r,srtx:i,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var c,u,b,g;const p=this.w;let x=[];const f=null==(u=null==(c=p.globals.seriesRangeName)?void 0:c[t])?void 0:u[e],y=null==(g=null==(b=p.config.series[t].data)?void 0:b[e])?void 0:g.x,m=Array.isArray(y)?y.join(" "):y,v=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(m),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===m&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?r+l*v:r+o*this.visibleI+l*v,C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(s=(o=d.barHeight/x.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+x.indexOf(f))+l*v))):(v>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?i+h*v:i+n*this.visibleI+h*v),C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(a=(n=d.barWidth/x.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(f))+h*v))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:r,zeroH:i}){var o,n;const l=this.w,{i:h,j:d,realIndex:c,translationsIndex:u}=t,b=this.yRatio[u],g=this.getRangeValue(c,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=i-p/b,x=i-x/b):p=i;const y=Math.abs(x-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:d,w:l});if(f){const t=m.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(c,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:c,barWidth:a});e=t.x,r=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,i,c,d,u),barXPosition:r}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:r,barHeight:i,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,c=this.preventBarOverflow(n+s/this.invertedYRatio),u=this.preventBarOverflow(n+a/this.invertedYRatio),b=this.getRangeValue(h,d),g=Math.abs(u-c),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:i,x1:c,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=b.start&&null!=b.end){const t=p.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=r),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:b.start<0&&b.end<0?c:u,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v7.2.0
21
+ * ApexCharts v7.4.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -1855,6 +1855,14 @@ class Helpers {
1855
1855
  * second at the top, and nothing else touched. Stacked totals already resolve
1856
1856
  * per group (see drawsStackedTotal, #4173); corners never got the same fix.
1857
1857
  *
1858
+ * plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
1859
+ * caps both the baseline and the far end, 'last' only the far end (#4845).
1860
+ *
1861
+ * A single-data-point chart used to hand its baseline segment 'top' (and a
1862
+ * solo segment 'top' instead of 'both'), which on a horizontal stack rounded
1863
+ * the first segment on its INNER edge and left a pill in the middle of the
1864
+ * bar (#4845). One data point is resolved like any other now.
1865
+ *
1858
1866
  * @param {any[]} series
1859
1867
  * @returns {string[][]}
1860
1868
  */
@@ -1869,9 +1877,11 @@ class Helpers {
1869
1877
  () => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
1870
1878
  );
1871
1879
  if (alwaysApplyRadius) return output;
1872
- const isSoloHorizontal = this.w.config.chart.type === "bar" && numColumns === 1;
1873
- const soloCorner = isSoloHorizontal ? "top" : "both";
1874
- const baseCorner = isSoloHorizontal ? "top" : "bottom";
1880
+ const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
1881
+ const soloPositive = lastOnly ? "top" : "both";
1882
+ const soloNegative = lastOnly ? "bottom" : "both";
1883
+ const positiveBase = lastOnly ? "none" : "bottom";
1884
+ const negativeBase = lastOnly ? "none" : "top";
1875
1885
  for (const stack of this.getStackedSeriesIndices(numSeries)) {
1876
1886
  for (let j = 0; j < numColumns; j++) {
1877
1887
  const positiveIndices = [];
@@ -1883,22 +1893,22 @@ class Helpers {
1883
1893
  }
1884
1894
  if (positiveIndices.length > 0 && negativeIndices.length === 0) {
1885
1895
  if (positiveIndices.length === 1) {
1886
- output[positiveIndices[0]][j] = soloCorner;
1896
+ output[positiveIndices[0]][j] = soloPositive;
1887
1897
  } else {
1888
1898
  const first = positiveIndices[0];
1889
1899
  const last = positiveIndices[positiveIndices.length - 1];
1890
1900
  for (const i of positiveIndices) {
1891
- output[i][j] = i === first ? baseCorner : i === last ? "top" : "none";
1901
+ output[i][j] = i === first ? positiveBase : i === last ? "top" : "none";
1892
1902
  }
1893
1903
  }
1894
1904
  } else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
1895
1905
  if (negativeIndices.length === 1) {
1896
- output[negativeIndices[0]][j] = "both";
1906
+ output[negativeIndices[0]][j] = soloNegative;
1897
1907
  } else {
1898
- const highest = Math.max(...negativeIndices);
1899
- const lowest = Math.min(...negativeIndices);
1908
+ const nearest = Math.min(...negativeIndices);
1909
+ const farthest = Math.max(...negativeIndices);
1900
1910
  for (const i of negativeIndices) {
1901
- output[i][j] = i === highest ? "bottom" : i === lowest ? "top" : "none";
1911
+ output[i][j] = i === nearest ? negativeBase : i === farthest ? "bottom" : "none";
1902
1912
  }
1903
1913
  }
1904
1914
  } else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v7.2.0
2
+ * ApexCharts v7.4.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,s,i)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[s]=i,l=(e,t)=>{for(var s in t||(t={}))r.call(t,s)&&a(e,s,t[s]);if(i)for(var s of i(t))n.call(t,s)&&a(e,s,t[s]);return e},o=(e,i)=>t(e,s(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}const u=h(require("apexcharts/core")),c=u.__apex_CoreUtils,p=u.__apex_Graphics,d=u.__apex_Fill,g=u.__apex_DataLabels,f=u.__apex_Markers,m=u.__apex_charts_Scatter,y=u.__apex_Series,x=u.__apex_Utils;class b{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[e]){if(new c(this.lineCtx.w).seriesHaveSameValues(e)){const s=t[e].slice();s[s.length-1]=s[s.length-1]+1e-6,t[e]=s}}return t}calculatePoints({series:e,realIndex:t,x:s,y:i,i:r,j:n,prevY:a}){const l=this.w,o=[],h=[];let u=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(u=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===n&&(o.push(u),h.push(x.isNumber(e[r][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(x.isNumber(e[r][n+1])?i+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const i=this.w;for(let r=0;r<i.globals.previousPaths.length;r++){const n=i.globals.previousPaths[r];("line"===n.type||"area"===n.type)&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(s,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[r].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[r].paths[1]&&(e=i.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:i,lineYPosition:r,translationsIndex:n}){var a,l,o;const h=this.w,u=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(a=this.w.config.series[t])?void 0:a.type)||"column"===(null==(l=this.w.config.series[t])?void 0:l.type));if(void 0!==(null==(o=s[e])?void 0:o[0])){if(u)if(e>0){const e=this.lineCtx.stackTopAt(t,0);r=void 0===e?this.lineCtx.zeroY:e}else r=this.lineCtx.zeroY;else r=this.lineCtx.zeroY;i=r-s[e][0]/this.lineCtx.yRatio[n]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[n]:0)}else if(u&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){i=r=this.lineCtx.prevSeriesY[t][0];break}return{prevY:i,lineYPosition:r}}}function v(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const P=e=>{const t=function(e){const t=[];let s=e[0],i=e[1],r=t[0]=w(s,i),n=1;for(let a=e.length-1;n<a;n++)s=i,i=e[n+1],t[n]=.5*(r+(r=w(s,i)));return t[n]=r,t}(e),s=e.length-1,i=[];let r,n,a,l;for(let i=0;i<s;i++)a=w(e[i],e[i+1]),Math.abs(a)<1e-6?t[i]=t[i+1]=0:(r=t[i]/a,n=t[i+1]/a,l=r*r+n*n,l>9&&(l=3*a/Math.sqrt(l),t[i]=l*r,t[i+1]=l*n));for(let r=0;r<=s;r++)l=(e[Math.min(s,r+1)][0]-e[Math.max(0,r-1)][0])/(6*(1+t[r]*t[r])),i.push([l||0,t[r]*l||0]);return i},A={points(e){const t=P(e),s=e[1],i=e[0],r=[],n=t[1],a=t[0];r.push(i,[i[0]+a[0],i[1]+a[1],s[0]-n[0],s[1]-n[1],s[0],s[1]]);for(let s=2,i=t.length;s<i;s++){const i=e[s],n=t[s];r.push([i[0]-n[0],i[1]-n[1],i[0],i[1]])}return r},slice(e,t,s){const i=e.slice(t,s);if(t){if(s-t>1&&i[1].length<6){const e=i[0].length;i[1]=[2*i[0][e-2]-i[0][e-4],2*i[0][e-1]-i[0][e-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function w(e,t){return(t[1]-e[1])/(t[0]-e[0])}const k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Y(e,t){const{ax:s,bx:i,ay:r,by:n}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(k)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+i}`);continue}if("V"===e){for(const e of t)a.push(`V ${r*e+n}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+i} ${r*t[e+6]+n}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+i} ${r*t[e+1]+n}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const S=u.__apex_BrowserAPIs_BrowserAPIs,F=u.__apex_Environment_Environment;function M(e){return-Math.cos(e*Math.PI)/2+.5}function I(e,t,s,i){e=Math.min(Math.max(e,0),1),s=Math.min(Math.max(s,0),1);const r=3*e,n=3*(s-e)-r,a=1-r-n,l=3*t,o=3*(i-t)-l,h=1-l-o,u=e=>((a*e+n)*e+r)*e;return e=>e<=0?0:e>=1?1:(e=>((h*e+o)*e+l)*e)((e=>{let t=0,s=1,i=e;if(i<t)return t;if(i>s)return s;for(;t<s;){const r=u(i);if(Math.abs(r-e)<1e-4)return i;e>r?t=i:s=i,i=(t+s)/2}return i})(e))}const C=new Map;function _(e){return"function"==typeof e?j(e):(t=e,Array.isArray(t)&&4===t.length&&t.every(e=>"number"==typeof e)?I(e[0],e[1],e[2],e[3]):"string"==typeof e&&C.has(e)?j(C.get(e)):M);var t}function j(e){return t=>{const s=e(t);return"number"==typeof s&&isFinite(s)?s:t}}C.set("linear",e=>e),C.set("easeInOutSine",M),C.set("easeInSine",e=>1-Math.cos(e*Math.PI/2)),C.set("easeOutSine",e=>Math.sin(e*Math.PI/2)),C.set("easeInQuad",e=>e*e),C.set("easeOutQuad",e=>1-(1-e)*(1-e)),C.set("easeInOutQuad",e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2),C.set("easeInCubic",e=>e*e*e),C.set("easeOutCubic",e=>1-Math.pow(1-e,3)),C.set("easeInOutCubic",e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2),C.set("easeOutBack",e=>{const t=1.70158;return 1+2.70158*Math.pow(e-1,3)+t*Math.pow(e-1,2)}),C.set("easeInOutBack",e=>{const t=2.5949095;return e<.5?Math.pow(2*e,2)*(7.189819*e-t)/2:(Math.pow(2*e-2,2)*((t+1)*(2*e-2)+t)+2)/2});const L=u.__apex_PathMorphing_parsePath,X=u.__apex_PathMorphing_arrayToPath;function R(e,t,s){if(!e||"string"!=typeof e)return null;const i=L(e);if(!i.length||"M"!==i[0][0])return null;for(let e=1;e<i.length;e++)if("M"===i[e][0])return null;let r=i,n=null;if(s){if(i.length<5)return null;if(n=i.slice(-3),r=i.slice(0,-3),"Z"!==n[2][0])return null;if("L"!==n[1][0])return null;if("L"!==n[0][0]&&"C"!==n[0][0])return null}else if("Z"===i[i.length-1][0])return null;if(r.length!==t||r.length<2)return null;const a=r[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<r.length;e++)if(r[e][0]!==a)return null;const l=r.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:r,closing:n,segType:a,anchors:l}}function z(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function D(e,t,s){const i=e,r=[t[1],t[2]],n=[t[3],t[4]],a=[t[5],t[6]],l=z(i,r,s),o=z(r,n,s),h=z(n,a,s),u=z(l,o,s),c=z(o,h,s),p=z(u,c,s);return{first:["C",l[0],l[1],u[0],u[1],p[0],p[1]],second:["C",c[0],c[1],h[0],h[1],a[0],a[1]],mid:p}}function N(e,t,s){const i=[t[1],t[2]],r=z(e,i,s);return{first:["L",r[0],r[1]],second:["L",i[0],i[1]],mid:r}}function O(e,t){const{body:s,closing:i,segType:r,anchors:n}=e,a=n.length,l=t.length,o=e=>"C"===r?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",n[0][0],n[0][1]]];let u=0;for(;u<l&&0!==t[u];)u++;for(let e=1;e<=u;e++)h.push(o(n[0]));let c=u+1;for(let e=0;e<a-1;e++){let i=0;for(;c+i<l&&-1===t[c+i];)i++;const a=s[e+1];if(i){const t=i+1;let s=n[e],l=a;for(let e=0;e<i;e++){const i=1/(t-e),n="C"===r?D(s,l,i):N(s,l,i);h.push(n.first),s=n.mid,l=n.second}h.push(l)}else h.push(a.slice());c+=i+1}for(;c<l;)h.push(o(n[a-1])),c++;return i&&i.forEach(e=>h.push(e.slice())),h}function $(e,t,s,i,r,n){const a=R(e,i,n);if(!a)return null;const l=R(t,r,n);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:X(O(a,o)),toInterp:X(O(l,h))}}function B(e){const t=new Map;return e.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),0===s?e:`${e}#${s}`})}function T(e,t,s=!1,i=!1){var r,n;if(!function(e){var t;const s=e.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(t=s.largeDatasetThreshold)?t:0;return!(i>0&&e.globals.dataPoints>i||!(F.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(r=a.seriesY)?void 0:r[t],o=null==(n=e.seriesData.series)?void 0:n[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=B(l.map((e,s)=>function(e,t,s){var i,r;if(e.isXNumeric){const r=null==(i=e.seriesX)?void 0:i[t];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const n=null==(r=e.labels)?void 0:r[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(a,t,s))),u=B(o.map((s,i)=>function(e,t,s){var i,r,n,a;if(null==(i=e.axisFlags)?void 0:i.isXNumeric){const i=null==(n=null==(r=e.seriesData)?void 0:r.seriesX)?void 0:n[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,i))),c=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const i=new Array(t.length),r=new Set;let n=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!r.has(s.get(e))?s.get(e):-1;i[t]=o,-1!==o&&(r.add(o),o<n&&(a=!1),n=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)r.has(t)||o.push(t);return{toOld:i,exits:o,ordered:a,changed:!l}}(h,u);return(c.ordered||i)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:u}:null}function W(e,t,s,i,r){const n=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-n)/t));i(s(o),o),o<1?S.requestAnimationFrame(a):r&&r()};S.requestAnimationFrame(a)}function H(e,{elPointsMain:t,realIndex:s,speed:i}){var r,n,a,l;if(!(null==t?void 0:t.node))return!1;const o=T(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const u=null==(r=h.xPixels)?void 0:r[s],c=null==(n=h.yPixels)?void 0:n[s];if(!u||!c)return!1;const p=t.node.querySelectorAll(".apexcharts-marker");if(!p.length)return!1;const d=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],g=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],f=function(e){var t,s;const i=e.config.chart.animations;return _(null!=(s=null==(t=i.dynamicAnimation)?void 0:t.easing)?s:i.easing)}(e),m=Math.max(1,i||1);return t.node.classList.remove("apexcharts-element-hidden"),p.forEach(t=>{var i,r,n,a,l,p,y,x,b;const v=parseInt(null!=(r=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?r:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=d[v]&&null!=g[v]?[d[v],g[v]]:null;if(-1===P||!A){const s=t.style;return s.opacity="0",void W(e,m,f,e=>{s.opacity=String(e)},()=>{s.opacity=""})}const w=(null!=(n=u[P])?n:NaN)-A[0],k=(null!=(a=c[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(k))return;const Y=null!=(y=null==(p=null==(l=h.rPixels)?void 0:l[s])?void 0:p[P])?y:NaN,S=parseFloat(null!=(b=null!=(x=t.getAttribute("r"))?x:t.getAttribute("default-marker-size"))?b:""),F=isFinite(Y)&&isFinite(S)&&S>0&&Math.abs(Y-S)>.25;if(!(Math.abs(w)>=.5||Math.abs(k)>=.5)&&!F)return;const M=e=>{const s=w*(1-e),i=k*(1-e);if(F){const r=(Y+(S-Y)*e)/S;t.setAttribute("transform",`translate(${s+A[0]*(1-r)}, ${i+A[1]*(1-r)}) scale(${r})`)}else t.setAttribute("transform",`translate(${s}, ${i})`)};M(0),W(e,m,f,M,()=>{t.removeAttribute("transform")})}),!0}function V(e,{type:t,realIndex:s,pathFromLine:i,pathFromArea:r,linePaths:n,areaPaths:a}){var l,o;const h=T(e,s);if(!h)return null;const{join:u,oldKeys:c,newKeys:p}=h,d=e.globals.prevStreamFrame;if(!d)return null;const g=null==(l=d.seriesY)?void 0:l[s],f=null==(o=e.seriesData.series)?void 0:o[s];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),i=[];let r=0;for(let t=0;t<e.toOld.length;t++){const n=e.toOld[t];if(-1!==n){for(;r<n;)s.has(r)&&i.push({oldJ:r,newJ:-1}),r++;i.push({oldJ:n,newJ:t}),r=n+1}else i.push({oldJ:-1,newJ:t})}for(;r<t;)s.has(r)&&i.push({oldJ:r,newJ:-1}),r++;return i}(u,c.length),y={};return Array.isArray(n)&&1===n.length&&i&&(y.line=$(i,n[0],m,c.length,p.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&r&&(y.area=$(r,a[0],m,c.length,p.length,!0)),y.line||y.area?y:null}class E{constructor(e,t,s,i){this.ctx=t,this.w=e,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new m(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new b(this),this.markers=new f(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,s,i){var r;const n=this.w,a=new p(this.w),h=n.globals.comboCharts?t:n.config.chart.type,u=a.group({class:`apexcharts-${h}-series apexcharts-plot-series`}),d=new c(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const g=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);const r=n.globals.comboCharts?s[t]:t,a=this.yRatio.length>1?r:0;this._initSerieVariables(e,t,r);const u=[],c=[],p=[];let d=n.globals.padHorizontal+this.categoryAxisCorrection;const f=1,m=[],x=[];y.addCollapsedClassToSeries(this.w,this.elSeries,r),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(d=(n.seriesData.seriesX[r][0]-n.globals.minX)/this.xRatio),p.push(d);const b=d;let v;const P=b;let A=this.zeroY,w=this.zeroY;const k=0;A=this.lineHelpers.determineFirstPrevY({i:t,realIndex:r,series:e,prevY:A,lineYPosition:k,translationsIndex:a}).prevY,"monotoneCubic"===n.config.stroke.curve&&null===e[t][0]?u.push(null):u.push(A);const Y=A;let S;"rangeArea"===h&&(S=this.lineHelpers.determineFirstPrevY({i:t,realIndex:r,series:i,prevY:w,lineYPosition:k,translationsIndex:a}),w=S.prevY,v=w,c.push(null!==u[0]?w:null));const F=this._calculatePathsFrom({type:h,series:e,i:t,realIndex:r,translationsIndex:a,prevX:P,prevY:A,prevY2:w}),M=[u[0]],I=[c[0]],C={type:h,series:e,realIndex:r,translationsIndex:a,i:t,x:d,y:f,pX:b,pY:Y,pathsFrom:F,linePaths:m,areaPaths:x,seriesIndex:s,lineYPosition:k,xArrj:p,yArrj:u,y2Arrj:c,seriesRangeEnd:i},_=this._iterateOverDataPoints(o(l({},C),{iterations:"rangeArea"===h?e[t].length-1:void 0,isRangeStart:!0}));if("rangeArea"===h){const e=this._calculatePathsFrom({series:i,i:t,realIndex:r,prevX:P,prevY:w}),s=this._iterateOverDataPoints(o(l({},C),{series:i,xArrj:[d],yArrj:M,y2Arrj:I,pY:v,areaPaths:_.areaPaths,pathsFrom:e,iterations:i[t].length-1,isRangeStart:!1})),n=_.linePaths.length/2;for(let e=0;e<n;e++)_.linePaths[e]=s.linePaths[e+n]+_.linePaths[e];_.linePaths.splice(n),_.pathFromLine=s.pathFromLine+_.pathFromLine}else/z\s*$/i.test(_.pathFromArea)||(_.pathFromArea+="z");this._handlePaths({type:h,realIndex:r,i:t,paths:_}),this.markers.flushBatch(this.elPointsMain,r),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),g.push(this.elSeries)}if(void 0!==(null==(r=n.config.series[0])?void 0:r.zIndex)&&g.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),n.config.chart.stacked)for(let e=g.length-1;e>=0;e--)u.add(g[e]);else for(let e=0;e<g.length;e++)u.add(g[e]);return u}_initSerieVariables(e,t,s){const i=this.w,r=new p(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let n=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],n=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[n]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[n]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=i.config.series[s];if(this.elSeries=r.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:x.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:i,translationsIndex:r,prevX:n,prevY:a,prevY2:l}){const o=this.w,h=new p(this.w);let u,c,d,g;if(null===t[s][0]){for(let e=0;e<t[s].length;e++)if(null!==t[s][e]){n=this.xDivision*e,a=this.zeroY-t[s][e]/this.yRatio[r],u=h.move(n,a),c=h.move(n,this.areaBottomY);break}}else u=h.move(n,a),"rangeArea"===e&&(u=h.move(n,l)+h.line(n,a)),c=h.move(n,this.areaBottomY)+h.line(n,a);if(d=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),g=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),o.globals.previousPaths.length>0){const e=this.lineHelpers.checkPreviousPaths({pathFromLine:d,pathFromArea:g,realIndex:i});d=e.pathFromLine,g=e.pathFromArea}return{prevX:n,prevY:a,linePath:u,areaPath:c,pathFromLine:d,pathFromArea:g}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;const s=this.w.seriesData.seriesX[e];return s?s[t]:void 0}stackTopAt(e,t){const s=this._stackKey(e,t);if(null!=s)return this.prevSeriesYByX.get(s)}_recordStackTops(e,t){const s=this.w;if(Array.isArray(t)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e))for(let s=0;s<t.length;s++){const i=this._stackKey(e,s);if(null==i)continue;const r=t[s];x.isNumber(r)&&this.prevSeriesYByX.set(i,r)}}_handlePaths({type:e,realIndex:t,i:s,paths:i}){var r,n,a,h,u,c,g;const f=this.w,m=new p(this.w),y=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,m),x=new d(this.w);this.prevSeriesY.push(i.yArrj),this._recordStackTops(t,i.yArrj);let b=null;"line"!==e&&"area"!==e||!f.globals.dataChanged||(b=function(e,t,s,i){var r;const n=e.globals,a=n.prevStreamFrame;if(!a||!n.dataChanged||!(null==(r=e.axisFlags)?void 0:r.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],u=e.seriesData.series[t];if(!(l&&o&&h&&u))return null;if(l.length<3||h.length<3)return null;let c=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){c=e;break}if(-1===c)return null;const p=Math.min(l.length-c,h.length);if(p<2)return null;const d=h.length-p;if(0===c&&0===d)return null;for(let e=0;e<p;e++){if(l[c+e]!==h[e])return null;const t=o[c+e],s=u[e];if(t!==s&&(null!=t||null!=s))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let m=-1,y=-1;for(let e=0;e<p;e++)null!=g[c+e]&&null!=f[c+e]&&null!=s[e]&&null!=i[e]&&(-1===m&&(m=e),y=e);if(-1===m||y<=m)return null;const x=s[m],b=s[y],v=g[c+m],P=g[c+y];if(Math.abs(b-x)<1e-6)return null;const A=(P-v)/(b-x),w=v-A*x;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=m,Y=m;for(let e=m;e<=y;e++){const t=i[e];null!=t&&null!=f[c+e]&&(t<i[k]&&(k=e),t>i[Y]&&(Y=e))}let S=1,F=0;const M=i[k],I=i[Y];if(Math.abs(I-M)>1e-6?(S=(f[c+Y]-f[c+k])/(I-M),F=f[c+k]-S*M):F=f[c+k]-M,!isFinite(S)||!isFinite(F)||S<.2||S>5)return null;const C=Math.floor((m+y)/2);if(C!==m&&C!==y&&null!=s[C]&&null!=g[c+C]){const e=A*s[C]+w;if(Math.abs(e-g[c+C])>1.5)return null;if(null!=i[C]&&null!=f[c+C]){const e=S*i[C]+F;if(Math.abs(e-f[c+C])>1.5)return null}}return n.streamScrolled=!0,{ax:A,bx:w,ay:S,by:F}}(f,t,i.xArrj,i.yArrj));let v=null;b||"line"!==e&&"area"!==e||(v=V(f,{type:e,realIndex:t,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),f.globals.seriesXvalues[t]=i.xArrj,f.globals.seriesYvalues[t]=i.yArrj;const P=f.config.forecastDataPoints;if(P.count>0&&"rangeArea"!==e){const e=f.globals.seriesXvalues[t][f.globals.seriesXvalues[t].length-P.count-1],s=m.drawRect(e,0,f.layout.gridWidth,f.layout.gridHeight,0);f.dom.elForecastMask.appendChild(s.node);const i=m.drawRect(0,0,e,f.layout.gridHeight,0);f.dom.elNonForecastMask.appendChild(i.node)}this.pointsChart?H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}):(f.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),H(f,{elPointsMain:this.elPointsMain,realIndex:t,speed:f.config.chart.animations.dynamicAnimation.speed}),T(f,t)&&(null==(r=this.elDataLabelsWrap)?void 0:r.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),f.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const A={i:s,realIndex:t,animationDelay:s,initialSpeed:f.config.chart.animations.speed,dataChangeSpeed:f.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=i.numericXY,k="line"===e||"area"===e,S=k&&i.linePaths.length>1?[i.linePaths.join(" ")]:i.linePaths,F=k&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if("area"===e){const e=x.fillPath({seriesNumber:t});for(let t=0;t<F.length;t++){const s=y.renderPaths(o(l({},A),{pathFrom:b?Y(i.areaPaths[t],b):null!=(a=null==(n=null==v?void 0:v.area)?void 0:n.from)?a:i.pathFromArea,pathTo:F[t],pathToNumeric:w?{xs:w.xs,ys:w.ys,closeY:w.areaCloseY}:void 0,pathToInterp:null==(h=null==v?void 0:v.area)?void 0:h.toInterp,scrollMorph:!!b,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(s)}}if(f.config.stroke.show&&!this.pointsChart){let r=null;if("line"===e)r=x.fillPath({seriesNumber:t,i:s});else if("solid"===f.config.stroke.fill.type)r=f.globals.stroke.colors[t];else{const e=f.config.fill;f.config.fill=f.config.stroke.fill,r=x.fillPath({seriesNumber:t,i:s}),f.config.fill=e}for(let s=0;s<S.length;s++){let n=r;"rangeArea"===e&&(n=x.fillPath({seriesNumber:t}));const a=o(l({},A),{pathFrom:b?Y(i.linePaths[s],b):null!=(c=null==(u=null==v?void 0:v.line)?void 0:u.from)?c:i.pathFromLine,pathTo:S[s],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:null==(g=null==v?void 0:v.line)?void 0:g.toInterp,scrollMorph:!!b,stroke:r,strokeWidth:this.strokeWidth,strokeLineCap:f.config.stroke.lineCap,fill:"rangeArea"===e?n:"none"}),h=y.renderPaths(a);if(this.elSeries.add(h),h.attr("fill-rule","evenodd"),P.count>0&&"rangeArea"!==e){const e=y.renderPaths(a);e.node.setAttribute("stroke-dasharray",P.dashArray),P.strokeWidth&&e.node.setAttribute("stroke-width",P.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${f.globals.cuid})`),h.attr("clip-path",`url(#nonForecastMask${f.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:i,translationsIndex:r,i:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,seriesIndex:g,lineYPosition:f,xArrj:m,yArrj:y,y2Arrj:b,isRangeStart:P,seriesRangeEnd:A}){var w,k;const Y=this.w,S=new p(this.w),F=this.yRatio;let{prevY:M,linePath:I,areaPath:C,pathFromLine:_,pathFromArea:j}=u;const L=x.isNumber(Y.globals.minYArr[i])?Y.globals.minYArr[i]:Y.globals.minY;s||(s=Y.globals.dataPoints>1?Y.globals.dataPoints-1:Y.globals.dataPoints);const X=(e,t)=>t-e/F[r]+2*(this.isReversed?e/F[r]:0);let R=l;const z=Y.config.chart.stacked&&!Y.globals.comboCharts||Y.config.chart.stacked&&Y.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(w=this.w.config.series[i])?void 0:w.type)||"column"===(null==(k=this.w.config.series[i])?void 0:k.type));let D=Y.config.stroke.curve;Array.isArray(D)&&(D=Array.isArray(g)?D[g[n]]:D[n]);let N,O=0;const $=this.pointsChart?this._scatterJitterPx(i):null;if("straight"===D&&!this.pointsChart){const p=this._fastStraightPath({type:e,series:t,i:n,realIndex:i,translationsIndex:r,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,xArrj:m,yArrj:y,y2Arrj:b,stackSeries:z});if(p)return p}for(let r=0;r<s&&0!==t[n].length;r++){const u=void 0===t[n][r+1]||null===t[n][r+1];if(Y.axisFlags.isXNumeric){let e=Y.seriesData.seriesX[i][r+1];void 0===Y.seriesData.seriesX[i][r+1]&&(e=Y.seriesData.seriesX[i][s-1]),a=(e-Y.globals.minX)/this.xRatio}else a+=this.xDivision;if(z)if(n>0&&Y.globals.collapsedSeries.length<Y.config.series.length-1){if((e=>{var t;for(let s=e;s>=0;s--){const e=null!=(t=null==g?void 0:g[s])?t:s;if(-1===Y.globals.collapsedSeriesIndices.indexOf(e)&&-1===Y.globals.ancillaryCollapsedSeriesIndices.indexOf(e))return s}return-1})(n-1)<0)f=this.zeroY;else{const e=this.stackTopAt(i,r+1);f=void 0===e?this.zeroY:e}}else f=this.zeroY;else f=this.zeroY;u?l=X(L,f):(l=X(t[n][r+1],f),"rangeArea"===e&&(R=X(A[n][r+1],f)));let p=a,x=l;if($){const e=100003*i+(r+1);$.x&&(p=a+2*(v(7919*e+13)-.5)*$.x),$.y&&(x=l+2*(v(6271*e+97)-.5)*$.y)}m.push(null===t[n][r+1]?null:p),!u||"smooth"!==Y.config.stroke.curve&&"monotoneCubic"!==Y.config.stroke.curve?(y.push(x),b.push(R)):(y.push(null),b.push(null));const w=this.lineHelpers.calculatePoints({series:t,x:p,y:x,realIndex:i,i:n,j:r,prevY:M}),k=this._createPaths({type:e,series:t,i:n,j:r,x:a,y:l,y2:R,xArrj:m,yArrj:y,y2Arrj:b,pX:o,pY:h,pathState:O,segmentStartX:N,linePath:I,areaPath:C,linePaths:c,areaPaths:d,curve:D,isRangeStart:P});d=k.areaPaths,c=k.linePaths,o=k.pX,h=k.pY,O=k.pathState,N=k.segmentStartX,C=k.areaPath,I=k.linePath,!this.appendPathFrom||Y.globals.hasNullValues||"monotoneCubic"===D&&"rangeArea"===e||(_+=S.line(a,this.areaBottomY),j+=S.line(a,this.areaBottomY)),this.handleNullDataPoints(t,w,n,r,i),this._handleMarkersAndLabels({type:e,pointsPos:w,i:n,j:r,realIndex:i,isRangeStart:P})}return{yArrj:y,xArrj:m,pathFromArea:j,areaPaths:d,pathFromLine:_,linePaths:c,linePath:I,areaPath:C}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:i,j:r,realIndex:n}){const a=this.w,l=new g(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:r+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:n,j:r+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,i=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const r=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,n=this.yRatio.length>1?e:0,a=this.yRatio[n]?1/this.yRatio[n]:0;return{x:(i.x||0)*r,y:(i.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:i,translationsIndex:r,iterations:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:p,xArrj:d,yArrj:g,y2Arrj:f,stackSeries:m}){const y=this.w;if("line"!==e&&"area"!==e)return null;if(y.globals.comboCharts||m)return null;if(y.config.dataLabels.enabled)return null;if(y.config.markers.discrete.length)return null;if(y.globals.markers.size[i]>0)return null;const x=t[s],b=x.length;if(!n||b<2||b-1!==n)return null;for(let e=0;e<=n;e++){const t=x[e];if(null==t)return null}const v=y.axisFlags.isXNumeric,P=v?y.seriesData.seriesX[i]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[r],w=this.isReversed,k=this.zeroY,Y=this.areaBottomY,S=this.xRatio,F=y.globals.minX,M=this.xDivision,I=y.config.markers.offsetX,C=y.config.markers.offsetY,_=this.appendPathFrom&&!y.globals.hasNullValues;let{pathFromLine:j,pathFromArea:L}=u;const X=this.ctx&&this.ctx.renderer,R=!(!X||!X.kind||"svg"===X.kind),z=!R||y.globals.dataChanged&&!!y.globals.prevStreamFrame,D=R?new Float64Array(b):null,N=R?new Float64Array(b):null;D&&N&&(D[0]=o,N[0]=h),void 0===y.globals.pointsArray[i]&&(y.globals.pointsArray[i]=[]);const O=y.globals.pointsArray[i],$=P?(P[0]-F)/S+I:this.categoryAxisCorrection+I;O.push([$,u.prevY+C]);const B=z?new Array(n+1):[];z&&(B[0]="M "+o+" "+h);const T=z&&_?new Array(n):null;let W=a,H=o,V=h;for(let e=0;e<n;e++){P?H=(P[e+1]-F)/S:(W+=M,H=W);const t=x[e+1];V=k-t/A+2*(w?t/A:0),d.push(H),g.push(V),f.push(l),O.push([H+I,V+C]),z&&(B[e+1]=" L "+H+" "+V,T&&(T[e]=" L "+H+" "+Y)),D&&N&&(D[e+1]=H,N[e+1]=V)}let E="",J="";if(z&&(E=B.join(""),J=E+" L "+H+" "+Y+" L "+o+" "+Y+"z"),T){const e=T.join("");j+=e,L+=e}else!z&&_&&(j+=" L "+H+" "+Y,L+=" L "+H+" "+Y);return c.push(E),p.push(J),{yArrj:g,xArrj:d,pathFromArea:L,areaPaths:p,pathFromLine:j,linePaths:c,linePath:E,areaPath:J,numericXY:D?{xs:D,ys:N,areaCloseY:Y}:void 0}}_createPaths({type:e,series:t,i:s,j:i,x:r,y:n,xArrj:a,yArrj:l,y2:o,y2Arrj:h,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m,linePaths:y,areaPaths:x,curve:b,isRangeStart:v}){const P=new p(this.w),w=this.areaBottomY,k="rangeArea"===e,Y="rangeArea"===e&&v;switch(b){case"monotoneCubic":{const e=v?l:h,r=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),n=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},o=(e,t)=>{const s=n(e),i=[];for(let e=0,r=0;e<s.length;r+=s[e++])i[e]=A.slice(t,r,r+s[e]);return i};switch(d){case 0:if(null===e[i+1])break;d=1;case 1:if(!(k?a.length===t[s].length:i===t[s].length-2))break;case 2:{const t=v?a:a.slice().reverse(),s=v?e:e.slice().reverse(),i=r(t,s),n=i.length>1?A.points(i):i;let l=[];k&&(Y?x=i:l=x.reverse());let h=0,u=0;if(o(s,n).forEach(e=>{h++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const i=e[s],r=i.length;r>4?(t+=`C${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`,t+=`, ${i[4]}, ${i[5]}`):r>2&&(t+=`S${i[0]}, ${i[1]}`,t+=`, ${i[2]}, ${i[3]}`)}return t})(e),s=u;u+=e.length;const r=u-1;Y?f=P.move(i[s][0],i[s][1])+t:k?f=P.move(l[s][0],l[s][1])+P.line(i[s][0],i[s][1])+t+P.line(l[r][0],l[r][1]):(f=P.move(i[s][0],i[s][1])+t,m=f+P.line(i[r][0],w)+P.line(i[s][0],w)+"z",x.push(m)),y.push(f)}),k&&h>1&&!Y){const e=y.slice(h).reverse();y.splice(h),e.forEach(e=>y.push(e))}d=0;break}}break}case"smooth":{const e=.35*(r-u);if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=Y?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){y.push(f),x.push(m);break}if(d=1,i<t[s].length-2){const t=P.curve(u+e,c,r-e,n,r,n);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=Y?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1;else{const a=P.curve(u+e,c,r-e,n,r,n);f+=a,m+=a,i>=t[s].length-2&&(Y&&(f+=P.curve(r,n,r,n,r,o)+P.move(r,o)),m+=P.curve(r,n,r,n,r,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1)}}u=r,c=n;break}default:{const e=(e,t,s)=>{let i="";switch(e){case"stepline":i=P.line(t,null,"H")+P.line(null,s,"V");break;case"linestep":i=P.line(null,s,"V")+P.line(t,null,"H");break;case"straight":i=P.line(t,s)}return i};if(null===t[s][i])d=0;else switch(d){case 0:if(g=u,f=Y?P.move(u,h[i])+P.line(u,c):P.move(u,c),m=P.move(u,c),null===t[s][i+1]||void 0===t[s][i+1]){y.push(f),x.push(m);break}if(d=1,i<t[s].length-2){const t=e(b,r,n);f+=t,m+=t;break}case 1:if(null===t[s][i+1])f+=Y?P.line(u,o):P.move(u,c),m+=P.line(u,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1;else{const a=e(b,r,n);f+=a,m+=a,i>=t[s].length-2&&(Y&&(f+=P.line(r,o)),m+=P.line(r,w)+P.line(g,w)+"z",y.push(f),x.push(m),d=-1)}}u=r,c=n;break}}return{linePaths:y,areaPaths:x,pX:u,pY:c,pathState:d,segmentStartX:g,linePath:f,areaPath:m}}handleNullDataPoints(e,t,s,i,r){const n=this.w;if(null===e[s][i]&&n.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-n.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:i+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}u.default.use({line:E,area:E,scatter:E,bubble:E,rangeArea:E}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.default});
package/dist/line.esm.js CHANGED
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v7.2.0
21
+ * ApexCharts v7.4.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";