apexcharts 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +271 -173
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +35 -0
  6. package/dist/apexcharts.esm.js +1722 -1527
  7. package/dist/apexcharts.full.js +1459 -1075
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +994 -715
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +994 -715
  13. package/dist/area.common.js +2 -2
  14. package/dist/area.esm.js +91 -40
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +433 -394
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +364 -322
  20. package/dist/bubble.common.js +2 -2
  21. package/dist/bubble.esm.js +91 -40
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +364 -322
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +433 -394
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +271 -173
  29. package/dist/donut.common.js +1 -1
  30. package/dist/donut.esm.js +1 -1
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +433 -394
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +250 -187
  35. package/dist/features/annotations.common.js +1 -1
  36. package/dist/features/annotations.esm.js +1 -1
  37. package/dist/features/annotations.js +1 -1
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +2 -2
  42. package/dist/features/drilldown.esm.js +4 -2
  43. package/dist/features/drilldown.js +2 -2
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +1 -1
  48. package/dist/features/exports.esm.js +1 -1
  49. package/dist/features/exports.js +1 -1
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +2 -2
  54. package/dist/features/highlight-filter.esm.js +14 -9
  55. package/dist/features/highlight-filter.js +2 -2
  56. package/dist/features/history.common.js +1 -1
  57. package/dist/features/history.esm.js +1 -1
  58. package/dist/features/history.js +1 -1
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +2 -2
  63. package/dist/features/keyboard.esm.js +97 -145
  64. package/dist/features/keyboard.js +2 -2
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +63 -43
  67. package/dist/features/legend.js +2 -2
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +1 -1
  78. package/dist/features/morph.esm.js +1 -1
  79. package/dist/features/morph.js +1 -1
  80. package/dist/features/perspectives.common.js +1 -1
  81. package/dist/features/perspectives.esm.js +1 -1
  82. package/dist/features/perspectives.js +1 -1
  83. package/dist/features/raincloud.common.js +1 -1
  84. package/dist/features/raincloud.esm.js +1 -1
  85. package/dist/features/raincloud.js +1 -1
  86. package/dist/features/renderer-canvas.common.js +2 -2
  87. package/dist/features/renderer-canvas.esm.js +2 -1
  88. package/dist/features/renderer-canvas.js +2 -2
  89. package/dist/features/stats.common.js +1 -1
  90. package/dist/features/stats.esm.js +1 -1
  91. package/dist/features/stats.js +1 -1
  92. package/dist/features/storyboard.common.js +1 -1
  93. package/dist/features/storyboard.esm.js +1 -1
  94. package/dist/features/storyboard.js +1 -1
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +3 -2
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +92 -2
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +83 -47
  103. package/dist/features/trellis.js +2 -2
  104. package/dist/features/waterfall.common.js +1 -1
  105. package/dist/features/waterfall.esm.js +1 -1
  106. package/dist/features/waterfall.js +1 -1
  107. package/dist/features/weave.common.js +1 -1
  108. package/dist/features/weave.esm.js +1 -1
  109. package/dist/features/weave.js +1 -1
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +950 -795
  112. package/dist/heatmap.common.js +2 -2
  113. package/dist/heatmap.esm.js +3 -17
  114. package/dist/heatmap.js +2 -2
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +433 -394
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +54 -38
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +2 -2
  121. package/dist/line.esm.js +91 -40
  122. package/dist/line.js +2 -2
  123. package/dist/locales/en.json +2 -1
  124. package/dist/locales/ro.json +3 -2
  125. package/dist/pictograms.common.js +1 -1
  126. package/dist/pictograms.esm.js +1 -1
  127. package/dist/pictograms.js +1 -1
  128. package/dist/pie.common.js +1 -1
  129. package/dist/pie.esm.js +1 -1
  130. package/dist/pie.js +1 -1
  131. package/dist/polarArea.common.js +1 -1
  132. package/dist/polarArea.esm.js +1 -1
  133. package/dist/radar.common.js +2 -2
  134. package/dist/radar.esm.js +5 -4
  135. package/dist/radar.js +2 -2
  136. package/dist/radialBar.common.js +1 -1
  137. package/dist/radialBar.esm.js +1 -1
  138. package/dist/radialBar.js +1 -1
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +72 -26
  141. package/dist/rangeArea.common.js +2 -2
  142. package/dist/rangeArea.esm.js +91 -40
  143. package/dist/rangeBar.common.js +2 -2
  144. package/dist/rangeBar.esm.js +433 -394
  145. package/dist/scatter.common.js +2 -2
  146. package/dist/scatter.esm.js +91 -40
  147. package/dist/streamgraph.common.js +2 -2
  148. package/dist/streamgraph.esm.js +93 -41
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +103 -93
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +105 -86
  154. package/dist/treemap.js +2 -2
  155. package/dist/unit-shapes.common.js +1 -1
  156. package/dist/unit-shapes.esm.js +1 -1
  157. package/dist/unit-shapes.js +1 -1
  158. package/dist/unit.common.js +2 -2
  159. package/dist/unit.esm.js +280 -202
  160. package/dist/unit.js +2 -2
  161. package/dist/violin.common.js +2 -2
  162. package/dist/violin.esm.js +72 -26
  163. package/dist/violin.js +2 -2
  164. package/dist/waterfall.common.js +2 -2
  165. package/dist/waterfall.esm.js +432 -393
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +13 -6
  168. package/src/assets/apexcharts.css +35 -0
  169. package/src/charts/Bar.js +62 -55
  170. package/src/charts/BarStacked.js +80 -88
  171. package/src/charts/BoxCandleStick.js +28 -31
  172. package/src/charts/Icicle.js +37 -37
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Radar.js +5 -7
  175. package/src/charts/RangeBar.js +47 -43
  176. package/src/charts/Sunburst.js +101 -98
  177. package/src/charts/Treemap.js +108 -66
  178. package/src/charts/Unit.js +368 -250
  179. package/src/charts/Violin.js +48 -30
  180. package/src/charts/common/Breadcrumb.js +2 -2
  181. package/src/charts/common/Hierarchy.js +32 -11
  182. package/src/charts/common/Jitter.js +32 -7
  183. package/src/charts/common/bar/DataLabels.js +76 -81
  184. package/src/charts/common/bar/Helpers.js +43 -7
  185. package/src/charts/common/line/Helpers.js +12 -15
  186. package/src/charts/common/partition/NodeTooltip.js +8 -1
  187. package/src/charts/common/partition/Partition.js +33 -1
  188. package/src/charts/common/treemap/Helpers.js +3 -11
  189. package/src/locales/en.json +2 -1
  190. package/src/locales/ro.json +3 -2
  191. package/src/modules/Core.js +4 -0
  192. package/src/modules/CoreUtils.js +18 -42
  193. package/src/modules/Data.js +23 -24
  194. package/src/modules/DataLabels.js +6 -6
  195. package/src/modules/Graphics.js +62 -49
  196. package/src/modules/Markers.js +3 -1
  197. package/src/modules/Range.js +44 -29
  198. package/src/modules/RendererController.js +17 -3
  199. package/src/modules/Scales.js +32 -9
  200. package/src/modules/Series.js +39 -18
  201. package/src/modules/Theme.js +1 -1
  202. package/src/modules/ZoomPanSelection.js +119 -2
  203. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  204. package/src/modules/animations/LengthTransition.js +22 -2
  205. package/src/modules/drilldown/Breadcrumb.js +5 -2
  206. package/src/modules/helpers/Destroy.js +1 -1
  207. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  208. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  209. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  210. package/src/modules/legend/Helpers.js +2 -0
  211. package/src/modules/legend/Legend.js +11 -12
  212. package/src/modules/settings/Options.js +7 -0
  213. package/src/modules/streamgraph/StreamLabels.js +1 -0
  214. package/src/modules/tooltip/Tooltip.js +20 -4
  215. package/src/modules/tooltip/Utils.js +8 -0
  216. package/src/modules/trellis/Trellis.js +6 -0
  217. package/src/modules/trellis/TrellisChrome.js +18 -7
  218. package/src/modules/trellis/TrellisSync.js +2 -0
  219. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  220. package/src/ssr/DOMShim.js +10 -0
  221. package/src/types/internal.d.ts +9 -3
  222. package/types/apexcharts.d.ts +31 -12
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- !function(e){var t="undefined"!=typeof globalThis?globalThis:self,r=t.ApexCharts;if(r&&r.__internals)return e.call(t);if(r)throw new Error("ApexCharts: dist/features/highlight-filter.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/highlight-filter.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/features/highlight-filter.js",run:e,done:!1},l=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);l.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var r=t.ApexCharts;if(r)if(r.__internals){n.done=!0;var i=l.indexOf(n);-1!==i&&l.splice(i,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/features/highlight-filter.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/features/highlight-filter.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/highlight-filter.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/features/highlight-filter.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,o=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&s(e,r,t[r]);if(l)for(var r of l(t))a.call(t,r)&&s(e,r,t[r]);return e},u=(e,t)=>r(e,n(t));const h=globalThis.ApexCharts,d=globalThis.ApexCharts.__internals.__apex_Graphics,c=globalThis.ApexCharts.__internals.__apex_CoreUtils,p=globalThis.ApexCharts.__internals.__apex_Series,g=globalThis.ApexCharts.__internals.__apex_Utils,f=globalThis.ApexCharts.__internals;f.__apex_Animations,f.__apex_Animations_computeStagger,f.__apex_Animations_applyAnimationPolicy;const v=f.__apex_Animations_prefersReducedMotion;f.__apex_Animations_applyProgressiveReveal;const b=globalThis.ApexCharts.__internals.__apex_DataLabels,m=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,y=globalThis.ApexCharts.__internals.__apex_Environment_Environment,A=globalThis.ApexCharts.__internals;A.__apex_Easing_easeInOutSine,A.__apex_Easing_DEFAULT_EASING_NAME,A.__apex_Easing_cubicBezier,A.__apex_Easing_registerEasing;const _=A.__apex_Easing_resolveEasing,x=globalThis.ApexCharts.__internals,w=x.__apex_PathMorphing_parsePath;x.__apex_PathMorphing_morphPaths,x.__apex_PathMorphing_pathBbox;const k=x.__apex_PathMorphing_arrayToPath;function S(e,t,r){if(!e||"string"!=typeof e)return null;const n=w(e);if(!n.length||"M"!==n[0][0])return null;for(let e=1;e<n.length;e++)if("M"===n[e][0])return null;let l=n,i=null;if(r){if(n.length<5)return null;if(i=n.slice(-3),l=n.slice(0,-3),"Z"!==i[2][0])return null;if("L"!==i[1][0])return null;if("L"!==i[0][0]&&"C"!==i[0][0])return null}else if("Z"===n[n.length-1][0])return null;if(l.length!==t||l.length<2)return null;const a=l[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<l.length;e++)if(l[e][0]!==a)return null;const s=l.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of s)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:l,closing:i,segType:a,anchors:s}}function M(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function C(e,t,r){const n=e,l=[t[1],t[2]],i=[t[3],t[4]],a=[t[5],t[6]],s=M(n,l,r),o=M(l,i,r),u=M(i,a,r),h=M(s,o,r),d=M(o,u,r),c=M(h,d,r);return{first:["C",s[0],s[1],h[0],h[1],c[0],c[1]],second:["C",d[0],d[1],u[0],u[1],a[0],a[1]],mid:c}}function E(e,t,r){const n=[t[1],t[2]],l=M(e,n,r);return{first:["L",l[0],l[1]],second:["L",n[0],n[1]],mid:l}}function T(e,t){const{body:r,closing:n,segType:l,anchors:i}=e,a=i.length,s=t.length,o=e=>"C"===l?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],u=[["M",i[0][0],i[0][1]]];let h=0;for(;h<s&&0!==t[h];)h++;for(let e=1;e<=h;e++)u.push(o(i[0]));let d=h+1;for(let e=0;e<a-1;e++){let n=0;for(;d+n<s&&-1===t[d+n];)n++;const a=r[e+1];if(n){const t=n+1;let r=i[e],s=a;for(let e=0;e<n;e++){const n=1/(t-e),i="C"===l?C(r,s,n):E(r,s,n);u.push(i.first),r=i.mid,s=i.second}u.push(s)}else u.push(a.slice());d+=n+1}for(;d<s;)u.push(o(i[a-1])),d++;return n&&n.forEach(e=>u.push(e.slice())),u}function $(e,t,r,n,l,i){const a=S(e,n,i);if(!a)return null;const s=S(t,l,i);if(!s)return null;if(a.segType!==s.segType)return null;if((a.closing||s.closing)&&(!a.closing||!s.closing||a.closing[0][0]!==s.closing[0][0]))return null;const o=r.map(e=>e.oldJ),u=r.map(e=>e.newJ);return{from:k(T(a,o)),toInterp:k(T(s,u))}}function P(e,t,r){var n,l,i,a;if(null==(n=e.axisFlags)?void 0:n.isXNumeric){const n=null==(i=null==(l=e.seriesData)?void 0:l.seriesX)?void 0:i[t];if(n&&n.length&&null!=n[r])return"x:"+n[r]}const s=null==(a=e.globals.labels)?void 0:a[r];return null!=s&&""!==String(s)?"c:"+(Array.isArray(s)?s.join(" "):String(s)):"j:"+r}function L(e){const t=new Map;return e.map(e=>{const r=t.get(e)||0;return t.set(e,r+1),0===r?e:`${e}#${r}`})}function D(e,t,r=!1,n=!1){var l,i;if(!function(e){var t;const r=e.config.chart.animations;if(!r||!1===r.enabled)return!1;if(!r.dynamicAnimation||!1===r.dynamicAnimation.enabled)return!1;const n=null!=(t=r.largeDatasetThreshold)?t:0;return!(n>0&&e.globals.dataPoints>n||!(y.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const s=null==(l=a.seriesY)?void 0:l[t],o=null==(i=e.seriesData.series)?void 0:i[t];if(!Array.isArray(s)||!Array.isArray(o))return null;if(!s.length||!o.length)return null;const u=L(s.map((e,r)=>function(e,t,r){var n,l;if(e.isXNumeric){const l=null==(n=e.seriesX)?void 0:n[t];if(l&&l.length&&null!=l[r])return"x:"+l[r]}const i=null==(l=e.labels)?void 0:l[r];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+r}(a,t,r))),h=L(o.map((r,n)=>P(e,t,n))),d=function(e,t){const r=new Map;e.forEach((e,t)=>{r.has(e)||r.set(e,t)});const n=new Array(t.length),l=new Set;let i=-1,a=!0,s=e.length===t.length;t.forEach((e,t)=>{const o=r.has(e)&&!l.has(r.get(e))?r.get(e):-1;n[t]=o,-1!==o&&(l.add(o),o<i&&(a=!1),i=o),o!==t&&(s=!1)});const o=[];for(let t=0;t<e.length;t++)l.has(t)||o.push(t);return{toOld:n,exits:o,ordered:a,changed:!s}}(u,h);return(d.ordered||n)&&(d.changed||r)?{join:d,oldKeys:u,newKeys:h}:null}function F(e,{type:t,realIndex:r,pathFromLine:n,pathFromArea:l,linePaths:i,areaPaths:a}){var s,o;const u=D(e,r);if(!u)return null;const{join:h,oldKeys:d,newKeys:c}=u,p=e.globals.prevStreamFrame;if(!p)return null;const g=null==(s=p.seriesY)?void 0:s[r],f=null==(o=e.seriesData.series)?void 0:o[r];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const v=function(e,t){const r=new Set(e.exits),n=[];let l=0;for(let t=0;t<e.toOld.length;t++){const i=e.toOld[t];if(-1!==i){for(;l<i;)r.has(l)&&n.push({oldJ:l,newJ:-1}),l++;n.push({oldJ:i,newJ:t}),l=i+1}else n.push({oldJ:-1,newJ:t})}for(;l<t;)r.has(l)&&n.push({oldJ:l,newJ:-1}),l++;return n}(h,d.length),b={};return Array.isArray(i)&&1===i.length&&n&&(b.line=$(n,i[0],v,d.length,c.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&l&&(b.area=$(l,a[0],v,d.length,c.length,!0)),b.line||b.area?b:null}const O=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function j(e,t){const{ax:r,bx:n,ay:l,by:i}=t,a=[],s=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=s.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(O)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${r*e+n}`);continue}if("V"===e){for(const e of t)a.push(`V ${l*e+i}`);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]} ${r*t[e+5]+n} ${l*t[e+6]+i}`);continue}const s=[];for(let e=0;e+1<t.length;e+=2)s.push(`${r*t[e]+n} ${l*t[e+1]+i}`);s.length&&a.push(`${e} ${s.join(" ")}`)}return a.join(" ")}const I="apexcharts-highlight-part",N={f:1,o:0},B={f:0,o:0},z=e=>({f:e,o:e<1?1:0}),H=e=>"number"==typeof e&&e==e&&e!==1/0&&e!==-1/0,R=(e,t,r)=>r>=1?t:e+(t-e)*r,W=e=>e&&"object"==typeof e&&!Array.isArray(e),Y=(e,t="fill-opacity")=>{var r;const n=null==(r=e.instance)?void 0:r._cmd,l=parseFloat(n?n[t.replace("-o","O")]:e.getAttribute(t));return isFinite(l)?l:1};function q(e){const t="string"==typeof e?e.trim():"";let r,n=null;return(r=/^rgba\(([^,]+,[^,]+,[^,]+),([^)]+)\)$/i.exec(t))?n=[`rgb(${r[1]})`,parseFloat(r[2])]:(r=/^color-mix\(in srgb, (.+) ([\d.]+)%, transparent\)$/.exec(t))?n=[r[1],parseFloat(r[2])/100]:(r=/^(#[\da-f]{6})([\da-f]{2})$/i.exec(t))&&(n=[r[1],parseInt(r[2],16)/255]),n&&n[1]>0&&n[1]<1?n:[e,1]}function X(e,t){const r=null!=e&&t?e/t:null;return{value:null!=e?e:null,total:null!=t?t:null,share:r,overflow:null!=r&&(r<0?"sign":r>1)}}function G(e){let t=parseFloat(e.getAttribute("x")),r=parseFloat(e.getAttribute("y"));return String(e.getAttribute("transform")||"").replace(/translate\(\s*([^\s,)]+)[\s,]*([^\s,)]*)\s*\)/g,(e,n,l)=>(t+=parseFloat(n)||0,r+=parseFloat(l)||0,"")),[t,r]}const V=["mousemove","mousedown","mouseup","mouseover","mouseout","click","touchstart","touchmove","touchend"];function J(e,t){const r=e._apxHits||(e._apxHits=new Set);if(!e._apxHitStop){e._apxHitStop=!0;const t=e=>{r.has(e.relatedTarget)&&e.stopImmediatePropagation()};["mouseout","mouseleave","mouseover","mouseenter"].forEach(r=>e.addEventListener(r,t,!0))}r.add(t),V.forEach(r=>t.addEventListener(r,t=>{t.stopPropagation();const n="mouseover"===r,l="mouseout"===r;(n||l)&&t.relatedTarget===e||(Q(e,r,t),n&&Q(e,"mouseenter",t),l&&Q(e,"mouseleave",t))},{passive:!0}))}function U(e,t){const r=()=>{const r=e.getAttribute("filter");r?t.setAttribute("filter",r):t.removeAttribute("filter")};r(),y.isBrowser()&&"undefined"!=typeof MutationObserver&&new MutationObserver(r).observe(e,{attributes:!0,attributeFilter:["filter"]})}function Z(e,t){const r=e.parentNode,n=Array.from(r.childNodes);r.insertBefore(t,n[n.indexOf(e)+1]||null)}const K=(e,t)=>e.setAttribute("class",`${e.getAttribute("class")||""} ${t}`.trim());function Q(e,t,r){try{const n=r.touches?{bubbles:!0,cancelable:!0,touches:Array.from(r.touches),targetTouches:Array.from(r.targetTouches),changedTouches:Array.from(r.changedTouches)}:"mouseenter"===t||"mouseleave"===t?{clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,relatedTarget:r.relatedTarget,buttons:r.buttons}:r;e.dispatchEvent(new r.constructor(t,n))}catch(e){}}function ee(e){if(!W(e))return e;const t=e,{highlightData:r,highlight:n}=t,s=((e,t)=>{var r={};for(var n in e)i.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))t.indexOf(n)<0&&a.call(e,n)&&(r[n]=e[n]);return r})(t,["highlightData","highlight"]);return["data","children"].forEach(e=>{Array.isArray(s[e])&&(s[e]=s[e].map(ne))}),s}function te(e){const t=[];return(e||[]).forEach(e=>(W(e)&&Array.isArray(e.data)?e.data:[]).forEach(e=>{W(e)&&void 0!==e.x&&(void 0!==e.y||Array.isArray(e.children))&&t.push(e)})),t}const re=e=>W(e)&&("highlight"in e||"highlightData"in e||[e.data,e.children].some(e=>Array.isArray(e)&&e.some(re))),ne=e=>W(e)&&("highlight"in e||Array.isArray(e.children))?ee(e):e;function le(e,t){if("number"==typeof t)return t;const r=e.config&&e.config.series||[];for(let e=0;e<r.length;e++)if(r[e]&&r[e].name===t)return e;return-1}function ie(e){return!!(e&&e.weaveHighlights&&e.weaveHighlights.records.length)}function ae(e,t){if(!ie(e))return null;let r=null;for(const n of e.weaveHighlights.records)for(const l of n.entries)le(e,l.series)===t&&(r=l.values);return r}const se="p:",oe=["pie","donut","polarArea"];function ue(e,t){var r;const n=e.w.highlightData;if(!n)return;if(e._render!==t&&e._beginRender(t,"p:"),!n.active&&!(null==(r=e._prev())?void 0:r.size))return;n.active&&"polarArea"===t.chartType&&"clamp"!==e.cfg.axis&&n.parts.forEach(e=>{H(e[0])&&(t.maxY=Math.max(t.maxY,e[0]))});const l=t.animatePaths,i=t.drawArcs,a=t.getSliceMovers,s=t.getHoverOutlinePath,h={arcs:[],movers:[],reach:[],ap:l};t.animatePaths=(e,r)=>{const n=o({},r);l.call(t,e,r),n.run=r.dur,h.arcs[r.i]={a:n,el:e}},t.drawArcs=(...r)=>{const n=i.apply(t,r);return function(e,t,r,n){var l,i,a,s,h,c,p,f,v,b;const m=e.w,A=m.globals,_=e.cfg,x=m.highlightData,w=x.active,k=e._prev(),S=t.chartType,M="polarArea"===S,C=A.radialSize,E="donut"===S?t.donutSize:0,T=w?null!=(l=_.fadeOpacity)?l:.2:1,$=!0===(null==(i=e.ctx.morphTypeChange)?void 0:i.isActive()),P=!A.dataChanged||!A.shouldAnimate,L="area"===(null==(a=_.pie)?void 0:a.encoding),D=m.seriesData.series,F="part"===(null!=(h=null==(s=_.dataLabels)?void 0:s.value)?h:"part"),O=t.strokeWidth>0&&(null!=(p=null==(c=_.outline)?void 0:c.width)?p:1)>0?{opacity:null!=(v=null==(f=_.outline)?void 0:f.opacity)?v:1}:null,j=null==(b=A.prevHighlightLabels)?void 0:b.get(-1),H=[],W=(e,t)=>{var r,n;return(null==(r=e.classList)?void 0:r.contains(t))||` ${null==(n=e.getAttribute)?void 0:n.call(e,"class")} `.indexOf(` ${t} `)>-1};Array.from(r.node.childNodes).filter(e=>W(e,"apexcharts-pie-series")).forEach(r=>{var l,i,a,s,h,c;const p=Array.from(r.childNodes).find(e=>W(e,"apexcharts-pie-area"));if(!p)return;const f=Number(p.getAttribute("j")),v=se+f,b=P||null==k?void 0:k.get(v);if(!w&&!b)return;const S=n.arcs[f],G=D[f],V=w?null==(l=x.parts[f])?void 0:l[0]:null,Z=t.sliceSizes[f],K=M?Z:C,Q=y.isBrowser()&&!!S&&S.a.run>0&&!$,ee=+(null==S?void 0:S.a.animBeginArr[f])||0,te=null!=V&&G>0?V/G:null;let re=null,ne=!1;if(null!=te&&te>0)if(ne=te>1,M)re=Math.min(C,Z*te);else{const e=Math.min(te,1);re=L?Math.sqrt(E*E+e*(C*C-E*E)):E+(C-E)*e}const le=null!=(i=null==b?void 0:b.lr)?i:null==b?void 0:b.fr;let ie=re;const ae=null==re&&null!=le&&Q;ae&&(ie=A.collapsedSeriesIndices.indexOf(f)>-1?le*C:w?E:K);const oe=ae&&!w;let ue=ie,he=!1;null!=ie&&Q&&!P&&(null!=le?ue=le*C:b||"baseline"===_.enter?ue=E:(he=!0,ue=M?null!=(a=S.a.prevSize)?a:Z:C),ae||Math.abs(S.a.prevEndAngle-S.a.prevStartAngle)>.01||(ue=ie,he=!1));let de=null,ce=null;const ge=e=>{const t=p.getAttribute("transform");t&&(e.setAttribute("transform",t),e.classList.add("apexcharts-slice-mover"),e.style.transition=p.style.transition),(n.movers[f]=n.movers[f]||[]).push(e)},fe=(e,r,l,i)=>{if(S&&!$)n.ap.call(e,r,u(o({},S.a),{size:l,prevSize:P?void 0:i,isTrack:!0}));else{const n=Number(p.getAttribute("data:angle"));r.attr({d:e.getPiePath({me:e,startAngle:Number(p.getAttribute("data:startAngle")),angle:n>=t.fullAngle?t.fullAngle-.01:n,size:l}),"stroke-width":e.strokeWidth})}},ve=p.getAttribute("fill"),[be,me]=q(ve),ye=Y(p),Ae=!!ve&&"none"!==ve&&!/^url\(/i.test(ve),_e=Ae?me*ye:ye,xe=Ae?he?_e:null!=le&&null!=(s=b.al)?s:1:ye,we=Ae?oe?_e:1:ye;if(null!=ie){const l=pe(t,K);de=new d(m).drawPath({d:"",fill:be,stroke:p.getAttribute("stroke"),strokeWidth:0,fillOpacity:xe,classes:`${I} apexcharts-pie-highlight-part`});const i=de.node;if(i.setAttribute("pointer-events","none"),null!=te&&i.setAttribute("data:hl-share",String(te)),r.appendChild(i),ge(i),Q&&!P&&i.setAttribute("d",l.getChangedPath(S.a.prevStartAngle,S.a.prevEndAngle,ue)),fe(l,de,ie,ue),ne&&!ae&&i.classList.add("apexcharts-highlight-overflow"),U(p,i),(ne&&!ae||ae&&(null==b?void 0:b.edge))&&(ce=new d(m).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${I} apexcharts-highlight-edge`}),ce.node.setAttribute("pointer-events","none"),ce.node.setAttribute("stroke-opacity","0"),r.appendChild(ce.node),ge(ce.node),fe(pe(t,K,{strokeWidth:{value:1}}),ce,M?Z:C-2,M?null==S?void 0:S.a.prevSize:C-2)),M&&ne&&!ae&&(i.removeAttribute("pointer-events"),J(p,i),n.reach[f]=ie),$){const t=[i,null==ce?void 0:ce.node].filter(Boolean),r=e=>t.forEach(t=>t.setAttribute("opacity",e));r(0),e._tween(e.ctx.morphTypeChange.getSpeed(),m.config.chart.animations.dynamicAnimation.speed,r,()=>t.forEach(e=>e.removeAttribute("opacity")))}}const ke={d:null,fr:null,f:T,edge:!1,c:!w,al:we};e._targets.set(v,ke);const Se=ne&&null!=re?.75:0,Me=P?Se:(null==b?void 0:b.edge)?.75:0,Ce=null!=ue?ue:0,Ee=null!=ie?ie:0;e._fade(p,P?z(T):he?B:b?{f:b.f,o:null!=(h=b.o)?h:z(b.f).o}:N,oe?B:z(T),{delayMs:ee,speed:null==S?void 0:S.a.run,el:null==S?void 0:S.el},{anim:Q,force:!!de&&(Ce!==Ee||Me!==Se||xe!==we),outline:O&&u(o({},O),{color:A.colors[f]}),also:e=>{de&&(ke.lr=R(Ce,Ee,e)/C,ke.la=R(xe,we,e),de.node.setAttribute("fill-opacity",String(ke.la))),null==ce||ce.node.setAttribute("stroke-opacity",String(R(Me,Se,e)))},land:oe?N:void 0,done:ae?()=>{null==de||de.remove(),null==ce||ce.remove(),ke.lr=null}:void 0,rec:ke}),null!=re&&Object.assign(ke,{fr:re/C,edge:ne,n:de.node});const Te=t.sliceLabelGroups[f],$e=Te&&Array.from(Te.childNodes).find(e=>W(e,"apexcharts-pie-label"));if($e&&w){if(null==V&&F)return t.sliceLabels=t.sliceLabels.filter(e=>e.node!==Te),null==(c=Te.parentNode)||c.removeChild(Te),void delete t.sliceLabelGroups[f];!function(e,t,r,n,l,i,a,s,o){var u,h;const c=e.config.dataLabels.formatter;if(null!=i){const t=null!=(h=null==(u=e.globals.seriesPercent[l])?void 0:u[0])?h:0,r=a?t*i/a:0;n.textContent=String(c?c(r,{seriesIndex:l,dataPointIndex:l,series:e.seriesData.series,w:e,highlight:X(i,a)}):r+"%")}const p=parseFloat(n.getAttribute("font-size"))||12,f=Number(r.getAttribute("data:startAngle")),v=Number(r.getAttribute("data:angle"));if(null!=i&&null!=s&&s-o>=1.2*p){const r=e.config.plotOptions.pie.dataLabels.offset,l=g.polarToCartesian(t.centerX,t.centerY,"donut"===t.chartType?(o+s)/2+r:s/1.25+r,(f+v/2)%t.fullAngle);n.setAttribute("x",l.x),n.setAttribute("y",l.y)}const b=new d(e).getTextRects(n.textContent,n.getAttribute("font-size"),n.getAttribute("font-family"),void 0,!0,n.getAttribute("font-weight")),m=parseFloat(n.getAttribute("x")),y=parseFloat(n.getAttribute("y")),A=null!=s&&[[m-b.width/2,y-.75*b.height],[m+b.width/2,y-.75*b.height],[m-b.width/2,y+.25*b.height],[m+b.width/2,y+.25*b.height]].every(([e,r])=>{const n=e-t.centerX,l=r-t.centerY,i=Math.hypot(n,l),a=((180*Math.atan2(l,n)/Math.PI+90-f)%360+360)%360;return i>=o&&i<=s&&a<=v});A||(n.setAttribute("fill",e.config.chart.foreColor),n.removeAttribute("filter"))}(m,t,p,$e,f,F?V:null,G,re,E)}$e&&Q&&!P&&j&&H.push({t:$e,src:j.get(f),el:S.el,delayMs:ee,arc:S})}),H.length&&(e._ride=()=>function(e,t){t.forEach(({t:t,src:r,el:n,delayMs:l,arc:i})=>{if(!t.isConnected)return;const[a,s]=G(t),o=r?r.x-a:0,u=r?r.y-s:0;r&&Math.abs(o)<.5&&Math.abs(u)<.5||e._tween(l,i.a.run,e=>{const n=1-e;n>0&&r?t.setAttribute("transform",`translate(${o*n} ${u*n})`):t.removeAttribute("transform"),r||(e<1?t.setAttribute("opacity",String(e)):t.removeAttribute("opacity"))},void 0,void 0,n)})}(e,H))}(e,t,n,h),n},t.getSliceMovers=e=>a.call(t,e).concat(h.movers[e]||[]),t.getHoverOutlinePath=e=>{const r=t.sliceSizes;if(!(h.reach[e]>r[e]))return s.call(t,e);t.sliceSizes=r.slice(),t.sliceSizes[e]=h.reach[e];try{return s.call(t,e)}finally{t.sliceSizes=r}},he(e,t)}function he(e,t){const r=t.renderInnerDataLabels,n=t.printInnerLabels;t.renderInnerDataLabels=(n,l,i)=>de(e,()=>r.call(t,n,ce(e,l,0),i)),t.printInnerLabels=(r,l,i,a)=>de(e,()=>n.call(t,ce(e,r,a?+a.parentNode.getAttribute("rel")-1:-1),l,i,a))}function de(e,t){var r,n;const l=e.w.globals,i=e.w.highlightData;if(!(null==i?void 0:i.active)||"part"!==(null!=(n=null==(r=e.cfg.dataLabels)?void 0:r.total)?n:"part"))return t();const a=l.seriesTotals;l.seriesTotals=i.parts.map(e=>{var t;return null!=(t=e[0])?t:0});try{return t()}finally{l.seriesTotals=a}}function ce(e,t,r){var n,l;const i=e.w,a=i.highlightData;if(!(null==a?void 0:a.active))return t;const s=i.seriesData.series,h=a.parts.map(e=>e[0]),d=r>-1&&"part"===(null!=(l=null==(n=e.cfg.dataLabels)?void 0:n.value)?l:"part")?h[r]:null,c=e=>e.reduce((e,t)=>e+(H(t)?t:0),0),p=t.total.formatter,g=t.value.formatter;return u(o({},t),{total:u(o({},t.total),{formatter:p&&(e=>p(e,{highlight:X(c(h),c(s))}))}),value:u(o({},t.value),{formatter:(e,t)=>g(null!=d?d:e,t,{highlight:r>-1?X(h[r],s[r]):void 0})})})}const pe=(e,t,r)=>Object.create(e,o({getSliceExtent:{value:r=>e.getSliceExtent(u(o({},r),{size:t}))}},r)),ge="r:",fe="r:o",ve=["length","baseWidth","tipWidth","offsetY"],be=.45,me=`${I} apexcharts-radialbar-highlight-lane`;function ye(e,t){var r,n,l,i,a,s,u;const h=e.w,d=h.highlightData,c=null==(n=null==(r=e.ctx.lastUpdateOptions)?void 0:r.tooltip)?void 0:n.enabled;if(null!=c?e._tipUser=c:e._tipOn&&(h.config.tooltip.enabled=!1),e._tipOn=!1,!d)return;e._render!==t&&e._beginRender(t,ge),function(e){const t=e.ctx.morphTypeChange;if(!t||t._hfOut)return;t._hfOut=!0;const r=t.captureBeforeDestroy;t.captureBeforeDestroy=n=>{const l=function(e,t){var r,n,l,i,a;const s=e.w,o=s.globals,u=null==(r=s.dom.baseEl)?void 0:r.querySelector(".apexcharts-radialbar");if("radialBar"!==t&&"gauge"!==t||!u)return null;const h=e.ctx.morphTypeChange,d=null!=(l=null==(n=o.circleGeometry)?void 0:n.cx)?l:0,c=null!=(a=null==(i=o.circleGeometry)?void 0:i.cy)?a:0,p=new Map,g=new Set,f=new Set;u.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(t=>{var r,n,l,i;const a=t.parentNode,s=+a.getAttribute("data:realIndex"),o=ge+t.getAttribute("j"),u=null!=(n=e._targets.get(o))?n:null==(r=e._prev())?void 0:r.get(o),v=a.querySelector(".apexcharts-radialbar-highlight-part");if(!(v||(null==u?void 0:u.s)>0||(null!=(i=null!=(l=null==u?void 0:u.lf)?l:null==u?void 0:u.f)?i:1)<1))return;g.add(t);const b=null==v?void 0:v.getAttribute("d"),m=+(null==v?void 0:v.getAttribute("stroke-width"));let y=null;if(b&&m>0&&"0"!==v.getAttribute("opacity"))y=h._radialArcToFilledSegment(b,m,d,c)||b,f.add(v);else{const e=/M\s*(-?[\d.e]+)\s+(-?[\d.e]+)/.exec(t.getAttribute("d")||"");e&&(y=`M ${e[1]} ${e[2]} L ${e[1]} ${e[2]} Z`)}y&&p.set(s,y)});const v=[...u.getElementsByClassName(I)];return p.size||v.length?(v.forEach(e=>f.has(e)||e.closest(".apexcharts-tracks")||g.add(e)),{marks:p,ghost:()=>{const e="data-hf-ghost";g.forEach(t=>t.setAttribute(e,""));const t=s.dom.Paper.node.cloneNode(!0);g.forEach(t=>t.removeAttribute(e));const r=new Set(t.querySelectorAll(`[${e}]`)),n=new Set;r.forEach(r=>{r.removeAttribute(e);for(let e=r.parentNode;e&&e!==t;e=e.parentNode)n.add(e)});const l=e=>[...e.children].forEach(e=>{r.has(e)||(n.has(e)?l(e):"defs"!==e.tagName.toLowerCase()&&e.remove())});return l(t),t.removeAttribute("id"),[t,...t.querySelectorAll("*")].forEach(e=>{e.id&&(e.id+="-hf"),[...e.attributes].forEach(t=>{t.value.includes("url(#")&&e.setAttribute(t.name,t.value.replace(/url\(#([^)]+)\)/g,"url(#$1-hf)"))})}),t}}):null}(e,null==n?void 0:n.fromType);if(!l)return r.call(t,n);const i=t._captureFromDOM;let a;t._captureFromDOM=e=>{const r=i.call(t,e);return r.marks.forEach(e=>{var t;e.d=null!=(t=l.marks.get(e.realIndex))?t:e.d}),r};try{a=r.call(t,n)}finally{t._captureFromDOM=i}const s=t._snapshot;return!a||!s||t._ghost||s.pieceOut||s.pieceIn||(t._ghost=l.ghost()),a}}(e);const p=h.config.plotOptions.radialBar;if(e._ind=null!=(i=null==(l=e.cfg.radialBar)?void 0:l.indicator)?i:"needle"===p.shape?"needle":"arc","lanes"!==e._ind||"needle"!==p.shape||(null==(a=p.needle)?void 0:a.showValueArc)||(e._ind="needle"),!d.active&&!(null==(s=e._prev())?void 0:s.size))return;const g=h.config.tooltip;d.active&&!g.enabled&&null==e._tipUser&&y.isBrowser()&&(g.enabled=!0,e._tipOn=!0),he(e,t),function(e,t){const r=t.renderInnerDataLabels,n=t.printInnerLabels;t.renderInnerDataLabels=(n,l,i)=>{const a=r(n||t.dataLabelsGroup,l,i);return xe(e,t,l,-1,a),a},t.printInnerLabels=(r,l,i,a)=>{n(r,l,i,a),xe(e,t,r,a?+a.parentNode.getAttribute("rel")-1:-1)}}(e,t);const f=t.drawNeedle;t.drawNeedle=r=>{const n=f.call(t,r);return function(e,t,r){var n,l;const i=e.w,a=i.globals,s=i.highlightData.active,o=!a.dataChanged||!a.shouldAnimate,u=o||null==(n=e._prev())?void 0:n.get(fe);if(!s&&!u)return;const h=s?null!=(l=e.cfg.fadeOpacity)?l:.2:1,d=o?h:u?u.f:1,c={d:null,f:h,c:!s};e._targets.set(fe,c);const p=e=>{c.lf=e,e<1?r.node.setAttribute("opacity",String(e)):r.node.removeAttribute("opacity")},g=e.ctx.morphTypeChange,f=(null==g?void 0:g.isActive())?{delay:g.getSpeed(),speed:i.config.chart.animations.dynamicAnimation.speed}:t.needleMotion();f&&d!==h?(c.run=!0,e._tween(f.delay||0,f.speed,e=>p(R(d,h,e)),()=>c.run=!1,f.ease)):p(h),s&&y.isBrowser()&&Promise.resolve().then(()=>{var e;const t=i.dom.baseEl,n=null==t?void 0:t.querySelector(".apexcharts-radialbar-slice-0");n&&r.node.isConnected&&(J(n,r.node),null==(e=t.querySelector(".apexcharts-radialbar-hollow"))||e.setAttribute("pointer-events","none"))})}(e,t,n),n};const v=t.animatePaths;t.animatePaths=(r,n)=>{const l=o({},n);v.call(t,r,n),n.isTrack||(l.run=n.dur,Ae(e,t,r,l,v))},!0===(null==(u=e.ctx.morphTypeChange)?void 0:u.isActive())&&Promise.resolve().then(()=>{var r;e._render!==t||h.globals.isDestroyed||null==(r=h.dom.baseEl)||r.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(r=>Ae(e,t,r.instance,null,v))})}function Ae(e,t,r,n,l){var i,a,s,h,c,p;const f=e.w,v=f.globals,b=e.cfg,m=f.highlightData,A=m.active,_=r.node,x=n?n.i:Number(_.getAttribute("j")),w=ge+x,k=!n,S=!v.dataChanged||!v.shouldAnimate,M=e._prev(),C=S||null==M?void 0:M.get(w),E=f.config.plotOptions.radialBar,T=e._ind,$=_.getAttribute("stroke"),P=_.getAttribute("fill"),L=$&&"transparent"!==$?$:k&&P&&"none"!==P?P:null,D=0===x&&("needle"===T||!L),F=f.seriesData.series[x],O=A&&v.collapsedSeriesIndices.indexOf(x)<0&&null!=(a=null==(i=m.parts[x])?void 0:i[0])?a:null,j=t.startAngle,z=n?n.endAngle:t._arcEnd(F),W=n?n.run:0,q=y.isBrowser()&&W>0,X=n&&+n.animBeginArr[x]||0,G=null!=(s=b.fadeOpacity)?s:.2,V=A&&!D&&!!L,Q={f:G,o:0},ee=n?n.size:Math.hypot(_.getAttribute("data:cx")-v.circleGeometry.cx,_.getAttribute("data:cy")-v.circleGeometry.cy);if("lanes"===T&&L)return function(e,t,r,n){var l,i,a,s,h,c,p;const{i:g,c:f,prev:v,mount:b,pv:m,whole:A,wholeEnd:_,run:x,anim:w,delayMs:k,size:S}=n,M=e.w,C=M.globals,E=e.cfg,T=M.config.plotOptions.radialBar,$=M.highlightData.active,P=r.node,L=!f,D=t.startAngle,F=$&&C.collapsedSeriesIndices.indexOf(g)<0?1:0,O=L?y.isBrowser()&&!!F:w&&!b,j=!L&&w&&b,N=L?0:O?null!=(l=null==v?void 0:v.s)?l:0:F,B=L?{delayMs:e.ctx.morphTypeChange.getSpeed(),speed:M.config.chart.animations.dynamicAnimation.speed}:{delayMs:k,speed:x};if(0===g&&function(e,t){var r;const n=null==(r=e._render)?void 0:r._hfLine,l=null==n?void 0:n.rec;if(!l||l.run||l.lf===l.f)return;const i=l.lf,a=()=>{var e,t;if(l.run=!1,l.f)return;l.done=!0;const r=null==(e=n.node)?void 0:e.previousSibling;null!=l.hold&&r&&r.textContent===l.pv&&(r.textContent=l.vt=l.hold),null==(t=n.node)||t.remove(),n.node=null};if(!t)return l.lf=l.f,ke(n),void a();l.run=!0,e._tween(t.delayMs,t.speed,e=>{l.lf=R(i,l.f,e),ke(n)},a,void 0,t.el)}(e,O?u(o({},B),{el:r}):null),!F&&!N)return;const z=null!=m?t._arcEnd(m):D,W=_,q=F?z:W;let X=W,G=q;L?G="baseline"===E.enter?D:W:O?(X=null!=(i=null==v?void 0:v.we)?i:H(f.prevEndAngle)?f.prevEndAngle:W,G=null!=(a=null==v?void 0:v.e)?a:"baseline"===E.enter?D:X):j&&(X=G=D);const V=F?null!=(c=null==(h=null==(s=E.radialBar)?void 0:s.lanes)?void 0:h.opacity)?c:be:1,Q=L?1:O?v?v.f:1:V,ee=L?t.getStrokeWidth({size:C.circleGeometry.r,series:M.seriesData.series}):Number(P.getAttribute("stroke-width")),te=P.getAttribute("stroke-opacity"),re=e=>{var t;const r=new d(M).drawPath({d:"",stroke:n.paint,strokeWidth:ee,fill:"none",strokeOpacity:Y(P,"stroke-opacity"),strokeDashArray:null!=(t=P.getAttribute("stroke-dasharray"))?t:0,classes:`${me} ${e}`});return r.node.setAttribute("aria-hidden","true"),U(P,r.node),r},ne=re("apexcharts-radialbar-highlight-whole"),le=re("apexcharts-radialbar-highlight-part");Z(P,ne.node),Z(ne.node,le.node),ne.node.setAttribute("pointer-events","none"),F&&z-W>.01?J(P,le.node):le.node.setAttribute("pointer-events","none"),null!=m&&(m>(null!=A?A:0)||m>("number"==typeof T.max?T.max:100))&&K(le.node,"apexcharts-highlight-overflow");const ie=M.seriesData.series.length,ae=function(e){var t,r;if(e._hfTracks)return e._hfTracks;const n=(e,t)=>{var r;return` ${null==(r=e.getAttribute)?void 0:r.call(e,"class")} `.includes(` ${t} `)},l=[...(null==(r=null==(t=e.w.dom.Paper)?void 0:t.node)?void 0:r.childNodes)||[]];let i=[];for(let e=l.length-1;e>=0&&!i.length;e--){const t=[...l[e].childNodes||[]].find(e=>n(e,"apexcharts-tracks"));t&&(i=[...t.childNodes].map(e=>[...e.childNodes].find(e=>n(e,"apexcharts-radialbar-area"))))}return e._hfTracks=i}(t)[T.inverseOrder?ie-1-g:g],se=ae&&[ae.getAttribute("d"),ae.getAttribute("stroke-width")],oe=se?(parseFloat(se[1])||0)/(ee||1):0;let ue=null;if(ae){ue=new d(M).drawPath({d:"",stroke:ae.getAttribute("stroke"),strokeWidth:0,fill:"none",strokeOpacity:null!=(p=ae.getAttribute("stroke-opacity"))?p:1,classes:`${I} apexcharts-radialbar-highlight-track`});const e=ae.getAttribute("filter");e&&ue.node.setAttribute("filter",e),ue.node.setAttribute("pointer-events","none"),ue.node.setAttribute("aria-hidden","true"),Z(ae,ue.node)}const he=S-ee/2,de=S+ee/2,ce=ie<2,pe=ce?Math.max(2,.12*ee):Math.max(1,Math.min(.08*ee,t.margin/3)),fe=ce?0:Math.max(0,(3*pe-t.margin)/2),ve=Math.max(.5,(ee-pe)/2-fe),ye=(e,r)=>{const n=e-D;return n>.01?t.getPiePath({me:t,startAngle:D,angle:n===t.fullAngle?t.fullAngle-.01:n,size:r}):""},Ae=e=>{const r=t.trackStartAngle;let n=t.trackEndAngle;Math.abs(n)+Math.abs(r)>=360&&(n=360-Math.abs(t.startAngle)-.1);const l=n<r?t.fullAngle+n-r:n-r;return t.getPiePath({me:t,startAngle:r,angle:l===t.fullAngle?l-.01:l,size:e})},xe=(e,t,r)=>{e.setAttribute("d",t),e.setAttribute("stroke-width",String(r))},we={d:null,c:!$,f:V,cx:f?f.centerX:C.circleGeometry.cx,cy:f?f.centerY:C.circleGeometry.cy};e._targets.set(ge+g,we);const Se=(e,t,r)=>{we.s=e,we.we=t,we.e=r;const n=de-fe*e,l=he+e*(de-fe-ve-he),i=he+fe*e,a=i+e*ve;we.mid=(l+a)/2,xe(ne.node,ye(t,(l+n)/2),n-l),xe(le.node,a>i?ye(r,(i+a)/2):"",a-i),ae&&(e?(xe(ae,Ae((l+n)/2),(n-l)*oe),xe(ue.node,Ae((i+a)/2),(a-i)*oe)):(xe(ae,se[0],se[1]),xe(ue.node,"",0)))},Me=[ne.node,le.node,null==ue?void 0:ue.node].filter(Boolean);let Ce=!L;const Ee=()=>{Ce=!0,P.setAttribute("stroke-opacity","0"),Me.forEach(e=>e.removeAttribute("opacity"))};Ce?Ee():Me.forEach(e=>e.setAttribute("opacity","0")),Se(N,X,G);let Te=!1;if((O||j)&&ne.animate(B.speed,B.delayMs).during(e=>{Te||(Ce||Ee(),Se(R(N,F,e),R(X,W,e),R(G,q,e)))}),e._fade(ne.node,{f:Q,o:0},{f:V,o:0},u(o({},B),{el:ne}),{attr:"stroke-opacity",anim:O,force:O,done:F?void 0:()=>{Te=!0,Me.forEach(e=>e.remove()),ae&&xe(ae,se[0],se[1]),null==te?P.removeAttribute("stroke-opacity"):P.setAttribute("stroke-opacity",te),we.s=0},rec:we}),y.isBrowser()){const t=t=>{e._lane=[g,_e(P,t,we)]};["mouseover","mousemove","mousedown","touchstart","touchmove"].forEach(e=>P.addEventListener(e,t,!0))}}(e,t,r,{i:x,c:n,prev:C,mount:S,pv:O,whole:F,wholeEnd:z,run:W,anim:q,delayMs:X,size:ee,paint:L}),void(0===x&&Me(e,t,r,!1,O,S,k,n));const te=V&&null!=O?t._arcEnd(O):null,re=null!=te&&te-j>.01,ne=null!=(h=null==C?void 0:C.e)?h:null,le=!re&&null!=ne&&q,ie=le&&!V,ae=re?te:le?ie?z:j:null;let se=ae,oe=!1;null!=ae&&q&&!S&&(null!=ne?se=ne:C||"baseline"===b.enter?se=j:(oe=!0,se=H(n.prevEndAngle)?n.prevEndAngle:z));const ue=e=>{const r=e-j;return t.getPiePath({me:t,startAngle:j,angle:r===t.fullAngle?t.fullAngle-.01:r,size:ee})};let he=null;if(null!=ae&&L){he=new d(f).drawPath({d:"",stroke:L,strokeWidth:k?t.getStrokeWidth({size:v.circleGeometry.r,series:f.seriesData.series}):Number(_.getAttribute("stroke-width")),fill:"none",strokeOpacity:Y(_,"stroke-opacity"),strokeDashArray:null!=(c=_.getAttribute("stroke-dasharray"))?c:0,classes:`${I} apexcharts-radialbar-highlight-part`});const e=he.node;e.setAttribute("aria-hidden","true"),Z(_,e),re&&O>("number"==typeof E.max?E.max:100)&&K(e,"apexcharts-highlight-overflow"),U(_,e),re&&te-z>.01?J(_,e):e.setAttribute("pointer-events","none"),n&&q&&!S?(e.setAttribute("d",ue(se)),l.call(t,he,u(o({},n),{endAngle:ae,prevStartAngle:j,prevEndAngle:se,isTrack:!0}))):n?l.call(t,he,u(o({},n),{endAngle:ae,dur:W,isTrack:!0})):e.setAttribute("d",ue(ae))}const de=re&&te-z>.01?.75:0,ce=S?de:null!=(p=null==C?void 0:C.tk)?p:0;let pe=null;if(he&&(de||ce&&q)){const e=Number(he.node.getAttribute("stroke-width"))||0,t=n?n.centerX:v.circleGeometry.cx,r=n?n.centerY:v.circleGeometry.cy;pe=new d(f).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${I} apexcharts-highlight-edge apexcharts-radialbar-highlight-edge`});const l=pe.node;l.setAttribute("pointer-events","none"),l.setAttribute("aria-hidden","true"),l.setAttribute("stroke-opacity",String(ce)),Z(he.node,l);const i=n=>{const i=g.polarToCartesian(t,r,ee-e/2,n),a=g.polarToCartesian(t,r,ee+e/2,n);l.setAttribute("d",`M ${i.x} ${i.y} L ${a.x} ${a.y}`)},a=q?H(n.prevEndAngle)&&!S?n.prevEndAngle:j:z;i(a),a!==z&&pe.animate(W,X).during(e=>i(R(a,z,e)))}const fe=[];he&&k&&fe.push(he.node),pe&&k&&fe.push(pe.node);const ve={d:null,e:null,f:V?G:1,c:!A};if(L&&(A||C)){e._targets.set(w,ve);const t=null!=se?se:0,l=null!=ae?ae:0;he&&(ve.e=l),he&&n&&q&&!S&&t!==l&&(ve.e=t,he.animate(W,X).during(e=>null!=ve.e&&(ve.e=R(t,l,e))));const i=f.config.chart.animations.dynamicAnimation.speed;e._fade(_,S&&!k?V?Q:N:oe?B:C?{f:C.f,o:0}:N,ie?B:V?Q:N,k?{delayMs:e.ctx.morphTypeChange.getSpeed(),speed:i}:{delayMs:X,speed:W,el:r},{attr:"stroke-opacity",anim:k?y.isBrowser():q,force:!!he&&(k||t!==l||ce!==de),also:e=>{pe&&(ve.tk=R(ce,de,e),pe.node.setAttribute("stroke-opacity",String(ve.tk))),fe.forEach(t=>e<1?t.setAttribute("opacity",e):t.removeAttribute("opacity"))},land:ie?N:void 0,done:le||pe&&!de?()=>{le&&(null==he||he.remove(),ve.e=null),null==pe||pe.remove(),ve.tk=0}:void 0,rec:ve}),he&&(ve.n=he.node)}0===x&&Me(e,t,r,D,O,S,k,n)}function _e(e,t,r){var n,l;const i=(null==(n=t.touches)?void 0:n[0])||t,a=null==(l=e.getScreenCTM)?void 0:l.call(e);if(!(a&&r.s>0))return"part";const s=i.clientX-a.e,o=i.clientY-a.f,u=a.a*a.d-a.b*a.c||1,h=(a.d*s-a.c*o)/u,d=(a.a*o-a.b*s)/u;return Math.hypot(h-r.cx,d-r.cy)>r.mid?"whole":"part"}function xe(e,t,r,n,l){var i,a,s;const o=e.w,u=o.globals;if("lanes"!==e._ind)return;const h=o.highlightData.active;let d=t._hfLine;if(!d){const n=!u.dataChanged||!u.shouldAnimate,l=n||null==(i=e._prev())?void 0:i.get("r:w"),s=h?Se(e,r,-1):"",o=s?1:0,c=n||!y.isBrowser()?o:null!=(a=null==l?void 0:l.f)?a:0;if(d=t._hfLine={node:null,rec:null},!o&&!c)return;d.rec={d:null,c:!h,t:s||(null==l?void 0:l.t)||"",f:o,lf:c,o0:c,pv:o?null:null==l?void 0:l.vt},e._targets.set("r:w",d.rec)}const c=d.rec;if(l){if(d.node=null,!c||!c.lf&&c.done)return;const t=l.node.childNodes,n=r.value.show?t[t.length-1]:null;if(!n)return;null==c.pv||c.done||(c.hold=n.textContent,n.textContent=c.pv),c.vt=n.textContent;const i=we(o,r,n,(h?Se(e,r,-1):"")||c.t);l.add(i),d.node=i.node}else if(h){const t=Se(e,r,n),l=null==(s=o.dom.baseEl)?void 0:s.querySelector(".apexcharts-datalabel-value");!d.node&&t&&n>-1&&l&&(d.node=we(o,r,l,t).node,l.parentNode.appendChild(d.node)),d.node&&(d.node.textContent=t),c&&l&&(c.vt=l.textContent)}ke(d)}function we(e,t,r,n){const l=parseFloat(t.value.fontSize)||14,i=Math.max(11,Math.round(l/2)),a=new d(e).drawText({x:+r.getAttribute("x"),y:+r.getAttribute("y")+l/4+4+.8*i,text:n,textAnchor:"middle",fontSize:i+"px",fontFamily:t.value.fontFamily,fontWeight:400,foreColor:r.getAttribute("fill"),cssClass:"apexcharts-datalabel-whole"});return a.node.setAttribute("aria-hidden","true"),a}function ke(e){var t,r,n;null==(n=e.node)||n.setAttribute("fill-opacity",String(.6*(null!=(r=null==(t=e.rec)?void 0:t.lf)?r:1)))}function Se(e,t,r){var n,l;const i=e.w,a=e.cfg.dataLabels||{},s=i.seriesData.series,h=i.highlightData.parts.map(e=>e[0]),d=r>-1?r:s.length<2?0:-1,c=(e,t)=>{const r=String(e(t)),n=String(e(u(o({},t),{lane:"whole"})));return n!==r?n:"/ "+r};if(d>-1)return"part"===(null!=(n=a.value)?n:"part")&&H(h[d])?c(e=>t.value.formatter(s[d],i,e),{highlight:X(h[d],s[d])}):"";if(!t.total.show||"part"!==(null!=(l=a.total)?l:"part")||!t.total.formatter||!h.some(H))return"";const p=e=>e.reduce((e,t)=>e+(H(t)?t:0),0);return c(e=>t.total.formatter(i,e),{highlight:X(p(h),p(s))})}function Me(e,t,r,n,l,i,a,s){var o,u,h;const c=e.w,p=c.globals,g=e.cfg,f=c.highlightData.active,v=i||null==(o=e._prev())?void 0:o.get("r:n"),b=n&&null!=l?t._angleAtValue(l):null;if(null==b&&!v)return;const A=c.config.plotOptions.radialBar,_=a?null:"needle"===A.shape?t.needleMotion():s&&s.run>0&&y.isBrowser()?{speed:s.run,delay:+s.animBeginArr[0]||0}:null;let x,w=1,k=b,S=1;const M=null==b;if(M){if(!_)return;x=v.ang,w=v.op,k=f&&n?t.startAngle:t._angleAtValue(c.seriesData.series[0]),S=0}else _?i?x=t.startAngle:v?(x=v.ang,w=v.op):(x=t._angleAtValue(p.dataChanged?p.previousPaths[0]:c.seriesData.series[0]),w=0):x=k;const C=p.circleGeometry,E=(null==(u=g.radialBar)?void 0:u.needle)||{},T=A.needle||{},$={};ve.forEach(e=>{var t;return $[e]=null!=(t=E[e])?t:T[e]});const P=null!=(h=E.color)?h:p.colors[0],{path:L,cx:D,cy:F}=t.needlePath({size:C.r,centerX:C.cx,centerY:C.cy,series:c.seriesData.series},$),O=new d(c),j=O.group({class:"apexcharts-gauge-needle-highlight"});M||!y.isBrowser()?j.node.setAttribute("pointer-events","none"):J(r.node,j.node),j.node.setAttribute("aria-hidden","true"),j.node.setAttribute("transform-origin",`${D} ${F}`),j.add(O.drawPath({d:L,stroke:P,strokeWidth:0,fill:P,classes:`${I} apexcharts-gauge-needle-highlight-shape`})),null!=l&&l>("number"==typeof A.max?A.max:100)&&K(j.node,"apexcharts-highlight-overflow");const N=r.node.parentNode.parentNode;N.insertBefore(j.node,N.childNodes[0]||null);const B=()=>{const e=[...N.childNodes].filter(e=>e!==j.node),t=e.findIndex(e=>{var t;return` ${null==(t=e.getAttribute)?void 0:t.call(e,"class")} `.includes(" apexcharts-radialbar-hollow ")});return!(t<0||j.node.parentNode!==N||(N.insertBefore(j.node,e[t+1]||null),0))};B()||Promise.resolve().then(B);const z={d:null,ang:x,op:w,c:!f};e._targets.set("r:n",z);const H=(e,t)=>{z.ang=e,z.op=t,j.node.setAttribute("transform",`rotate(${e})`),t<1?j.node.setAttribute("opacity",String(t)):j.node.removeAttribute("opacity")},W=e=>H(x+(k-x)*e,R(w,S,e)),Y=()=>{z.run=!1,M?j.remove():H(k,S)};if(a)return H(k,0),void e._tween(e.ctx.morphTypeChange.getSpeed(),c.config.chart.animations.dynamicAnimation.speed,e=>H(k,e),Y);if(!_||x===k&&w===S)return W(1),void Y();z.run=!0,W(0);const q=_;if(q.ease){const r=performance.now(),n=l=>{if(p.isDestroyed||e._render!==t)return;const i=Math.max(0,Math.min(1,(l-r)/q.speed));W(q.ease(i)),i<1?m.requestAnimationFrame(n):Y()};m.requestAnimationFrame(n)}else j.animate(q.speed,q.delay||0).during(e=>W(e)).after(Y)}const Ce="apexcharts-highlight-tile",Ee="apexcharts-highlight-overflow",Te=/^url\(/i;function $e(e,t){var r,n,l;const i=e.w,a=i.globals,s=i.highlightData;if(!s)return;e._beginRender(t,"t:"),e._tmDefs.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),e._tmDefs=[];const u=e._tiles=new Map,h=s.active,c=i.seriesData.series;!function(e,t,r){const n=l=>{var i,a;const s=l.children;if(!s||!s.length){const e=null==(i=null==t?void 0:t[l._si])?void 0:i[l._di];return l.highlight=t?X(H(e)?e:null,null==(a=r[l._si])?void 0:a[l._di]):void 0,l.highlight}let o=null;if(s.forEach(e=>{const t=n(e);!t||null==t.value||t.value*(t.total||0)<0||(o=(o||0)+Math.abs(t.value))}),!t)return l.highlight=void 0;const u=e._subtreeArea(l),h=null!=o&&u?o/u:null;return l.highlight={value:o,total:u,share:h,overflow:null!=h&&h>1},l.highlight};(e.roots||[]).forEach(n)}(t,h?s.parts:null,c);const p=e._prev();if(!h&&!(null==p?void 0:p.size))return;const g=new Map;null==p||p.forEach(e=>g.set(e.ij,e)),null==(r=a.prevTreemapView)||r.querySelectorAll(`.${Ce}`).forEach(e=>{e.classList.remove(Ce,Ee),e.removeAttribute("data:hl-share")});const f=e.cfg,v=h?null!=(n=f.fadeOpacity)?n:.2:1,b=!0===(null==(l=e.ctx.morphTypeChange)?void 0:l.isActive()),m=t.dynamicAnim,y=b||!!(a.dataChanged&&m.enabled&&a.shouldAnimate),A=b?e.ctx.morphTypeChange.getSpeed():m.speed,_=i.config.chart.foreColor;let x=!1;h&&function(e,t){const r=t._showParentTooltip;t._showParentTooltip=(n,l)=>{var i,a,s;r.call(t,n,l);const o=l.highlight,u=e.cfg.tooltip||{};if(null==(null==o?void 0:o.value)||!1===u.show||"function"==typeof(null==(a=null==(i=e.w.config.plotOptions.treemap.parents)?void 0:i.tooltip)?void 0:a.formatter))return;const h=null==(s=t._tip())?void 0:s.querySelector(".apexcharts-tooltip-text-y-value");if(!h)return;let d=`/ ${t._formatValue(o.total)}`;u.share&&o.total&&(d+=` \xb7 ${Math.round(100*o.share)}%`),h.innerHTML=`${t._formatValue(o.value)} <span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">${d}</span>`}}(e,t);let w=null;const k=t.helpers.calculateDataLabels;t.helpers.calculateDataLabels=e=>{const r=k.call(t.helpers,e),n=w=u.get(e.i+"|"+e.j);if(r&&n){const e=function(e){const t=[];return function e(r){"text"===String(r.tagName||r.nodeName).toLowerCase()&&t.push(r),Array.from(r.childNodes||[]).forEach(e)}(e),t}(r.node);n.lb=e.filter(e=>/^(#fff|#ffffff|white)$/i.test(e.getAttribute("fill")||""));const t=e[0],[,l,,i]=n.r;if(t&&i>l){const e=parseFloat(t.getAttribute("font-size"))||12;n.need=(i-parseFloat(t.getAttribute("y"))+.9*e)/(i-l)}Pe(n,_)}return r};const S=t.rotateToFitLabel;return t.rotateToFitLabel=(...e)=>{S.apply(t,e);const r=w;if(w=null,(null==r?void 0:r.lb)&&/rotate/.test(e[0].node.getAttribute("transform")||"")){const t=new d(i).getTextRects(e[2],String(e[1])).width;r.need=.5+t/2/(e[6]-e[4]),r.tone=null,Pe(r,_)}},(t,r,n,l,d)=>{var m,w,k,S;const M="t:"+d._key,C=r+"|"+n,E=null==(m=c[r])?void 0:m[n],T=y?(null==p?void 0:p.get(M))||(E?void 0:g.get(C)):void 0;if(!h&&!T)return;if(Te.test(l))return void(h&&!x&&(x=!0,e._warn("fill","treemap tiles with a gradient, pattern or image fill are drawn without their parts.")));const $=h?null==(w=s.parts[r])?void 0:w[n]:null;if(!E&&!T)return;const P=H($)&&E?$/E:null;let L=h?{s:null==P||P<0?0:Math.min(P,1),f:v,c:l}:{s:1,f:0,c:l},D=L;if(T)D={s:T.s,f:T.f,c:T.col},!E&&h&&(L=o({},D));else if(y){const e=null==(k=a.previousPaths[r])?void 0:k[n];(b||(null==(S=null==e?void 0:e.rect)?void 0:S.width)>0)&&(D="baseline"===f.enter?{s:0,f:1,c:L.c}:{s:1,f:0,c:L.c},b||!e.fill||Te.test(e.fill)||(D.c=e.fill))}const F=D.s!==L.s||D.f!==L.f||D.c!==L.c;if(!h&&!F)return;const O=i.dom.Paper.gradient("linear",e=>{for(let t=0;t<4;t++)e.stop(0,l,1)});O.from(0,1).to(0,0),e._tmDefs.push(O.node);const j=Array.from(O.node.childNodes),I=t.node;h&&(I.setAttribute("class",`${I.getAttribute("class")||""} ${Ce}${null!=P&&P>1?" "+Ee:""}`.trim()),I.setAttribute("data:hl-share",null==P?"":String(P)));const N={s:L.s,f:L.f,col:L.c,c:!h,ij:C,run:!1,base:l,r:d.rect,lb:null,need:.5,tone:null};e._targets.set(M,N),u.set(C,N);const B=function(e,t){const r=Le(e),n=Le(t);return e!==t&&r&&n?e=>e>=1?t:`rgba(${[0,1,2].map(t=>Math.round(R(r[t],n[t],e))).join(",")},${+R(r[3],n[3],e).toFixed(3)})`:r=>r>=1?t:e}(D.c,L.c),z=e=>{N.ls=e.s,N.lf=e.f,N.lc=e.c,j.forEach((t,r)=>{t.setAttribute("offset",String(0===r?0:3===r?1:e.s)),t.setAttribute("stop-color",e.c),t.setAttribute("stop-opacity",String(r<2?1:e.f))}),Pe(N,_)},W=()=>{var e;N.run=!1,z(L),!h&&I.isConnected&&(I.setAttribute("fill",l),null==(e=O.node.parentNode)||e.removeChild(O.node))};if(y&&F){N.run=!0,z(D);let t=null,r=!1;const n={finish(){e._live.delete(n),h?z({s:N.ls,f:t=L.f,c:N.lc}):(r=!0,W())}};e._hold(n),O.animate(A,0).during(e=>r||z({s:R(D.s,L.s,e),f:null!=t?t:R(D.f,L.f,e),c:B(e)})).after(()=>{e._live.delete(n),r||W()})}else z(L);return O.url()}}function Pe(e,t){var r;const n=(null!=(r=e.ls)?r:e.s)>=e.need-1e-9;e.lb&&e.tone!==n&&(e.tone=n,e.lb.forEach(e=>{null==e._apxFill&&(e._apxFill=e.getAttribute("fill")),e.setAttribute("fill",n?e._apxFill:t)}))}function Le(e){var t;const r=String(e).trim();let n=/^#([\da-f]+)$/i.exec(r);if(n){let e=n[1];return e.length<5&&(e=e.replace(/./g,"$&$&")),6!==e.length&&8!==e.length?null:[0,2,4,6].map(t=>t<e.length?parseInt(e.slice(t,t+2),16)/(6===t?255:1):1)}if(n=/^rgba?\(([^)]*)\)$/i.exec(r),!n)return null;const l=n[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);return l.length>=3&&l.every(isFinite)?[l[0],l[1],l[2],null!=(t=l[3])?t:1]:null}["prevHighlightParts","prevHighlightLabels"].forEach(e=>{-1===p.HELD.indexOf(e)&&p.HELD.push(e)});const De="apexcharts-flip-x",Fe="apexcharts-flip-y",Oe="apexcharts-flip-held",je="apexcharts-highlight-label-exit",Ie="b:",Ne={f:1,o:0},Be={f:1,o:1},ze={f:0,o:1};function He(e){if(!e)return!1;if(Array.isArray(e.highlightData))return!0;const t=e.data;if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++){const r=t[e];if(W(r)){if("highlight"in r)return!0}else if(null!=r)return!1}return!1}function Re(e,t,r){return W(e)&&"highlight"in e?e.highlight:t?t[r]:null}function We(e,t){let r=1/0,n=-1/0;return String(e).replace(/([MLQCT])([^MLQCTZz]*)/g,(e,l,i)=>{const a=i.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let e=t;e<a.length;e+=2)a[e]<r&&(r=a[e]),a[e]>n&&(n=a[e]);return""}),[r,n]}function Ye(e,t){let r=-1,n=1/0;return e.forEach((e,l)=>{null!=e&&Math.abs(e-t)<n&&(n=Math.abs(e-t),r=l)}),r}function qe(e){const t=e.previousElementSibling;return t&&"rect"===t.tagName.toLowerCase()?[t,e]:[e]}function Xe(e,t){return null!=t&&0!==t&&e/t>1}function Ge(e,t){const r=W(e)?e.y:Array.isArray(e)?e[1]:e;return"number"==typeof r?r:null!=t?t:null}function Ve(e,t,r){return e?e.replace(/([MLQCT])([^MLQCTZz]*)/g,(e,r,n)=>{const l=n.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let e=0;e+1<l.length;e+=2)l[e]=t(l[e]);return`${r} ${l.join(" ")} `}):e}h.registerFeatures({highlightFilter:class{constructor(e,t){var r,n,l,i;this.w=e,this.ctx=t,this._targets=new Map,this._render=null,this._seen=new Set,this._seriesEls=new Map,this._cu=null,this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,this._warned=new Set,this._rows=[],this._level=null,this._live=new Set,this._sig="",this._drawnSig="",this._ride=null,this._tiles=null,this._tmDefs=[],this._tipUser=null==(n=null==(r=t.opts)?void 0:r.tooltip)?void 0:n.enabled,this._tipOn=!1,this._ind=void 0,this._lane=null,this._onRender=()=>this.afterRender(),null==(l=t.events)||l.addEventListener("mounted",this._onRender),null==(i=t.events)||i.addEventListener("updated",this._onRender)}get cfg(){return this.w.config.highlightFilter||{}}isActive(){var e;return!!(null==(e=this.w.highlightData)?void 0:e.active)}canDrawParts(){const e=this.w,t=e.config,r=t.chart.type;return e.globals.axisCharts?!(e.globals.comboCharts||"bar"!==r&&"line"!==r&&"area"!==r&&"treemap"!==r||e.rangeData.seriesRange.length||"histogram"===t.chart.requestedType):oe.indexOf(r)>-1||"radialBar"===r}callerCarriesParts(){const e=this.w;return e.globals.axisCharts?(e.config.series||[]).some(He):Array.isArray(this.cfg.data)||te(e.config.series||[]).some(e=>"highlight"in e)}valueAt(e,t){var r,n,l;const i=null==(l=null==(n=null==(r=this.w.highlightData)?void 0:r.parts)?void 0:n[e])?void 0:l[this.w.globals.axisCharts?t:0];return null==i?null:i}_warn(e,t){this._warned.has(e)||(this._warned.add(e),console.warn("ApexCharts highlightFilter: "+t))}parse(){var e,t,r;const n=this.w,l=n.config,i=this.cfg,a=l.series||[],s=n.seriesData.series||[];if(!n.globals.axisCharts)return this._parseCircle();const o=!!l.chart.stacked,u=l.chart.type,h="bar"===u,d=function(e,t){const r=e.w.globals;if("treemap"!==t||!r.treemapRoots)return!1;const n=r.treemapRawSeries||[];n.some(e=>Array.isArray(null==e?void 0:e.highlightData))&&e._warn("nested","on a nested treemap put the part on each leaf as { x, y, highlight }; highlightData is ignored.");const l=e=>W(e)&&Array.isArray(e.children)&&e.children.length>0&&("highlight"in e||e.children.some(l));return n.some(e=>((null==e?void 0:e.data)||[]).some(l))&&e._warn("parent","a parent's highlight is ignored: parents add up their leaves' parts."),!0}(this,u),c=ie(n);let p=!1;for(let t=0;t<a.length;t++)if(d?re({data:null==(e=a[t])?void 0:e.data}):He(a[t])||c&&ae(n,t)){p=!0;break}let g=n.globals.axisCharts&&this.canDrawParts();p&&!g&&this._unsupported();const f=(n.globals.seriesYAxisMap||[]).map((e,t)=>e&&e.length?t:-1).filter(e=>e>-1);p&&g&&o&&(f.length>1||f.some(e=>{var t;return null==(t=l.yaxis[e])?void 0:t.logarithmic}))&&(g=!1,this._warn("stack","parts are not drawn on a stacked chart with more than one y axis or a logarithmic y axis."));const v=!(!1===i.enabled||!p||!g);if(!v)return void this._inactive(g);const b=[];let m=!1,y=!1;const A=n.globals;for(let e=0;e<s.length;e++){const t=a[e]||{},r=Array.isArray(t.data)?t.data:[],l=!d&&Array.isArray(t.highlightData),i=d?null:l?t.highlightData:c?ae(n,e):null,o=A.collapsedSeriesIndices.indexOf(e)>-1||A.ancillaryCollapsedSeriesIndices.indexOf(e)>-1;i&&!o&&i.length!==r.length&&(l?m=!0:y=!0);const u=[],h=s[e]?s[e].length:0;for(let e=0;e<h;e++){const t=Re(r[e],i,e);u.push(H(t)?o?0:t:null)}b.push(u)}v&&m&&this._warn("length","highlightData and data differ in length; the extra entries are ignored and the missing ones read as null."),v&&y&&this._warn("plugged-length","a plugin registered highlight parts that do not line up with the series data; the extra entries are ignored and the missing ones read as null.");const _=a.some(e=>Array.isArray(null==e?void 0:e.highlightData));_&&(null==(t=l.chart.dataReducer)?void 0:t.enabled)&&this._warn("reducer","highlightData cannot follow chart.dataReducer; put the part on each point as { x, y, highlight } instead."),_&&(null==(r=l.chart.streaming)?void 0:r.enabled)&&this._warn("stream","highlightData cannot follow chart.streaming; put the part on each point as { x, y, highlight } instead.");const x=v&&"clamp"!==i.axis&&"treemap"!==u&&!l.plotOptions.bar.isFunnel&&!(o&&"100%"===l.chart.stackType);let w=null;if(o&&h)w=(e,t)=>this._barKey(e,t);else if(o){const e=n.seriesData.seriesX;w=(t,r)=>{var l;return String(n.axisFlags.isXNumeric?null==(l=e[t])?void 0:l[r]:r)}}const k=x?this._runningExt(b,w,h):null;this._publish(b,k)}_unsupported(){const e=this.w.config.chart;this._warn("type",`parts are not drawn on this chart (type "${e.requestedType||e.type}"). Supported: column, bar, line and area (stacked too), funnel, pie, donut, polarArea, radialBar, gauge and treemap.`)}_inactive(e){e||(this._targets=new Map),this.w.highlightData={active:!1,parts:[],ext:null,capture:()=>this.capture()},this._sig="",this._rows=[]}_parseCircle(){const e=this.w,t=e.config,r=this.cfg,n=e.globals,l=(e.seriesData.series||[]).length,i=te(t.series);let a=i.some(e=>"highlight"in e);a&&i.length!==l&&(this._warn("points","per-point highlight values do not line up with the slices; use highlightFilter.data instead."),a=!1);let s=Array.isArray(r.data)?r.data:null;s&&s.length!==l&&(this._warn("length",`highlightFilter.data has ${s.length} values for ${l} slices; it is ignored until they match.`),s=null),s&&s.some(e=>Array.isArray(e))&&(s.some(e=>Array.isArray(e)&&1!==e.length)?(this._warn("rows","highlightFilter.data takes one value per slice (or ring); a row of several values is ignored."),s=null):s=s.map(e=>Array.isArray(e)?e[0]:e));const o=t.chart.type,u=oe.indexOf(o)>-1||"radialBar"===o,h=a||!!s;if(h&&!u&&this._unsupported(),!1===r.enabled||!h||!u)return void this._inactive(u);const d=[];for(let e=0;e<l;e++){const t=a?i[e]:null,r=t&&"highlight"in t?t.highlight:s?s[e]:null;d.push([H(r)?n.collapsedSeriesIndices.indexOf(e)>-1?0:r:null])}this._publish(d,null)}_publish(e,t){const r=this.w.globals;this.w.highlightData={active:!0,parts:e,ext:t,capture:()=>this.capture()};const n=this._rows,l=[];for(let t=0;t<e.length;t++){const i=r.collapsedSeriesIndices.indexOf(t)>-1||r.ancillaryCollapsedSeriesIndices.indexOf(t)>-1;l.push(i&&t<n.length?n[t]:e[t].join(","))}this._rows=l,this._sig="#"+l.join("|")}capture(){const e=this.w.globals,t=new Map;this._targets.forEach((e,r)=>{var n,l,i,a,s,h,d;if(e.c&&!e.run)return;const c=e.n,p=!!(null==c?void 0:c.isConnected);t.set(r,u(o({},e),{d:p&&c.getAttribute("d")||e.d,a:(null==(n=e.m)?void 0:n.isConnected)&&e.m.getAttribute("d")||e.a,flip:p?c.classList.contains(Fe)||c.classList.contains(De):e.flip,f:null!=(l=e.lf)?l:e.f,o:null!=(i=e.lo)?i:e.o,s:null!=(a=e.ls)?a:e.s,col:null!=(s=e.lc)?s:e.col,al:null!=(h=e.la)?h:e.al,k:null!=(d=e.lk)?d:e.k,n:null,m:null,g:null,lb:null}))}),e.prevHighlightParts=t,e.prevHighlightLabels=this._captureLabels(),this._targets=new Map}_prev(){return this.w.globals.prevHighlightParts}_animates(){const e=this.ctx.renderer;return(!e||!e.kind||"svg"===e.kind)&&this._animatesUpdate()&&!!this.w.globals.shouldAnimate}_animatesUpdate(){const e=this.w,t=e.config.chart.animations;return!(!(y.isBrowser()&&t.enabled&&t.dynamicAnimation.enabled&&e.globals.dataChanged)||v())}_tween(e,t,r,n,l,i){const a=this.w,s=l||function(e){var t,r;const n=e.config.chart.animations;return _(null!=(r=null==(t=n.dynamicAnimation)?void 0:t.easing)?r:n.easing)}(a),o=this._live;let u=!1;const h={finish(){u||(u=!0,o.delete(h),r(1),n&&n())}};this._hold(h);const d=performance.now()+e,c=e=>{if(u)return;if(a.globals.isDestroyed)return u=!0,void o.delete(h);const n=Math.max(0,Math.min(1,(e-d)/t));r(s(n)),n<1?m.requestAnimationFrame(c):h.finish()};r(0),i?i.animate(t,e).during(e=>u||r(e)).after(()=>h.finish()):m.requestAnimationFrame(c)}_hold(e){const t=this._live,r=this.w.globals;t.add(e),r.highlightTween={finish:()=>Array.from(t).forEach(e=>e.finish())}}bar(e,t){var r,n,l,i,a,s,u,h;const d=this.w,c=d.highlightData;if(!c)return;this._render!==e&&this._beginRender(e,Ie);const p=this._prev(),g=c.active;if(!g&&!(null==p?void 0:p.size))return;const{j:f,realIndex:v}=t,b=Ie+`${v}::${P(d,v,f)}`;this._seen.add(b);const m=null==p?void 0:p.get(b),y=g?null==(r=c.parts[v])?void 0:r[f]:null;if(!g&&!m)return;const A=this.cfg,_=g?null!=(n=A.fadeOpacity)?n:.2:1,x=null==(l=d.seriesData.series[v])?void 0:l[f],w=!!d.config.chart.stacked,k=g&&w?this._stackGeometry(e,t,y,x,m):null==y?null:this._barGeometry(e,t,y,x),S={paint:(r,n)=>this._paintBar(t,r,n,{key:b,prev:m,geo:k,fadeTo:_,active:g,whole:x,bar:w?e:null})};if(g){const e={};"part"===(null!=(a=null==(i=A.dataLabels)?void 0:i.value)?a:"part")&&Object.assign(e,null==y?{hide:!0}:o({val:null!=(s=null==k?void 0:k.val)?s:y},null==k?void 0:k.label)),w&&"part"===(null!=(h=null==(u=A.dataLabels)?void 0:u.total)?h:"part")&&(e.total=k.total(null!=e.val?e.val<0:x<0)),S.label=e}return S}_beginRender(e,t){var r;this._render=e,this._targets=new Map,this._seen=new Set,this._seriesEls=new Map,this._cu=new c(this.w),this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,t===Ie&&!this.w.config.chart.stacked&&(null==(r=this._prev())?void 0:r.size)&&Promise.resolve().then(()=>this._orphans())}_orphans(){const e=this.w,t=this._prev();t&&!e.globals.isDestroyed&&this._animates()&&t.forEach((t,r)=>{var n;if(this._seen.has(r)||0!==r.indexOf(Ie))return;const l=r.slice(2),i=this._seriesEls.get(l.slice(0,l.indexOf("::")));if(!i)return;const a=Array.from(i.querySelectorAll(".apexcharts-bar-ghost")).find(e=>e.getAttribute("data:ghostKey")===l);if(!a)return;if(a.setAttribute("fill-opacity",String(t.f)),!t.d)return;const s=new d(e,this.ctx).drawPath({d:t.d,stroke:"none",strokeWidth:0,fill:q(a.getAttribute("fill"))[0],fillOpacity:null!=(n=t.al)?n:1,classes:`${I} apexcharts-highlight-ghost`}).node;s.setAttribute("pointer-events","none"),s.setAttribute("clip-path",a.getAttribute("clip-path")||""),a.after(s);const o=a.style.transformOrigin||"",u=/^(left|right)/.test(o),h=parseFloat(a.getAttribute("data:ghostEdge")||""),[c]=We(t.d,u?0:1),p=s.style;p.transformBox="fill-box",p.transformOrigin=isFinite(h)?u?h-c+"px 50%":`50% ${h-c}px`:o;const g=()=>{a.parentNode&&!e.globals.isDestroyed?(p.transform=a.style.transform,p.opacity=a.style.opacity,m.requestAnimationFrame(g)):s.remove()};g()})}_barGeometry(e,t,r,n){const l=this.w,{j:i,realIndex:a,translationsIndex:s,paths:o}=t,u=e.barHelpers,h=u.getStrokeWidth(t.i,i,a);if(e.isFunnel){const e=n?Math.min(Math.abs(r/n),1):0,t=l.layout.gridWidth/2;return{pathTo:Ve(o.pathTo,r=>t+(r-t)*e),base:Ve(o.pathTo,()=>t),overflow:!1}}const d=l.config.yaxis[l.globals.seriesYAxisReverseMap[a]],c=(null==d?void 0:d.logarithmic)&&!l.globals.invalidLogScale&&this._cu?Math.max(0,this._cu.getLogValAtSeriesIndex(r,a)):r;if(e.isHorizontal){const e=t.zeroW,l=u.getXForValue(c,t.zeroW),s=this._rect(u,{a:o.barYPosition,len:o.barHeight,v1:e,v2:l,strokeWidth:h,realIndex:a,j:i,dir:c>=0?1:-1,horizontal:!0});return{pathTo:s.pathTo,base:s.base,overflow:Xe(r,n),label:{x:l,barWidth:Math.abs(l-e)}}}const p=t.zeroH,g=u.getYForValue(c,t.zeroH,s),f=this._rect(u,{a:o.barXPosition,len:o.barWidth,v1:p,v2:g,strokeWidth:h,realIndex:a,j:i,dir:c>=0?1:-1,horizontal:!1});return{pathTo:f.pathTo,base:f.base,overflow:Xe(r,n),label:{y:g,barHeight:Math.abs(g-p)}}}_rect(e,t){const r=((Array.isArray(t.strokeWidth)?t.strokeWidth[t.realIndex]:t.strokeWidth)||0)/2,n=t.v2-t.v1;if(Math.abs(n)<2*r){const l=t.v1+n/2,i=r*t.dir*(e.barCtx.isReversed?-1:1)*(t.horizontal?-1:1);t=u(o({},t),{v1:l+i,v2:l-i})}return e.barRect(t)}_stackGeometry(e,t,r,n,l){var i,a;const s=this.w,{j:o,realIndex:u,translationsIndex:h,paths:d}=t,c=e.barHelpers,p=e.isHorizontal,f=p?t.zeroW:t.zeroH;this._br||(this._br=c.createBorderRadiusArr(((null==(i=s.highlightData)?void 0:i.parts)||[]).map(e=>e.map(e=>null!=e?e:0))),g.isSafari()&&(this._br=this._br.map(e=>e.map(()=>"none"))));const v=this._br,b=this._barKey(u,o);let m=this._stk.get(b);m||(m={p:f,n:f,raw:0,any:!1},this._stk.set(b,m));const y="100%"===s.config.chart.stackType,A=s.seriesData.stackedSeriesTotals[o],_=null==r?null:y?A?100*r/A:0:r,x=null!=_?_:0,w=null!=_?_<0:null!=(null==l?void 0:l.s)?l.s<0:n<0,k=(e,t)=>p?c.getXForValue(e,t):c.getYForValue(e,t,h);let S=w?m.n:m.p,M=k(x,S);w?m.n=M:m.p=M,null!=r&&(m.raw+=r,m.any=!0);const C=m.raw,E=m.any,T={p:m.p,n:m.n};let $=!1;if(y){const e=k(100,f),t=k(-100,f),r=Math.min(e,t),n=Math.max(e,t),l=e=>Math.min(n,Math.max(r,e));$=l(M)!==M,S=l(S),M=l(M),T.p=l(T.p),T.n=l(T.n)}const P=c.arrBorderRadius;let L;c.arrBorderRadius=v;try{L=this._rect(c,{a:p?d.barYPosition:d.barXPosition,len:p?s.globals.barHeight:s.globals.barWidth,v1:S,v2:M,strokeWidth:p?c.getStrokeWidth(t.i,o,u):e.strokeWidth,realIndex:u,j:o,dir:w?-1:1,horizontal:p})}finally{c.arrBorderRadius=P}return{pathTo:null==r?null:L.pathTo,square:L.squarePathTo,base:L.base,flip:null!=r&&e.cornerFlip(null==(a=v[u])?void 0:a[o],x),s:w?-1:1,overflow:$,val:_,label:p?{x:M,barWidth:Math.abs(M-S)}:{y:M,barHeight:Math.abs(M-S)},total:e=>!!E&&{val:C,edge:e?T.n:T.p}}}_barKey(e,t){var r;const n=this.w;return n.labelData.seriesGroupIndex[e]+"|"+(!n.config.plotOptions.bar.horizontal&&n.axisFlags.isXNumeric?null==(r=n.seriesData.seriesX[e])?void 0:r[t]:t)}line(e,t,r,n,l,i,a){var s,h;const d=this.w,c=d.highlightData;if(!c||"line"!==t&&"area"!==t)return;this._render!==e&&this._beginRender(e,"l:");const p=this._prev(),g=c.active;if(!g&&!(null==p?void 0:p.size))return;const f="l:"+l,v=null==p?void 0:p.get(f);if(!g&&!v)return;const b=d.globals,m=this._animates(),y="area"===t,A=g&&c.parts[l]||[],x=A.some(e=>null!=e),w=g&&e._shapeOnly,k=(e,t)=>e&&(e._cmd?e._cmd[t]:e.node.getAttribute(t)),S=e.marks||[],M=y?S.find(e=>"none"!==k(e,"fill")):null,C=S.find(e=>e!==M),[E,T]=M&&d.config.chart.stacked?q(k(M,"fill")):[M&&k(M,"fill"),1],$=S.concat(y?S.filter(e=>e!==M&&!e._cmd).map(e=>e.node.nextElementSibling).filter(e=>/#forecastMask/.test((null==e?void 0:e.getAttribute("clip-path"))||"")).map(e=>({node:e})):[]),P=g&&!w&&(x||d.config.chart.stacked)?this._lineBuild(e,t,r,n,l,i,this._partRow(A,n,l)):null;let L=w?{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")}:x?{d:P.linePaths.join(" "),a:P.areaPaths.join(" "),num:P.numericXY}:null;const D=!L&&!!(null==v?void 0:v.d)&&m,O=g&&m&&(D||L&&!(null==v?void 0:v.d)&&(v||"baseline"===this.cfg.enter))?this._lineBase(e,t,r,n,l,i,x?A:null):null;P&&d.config.chart.stacked&&(this._swap(e,()=>e._recordStackTops(l,P.yArrj)),this._stkPrev.push(P.yArrj)),D&&(L=g?O:{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")});const I=D&&!g;let N=L;const B={};let z=null,H=!1;if(L&&m)if(null==v?void 0:v.d){if(N={d:v.d,a:v.a||L.a},!D)if(z=function(e,t,r,n){var l;const i=e.globals,a=i.prevStreamFrame;if(!a||!i.dataChanged||!(null==(l=e.axisFlags)?void 0:l.isXNumeric))return null;const s=a.seriesX[t],o=a.seriesY[t],u=e.seriesData.seriesX[t],h=e.seriesData.series[t];if(!(s&&o&&u&&h))return null;if(s.length<3||u.length<3)return null;let d=-1;for(let e=0;e<s.length;e++)if(s[e]===u[0]){d=e;break}if(-1===d)return null;const c=Math.min(s.length-d,u.length);if(c<2)return null;const p=u.length-c;if(0===d&&0===p)return null;for(let e=0;e<c;e++){if(s[d+e]!==u[e])return null;const t=o[d+e],r=h[e];if(t!==r&&(null!=t||null!=r))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let v=-1,b=-1;for(let e=0;e<c;e++)null!=g[d+e]&&null!=f[d+e]&&null!=r[e]&&null!=n[e]&&(-1===v&&(v=e),b=e);if(-1===v||b<=v)return null;const m=r[v],y=r[b],A=g[d+v],_=g[d+b];if(Math.abs(y-m)<1e-6)return null;const x=(_-A)/(y-m),w=A-x*m;if(!isFinite(x)||!isFinite(w))return null;if(Math.abs(x-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=v,S=v;for(let e=v;e<=b;e++){const t=n[e];null!=t&&null!=f[d+e]&&(t<n[k]&&(k=e),t>n[S]&&(S=e))}let M=1,C=0;const E=n[k],T=n[S];if(Math.abs(T-E)>1e-6?(M=(f[d+S]-f[d+k])/(T-E),C=f[d+k]-M*E):C=f[d+k]-E,!isFinite(M)||!isFinite(C)||M<.2||M>5)return null;const $=Math.floor((v+b)/2);if($!==v&&$!==b&&null!=r[$]&&null!=g[d+$]){const e=x*r[$]+w;if(Math.abs(e-g[d+$])>1.5)return null;if(null!=n[$]&&null!=f[d+$]){const e=M*n[$]+C;if(Math.abs(e-f[d+$])>1.5)return null}}return i.streamScrolled=!0,{ax:x,bx:w,ay:M,by:C}}(d,l,a.xArrj,a.yArrj),z)N={d:j(L.d,z),a:j(L.a,z)};else{const e=P||a,r=F(d,{type:t,realIndex:l,pathFromLine:v.d,pathFromArea:v.a||"",linePaths:e.linePaths,areaPaths:e.areaPaths});(null==r?void 0:r.line)&&([N.d,B.d]=[r.line.from,r.line.toInterp]),(null==r?void 0:r.area)&&([N.a,B.a]=[r.area.from,r.area.toInterp])}}else O?N=O:(H=!0,N={d:(null==C?void 0:C.node.getAttribute("pathFrom"))||L.d,a:(null==M?void 0:M.node.getAttribute("pathFrom"))||L.a});let W=null,Y=null,X=null;if(L){const r=this._partGroup(e.elSeries,"apexcharts-line-highlight"),i=L.num,a={i:n,j:"h",realIndex:l,delay:n,speed:d.config.chart.animations.dynamicAnimation.speed,cls:`apexcharts-${t} apexcharts-line-highlight-part`,chartType:t,clip:`url(#gridRectMask${b.cuid})`,scroll:!!z};if(M&&(W=this._emitPart(r,u(o({},a),{from:N.a,to:L.a,interp:B.a,paint:E,num:i&&{xs:i.xs,ys:i.ys,closeY:i.areaCloseY}}))),C){const t=u(o({},a),{from:N.d,to:L.d,interp:B.d,paint:"none",stroke:k(C,"stroke"),width:e.strokeWidth,num:i&&{xs:i.xs,ys:i.ys}});Y=this._emitPart(r,t),null==Y||Y.attr("fill-rule","evenodd");const n=!C._cmd&&C.node.getAttribute("clip-path");if(Y&&n&&n.indexOf("nonForecast")>-1){const e=d.config.forecastDataPoints;Y.attr("clip-path",n),X=this._emitPart(r,u(o({},t),{j:"hf",clip:`url(#forecastMask${b.cuid})`})),null==X||X.attr({"fill-rule":"evenodd","stroke-dasharray":e.dashArray,"stroke-width":e.strokeWidth||void 0})}}const s=this.ctx.renderer;s&&s.kind&&"svg"!==s.kind||!d.config.chart.animations.enabled||b.resized||b.dataChanged||[Y,y&&C].forEach(e=>{const t=e&&e.node.getAttribute("stroke-dasharray");!e||t&&"0"!==t||e.node.setAttribute("stroke-dasharray","none")})}const G={d:null,a:null,f:1,o:g?1:0,n:D?null==Y?void 0:Y.node:null,m:D?null==W?void 0:W.node:null,c:!g};this._targets.set(f,G);const V=H?T:(null==v?void 0:v.d)&&null!=(s=v.al)?s:1,J=I?T:1;G.al=J,this._fadeLine(t,$,H?ze:v?{f:v.f,o:null!=(h=v.o)?h:0}:Ne,I?ze:g?Be:Ne,{width:e.strokeWidth,also:W&&(V<1||J<1)?e=>{const t=R(V,J,e);G.la=t,W.node.setAttribute("fill-opacity",String(t))}:void 0,force:!!W&&V!==J,land:I?Ne:void 0,done:D?()=>{null==Y||Y.remove(),null==X||X.remove(),null==W||W.remove()}:void 0,rec:G,ease:z?_("linear"):void 0}),L&&!D&&Object.assign(G,{d:L.d,a:L.a,n:null==Y?void 0:Y.node,m:null==W?void 0:W.node}),this._lineLabels(e,t,n,l,A,P,a)}_partRow(e,t,r){const n=this.w,l=this._cu,i=n.config.yaxis[n.globals.seriesYAxisReverseMap[r]],a=(null==i?void 0:i.logarithmic)&&!n.globals.invalidLogScale?e.map(e=>l.getLogValAtSeriesIndex(e,r)):e.slice(),s=n.config.fill.type,o=a.length-1;return"gradient"!==s&&"gradient"!==s[t]||null==a[o]||!a.every(e=>e===a[0])||(a[o]+=1e-6),a}_lineBuild(e,t,r,n,l,i,a){const s=this.w.globals.pointsArray,o=s[l],u=o?o.length:0,h=[e._shapeOnly,e.appendPathFrom],d=r.slice();d[n]=a,e._shapeOnly=!0;try{const r=this._swap(e,()=>e._buildSeriesPaths(t,d,n,l,i));return r.S=d,r}finally{[e._shapeOnly,e.appendPathFrom]=h,o?o.length=u:delete s[l]}}_swap(e,t){if(!this.w.config.chart.stacked)return t();const r=[e.prevSeriesYByX,e.prevSeriesY];e.prevSeriesYByX=this._stk,e.prevSeriesY=this._stkPrev;try{return t()}finally{[e.prevSeriesYByX,e.prevSeriesY]=r}}_lineBase(e,t,r,n,l,i,a){const s=(a||r[n]).map(e=>null==e?null:0),o=this._lineBuild(e,t,r,n,l,i,s);return{d:o.linePaths.join(" "),a:o.areaPaths.join(" "),num:o.numericXY}}_fadeLine(e,t,r,n,l){var i,a,s,o,u,h,d;const c=this.cfg,p=null!=(i=c.fadeOpacity)?i:.2,g=null!=(s=null==(a=c.outline)?void 0:a.width)?s:1,f=null!=(u=null==(o=c.outline)?void 0:o.opacity)?u:1,v=null!=(d=null==(h=c.line)?void 0:h.dashArray)?d:4,b=l.rec,m=["fill-opacity","stroke-opacity","stroke-width","stroke-dasharray"],y=t.map(t=>{var r;const n=t.node,l=m.map(e=>n.getAttribute(e)),i=parseFloat(null!=(r=l[0])?r:"1");return{node:n,own:l,k:isFinite(i)?i:1,fill:"area"===e&&"none"!==(t._cmd?t._cmd.fill:n.getAttribute("fill"))}}),A=(t,r)=>{b.lf=t,b.lo=r,y.forEach(({node:n,own:i,k:a,fill:s})=>{t>=1&&r<=0?m.forEach((e,t)=>null==i[t]?n.removeAttribute(e):n.setAttribute(e,i[t])):s?n.setAttribute("fill-opacity",String(a*t*R(1,p,r))):"area"===e?(n.setAttribute("stroke-opacity",String(t*R(1,f,r))),n.setAttribute("stroke-width",String(R(l.width,g,r)))):(n.setAttribute("stroke-opacity",String(t)),n.setAttribute("stroke-dasharray",r<1?`${v} ${v*r}`:String(v)))})},_=e=>{A(R(r.f,n.f,e),R(r.o,n.o,e)),l.also&&l.also(e)},x=()=>{b.run=!1,l.land&&A(l.land.f,l.land.o),l.done&&l.done()};this._animates()&&(r.f!==n.f||r.o!==n.o||l.done||l.force)?(b.run=!0,this._tween(0,this.w.config.chart.animations.dynamicAnimation.speed,_,x,l.ease)):(_(1),x())}_lineLabels(e,t,r,n,l,i,a){var s,o,u,h;const d=this.w,c=d.globals,p=e.elDataLabelsWrap;if(!d.config.dataLabels.enabled||!(null==p?void 0:p.node)||e._shapeOnly)return;const g=(null==(s=d.highlightData)?void 0:s.active)&&"part"===(null!=(u=null==(o=this.cfg.dataLabels)?void 0:o.value)?u:"part");if(g){const a=p.node;for(;a.firstChild;)a.removeChild(a.firstChild);const s=c.dataLabelsRects;if(s[n]=[],c.lastDrawnDataLabelsIndexes[n]=[],i&&l.some(e=>null!=e)){const a=new b(d,this.ctx);for(let o=0;o<i.xArrj.length-1;o++){const u=e.lineHelpers.calculatePoints({series:i.S,x:i.xArrj[o+1],y:i.yArrj[o+1],realIndex:n,i:r,j:o,prevY:i.yArrj[0]});u.x.forEach((e,r)=>{if(null==l[o?o+1:r])return void s[n].push({x:NaN,y:NaN,width:0,height:0});const i=a.drawDataLabel({type:t,pos:{x:o?[e]:r?[NaN,e]:[e,NaN],y:u.y},i:n,j:o?o+1:1,row:l});i&&p.add(i)})}}}const f=g?null==i?void 0:i.xArrj:a.xArrj,v=g?null==i?void 0:i.yArrj:a.yArrj;if(!this._animates()||!f||D(d,n))return;const m=c.riseLabels;if(null==m?void 0:m.has(n)){const e=new Map(m);e.delete(n),c.riseLabels=e.size?e:null}const y=c.prevStreamFrame,A=null==(h=c.prevHighlightLabels)?void 0:h.get(n);Promise.resolve().then(()=>{var e,t;return this._rideLabels(p.node,f,v,A,[null==(e=null==y?void 0:y.xPixels)?void 0:e[n],null==(t=null==y?void 0:y.yPixels)?void 0:t[n]])})}_captureLabels(){const e=this.w,t=e.config.chart.type,r=e.dom.baseEl,n=oe.indexOf(t)>-1;if(!e.config.dataLabels.enabled||"line"!==t&&"area"!==t&&!n||!r||!y.isBrowser())return null;const l=new Map;if(n){const e=new Map;return r.querySelectorAll(".apexcharts-pie-label").forEach(t=>{const[r,n]=G(t);e.set(Number(t.parentNode.getAttribute("data:slice")),{x:r,y:n})}),l.set(-1,e),l}return r.querySelectorAll(".apexcharts-datalabels[data\\:realIndex]").forEach(t=>{const r=Number(t.getAttribute("data:realIndex")),n=e.globals.seriesXvalues[r]||[],i=new Map;t.querySelectorAll(`text.apexcharts-datalabel, text.${je}`).forEach(e=>{var t;const r=Ye(n,parseFloat(e.getAttribute("cx")));if(r<0)return;const[l,a]=G(e);i.set(r,{x:l,y:a,o:parseFloat(null!=(t=e.getAttribute("opacity"))?t:"1"),els:qe(e)})}),l.set(r,i)}),l}_rideLabels(e,t,r,n,l){const i=this.w;if(i.globals.isDestroyed||!e.isConnected)return;const[a,s]=l,o=[],u=new Set,h=e=>"number"==typeof e&&isFinite(e);e.querySelectorAll("text.apexcharts-datalabel").forEach(e=>{const l=Ye(t,parseFloat(e.getAttribute("cx")));if(l<0)return;const[i,d]=G(e),c=null==n?void 0:n.get(l);let p=0,g=0,f=0;c?(u.add(l),p=c.x-i,g=c.y-d,f=c.o):!(null==n?void 0:n.size)&&[null==a?void 0:a[l],null==s?void 0:s[l],t[l],r[l]].every(h)&&(p=a[l]-t[l],g=s[l]-r[l]),(f<1||Math.abs(p)>.01||Math.abs(g)>.01)&&o.push({els:qe(e),dx:p,dy:g,o:f,to:1})}),null==n||n.forEach((t,r)=>{if(u.has(r))return;const n=t.els.map(t=>{const r=t.cloneNode(!0);return r.setAttribute("class",je),r.setAttribute("pointer-events","none"),r.removeAttribute("transform"),e.appendChild(r),r}),[l,i]=G(n[n.length-1]);o.push({els:n,dx:t.x-l,dy:t.y-i,o:t.o,to:0,out:!0})}),o.length&&(o.forEach(e=>{e.bases=e.els.map(e=>e.getAttribute("transform")||""),e.ops=e.els.map(t=>{var r;return parseFloat(null!=(r=t.getAttribute("opacity"))?r:"1")/(e.out&&e.o>0?e.o:1)})}),this._tween(0,i.config.chart.animations.dynamicAnimation.speed,e=>o.forEach(({els:t,dx:r,dy:n,o:l,to:i,out:a,bases:s,ops:o})=>t.forEach((t,u)=>{const h=s[u],d=a?1:1-e;d?t.setAttribute("transform",`translate(${r*d} ${n*d}) ${h}`.trim()):h?t.setAttribute("transform",h):t.removeAttribute("transform");const c=R(l,i,e),p=o[u];c>=1&&p>=1?t.removeAttribute("opacity"):t.setAttribute("opacity",String(p*c))})),()=>o.forEach(e=>e.out&&e.els.forEach(e=>e.remove()))))}_paintBar(e,t,r,n){var l,i,a,s,o,u,h,c,p,g;const f=this.w,v=this.cfg,b=this._animates(),{key:m,prev:y,geo:A,fadeTo:_,active:x,bar:w}=n,k=r.elSeries;this._seriesEls.set(String(e.realIndex),k.node);let S=(null==A?void 0:A.pathTo)||null;const M=!S&&!!(null==y?void 0:y.d)&&b;M&&(S=this._exitTo(y,x,r.pathTo,null==A?void 0:A.base));const C=S&&!M?this._from(y,null==A?void 0:A.base,r.pathFrom,!!w):null;let E=C?C.d:(null==y?void 0:y.d)||null;const T=M&&!x;let $="apexcharts-bar-highlight-part",P=!1,L=null;if(w&&S){if(E&&E!==S){const e=w._pathToInterp;w._pathToInterp=null;const t=w.cornerMorph(E,S,M?void 0:A.square);t!==S&&(E=t,L=w._pathToInterp),w._pathToInterp=e}const e=w.isHorizontal?De:Fe,r=t.node.classList.contains(e);P=M?x?!!y.flip:r:A.flip;const n=(null==y?void 0:y.d)?!!y.flip:!!(null==C?void 0:C.cover)&&r;(P||b&&n)&&($+=" "+e),!P&&b&&n&&($+=" "+Oe,this._settleHeld(w))}const D="string"==typeof r.fill&&"none"!==r.fill&&r.fill.indexOf("url")<0?r.fill:f.globals.colors[f.config.plotOptions.bar.distributed?e.j:e.realIndex],[F,O]=q(r.fill&&"none"!==r.fill?r.fill:D),j=e.j>0&&r.elBarShadows?r.elBarShadows.node.lastElementChild:null,H=y?y.f:1,W=this._partGroup(k,"apexcharts-bar-highlight"),X=S?this._emitPart(W,{i:e.i,j:e.j,realIndex:e.realIndex,from:E||S,to:S,interp:L,paint:F,delay:r.delay,speed:r.speed,cls:$,chartType:"bar",clip:`url(#gridRectBarMask${f.globals.cuid})`}):null,G=Y(t.node),V=(null==C?void 0:C.cover)&&b?O:(null==y?void 0:y.d)&&null!=(l=y.al)?l:1,J=T?O:1,U=n.whole||(null==y?void 0:y.o)?null!=(a=null==(i=v.outline)?void 0:i.width)?a:1:0,Z=t.node,K=Z.getAttribute("stroke"),Q=(null==C?void 0:C.cover)&&b?1:(null==y?void 0:y.d)&&null!=(s=y.k)?s:0,ee=T?1:0,te=!!X&&U>0&&(Q>0||ee>0)&&parseFloat(Z.getAttribute("stroke-width"))>0&&!!K&&"none"!==K&&"transparent"!==K,re=Y(Z,"stroke-opacity"),ne={};te&&(["stroke","stroke-width","stroke-opacity","stroke-dasharray"].forEach(e=>{var t;ne[e]=X.node.getAttribute(e),X.node.setAttribute(e,null!=(t=Z.getAttribute(e))?t:"")}),Z.hasAttribute("stroke-dasharray")||X.node.removeAttribute("stroke-dasharray"));const le={d:null,f:_,base:null!=(o=null==A?void 0:A.base)?o:null==y?void 0:y.base,edge:!1,s:null!=(u=null==A?void 0:A.s)?u:null==y?void 0:y.s,n:M?null==X?void 0:X.node:null,c:!x,al:J,k:te?ee:0};this._targets.set(m,le);const ie=T?B:z(_);if(this._fade(t.node,(null==C?void 0:C.cover)&&b?B:y?{f:y.f,o:null!=(h=y.o)?h:z(y.f).o}:N,n.whole?ie:{f:ie.f,o:0},r,{outline:U>0?{color:D,width:U,opacity:null!=(p=null==(c=v.outline)?void 0:c.opacity)?p:1}:null,also:e=>{null==j||j.setAttribute("fill-opacity",String(R(H,_,e))),(e=>{const t=R(V,J,e);if(le.la=t,X&&(G<1||V<1||J<1)&&X.node.setAttribute("fill-opacity",String(G*t)),!te)return;const r=R(Q,ee,e);le.lk=r,r>0||e<1?(X.node.setAttribute("stroke-opacity",String(re*r)),!(le.lo>0)&&r>0&&Z.setAttribute("stroke-opacity","0")):X.attr(ne)})(e)},force:!!X&&(V!==J||te),land:T?N:void 0,done:M?()=>null==X?void 0:X.remove():void 0,rec:le}),!X||!S||M)return;if((null==A?void 0:A.overflow)&&X.node.classList.add("apexcharts-highlight-overflow"),(null==A?void 0:A.overflow)&&!w){const e=new d(f,this.ctx).drawPath({d:r.pathTo,stroke:"#fff",strokeWidth:1,fill:"none",strokeDashArray:3,classes:`${I} apexcharts-highlight-edge`});e.attr("clip-path",`url(#gridRectBarMask${f.globals.cuid})`),e.node.setAttribute("pointer-events","none"),W.add(e);const t=t=>e.node.setAttribute("stroke-opacity",String(.75*t));b&&!(null==y?void 0:y.edge)?this._tween(r.delayMs,r.speed,t):t(1)}const ae=null==(g=this.ctx.renderer)?void 0:g.kind;ae&&"svg"!==ae||f.config.plotOptions.bar.isFunnel||this._hitProxy(W,S,r.pathTo,t.node,!!f.globals.isBarHorizontal),r.labels&&this._contrastLabels(r.labels,S),Object.assign(le,{d:S,base:null==A?void 0:A.base,edge:!!(null==A?void 0:A.overflow)&&!w,s:null==A?void 0:A.s,flip:P,n:X.node})}_hitProxy(e,t,r,n,l){const i=l?0:1,[a,s]=We(t,i),[o,u]=We(r,i),[h,c]=We(t,i?0:1);if(!(s-a>.5&&c-h>.5))return;const p=[];u-o>.5?(a<o&&p.push([a,Math.min(s,o)]),s>u&&p.push([Math.max(a,u),s])):p.push([a,s]);const g=new d(this.w,this.ctx);for(const[t,r]of p){if(r-t<.5)continue;const i=g.drawPath({d:l?`M ${t} ${h} L ${r} ${h} L ${r} ${c} L ${t} ${c} Z`:`M ${h} ${t} L ${c} ${t} L ${c} ${r} L ${h} ${r} Z`,stroke:"none",strokeWidth:0,fill:"none",classes:"apexcharts-highlight-hit"}).node;i.setAttribute("pointer-events","all"),i.setAttribute("clip-path",`url(#gridRectBarMask${this.w.globals.cuid})`),J(n,i),e.add(i)}}_settleHeld(e){if(this._held)return;this._held=!0;const t=this.w;Promise.resolve().then(()=>{var r;t.globals.isDestroyed||(null==(r=t.dom.baseEl)?void 0:r.querySelector(`.apexcharts-series > .${Oe}`))||e.settleHeldMirrors()})}_from(e,t,r,n){var l;return(null==e?void 0:e.d)?{d:e.d,cover:!1}:t&&(e||"baseline"===this.cfg.enter||n&&(!this.w.globals.dataChanged||(null==(l=this._prev())?void 0:l.size)))?{d:t,cover:!1}:r?{d:r,cover:!0}:null}_exitTo(e,t,r,n){return t?n||e.base||e.d:r}_partGroup(e,t){let r=e.node._apxHighlight;return r&&r.node.parentNode===e.node||(r=new d(this.w,this.ctx).group({class:t}),e.node._apxHighlight=r),e.add(r),r}_emitPart(e,t){const r=this.w,n=function(e,t){const r=e&&e.renderer;return r&&r.kind&&"svg"!==r.kind?r:t}(this.ctx,new d(r,this.ctx)).renderPaths({i:t.i,j:t.j,realIndex:t.realIndex,pathFrom:t.from,pathTo:t.to,pathToInterp:t.interp||void 0,pathToNumeric:t.num,scrollMorph:!!t.scroll,stroke:t.stroke||"none",strokeWidth:t.width||0,fill:t.paint,animationDelay:t.delay,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:t.speed,className:`${I} ${t.cls}`,chartType:t.chartType,bindEventsOnPaths:!1});return n&&n.node?(n.attr("clip-path",t.clip),n.node.setAttribute("pointer-events","none"),n.node.setAttribute("index",String(t.realIndex)),n.node.setAttribute("j",String(t.j)),e.add(n),n):null}_fade(e,t,r,n,l){var i;const a=l.attr||"fill-opacity",s=Y(e,a),o=l.outline,u=l.rec||{},h=o&&null==o.width?["stroke","stroke-opacity"]:["stroke","stroke-width","stroke-opacity"],d=h.map(t=>e.getAttribute(t)),c=(t,r)=>{u.lf=t,u.lo=o?r:0,e.setAttribute(a,String(s*t)),o&&(r<=0?h.forEach((t,r)=>null==d[r]?e.removeAttribute(t):e.setAttribute(t,d[r])):(e.setAttribute("stroke",o.color),null!=o.width&&e.setAttribute("stroke-width",String(o.width)),e.setAttribute("stroke-opacity",String(o.opacity*Math.min(1,r)))))},p=e=>{c(R(t.f,r.f,e),R(t.o,r.o,e)),l.also&&l.also(e)},g=()=>{u.run=!1,l.land&&c(l.land.f,l.land.o),l.done&&l.done()};(null!=(i=l.anim)?i:this._animates())&&(t.f!==r.f||t.o!==r.o||l.done||l.force)?(u.run=!0,this._tween(n.delayMs,n.speed,p,g,l.curve,n.el)):(p(1),g())}_runningExt(e,t,r){if(!t)return e;const n=new Map;return e.map((e,l)=>e.map((e,i)=>{if(null==e)return null;const a=t(l,i)+(r&&e<0?"-":"+"),s=(n.get(a)||0)+e;return n.set(a,s),s}))}_contrastLabels(e,t){const r=this.w,n=e.node;if(!n||/rotate\((?!0\))/.test(n.getAttribute("transform")||""))return;const[l,i]=We(t,0),[a,s]=We(t,1),o=new d(r);n.querySelectorAll("text").forEach(e=>{const t=(e.getAttribute("fill")||"").toLowerCase();if("#fff"!==t&&"#ffffff"!==t&&"white"!==t)return;const n=o.getTextRects(e.textContent,e.getAttribute("font-size"),e.getAttribute("font-family"),void 0,!0,e.getAttribute("font-weight")),u=parseFloat(e.getAttribute("x")),h=parseFloat(e.getAttribute("y")),d=e.getAttribute("text-anchor"),c="middle"===d?u-n.width/2:"end"===d?u-n.width:u;c>=l-1&&c+n.width<=i+1&&h-.75*n.height>=a-1&&h+.25*n.height<=s+1||e.setAttribute("fill",r.config.chart.foreColor)})}tooltipRow(e,t,r,n){var l,i,a,s,h,d,c,p,f,v,b;const m=this.w,y=this.cfg,A=y.tooltip||{},_=m.globals.axisCharts,x=this.isActive()&&!1!==A.show&&(null!=r||!_)&&!!e.yValue,w=_||"lanes"!==this._ind||"radialBar"!==m.config.chart.type?void 0:(null==(l=this._lane)?void 0:l[0])===t?this._lane[1]:"part";if(e.marker&&function(e,t,r=.2,n){const l=e.style,i=e.firstElementChild;if(!t){if(!e._apxHl)return;return e._apxHl=!1,l.background=l.boxShadow=l.borderRadius="",void(i&&(i.style.display=""))}e._apxHl=!0;const a="#"===t.charAt(0)?g.hexToRgba(t,r):`color-mix(in srgb, ${t} ${100*r}%, transparent)`;l.background="part"===n?t:n?a:`linear-gradient(90deg, ${t} 50%, ${a} 50%)`,l.boxShadow=`inset 0 0 0 1px ${t}`,l.borderRadius="3px",i&&(i.style.display="none")}(e.marker,x&&!m.config.tooltip.fillSeriesColor?(null==(a=null==(i=this._tiles)?void 0:i.get(t+"|"+r))?void 0:a.base)||m.globals.colors[t]:null,w?null!=(d=null==(h=null==(s=y.radialBar)?void 0:s.lanes)?void 0:h.opacity)?d:be:y.fadeOpacity,w),!x)return;const k=this.valueAt(t,r),S=m.seriesData.series,M=_?null==(c=S[t])?void 0:c[r]:S[t],C=_?{series:S,seriesIndex:t,dataPointIndex:r,w:m}:u(o({},m),{w:m,series:S,seriesIndex:t,dataPointIndex:t,highlight:X(k,M),lane:w});if("function"==typeof A.formatter)return void(e.yValue.innerHTML=String(null!=(p=A.formatter(k,null!=M?M:null,C))?p:""));const E='<span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">';if("whole"===w){if(null!=k){const t=null!=(b=null==(v=null==(f=m.globals.locale)?void 0:f.highlightFilter)?void 0:v.part)?b:"part";e.yValue.innerHTML+=` ${E}(${t} ${n.yLbFormatter(k,C)})</span>`}return}let T=e.yValue.innerHTML;null!=k&&(T=`/ ${T}`,A.share&&M&&(T+=` \xb7 ${Math.round(k/M*100)}%`)),e.yValue.innerHTML=(null==k?"":`${n.yLbFormatter(k,C)} `)+`${E}${T}</span>`}drillView(e){Array.isArray(null==e?void 0:e.series)&&(e.series=e.series.map(ee),this._level={series:e.series,base:this.w.globals.initialSeries}),e&&null!=this.cfg.data&&(e.highlightFilter=u(o({},e.highlightFilter),{data:null}))}_drilled(){var e;const t=this._level;return!!(t&&((null==(e=this.ctx.drilldown)?void 0:e.depth)||0)>0&&this.w.globals.initialSeries===t.base)}_fire(e){var t;const r=null==(t=this.w.config.chart.events)?void 0:t.highlightFilterChanged;"function"==typeof r&&r(this.ctx,{active:"clear"!==e,phase:e})}pie(e){"radialBar"===e.chartType?ye(this,e):ue(this,e)}treemap(e){return $e(this,e)}afterRender(){this._tipOn&&(this._tipOn=!1,this.w.config.tooltip.enabled=!1);const e=this._ride;this._ride=null;const t=this.w.globals.circleTween;!e||t&&!t.done||e();const r=this._drawnSig,n=this._sig;r!==n&&(this._drawnSig=n,this._fire(r?n?"update":"clear":"enter"))}set(e,t={}){var r;const n=this.w,l=n.globals;if(!l.axisCharts)return this._setCircle(e,t);const i=t.series||this._rawSeries();if("treemap"===n.config.chart.type&&l.treemapRoots)return this._apply(function(e,t,r){const n=e.w;return t.map((e,t)=>{const l=ee(e),i=Array.isArray(null==r?void 0:r[t])?r[t]:null;if("function"!=typeof r&&!i)return l;let a=0;const s=l=>{var h,d,c;if(W(l)&&Array.isArray(l.children)&&l.children.length)return u(o({},l),{children:l.children.map(s)});const p=a++,g=W(l)?o({},l):{x:"",y:l};return g.highlight="function"==typeof r?r({seriesIndex:t,dataPointIndex:p,seriesName:e.name,x:null!=(h=g.x)?h:g.name,value:"number"==typeof(null!=(d=g.y)?d:g.value)?null!=(c=g.y)?c:g.value:null,datum:l,w:n}):null==i?void 0:i[p],g};return Array.isArray(l.data)&&(l.data=l.data.map(s)),l})}(this,i,e),t);const a=!t.series&&!!l.dataReducerRawSeries&&!!(null==(r=n.config.chart.dataReducer)?void 0:r.enabled),s=i.map((r,l)=>{const i=Array.isArray(r.data)?r.data:[],s="function"==typeof e?i.map((i,s)=>{var o;return e({seriesIndex:l,dataPointIndex:s,seriesName:r.name,x:W(i)?i.x:Array.isArray(i)?i[0]:n.labelData.labels[s],value:Ge(i,t.series||a?null:null==(o=n.seriesData.series[l])?void 0:o[s]),datum:i,w:n})}):Array.isArray(null==e?void 0:e[l])?e[l]:null,h=ee(r);return s&&(a&&h.data.every(e=>"number"!=typeof e)?h.data=h.data.map((e,t)=>null==e?e:Array.isArray(e)?{x:e[0],y:e[1],highlight:s[t]}:u(o({},e),{highlight:s[t]})):h.highlightData=s),h});return this._apply(s,t)}clear(e={}){return this.w.globals.axisCharts?this._apply(this._rawSeries().map(ee),e):this._setCircle(null,e)}_setCircle(e,t){const r=this.w,n=t.series||this._rawSeries(),l={};if((t.series||n.some(re))&&(l.series=n.map(ee)),"function"==typeof e){const l=te(n),i=t.series?[]:r.seriesData.series,a=r.seriesData.seriesNames,s=l.length||n.length,o=[];for(let t=0;t<s;t++){const s=l.length?l[t]:n[t];o.push(e({seriesIndex:t,dataPointIndex:t,seriesName:l.length?String(s.x):a[t],x:l.length?s.x:a[t],value:Ge(s,i[t]),datum:s,w:r}))}e=o}return l.highlightFilter={data:Array.isArray(e)?e:null},this.ctx.updateOptions(l,!1,!1!==t.animate,!0,!this._drilled())}_apply(e,t){const r=this._drilled();return r&&this._level&&(this._level.series=e.map(ee)),this.ctx.updateSeries(e,!1!==t.animate,!r)}_rawSeries(){var e,t;const r=this.w.globals;return(this._drilled()&&(null==(e=this._level)?void 0:e.series)||r.treemapRawSeries||(r.dataReducerRawSeries&&(null==(t=this.w.config.chart.dataReducer)?void 0:t.enabled)?r.initialSeries:null)||r.initialSeries||this.w.config.series).map(e=>W(e)?o({},e):e)}teardown(){var e,t;Array.from(this._live).forEach(e=>e.finish()),this._live.clear(),this._targets=new Map,this._render=null,this._cu=null,this._level=null,this._seriesEls=new Map,this._tiles=null,this._tmDefs=[],null==(e=this.ctx.events)||e.removeEventListener("mounted",this._onRender),null==(t=this.ctx.events)||t.removeEventListener("updated",this._onRender)}}}),e.default=h,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexHighlightFilter={})});
5
+ !function(e){var t="undefined"!=typeof globalThis?globalThis:self,r=t.ApexCharts;if(r&&r.__internals)return e.call(t);if(r)throw new Error("ApexCharts: dist/features/highlight-filter.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/highlight-filter.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/features/highlight-filter.js",run:e,done:!1},l=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);l.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var r=t.ApexCharts;if(r)if(r.__internals){n.done=!0;var i=l.indexOf(n);-1!==i&&l.splice(i,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/features/highlight-filter.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/features/highlight-filter.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/highlight-filter.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/features/highlight-filter.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,o=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&s(e,r,t[r]);if(l)for(var r of l(t))a.call(t,r)&&s(e,r,t[r]);return e},u=(e,t)=>r(e,n(t));const h=globalThis.ApexCharts,d=globalThis.ApexCharts.__internals.__apex_Graphics,c=globalThis.ApexCharts.__internals.__apex_CoreUtils,p=globalThis.ApexCharts.__internals.__apex_Series,g=globalThis.ApexCharts.__internals.__apex_Utils,f=globalThis.ApexCharts.__internals;f.__apex_Animations,f.__apex_Animations_computeStagger,f.__apex_Animations_applyAnimationPolicy;const v=f.__apex_Animations_prefersReducedMotion;f.__apex_Animations_applyProgressiveReveal;const b=globalThis.ApexCharts.__internals.__apex_DataLabels,m=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,y=globalThis.ApexCharts.__internals.__apex_Environment_Environment,A=globalThis.ApexCharts.__internals;A.__apex_Easing_easeInOutSine,A.__apex_Easing_DEFAULT_EASING_NAME,A.__apex_Easing_cubicBezier,A.__apex_Easing_registerEasing;const _=A.__apex_Easing_resolveEasing,x=globalThis.ApexCharts.__internals,w=x.__apex_PathMorphing_parsePath;x.__apex_PathMorphing_morphPaths,x.__apex_PathMorphing_pathBbox;const k=x.__apex_PathMorphing_arrayToPath;function S(e,t,r){if(!e||"string"!=typeof e)return null;const n=w(e);if(!n.length||"M"!==n[0][0])return null;for(let e=1;e<n.length;e++)if("M"===n[e][0])return null;let l=n,i=null;if(r){if(n.length<5)return null;if(i=n.slice(-3),l=n.slice(0,-3),"Z"!==i[2][0])return null;if("L"!==i[1][0])return null;if("L"!==i[0][0]&&"C"!==i[0][0])return null}else if("Z"===n[n.length-1][0])return null;if(l.length!==t||l.length<2)return null;const a=l[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<l.length;e++)if(l[e][0]!==a)return null;const s=l.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of s)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:l,closing:i,segType:a,anchors:s}}function M(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function C(e,t,r){const n=e,l=[t[1],t[2]],i=[t[3],t[4]],a=[t[5],t[6]],s=M(n,l,r),o=M(l,i,r),u=M(i,a,r),h=M(s,o,r),d=M(o,u,r),c=M(h,d,r);return{first:["C",s[0],s[1],h[0],h[1],c[0],c[1]],second:["C",d[0],d[1],u[0],u[1],a[0],a[1]],mid:c}}function E(e,t,r){const n=[t[1],t[2]],l=M(e,n,r);return{first:["L",l[0],l[1]],second:["L",n[0],n[1]],mid:l}}function T(e,t){const{body:r,closing:n,segType:l,anchors:i}=e,a=i.length,s=t.length,o=e=>"C"===l?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],u=[["M",i[0][0],i[0][1]]];let h=0;for(;h<s&&0!==t[h];)h++;for(let e=1;e<=h;e++)u.push(o(i[0]));let d=h+1;for(let e=0;e<a-1;e++){let n=0;for(;d+n<s&&-1===t[d+n];)n++;const a=r[e+1];if(n){const t=n+1;let r=i[e],s=a;for(let e=0;e<n;e++){const n=1/(t-e),i="C"===l?C(r,s,n):E(r,s,n);u.push(i.first),r=i.mid,s=i.second}u.push(s)}else u.push(a.slice());d+=n+1}for(;d<s;)u.push(o(i[a-1])),d++;return n&&n.forEach(e=>u.push(e.slice())),u}function $(e,t,r,n,l,i){const a=S(e,n,i);if(!a)return null;const s=S(t,l,i);if(!s)return null;if(a.segType!==s.segType)return null;if((a.closing||s.closing)&&(!a.closing||!s.closing||a.closing[0][0]!==s.closing[0][0]))return null;const o=r.map(e=>e.oldJ),u=r.map(e=>e.newJ);return{from:k(T(a,o)),toInterp:k(T(s,u))}}function P(e){const t=new Map;return e.map(e=>{const r=t.get(e)||0;return t.set(e,r+1),0===r?e:`${e}#${r}`})}function L(e,t,r=0|(r=>null==(r=e.seriesData.series[t])?void 0:r.length)()){return P(Array.from({length:r},(r,n)=>function(e,t,r){var n,l,i,a;if(null==(n=e.axisFlags)?void 0:n.isXNumeric){const n=null==(i=null==(l=e.seriesData)?void 0:l.seriesX)?void 0:i[t];if(n&&n.length&&null!=n[r])return"x:"+n[r]}const s=null==(a=e.globals.labels)?void 0:a[r];return null!=s&&""!==String(s)?"c:"+(Array.isArray(s)?s.join(" "):String(s)):"j:"+r}(e,t,n)))}function D(e,t,r=!1,n=!1){var l,i;if(!function(e){var t;const r=e.config.chart.animations;if(!r||!1===r.enabled)return!1;if(!r.dynamicAnimation||!1===r.dynamicAnimation.enabled)return!1;const n=null!=(t=r.largeDatasetThreshold)?t:0;return!(n>0&&e.globals.dataPoints>n||!(y.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const s=null==(l=a.seriesY)?void 0:l[t],o=null==(i=e.seriesData.series)?void 0:i[t];if(!Array.isArray(s)||!Array.isArray(o))return null;if(!s.length||!o.length)return null;const u=P(s.map((e,r)=>function(e,t,r){var n,l;if(e.isXNumeric){const l=null==(n=e.seriesX)?void 0:n[t];if(l&&l.length&&null!=l[r])return"x:"+l[r]}const i=null==(l=e.labels)?void 0:l[r];return null!=i&&""!==String(i)?"c:"+(Array.isArray(i)?i.join(" "):String(i)):"j:"+r}(a,t,r))),h=L(e,t),d=function(e,t){const r=new Map;e.forEach((e,t)=>{r.has(e)||r.set(e,t)});const n=new Array(t.length),l=new Set;let i=-1,a=!0,s=e.length===t.length;t.forEach((e,t)=>{const o=r.has(e)&&!l.has(r.get(e))?r.get(e):-1;n[t]=o,-1!==o&&(l.add(o),o<i&&(a=!1),i=o),o!==t&&(s=!1)});const o=[];for(let t=0;t<e.length;t++)l.has(t)||o.push(t);return{toOld:n,exits:o,ordered:a,changed:!s}}(u,h);return(d.ordered||n)&&(d.changed||r)?{join:d,oldKeys:u,newKeys:h}:null}function F(e,{type:t,realIndex:r,pathFromLine:n,pathFromArea:l,linePaths:i,areaPaths:a}){var s,o;const u=D(e,r);if(!u)return null;const{join:h,oldKeys:d,newKeys:c}=u,p=e.globals.prevStreamFrame;if(!p)return null;const g=null==(s=p.seriesY)?void 0:s[r],f=null==(o=e.seriesData.series)?void 0:o[r];if(g.length<2||f.length<2)return null;if(g.some(e=>null===e)||f.some(e=>null===e))return null;const v=function(e,t){const r=new Set(e.exits),n=[];let l=0;for(let t=0;t<e.toOld.length;t++){const i=e.toOld[t];if(-1!==i){for(;l<i;)r.has(l)&&n.push({oldJ:l,newJ:-1}),l++;n.push({oldJ:i,newJ:t}),l=i+1}else n.push({oldJ:-1,newJ:t})}for(;l<t;)r.has(l)&&n.push({oldJ:l,newJ:-1}),l++;return n}(h,d.length),b={};return Array.isArray(i)&&1===i.length&&n&&(b.line=$(n,i[0],v,d.length,c.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&l&&(b.area=$(l,a[0],v,d.length,c.length,!0)),b.line||b.area?b:null}const O=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function j(e,t){const{ax:r,bx:n,ay:l,by:i}=t,a=[],s=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=s.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(O)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${r*e+n}`);continue}if("V"===e){for(const e of t)a.push(`V ${l*e+i}`);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]} ${r*t[e+5]+n} ${l*t[e+6]+i}`);continue}const s=[];for(let e=0;e+1<t.length;e+=2)s.push(`${r*t[e]+n} ${l*t[e+1]+i}`);s.length&&a.push(`${e} ${s.join(" ")}`)}return a.join(" ")}const I="apexcharts-highlight-part",N={f:1,o:0},B={f:0,o:0},z=e=>({f:e,o:e<1?1:0}),H=e=>"number"==typeof e&&e==e&&e!==1/0&&e!==-1/0,R=(e,t,r)=>r>=1?t:e+(t-e)*r,W=e=>e&&"object"==typeof e&&!Array.isArray(e),Y=(e,t="fill-opacity")=>{var r;const n=null==(r=e.instance)?void 0:r._cmd,l=parseFloat(n?n[t.replace("-o","O")]:e.getAttribute(t));return isFinite(l)?l:1};function q(e){const t="string"==typeof e?e.trim():"";let r,n=null;return(r=/^rgba\(([^,]+,[^,]+,[^,]+),([^)]+)\)$/i.exec(t))?n=[`rgb(${r[1]})`,parseFloat(r[2])]:(r=/^color-mix\(in srgb, (.+) ([\d.]+)%, transparent\)$/.exec(t))?n=[r[1],parseFloat(r[2])/100]:(r=/^(#[\da-f]{6})([\da-f]{2})$/i.exec(t))&&(n=[r[1],parseInt(r[2],16)/255]),n&&n[1]>0&&n[1]<1?n:[e,1]}function X(e,t){const r=null!=e&&t?e/t:null;return{value:null!=e?e:null,total:null!=t?t:null,share:r,overflow:null!=r&&(r<0?"sign":r>1)}}function G(e){let t=parseFloat(e.getAttribute("x")),r=parseFloat(e.getAttribute("y"));return String(e.getAttribute("transform")||"").replace(/translate\(\s*([^\s,)]+)[\s,]*([^\s,)]*)\s*\)/g,(e,n,l)=>(t+=parseFloat(n)||0,r+=parseFloat(l)||0,"")),[t,r]}const V=["mousemove","mousedown","mouseup","mouseover","mouseout","click","touchstart","touchmove","touchend"];function J(e,t){const r=e._apxHits||(e._apxHits=new Set);if(!e._apxHitStop){e._apxHitStop=!0;const t=e=>{r.has(e.relatedTarget)&&e.stopImmediatePropagation()};["mouseout","mouseleave","mouseover","mouseenter"].forEach(r=>e.addEventListener(r,t,!0))}r.add(t),V.forEach(r=>t.addEventListener(r,t=>{t.stopPropagation();const n="mouseover"===r,l="mouseout"===r;(n||l)&&t.relatedTarget===e||(Q(e,r,t),n&&Q(e,"mouseenter",t),l&&Q(e,"mouseleave",t))},{passive:!0}))}function U(e,t){const r=()=>{const r=e.getAttribute("filter");r?t.setAttribute("filter",r):t.removeAttribute("filter")};r(),y.isBrowser()&&"undefined"!=typeof MutationObserver&&new MutationObserver(r).observe(e,{attributes:!0,attributeFilter:["filter"]})}function Z(e,t){const r=e.parentNode,n=Array.from(r.childNodes);r.insertBefore(t,n[n.indexOf(e)+1]||null)}const K=(e,t)=>e.setAttribute("class",`${e.getAttribute("class")||""} ${t}`.trim());function Q(e,t,r){try{const n=r.touches?{bubbles:!0,cancelable:!0,touches:Array.from(r.touches),targetTouches:Array.from(r.targetTouches),changedTouches:Array.from(r.changedTouches)}:"mouseenter"===t||"mouseleave"===t?{clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,relatedTarget:r.relatedTarget,buttons:r.buttons}:r;e.dispatchEvent(new r.constructor(t,n))}catch(e){}}function ee(e){if(!W(e))return e;const t=e,{highlightData:r,highlight:n}=t,s=((e,t)=>{var r={};for(var n in e)i.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))t.indexOf(n)<0&&a.call(e,n)&&(r[n]=e[n]);return r})(t,["highlightData","highlight"]);return["data","children"].forEach(e=>{Array.isArray(s[e])&&(s[e]=s[e].map(ne))}),s}function te(e){const t=[];return(e||[]).forEach(e=>(W(e)&&Array.isArray(e.data)?e.data:[]).forEach(e=>{W(e)&&void 0!==e.x&&(void 0!==e.y||Array.isArray(e.children))&&t.push(e)})),t}const re=e=>W(e)&&("highlight"in e||"highlightData"in e||[e.data,e.children].some(e=>Array.isArray(e)&&e.some(re))),ne=e=>W(e)&&("highlight"in e||Array.isArray(e.children))?ee(e):e;function le(e,t){if("number"==typeof t)return t;const r=e.config&&e.config.series||[];for(let e=0;e<r.length;e++)if(r[e]&&r[e].name===t)return e;return-1}function ie(e){return!!(e&&e.weaveHighlights&&e.weaveHighlights.records.length)}function ae(e,t){if(!ie(e))return null;let r=null;for(const n of e.weaveHighlights.records)for(const l of n.entries)le(e,l.series)===t&&(r=l.values);return r}const se="p:",oe=["pie","donut","polarArea"];function ue(e,t){var r;const n=e.w.highlightData;if(!n)return;if(e._render!==t&&e._beginRender(t,"p:"),!n.active&&!(null==(r=e._prev())?void 0:r.size))return;n.active&&"polarArea"===t.chartType&&"clamp"!==e.cfg.axis&&n.parts.forEach(e=>{H(e[0])&&(t.maxY=Math.max(t.maxY,e[0]))});const l=t.animatePaths,i=t.drawArcs,a=t.getSliceMovers,s=t.getHoverOutlinePath,h={arcs:[],movers:[],reach:[],ap:l};t.animatePaths=(e,r)=>{const n=o({},r);l.call(t,e,r),n.run=r.dur,h.arcs[r.i]={a:n,el:e}},t.drawArcs=(...r)=>{const n=i.apply(t,r);return function(e,t,r,n){var l,i,a,s,h,c,p,f,v,b;const m=e.w,A=m.globals,_=e.cfg,x=m.highlightData,w=x.active,k=e._prev(),S=t.chartType,M="polarArea"===S,C=A.radialSize,E="donut"===S?t.donutSize:0,T=w?null!=(l=_.fadeOpacity)?l:.2:1,$=!0===(null==(i=e.ctx.morphTypeChange)?void 0:i.isActive()),P=!A.dataChanged||!A.shouldAnimate,L="area"===(null==(a=_.pie)?void 0:a.encoding),D=m.seriesData.series,F="part"===(null!=(h=null==(s=_.dataLabels)?void 0:s.value)?h:"part"),O=t.strokeWidth>0&&(null!=(p=null==(c=_.outline)?void 0:c.width)?p:1)>0?{opacity:null!=(v=null==(f=_.outline)?void 0:f.opacity)?v:1}:null,j=null==(b=A.prevHighlightLabels)?void 0:b.get(-1),H=[],W=(e,t)=>{var r,n;return(null==(r=e.classList)?void 0:r.contains(t))||` ${null==(n=e.getAttribute)?void 0:n.call(e,"class")} `.indexOf(` ${t} `)>-1};Array.from(r.node.childNodes).filter(e=>W(e,"apexcharts-pie-series")).forEach(r=>{var l,i,a,s,h,c;const p=Array.from(r.childNodes).find(e=>W(e,"apexcharts-pie-area"));if(!p)return;const f=Number(p.getAttribute("j")),v=se+f,b=P||null==k?void 0:k.get(v);if(!w&&!b)return;const S=n.arcs[f],G=D[f],V=w?null==(l=x.parts[f])?void 0:l[0]:null,Z=t.sliceSizes[f],K=M?Z:C,Q=y.isBrowser()&&!!S&&S.a.run>0&&!$,ee=+(null==S?void 0:S.a.animBeginArr[f])||0,te=null!=V&&G>0?V/G:null;let re=null,ne=!1;if(null!=te&&te>0)if(ne=te>1,M)re=Math.min(C,Z*te);else{const e=Math.min(te,1);re=L?Math.sqrt(E*E+e*(C*C-E*E)):E+(C-E)*e}const le=null!=(i=null==b?void 0:b.lr)?i:null==b?void 0:b.fr;let ie=re;const ae=null==re&&null!=le&&Q;ae&&(ie=A.collapsedSeriesIndices.indexOf(f)>-1?le*C:w?E:K);const oe=ae&&!w;let ue=ie,he=!1;null!=ie&&Q&&!P&&(null!=le?ue=le*C:b||"baseline"===_.enter?ue=E:(he=!0,ue=M?null!=(a=S.a.prevSize)?a:Z:C),ae||Math.abs(S.a.prevEndAngle-S.a.prevStartAngle)>.01||(ue=ie,he=!1));let de=null,ce=null;const ge=e=>{const t=p.getAttribute("transform");t&&(e.setAttribute("transform",t),e.classList.add("apexcharts-slice-mover"),e.style.transition=p.style.transition),(n.movers[f]=n.movers[f]||[]).push(e)},fe=(e,r,l,i)=>{if(S&&!$)n.ap.call(e,r,u(o({},S.a),{size:l,prevSize:P?void 0:i,isTrack:!0}));else{const n=Number(p.getAttribute("data:angle"));r.attr({d:e.getPiePath({me:e,startAngle:Number(p.getAttribute("data:startAngle")),angle:n>=t.fullAngle?t.fullAngle-.01:n,size:l}),"stroke-width":e.strokeWidth})}},ve=p.getAttribute("fill"),[be,me]=q(ve),ye=Y(p),Ae=!!ve&&"none"!==ve&&!/^url\(/i.test(ve),_e=Ae?me*ye:ye,xe=Ae?he?_e:null!=le&&null!=(s=b.al)?s:1:ye,we=Ae?oe?_e:1:ye;if(null!=ie){const l=pe(t,K);de=new d(m).drawPath({d:"",fill:be,stroke:p.getAttribute("stroke"),strokeWidth:0,fillOpacity:xe,classes:`${I} apexcharts-pie-highlight-part`});const i=de.node;if(i.setAttribute("pointer-events","none"),null!=te&&i.setAttribute("data:hl-share",String(te)),r.appendChild(i),ge(i),Q&&!P&&i.setAttribute("d",l.getChangedPath(S.a.prevStartAngle,S.a.prevEndAngle,ue)),fe(l,de,ie,ue),ne&&!ae&&i.classList.add("apexcharts-highlight-overflow"),U(p,i),(ne&&!ae||ae&&(null==b?void 0:b.edge))&&(ce=new d(m).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${I} apexcharts-highlight-edge`}),ce.node.setAttribute("pointer-events","none"),ce.node.setAttribute("stroke-opacity","0"),r.appendChild(ce.node),ge(ce.node),fe(pe(t,K,{strokeWidth:{value:1}}),ce,M?Z:C-2,M?null==S?void 0:S.a.prevSize:C-2)),M&&ne&&!ae&&(i.removeAttribute("pointer-events"),J(p,i),n.reach[f]=ie),$){const t=[i,null==ce?void 0:ce.node].filter(Boolean),r=e=>t.forEach(t=>t.setAttribute("opacity",e));r(0),e._tween(e.ctx.morphTypeChange.getSpeed(),m.config.chart.animations.dynamicAnimation.speed,r,()=>t.forEach(e=>e.removeAttribute("opacity")))}}const ke={d:null,fr:null,f:T,edge:!1,c:!w,al:we};e._targets.set(v,ke);const Se=ne&&null!=re?.75:0,Me=P?Se:(null==b?void 0:b.edge)?.75:0,Ce=null!=ue?ue:0,Ee=null!=ie?ie:0;e._fade(p,P?z(T):he?B:b?{f:b.f,o:null!=(h=b.o)?h:z(b.f).o}:N,oe?B:z(T),{delayMs:ee,speed:null==S?void 0:S.a.run,el:null==S?void 0:S.el},{anim:Q,force:!!de&&(Ce!==Ee||Me!==Se||xe!==we),outline:O&&u(o({},O),{color:A.colors[f]}),also:e=>{de&&(ke.lr=R(Ce,Ee,e)/C,ke.la=R(xe,we,e),de.node.setAttribute("fill-opacity",String(ke.la))),null==ce||ce.node.setAttribute("stroke-opacity",String(R(Me,Se,e)))},land:oe?N:void 0,done:ae?()=>{null==de||de.remove(),null==ce||ce.remove(),ke.lr=null}:void 0,rec:ke}),null!=re&&Object.assign(ke,{fr:re/C,edge:ne,n:de.node});const Te=t.sliceLabelGroups[f],$e=Te&&Array.from(Te.childNodes).find(e=>W(e,"apexcharts-pie-label"));if($e&&w){if(null==V&&F)return t.sliceLabels=t.sliceLabels.filter(e=>e.node!==Te),null==(c=Te.parentNode)||c.removeChild(Te),void delete t.sliceLabelGroups[f];!function(e,t,r,n,l,i,a,s,o){var u,h;const c=e.config.dataLabels.formatter;if(null!=i){const t=null!=(h=null==(u=e.globals.seriesPercent[l])?void 0:u[0])?h:0,r=a?t*i/a:0;n.textContent=String(c?c(r,{seriesIndex:l,dataPointIndex:l,series:e.seriesData.series,w:e,highlight:X(i,a)}):r+"%")}const p=parseFloat(n.getAttribute("font-size"))||12,f=Number(r.getAttribute("data:startAngle")),v=Number(r.getAttribute("data:angle"));if(null!=i&&null!=s&&s-o>=1.2*p){const r=e.config.plotOptions.pie.dataLabels.offset,l=g.polarToCartesian(t.centerX,t.centerY,"donut"===t.chartType?(o+s)/2+r:s/1.25+r,(f+v/2)%t.fullAngle);n.setAttribute("x",l.x),n.setAttribute("y",l.y)}const b=new d(e).getTextRects(n.textContent,n.getAttribute("font-size"),n.getAttribute("font-family"),void 0,!0,n.getAttribute("font-weight")),m=parseFloat(n.getAttribute("x")),y=parseFloat(n.getAttribute("y")),A=null!=s&&[[m-b.width/2,y-.75*b.height],[m+b.width/2,y-.75*b.height],[m-b.width/2,y+.25*b.height],[m+b.width/2,y+.25*b.height]].every(([e,r])=>{const n=e-t.centerX,l=r-t.centerY,i=Math.hypot(n,l),a=((180*Math.atan2(l,n)/Math.PI+90-f)%360+360)%360;return i>=o&&i<=s&&a<=v});A||(n.setAttribute("fill",e.config.chart.foreColor),n.removeAttribute("filter"))}(m,t,p,$e,f,F?V:null,G,re,E)}$e&&Q&&!P&&j&&H.push({t:$e,src:j.get(f),el:S.el,delayMs:ee,arc:S})}),H.length&&(e._ride=()=>function(e,t){t.forEach(({t:t,src:r,el:n,delayMs:l,arc:i})=>{if(!t.isConnected)return;const[a,s]=G(t),o=r?r.x-a:0,u=r?r.y-s:0;r&&Math.abs(o)<.5&&Math.abs(u)<.5||e._tween(l,i.a.run,e=>{const n=1-e;n>0&&r?t.setAttribute("transform",`translate(${o*n} ${u*n})`):t.removeAttribute("transform"),r||(e<1?t.setAttribute("opacity",String(e)):t.removeAttribute("opacity"))},void 0,void 0,n)})}(e,H))}(e,t,n,h),n},t.getSliceMovers=e=>a.call(t,e).concat(h.movers[e]||[]),t.getHoverOutlinePath=e=>{const r=t.sliceSizes;if(!(h.reach[e]>r[e]))return s.call(t,e);t.sliceSizes=r.slice(),t.sliceSizes[e]=h.reach[e];try{return s.call(t,e)}finally{t.sliceSizes=r}},he(e,t)}function he(e,t){const r=t.renderInnerDataLabels,n=t.printInnerLabels;t.renderInnerDataLabels=(n,l,i)=>de(e,()=>r.call(t,n,ce(e,l,0),i)),t.printInnerLabels=(r,l,i,a)=>de(e,()=>n.call(t,ce(e,r,a?+a.parentNode.getAttribute("rel")-1:-1),l,i,a))}function de(e,t){var r,n;const l=e.w.globals,i=e.w.highlightData;if(!(null==i?void 0:i.active)||"part"!==(null!=(n=null==(r=e.cfg.dataLabels)?void 0:r.total)?n:"part"))return t();const a=l.seriesTotals;l.seriesTotals=i.parts.map(e=>{var t;return null!=(t=e[0])?t:0});try{return t()}finally{l.seriesTotals=a}}function ce(e,t,r){var n,l;const i=e.w,a=i.highlightData;if(!(null==a?void 0:a.active))return t;const s=i.seriesData.series,h=a.parts.map(e=>e[0]),d=r>-1&&"part"===(null!=(l=null==(n=e.cfg.dataLabels)?void 0:n.value)?l:"part")?h[r]:null,c=e=>e.reduce((e,t)=>e+(H(t)?t:0),0),p=t.total.formatter,g=t.value.formatter;return u(o({},t),{total:u(o({},t.total),{formatter:p&&(e=>p(e,{highlight:X(c(h),c(s))}))}),value:u(o({},t.value),{formatter:(e,t)=>g(null!=d?d:e,t,{highlight:r>-1?X(h[r],s[r]):void 0})})})}const pe=(e,t,r)=>Object.create(e,o({getSliceExtent:{value:r=>e.getSliceExtent(u(o({},r),{size:t}))}},r)),ge="r:",fe="r:o",ve=["length","baseWidth","tipWidth","offsetY"],be=.45,me=`${I} apexcharts-radialbar-highlight-lane`;function ye(e,t){var r,n,l,i,a,s,u;const h=e.w,d=h.highlightData,c=null==(n=null==(r=e.ctx.lastUpdateOptions)?void 0:r.tooltip)?void 0:n.enabled;if(null!=c?e._tipUser=c:e._tipOn&&(h.config.tooltip.enabled=!1),e._tipOn=!1,!d)return;e._render!==t&&e._beginRender(t,ge),function(e){const t=e.ctx.morphTypeChange;if(!t||t._hfOut)return;t._hfOut=!0;const r=t.captureBeforeDestroy;t.captureBeforeDestroy=n=>{const l=function(e,t){var r,n,l,i,a;const s=e.w,o=s.globals,u=null==(r=s.dom.baseEl)?void 0:r.querySelector(".apexcharts-radialbar");if("radialBar"!==t&&"gauge"!==t||!u)return null;const h=e.ctx.morphTypeChange,d=null!=(l=null==(n=o.circleGeometry)?void 0:n.cx)?l:0,c=null!=(a=null==(i=o.circleGeometry)?void 0:i.cy)?a:0,p=new Map,g=new Set,f=new Set;u.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(t=>{var r,n,l,i;const a=t.parentNode,s=+a.getAttribute("data:realIndex"),o=ge+t.getAttribute("j"),u=null!=(n=e._targets.get(o))?n:null==(r=e._prev())?void 0:r.get(o),v=a.querySelector(".apexcharts-radialbar-highlight-part");if(!(v||(null==u?void 0:u.s)>0||(null!=(i=null!=(l=null==u?void 0:u.lf)?l:null==u?void 0:u.f)?i:1)<1))return;g.add(t);const b=null==v?void 0:v.getAttribute("d"),m=+(null==v?void 0:v.getAttribute("stroke-width"));let y=null;if(b&&m>0&&"0"!==v.getAttribute("opacity"))y=h._radialArcToFilledSegment(b,m,d,c)||b,f.add(v);else{const e=/M\s*(-?[\d.e]+)\s+(-?[\d.e]+)/.exec(t.getAttribute("d")||"");e&&(y=`M ${e[1]} ${e[2]} L ${e[1]} ${e[2]} Z`)}y&&p.set(s,y)});const v=[...u.getElementsByClassName(I)];return p.size||v.length?(v.forEach(e=>f.has(e)||e.closest(".apexcharts-tracks")||g.add(e)),{marks:p,ghost:()=>{const e="data-hf-ghost";g.forEach(t=>t.setAttribute(e,""));const t=s.dom.Paper.node.cloneNode(!0);g.forEach(t=>t.removeAttribute(e));const r=new Set(t.querySelectorAll(`[${e}]`)),n=new Set;r.forEach(r=>{r.removeAttribute(e);for(let e=r.parentNode;e&&e!==t;e=e.parentNode)n.add(e)});const l=e=>[...e.children].forEach(e=>{r.has(e)||(n.has(e)?l(e):"defs"!==e.tagName.toLowerCase()&&e.remove())});return l(t),t.removeAttribute("id"),[t,...t.querySelectorAll("*")].forEach(e=>{e.id&&(e.id+="-hf"),[...e.attributes].forEach(t=>{t.value.includes("url(#")&&e.setAttribute(t.name,t.value.replace(/url\(#([^)]+)\)/g,"url(#$1-hf)"))})}),t}}):null}(e,null==n?void 0:n.fromType);if(!l)return r.call(t,n);const i=t._captureFromDOM;let a;t._captureFromDOM=e=>{const r=i.call(t,e);return r.marks.forEach(e=>{var t;e.d=null!=(t=l.marks.get(e.realIndex))?t:e.d}),r};try{a=r.call(t,n)}finally{t._captureFromDOM=i}const s=t._snapshot;return!a||!s||t._ghost||s.pieceOut||s.pieceIn||(t._ghost=l.ghost()),a}}(e);const p=h.config.plotOptions.radialBar;if(e._ind=null!=(i=null==(l=e.cfg.radialBar)?void 0:l.indicator)?i:"needle"===p.shape?"needle":"arc","lanes"!==e._ind||"needle"!==p.shape||(null==(a=p.needle)?void 0:a.showValueArc)||(e._ind="needle"),!d.active&&!(null==(s=e._prev())?void 0:s.size))return;const g=h.config.tooltip;d.active&&!g.enabled&&null==e._tipUser&&y.isBrowser()&&(g.enabled=!0,e._tipOn=!0),he(e,t),function(e,t){const r=t.renderInnerDataLabels,n=t.printInnerLabels;t.renderInnerDataLabels=(n,l,i)=>{const a=r(n||t.dataLabelsGroup,l,i);return xe(e,t,l,-1,a),a},t.printInnerLabels=(r,l,i,a)=>{n(r,l,i,a),xe(e,t,r,a?+a.parentNode.getAttribute("rel")-1:-1)}}(e,t);const f=t.drawNeedle;t.drawNeedle=r=>{const n=f.call(t,r);return function(e,t,r){var n,l;const i=e.w,a=i.globals,s=i.highlightData.active,o=!a.dataChanged||!a.shouldAnimate,u=o||null==(n=e._prev())?void 0:n.get(fe);if(!s&&!u)return;const h=s?null!=(l=e.cfg.fadeOpacity)?l:.2:1,d=o?h:u?u.f:1,c={d:null,f:h,c:!s};e._targets.set(fe,c);const p=e=>{c.lf=e,e<1?r.node.setAttribute("opacity",String(e)):r.node.removeAttribute("opacity")},g=e.ctx.morphTypeChange,f=(null==g?void 0:g.isActive())?{delay:g.getSpeed(),speed:i.config.chart.animations.dynamicAnimation.speed}:t.needleMotion();f&&d!==h?(c.run=!0,e._tween(f.delay||0,f.speed,e=>p(R(d,h,e)),()=>c.run=!1,f.ease)):p(h),s&&y.isBrowser()&&Promise.resolve().then(()=>{var e;const t=i.dom.baseEl,n=null==t?void 0:t.querySelector(".apexcharts-radialbar-slice-0");n&&r.node.isConnected&&(J(n,r.node),null==(e=t.querySelector(".apexcharts-radialbar-hollow"))||e.setAttribute("pointer-events","none"))})}(e,t,n),n};const v=t.animatePaths;t.animatePaths=(r,n)=>{const l=o({},n);v.call(t,r,n),n.isTrack||(l.run=n.dur,Ae(e,t,r,l,v))},!0===(null==(u=e.ctx.morphTypeChange)?void 0:u.isActive())&&Promise.resolve().then(()=>{var r;e._render!==t||h.globals.isDestroyed||null==(r=h.dom.baseEl)||r.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(r=>Ae(e,t,r.instance,null,v))})}function Ae(e,t,r,n,l){var i,a,s,h,c,p;const f=e.w,v=f.globals,b=e.cfg,m=f.highlightData,A=m.active,_=r.node,x=n?n.i:Number(_.getAttribute("j")),w=ge+x,k=!n,S=!v.dataChanged||!v.shouldAnimate,M=e._prev(),C=S||null==M?void 0:M.get(w),E=f.config.plotOptions.radialBar,T=e._ind,$=_.getAttribute("stroke"),P=_.getAttribute("fill"),L=$&&"transparent"!==$?$:k&&P&&"none"!==P?P:null,D=0===x&&("needle"===T||!L),F=f.seriesData.series[x],O=A&&v.collapsedSeriesIndices.indexOf(x)<0&&null!=(a=null==(i=m.parts[x])?void 0:i[0])?a:null,j=t.startAngle,z=n?n.endAngle:t._arcEnd(F),W=n?n.run:0,q=y.isBrowser()&&W>0,X=n&&+n.animBeginArr[x]||0,G=null!=(s=b.fadeOpacity)?s:.2,V=A&&!D&&!!L,Q={f:G,o:0},ee=n?n.size:Math.hypot(_.getAttribute("data:cx")-v.circleGeometry.cx,_.getAttribute("data:cy")-v.circleGeometry.cy);if("lanes"===T&&L)return function(e,t,r,n){var l,i,a,s,h,c,p;const{i:g,c:f,prev:v,mount:b,pv:m,whole:A,wholeEnd:_,run:x,anim:w,delayMs:k,size:S}=n,M=e.w,C=M.globals,E=e.cfg,T=M.config.plotOptions.radialBar,$=M.highlightData.active,P=r.node,L=!f,D=t.startAngle,F=$&&C.collapsedSeriesIndices.indexOf(g)<0?1:0,O=L?y.isBrowser()&&!!F:w&&!b,j=!L&&w&&b,N=L?0:O?null!=(l=null==v?void 0:v.s)?l:0:F,B=L?{delayMs:e.ctx.morphTypeChange.getSpeed(),speed:M.config.chart.animations.dynamicAnimation.speed}:{delayMs:k,speed:x};if(0===g&&function(e,t){var r;const n=null==(r=e._render)?void 0:r._hfLine,l=null==n?void 0:n.rec;if(!l||l.run||l.lf===l.f)return;const i=l.lf,a=()=>{var e,t;if(l.run=!1,l.f)return;l.done=!0;const r=null==(e=n.node)?void 0:e.previousSibling;null!=l.hold&&r&&r.textContent===l.pv&&(r.textContent=l.vt=l.hold),null==(t=n.node)||t.remove(),n.node=null};if(!t)return l.lf=l.f,ke(n),void a();l.run=!0,e._tween(t.delayMs,t.speed,e=>{l.lf=R(i,l.f,e),ke(n)},a,void 0,t.el)}(e,O?u(o({},B),{el:r}):null),!F&&!N)return;const z=null!=m?t._arcEnd(m):D,W=_,q=F?z:W;let X=W,G=q;L?G="baseline"===E.enter?D:W:O?(X=null!=(i=null==v?void 0:v.we)?i:H(f.prevEndAngle)?f.prevEndAngle:W,G=null!=(a=null==v?void 0:v.e)?a:"baseline"===E.enter?D:X):j&&(X=G=D);const V=F?null!=(c=null==(h=null==(s=E.radialBar)?void 0:s.lanes)?void 0:h.opacity)?c:be:1,Q=L?1:O?v?v.f:1:V,ee=L?t.getStrokeWidth({size:C.circleGeometry.r,series:M.seriesData.series}):Number(P.getAttribute("stroke-width")),te=P.getAttribute("stroke-opacity"),re=e=>{var t;const r=new d(M).drawPath({d:"",stroke:n.paint,strokeWidth:ee,fill:"none",strokeOpacity:Y(P,"stroke-opacity"),strokeDashArray:null!=(t=P.getAttribute("stroke-dasharray"))?t:0,classes:`${me} ${e}`});return r.node.setAttribute("aria-hidden","true"),U(P,r.node),r},ne=re("apexcharts-radialbar-highlight-whole"),le=re("apexcharts-radialbar-highlight-part");Z(P,ne.node),Z(ne.node,le.node),ne.node.setAttribute("pointer-events","none"),F&&z-W>.01?J(P,le.node):le.node.setAttribute("pointer-events","none"),null!=m&&(m>(null!=A?A:0)||m>("number"==typeof T.max?T.max:100))&&K(le.node,"apexcharts-highlight-overflow");const ie=M.seriesData.series.length,ae=function(e){var t,r;if(e._hfTracks)return e._hfTracks;const n=(e,t)=>{var r;return` ${null==(r=e.getAttribute)?void 0:r.call(e,"class")} `.includes(` ${t} `)},l=[...(null==(r=null==(t=e.w.dom.Paper)?void 0:t.node)?void 0:r.childNodes)||[]];let i=[];for(let e=l.length-1;e>=0&&!i.length;e--){const t=[...l[e].childNodes||[]].find(e=>n(e,"apexcharts-tracks"));t&&(i=[...t.childNodes].map(e=>[...e.childNodes].find(e=>n(e,"apexcharts-radialbar-area"))))}return e._hfTracks=i}(t)[T.inverseOrder?ie-1-g:g],se=ae&&[ae.getAttribute("d"),ae.getAttribute("stroke-width")],oe=se?(parseFloat(se[1])||0)/(ee||1):0;let ue=null;if(ae){ue=new d(M).drawPath({d:"",stroke:ae.getAttribute("stroke"),strokeWidth:0,fill:"none",strokeOpacity:null!=(p=ae.getAttribute("stroke-opacity"))?p:1,classes:`${I} apexcharts-radialbar-highlight-track`});const e=ae.getAttribute("filter");e&&ue.node.setAttribute("filter",e),ue.node.setAttribute("pointer-events","none"),ue.node.setAttribute("aria-hidden","true"),Z(ae,ue.node)}const he=S-ee/2,de=S+ee/2,ce=ie<2,pe=ce?Math.max(2,.12*ee):Math.max(1,Math.min(.08*ee,t.margin/3)),fe=ce?0:Math.max(0,(3*pe-t.margin)/2),ve=Math.max(.5,(ee-pe)/2-fe),ye=(e,r)=>{const n=e-D;return n>.01?t.getPiePath({me:t,startAngle:D,angle:n===t.fullAngle?t.fullAngle-.01:n,size:r}):""},Ae=e=>{const r=t.trackStartAngle;let n=t.trackEndAngle;Math.abs(n)+Math.abs(r)>=360&&(n=360-Math.abs(t.startAngle)-.1);const l=n<r?t.fullAngle+n-r:n-r;return t.getPiePath({me:t,startAngle:r,angle:l===t.fullAngle?l-.01:l,size:e})},xe=(e,t,r)=>{e.setAttribute("d",t),e.setAttribute("stroke-width",String(r))},we={d:null,c:!$,f:V,cx:f?f.centerX:C.circleGeometry.cx,cy:f?f.centerY:C.circleGeometry.cy};e._targets.set(ge+g,we);const Se=(e,t,r)=>{we.s=e,we.we=t,we.e=r;const n=de-fe*e,l=he+e*(de-fe-ve-he),i=he+fe*e,a=i+e*ve;we.mid=(l+a)/2,xe(ne.node,ye(t,(l+n)/2),n-l),xe(le.node,a>i?ye(r,(i+a)/2):"",a-i),ae&&(e?(xe(ae,Ae((l+n)/2),(n-l)*oe),xe(ue.node,Ae((i+a)/2),(a-i)*oe)):(xe(ae,se[0],se[1]),xe(ue.node,"",0)))},Me=[ne.node,le.node,null==ue?void 0:ue.node].filter(Boolean);let Ce=!L;const Ee=()=>{Ce=!0,P.setAttribute("stroke-opacity","0"),Me.forEach(e=>e.removeAttribute("opacity"))};Ce?Ee():Me.forEach(e=>e.setAttribute("opacity","0")),Se(N,X,G);let Te=!1;if((O||j)&&ne.animate(B.speed,B.delayMs).during(e=>{Te||(Ce||Ee(),Se(R(N,F,e),R(X,W,e),R(G,q,e)))}),e._fade(ne.node,{f:Q,o:0},{f:V,o:0},u(o({},B),{el:ne}),{attr:"stroke-opacity",anim:O,force:O,done:F?void 0:()=>{Te=!0,Me.forEach(e=>e.remove()),ae&&xe(ae,se[0],se[1]),null==te?P.removeAttribute("stroke-opacity"):P.setAttribute("stroke-opacity",te),we.s=0},rec:we}),y.isBrowser()){const t=t=>{e._lane=[g,_e(P,t,we)]};["mouseover","mousemove","mousedown","touchstart","touchmove"].forEach(e=>P.addEventListener(e,t,!0))}}(e,t,r,{i:x,c:n,prev:C,mount:S,pv:O,whole:F,wholeEnd:z,run:W,anim:q,delayMs:X,size:ee,paint:L}),void(0===x&&Me(e,t,r,!1,O,S,k,n));const te=V&&null!=O?t._arcEnd(O):null,re=null!=te&&te-j>.01,ne=null!=(h=null==C?void 0:C.e)?h:null,le=!re&&null!=ne&&q,ie=le&&!V,ae=re?te:le?ie?z:j:null;let se=ae,oe=!1;null!=ae&&q&&!S&&(null!=ne?se=ne:C||"baseline"===b.enter?se=j:(oe=!0,se=H(n.prevEndAngle)?n.prevEndAngle:z));const ue=e=>{const r=e-j;return t.getPiePath({me:t,startAngle:j,angle:r===t.fullAngle?t.fullAngle-.01:r,size:ee})};let he=null;if(null!=ae&&L){he=new d(f).drawPath({d:"",stroke:L,strokeWidth:k?t.getStrokeWidth({size:v.circleGeometry.r,series:f.seriesData.series}):Number(_.getAttribute("stroke-width")),fill:"none",strokeOpacity:Y(_,"stroke-opacity"),strokeDashArray:null!=(c=_.getAttribute("stroke-dasharray"))?c:0,classes:`${I} apexcharts-radialbar-highlight-part`});const e=he.node;e.setAttribute("aria-hidden","true"),Z(_,e),re&&O>("number"==typeof E.max?E.max:100)&&K(e,"apexcharts-highlight-overflow"),U(_,e),re&&te-z>.01?J(_,e):e.setAttribute("pointer-events","none"),n&&q&&!S?(e.setAttribute("d",ue(se)),l.call(t,he,u(o({},n),{endAngle:ae,prevStartAngle:j,prevEndAngle:se,isTrack:!0}))):n?l.call(t,he,u(o({},n),{endAngle:ae,dur:W,isTrack:!0})):e.setAttribute("d",ue(ae))}const de=re&&te-z>.01?.75:0,ce=S?de:null!=(p=null==C?void 0:C.tk)?p:0;let pe=null;if(he&&(de||ce&&q)){const e=Number(he.node.getAttribute("stroke-width"))||0,t=n?n.centerX:v.circleGeometry.cx,r=n?n.centerY:v.circleGeometry.cy;pe=new d(f).drawPath({d:"",fill:"none",stroke:"#fff",strokeWidth:1,strokeDashArray:3,classes:`${I} apexcharts-highlight-edge apexcharts-radialbar-highlight-edge`});const l=pe.node;l.setAttribute("pointer-events","none"),l.setAttribute("aria-hidden","true"),l.setAttribute("stroke-opacity",String(ce)),Z(he.node,l);const i=n=>{const i=g.polarToCartesian(t,r,ee-e/2,n),a=g.polarToCartesian(t,r,ee+e/2,n);l.setAttribute("d",`M ${i.x} ${i.y} L ${a.x} ${a.y}`)},a=q?H(n.prevEndAngle)&&!S?n.prevEndAngle:j:z;i(a),a!==z&&pe.animate(W,X).during(e=>i(R(a,z,e)))}const fe=[];he&&k&&fe.push(he.node),pe&&k&&fe.push(pe.node);const ve={d:null,e:null,f:V?G:1,c:!A};if(L&&(A||C)){e._targets.set(w,ve);const t=null!=se?se:0,l=null!=ae?ae:0;he&&(ve.e=l),he&&n&&q&&!S&&t!==l&&(ve.e=t,he.animate(W,X).during(e=>null!=ve.e&&(ve.e=R(t,l,e))));const i=f.config.chart.animations.dynamicAnimation.speed;e._fade(_,S&&!k?V?Q:N:oe?B:C?{f:C.f,o:0}:N,ie?B:V?Q:N,k?{delayMs:e.ctx.morphTypeChange.getSpeed(),speed:i}:{delayMs:X,speed:W,el:r},{attr:"stroke-opacity",anim:k?y.isBrowser():q,force:!!he&&(k||t!==l||ce!==de),also:e=>{pe&&(ve.tk=R(ce,de,e),pe.node.setAttribute("stroke-opacity",String(ve.tk))),fe.forEach(t=>e<1?t.setAttribute("opacity",e):t.removeAttribute("opacity"))},land:ie?N:void 0,done:le||pe&&!de?()=>{le&&(null==he||he.remove(),ve.e=null),null==pe||pe.remove(),ve.tk=0}:void 0,rec:ve}),he&&(ve.n=he.node)}0===x&&Me(e,t,r,D,O,S,k,n)}function _e(e,t,r){var n,l;const i=(null==(n=t.touches)?void 0:n[0])||t,a=null==(l=e.getScreenCTM)?void 0:l.call(e);if(!(a&&r.s>0))return"part";const s=i.clientX-a.e,o=i.clientY-a.f,u=a.a*a.d-a.b*a.c||1,h=(a.d*s-a.c*o)/u,d=(a.a*o-a.b*s)/u;return Math.hypot(h-r.cx,d-r.cy)>r.mid?"whole":"part"}function xe(e,t,r,n,l){var i,a,s;const o=e.w,u=o.globals;if("lanes"!==e._ind)return;const h=o.highlightData.active;let d=t._hfLine;if(!d){const n=!u.dataChanged||!u.shouldAnimate,l=n||null==(i=e._prev())?void 0:i.get("r:w"),s=h?Se(e,r,-1):"",o=s?1:0,c=n||!y.isBrowser()?o:null!=(a=null==l?void 0:l.f)?a:0;if(d=t._hfLine={node:null,rec:null},!o&&!c)return;d.rec={d:null,c:!h,t:s||(null==l?void 0:l.t)||"",f:o,lf:c,o0:c,pv:o?null:null==l?void 0:l.vt},e._targets.set("r:w",d.rec)}const c=d.rec;if(l){if(d.node=null,!c||!c.lf&&c.done)return;const t=l.node.childNodes,n=r.value.show?t[t.length-1]:null;if(!n)return;null==c.pv||c.done||(c.hold=n.textContent,n.textContent=c.pv),c.vt=n.textContent;const i=we(o,r,n,(h?Se(e,r,-1):"")||c.t);l.add(i),d.node=i.node}else if(h){const t=Se(e,r,n),l=null==(s=o.dom.baseEl)?void 0:s.querySelector(".apexcharts-datalabel-value");!d.node&&t&&n>-1&&l&&(d.node=we(o,r,l,t).node,l.parentNode.appendChild(d.node)),d.node&&(d.node.textContent=t),c&&l&&(c.vt=l.textContent)}ke(d)}function we(e,t,r,n){const l=parseFloat(t.value.fontSize)||14,i=Math.max(11,Math.round(l/2)),a=new d(e).drawText({x:+r.getAttribute("x"),y:+r.getAttribute("y")+l/4+4+.8*i,text:n,textAnchor:"middle",fontSize:i+"px",fontFamily:t.value.fontFamily,fontWeight:400,foreColor:r.getAttribute("fill"),cssClass:"apexcharts-datalabel-whole"});return a.node.setAttribute("aria-hidden","true"),a}function ke(e){var t,r,n;null==(n=e.node)||n.setAttribute("fill-opacity",String(.6*(null!=(r=null==(t=e.rec)?void 0:t.lf)?r:1)))}function Se(e,t,r){var n,l;const i=e.w,a=e.cfg.dataLabels||{},s=i.seriesData.series,h=i.highlightData.parts.map(e=>e[0]),d=r>-1?r:s.length<2?0:-1,c=(e,t)=>{const r=String(e(t)),n=String(e(u(o({},t),{lane:"whole"})));return n!==r?n:"/ "+r};if(d>-1)return"part"===(null!=(n=a.value)?n:"part")&&H(h[d])?c(e=>t.value.formatter(s[d],i,e),{highlight:X(h[d],s[d])}):"";if(!t.total.show||"part"!==(null!=(l=a.total)?l:"part")||!t.total.formatter||!h.some(H))return"";const p=e=>e.reduce((e,t)=>e+(H(t)?t:0),0);return c(e=>t.total.formatter(i,e),{highlight:X(p(h),p(s))})}function Me(e,t,r,n,l,i,a,s){var o,u,h;const c=e.w,p=c.globals,g=e.cfg,f=c.highlightData.active,v=i||null==(o=e._prev())?void 0:o.get("r:n"),b=n&&null!=l?t._angleAtValue(l):null;if(null==b&&!v)return;const A=c.config.plotOptions.radialBar,_=a?null:"needle"===A.shape?t.needleMotion():s&&s.run>0&&y.isBrowser()?{speed:s.run,delay:+s.animBeginArr[0]||0}:null;let x,w=1,k=b,S=1;const M=null==b;if(M){if(!_)return;x=v.ang,w=v.op,k=f&&n?t.startAngle:t._angleAtValue(c.seriesData.series[0]),S=0}else _?i?x=t.startAngle:v?(x=v.ang,w=v.op):(x=t._angleAtValue(p.dataChanged?p.previousPaths[0]:c.seriesData.series[0]),w=0):x=k;const C=p.circleGeometry,E=(null==(u=g.radialBar)?void 0:u.needle)||{},T=A.needle||{},$={};ve.forEach(e=>{var t;return $[e]=null!=(t=E[e])?t:T[e]});const P=null!=(h=E.color)?h:p.colors[0],{path:L,cx:D,cy:F}=t.needlePath({size:C.r,centerX:C.cx,centerY:C.cy,series:c.seriesData.series},$),O=new d(c),j=O.group({class:"apexcharts-gauge-needle-highlight"});M||!y.isBrowser()?j.node.setAttribute("pointer-events","none"):J(r.node,j.node),j.node.setAttribute("aria-hidden","true"),j.node.setAttribute("transform-origin",`${D} ${F}`),j.add(O.drawPath({d:L,stroke:P,strokeWidth:0,fill:P,classes:`${I} apexcharts-gauge-needle-highlight-shape`})),null!=l&&l>("number"==typeof A.max?A.max:100)&&K(j.node,"apexcharts-highlight-overflow");const N=r.node.parentNode.parentNode;N.insertBefore(j.node,N.childNodes[0]||null);const B=()=>{const e=[...N.childNodes].filter(e=>e!==j.node),t=e.findIndex(e=>{var t;return` ${null==(t=e.getAttribute)?void 0:t.call(e,"class")} `.includes(" apexcharts-radialbar-hollow ")});return!(t<0||j.node.parentNode!==N||(N.insertBefore(j.node,e[t+1]||null),0))};B()||Promise.resolve().then(B);const z={d:null,ang:x,op:w,c:!f};e._targets.set("r:n",z);const H=(e,t)=>{z.ang=e,z.op=t,j.node.setAttribute("transform",`rotate(${e})`),t<1?j.node.setAttribute("opacity",String(t)):j.node.removeAttribute("opacity")},W=e=>H(x+(k-x)*e,R(w,S,e)),Y=()=>{z.run=!1,M?j.remove():H(k,S)};if(a)return H(k,0),void e._tween(e.ctx.morphTypeChange.getSpeed(),c.config.chart.animations.dynamicAnimation.speed,e=>H(k,e),Y);if(!_||x===k&&w===S)return W(1),void Y();z.run=!0,W(0);const q=_;if(q.ease){const r=performance.now(),n=l=>{if(p.isDestroyed||e._render!==t)return;const i=Math.max(0,Math.min(1,(l-r)/q.speed));W(q.ease(i)),i<1?m.requestAnimationFrame(n):Y()};m.requestAnimationFrame(n)}else j.animate(q.speed,q.delay||0).during(e=>W(e)).after(Y)}const Ce="apexcharts-highlight-tile",Ee="apexcharts-highlight-overflow",Te=/^url\(/i;function $e(e,t){var r,n,l;const i=e.w,a=i.globals,s=i.highlightData;if(!s)return;e._beginRender(t,"t:"),e._tmDefs.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),e._tmDefs=[];const u=e._tiles=new Map,h=s.active,c=i.seriesData.series;!function(e,t,r){const n=l=>{var i,a;const s=l.children;if(!s||!s.length){const e=null==(i=null==t?void 0:t[l._si])?void 0:i[l._di];return l.highlight=t?X(H(e)?e:null,null==(a=r[l._si])?void 0:a[l._di]):void 0,l.highlight}let o=null;if(s.forEach(e=>{const t=n(e);!t||null==t.value||t.value*(t.total||0)<0||(o=(o||0)+Math.abs(t.value))}),!t)return l.highlight=void 0;const u=e._subtreeArea(l),h=null!=o&&u?o/u:null;return l.highlight={value:o,total:u,share:h,overflow:null!=h&&h>1},l.highlight};(e.roots||[]).forEach(n)}(t,h?s.parts:null,c);const p=e._prev();if(!h&&!(null==p?void 0:p.size))return;const g=new Map;null==p||p.forEach(e=>g.set(e.ij,e)),null==(r=a.prevTreemapView)||r.querySelectorAll(`.${Ce}`).forEach(e=>{e.classList.remove(Ce,Ee),e.removeAttribute("data:hl-share")});const f=e.cfg,v=h?null!=(n=f.fadeOpacity)?n:.2:1,b=!0===(null==(l=e.ctx.morphTypeChange)?void 0:l.isActive()),m=t.dynamicAnim,y=b||!!(a.dataChanged&&m.enabled&&a.shouldAnimate),A=b?e.ctx.morphTypeChange.getSpeed():m.speed,_=i.config.chart.foreColor;let x=!1;h&&function(e,t){const r=t._showParentTooltip;t._showParentTooltip=(n,l)=>{var i,a,s;r.call(t,n,l);const o=l.highlight,u=e.cfg.tooltip||{};if(null==(null==o?void 0:o.value)||!1===u.show||"function"==typeof(null==(a=null==(i=e.w.config.plotOptions.treemap.parents)?void 0:i.tooltip)?void 0:a.formatter))return;const h=null==(s=t._tip())?void 0:s.querySelector(".apexcharts-tooltip-text-y-value");if(!h)return;let d=`/ ${t._formatValue(o.total,l._si)}`;u.share&&o.total&&(d+=` \xb7 ${Math.round(100*o.share)}%`),h.innerHTML=`${t._formatValue(o.value,l._si)} <span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">${d}</span>`}}(e,t);let w=null;const k=t.helpers.calculateDataLabels;t.helpers.calculateDataLabels=e=>{const r=k.call(t.helpers,e),n=w=u.get(e.i+"|"+e.j);if(r&&n){const e=function(e){const t=[];return function e(r){"text"===String(r.tagName||r.nodeName).toLowerCase()&&t.push(r),Array.from(r.childNodes||[]).forEach(e)}(e),t}(r.node);n.lb=e.filter(e=>/^(#fff|#ffffff|white)$/i.test(e.getAttribute("fill")||""));const t=e[0],[,l,,i]=n.r;if(t&&i>l){const e=parseFloat(t.getAttribute("font-size"))||12;n.need=(i-parseFloat(t.getAttribute("y"))+.9*e)/(i-l)}Pe(n,_)}return r};const S=t.rotateToFitLabel;return t.rotateToFitLabel=(...e)=>{S.apply(t,e);const r=w;if(w=null,(null==r?void 0:r.lb)&&/rotate/.test(e[0].node.getAttribute("transform")||"")){const t=new d(i).getTextRects(e[2],String(e[1])).width;r.need=.5+t/2/(e[6]-e[4]),r.tone=null,Pe(r,_)}},(t,r,n,l,d)=>{var m,w,k,S;const M="t:"+d._key,C=r+"|"+n,E=null==(m=c[r])?void 0:m[n],T=y?(null==p?void 0:p.get(M))||(E?void 0:g.get(C)):void 0;if(!h&&!T)return;if(Te.test(l))return void(h&&!x&&(x=!0,e._warn("fill","treemap tiles with a gradient, pattern or image fill are drawn without their parts.")));const $=h?null==(w=s.parts[r])?void 0:w[n]:null;if(!E&&!T)return;const P=H($)&&E?$/E:null;let L=h?{s:null==P||P<0?0:Math.min(P,1),f:v,c:l}:{s:1,f:0,c:l},D=L;if(T)D={s:T.s,f:T.f,c:T.col},!E&&h&&(L=o({},D));else if(y){const e=null==(k=a.previousPaths[r])?void 0:k[n];(b||(null==(S=null==e?void 0:e.rect)?void 0:S.width)>0)&&(D="baseline"===f.enter?{s:0,f:1,c:L.c}:{s:1,f:0,c:L.c},b||!e.fill||Te.test(e.fill)||(D.c=e.fill))}const F=D.s!==L.s||D.f!==L.f||D.c!==L.c;if(!h&&!F)return;const O=i.dom.Paper.gradient("linear",e=>{for(let t=0;t<4;t++)e.stop(0,l,1)});O.from(0,1).to(0,0),e._tmDefs.push(O.node);const j=Array.from(O.node.childNodes),I=t.node;h&&(I.setAttribute("class",`${I.getAttribute("class")||""} ${Ce}${null!=P&&P>1?" "+Ee:""}`.trim()),I.setAttribute("data:hl-share",null==P?"":String(P)));const N={s:L.s,f:L.f,col:L.c,c:!h,ij:C,run:!1,base:l,r:d.rect,lb:null,need:.5,tone:null};e._targets.set(M,N),u.set(C,N);const B=function(e,t){const r=Le(e),n=Le(t);return e!==t&&r&&n?e=>e>=1?t:`rgba(${[0,1,2].map(t=>Math.round(R(r[t],n[t],e))).join(",")},${+R(r[3],n[3],e).toFixed(3)})`:r=>r>=1?t:e}(D.c,L.c),z=e=>{N.ls=e.s,N.lf=e.f,N.lc=e.c,j.forEach((t,r)=>{t.setAttribute("offset",String(0===r?0:3===r?1:e.s)),t.setAttribute("stop-color",e.c),t.setAttribute("stop-opacity",String(r<2?1:e.f))}),Pe(N,_)},W=()=>{var e;N.run=!1,z(L),!h&&I.isConnected&&(I.setAttribute("fill",l),null==(e=O.node.parentNode)||e.removeChild(O.node))};if(y&&F){N.run=!0,z(D);let t=null,r=!1;const n={finish(){e._live.delete(n),h?z({s:N.ls,f:t=L.f,c:N.lc}):(r=!0,W())}};e._hold(n),O.animate(A,0).during(e=>r||z({s:R(D.s,L.s,e),f:null!=t?t:R(D.f,L.f,e),c:B(e)})).after(()=>{e._live.delete(n),r||W()})}else z(L);return O.url()}}function Pe(e,t){var r;const n=(null!=(r=e.ls)?r:e.s)>=e.need-1e-9;e.lb&&e.tone!==n&&(e.tone=n,e.lb.forEach(e=>{null==e._apxFill&&(e._apxFill=e.getAttribute("fill")),e.setAttribute("fill",n?e._apxFill:t)}))}function Le(e){var t;const r=String(e).trim();let n=/^#([\da-f]+)$/i.exec(r);if(n){let e=n[1];return e.length<5&&(e=e.replace(/./g,"$&$&")),6!==e.length&&8!==e.length?null:[0,2,4,6].map(t=>t<e.length?parseInt(e.slice(t,t+2),16)/(6===t?255:1):1)}if(n=/^rgba?\(([^)]*)\)$/i.exec(r),!n)return null;const l=n[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);return l.length>=3&&l.every(isFinite)?[l[0],l[1],l[2],null!=(t=l[3])?t:1]:null}["prevHighlightParts","prevHighlightLabels"].forEach(e=>{-1===p.HELD.indexOf(e)&&p.HELD.push(e)});const De="apexcharts-flip-x",Fe="apexcharts-flip-y",Oe="apexcharts-flip-held",je="apexcharts-highlight-label-exit",Ie="b:",Ne={f:1,o:0},Be={f:1,o:1},ze={f:0,o:1};function He(e){if(!e)return!1;if(Array.isArray(e.highlightData))return!0;const t=e.data;if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++){const r=t[e];if(W(r)){if("highlight"in r)return!0}else if(null!=r)return!1}return!1}function Re(e,t,r){return W(e)&&"highlight"in e?e.highlight:t?t[r]:null}function We(e,t){let r=1/0,n=-1/0;return String(e).replace(/([MLQCT])([^MLQCTZz]*)/g,(e,l,i)=>{const a=i.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let e=t;e<a.length;e+=2)a[e]<r&&(r=a[e]),a[e]>n&&(n=a[e]);return""}),[r,n]}function Ye(e,t){let r=-1,n=1/0;return e.forEach((e,l)=>{null!=e&&Math.abs(e-t)<n&&(n=Math.abs(e-t),r=l)}),r}function qe(e){const t=e.previousElementSibling;return t&&"rect"===t.tagName.toLowerCase()?[t,e]:[e]}function Xe(e,t){return null!=t&&0!==t&&e/t>1}function Ge(e,t){const r=W(e)?e.y:Array.isArray(e)?e[1]:e;return"number"==typeof r?r:null!=t?t:null}function Ve(e,t,r){return e?e.replace(/([MLQCT])([^MLQCTZz]*)/g,(e,r,n)=>{const l=n.trim().split(/[\s,]+/).filter(Boolean).map(Number);for(let e=0;e+1<l.length;e+=2)l[e]=t(l[e]);return`${r} ${l.join(" ")} `}):e}h.registerFeatures({highlightFilter:class{constructor(e,t){var r,n,l,i;this.w=e,this.ctx=t,this._targets=new Map,this._render=null,this._seen=new Set,this._seriesEls=new Map,this._cu=null,this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,this._warned=new Set,this._rows=[],this._level=null,this._live=new Set,this._sig="",this._drawnSig="",this._ride=null,this._tiles=null,this._tmDefs=[],this._tipUser=null==(n=null==(r=t.opts)?void 0:r.tooltip)?void 0:n.enabled,this._tipOn=!1,this._ind=void 0,this._lane=null,this._onRender=()=>this.afterRender(),null==(l=t.events)||l.addEventListener("mounted",this._onRender),null==(i=t.events)||i.addEventListener("updated",this._onRender)}get cfg(){return this.w.config.highlightFilter||{}}isActive(){var e;return!!(null==(e=this.w.highlightData)?void 0:e.active)}canDrawParts(){const e=this.w,t=e.config,r=t.chart.type;return e.globals.axisCharts?!(e.globals.comboCharts||"bar"!==r&&"line"!==r&&"area"!==r&&"treemap"!==r||e.rangeData.seriesRange.length||"histogram"===t.chart.requestedType):oe.indexOf(r)>-1||"radialBar"===r}callerCarriesParts(){const e=this.w;return e.globals.axisCharts?(e.config.series||[]).some(He):Array.isArray(this.cfg.data)||te(e.config.series||[]).some(e=>"highlight"in e)}valueAt(e,t){var r,n,l;const i=null==(l=null==(n=null==(r=this.w.highlightData)?void 0:r.parts)?void 0:n[e])?void 0:l[this.w.globals.axisCharts?t:0];return null==i?null:i}_warn(e,t){this._warned.has(e)||(this._warned.add(e),console.warn("ApexCharts highlightFilter: "+t))}parse(){var e,t,r;const n=this.w,l=n.config,i=this.cfg,a=l.series||[],s=n.seriesData.series||[];if(!n.globals.axisCharts)return this._parseCircle();const o=!!l.chart.stacked,u=l.chart.type,h="bar"===u,d=function(e,t){const r=e.w.globals;if("treemap"!==t||!r.treemapRoots)return!1;const n=r.treemapRawSeries||[];n.some(e=>Array.isArray(null==e?void 0:e.highlightData))&&e._warn("nested","on a nested treemap put the part on each leaf as { x, y, highlight }; highlightData is ignored.");const l=e=>W(e)&&Array.isArray(e.children)&&e.children.length>0&&("highlight"in e||e.children.some(l));return n.some(e=>((null==e?void 0:e.data)||[]).some(l))&&e._warn("parent","a parent's highlight is ignored: parents add up their leaves' parts."),!0}(this,u),c=ie(n);let p=!1;for(let t=0;t<a.length;t++)if(d?re({data:null==(e=a[t])?void 0:e.data}):He(a[t])||c&&ae(n,t)){p=!0;break}let g=n.globals.axisCharts&&this.canDrawParts();p&&!g&&this._unsupported();const f=(n.globals.seriesYAxisMap||[]).map((e,t)=>e&&e.length?t:-1).filter(e=>e>-1);p&&g&&o&&(f.length>1||f.some(e=>{var t;return null==(t=l.yaxis[e])?void 0:t.logarithmic}))&&(g=!1,this._warn("stack","parts are not drawn on a stacked chart with more than one y axis or a logarithmic y axis."));const v=!(!1===i.enabled||!p||!g);if(!v)return void this._inactive(g);const b=[];let m=!1,y=!1;const A=n.globals;for(let e=0;e<s.length;e++){const t=a[e]||{},r=Array.isArray(t.data)?t.data:[],l=!d&&Array.isArray(t.highlightData),i=d?null:l?t.highlightData:c?ae(n,e):null,o=A.collapsedSeriesIndices.indexOf(e)>-1||A.ancillaryCollapsedSeriesIndices.indexOf(e)>-1;i&&!o&&i.length!==r.length&&(l?m=!0:y=!0);const u=[],h=s[e]?s[e].length:0;for(let e=0;e<h;e++){const t=Re(r[e],i,e);u.push(H(t)?o?0:t:null)}b.push(u)}v&&m&&this._warn("length","highlightData and data differ in length; the extra entries are ignored and the missing ones read as null."),v&&y&&this._warn("plugged-length","a plugin registered highlight parts that do not line up with the series data; the extra entries are ignored and the missing ones read as null.");const _=a.some(e=>Array.isArray(null==e?void 0:e.highlightData));_&&(null==(t=l.chart.dataReducer)?void 0:t.enabled)&&this._warn("reducer","highlightData cannot follow chart.dataReducer; put the part on each point as { x, y, highlight } instead."),_&&(null==(r=l.chart.streaming)?void 0:r.enabled)&&this._warn("stream","highlightData cannot follow chart.streaming; put the part on each point as { x, y, highlight } instead.");const x=v&&"clamp"!==i.axis&&"treemap"!==u&&!l.plotOptions.bar.isFunnel&&!(o&&"100%"===l.chart.stackType);let w=null;if(o&&h)w=(e,t)=>this._barKey(e,t);else if(o){const e=n.seriesData.seriesX;w=(t,r)=>{var l;return String(n.axisFlags.isXNumeric?null==(l=e[t])?void 0:l[r]:r)}}const k=x?this._runningExt(b,w,h):null;this._publish(b,k)}_unsupported(){const e=this.w.config.chart;this._warn("type",`parts are not drawn on this chart (type "${e.requestedType||e.type}"). Supported: column, bar, line and area (stacked too), funnel, pie, donut, polarArea, radialBar, gauge and treemap.`)}_inactive(e){e||(this._targets=new Map),this.w.highlightData={active:!1,parts:[],ext:null,capture:()=>this.capture()},this._sig="",this._rows=[]}_parseCircle(){const e=this.w,t=e.config,r=this.cfg,n=e.globals,l=(e.seriesData.series||[]).length,i=te(t.series);let a=i.some(e=>"highlight"in e);a&&i.length!==l&&(this._warn("points","per-point highlight values do not line up with the slices; use highlightFilter.data instead."),a=!1);let s=Array.isArray(r.data)?r.data:null;s&&s.length!==l&&(this._warn("length",`highlightFilter.data has ${s.length} values for ${l} slices; it is ignored until they match.`),s=null),s&&s.some(e=>Array.isArray(e))&&(s.some(e=>Array.isArray(e)&&1!==e.length)?(this._warn("rows","highlightFilter.data takes one value per slice (or ring); a row of several values is ignored."),s=null):s=s.map(e=>Array.isArray(e)?e[0]:e));const o=t.chart.type,u=oe.indexOf(o)>-1||"radialBar"===o,h=a||!!s;if(h&&!u&&this._unsupported(),!1===r.enabled||!h||!u)return void this._inactive(u);const d=[];for(let e=0;e<l;e++){const t=a?i[e]:null,r=t&&"highlight"in t?t.highlight:s?s[e]:null;d.push([H(r)?n.collapsedSeriesIndices.indexOf(e)>-1?0:r:null])}this._publish(d,null)}_publish(e,t){const r=this.w.globals;this.w.highlightData={active:!0,parts:e,ext:t,capture:()=>this.capture()};const n=this._rows,l=[];for(let t=0;t<e.length;t++){const i=r.collapsedSeriesIndices.indexOf(t)>-1||r.ancillaryCollapsedSeriesIndices.indexOf(t)>-1;l.push(i&&t<n.length?n[t]:e[t].join(","))}this._rows=l,this._sig="#"+l.join("|")}capture(){const e=this.w.globals,t=new Map;this._targets.forEach((e,r)=>{var n,l,i,a,s,h,d;if(e.c&&!e.run)return;const c=e.n,p=!!(null==c?void 0:c.isConnected);t.set(r,u(o({},e),{d:p&&c.getAttribute("d")||e.d,a:(null==(n=e.m)?void 0:n.isConnected)&&e.m.getAttribute("d")||e.a,flip:p?c.classList.contains(Fe)||c.classList.contains(De):e.flip,f:null!=(l=e.lf)?l:e.f,o:null!=(i=e.lo)?i:e.o,s:null!=(a=e.ls)?a:e.s,col:null!=(s=e.lc)?s:e.col,al:null!=(h=e.la)?h:e.al,k:null!=(d=e.lk)?d:e.k,n:null,m:null,g:null,lb:null}))}),e.prevHighlightParts=t,e.prevHighlightLabels=this._captureLabels(),this._targets=new Map}_prev(){return this.w.globals.prevHighlightParts}_animates(){const e=this.ctx.renderer;return(!e||!e.kind||"svg"===e.kind)&&this._animatesUpdate()&&!!this.w.globals.shouldAnimate}_animatesUpdate(){const e=this.w,t=e.config.chart.animations;return!(!(y.isBrowser()&&t.enabled&&t.dynamicAnimation.enabled&&e.globals.dataChanged)||v())}_tween(e,t,r,n,l,i){const a=this.w,s=l||function(e){var t,r;const n=e.config.chart.animations;return _(null!=(r=null==(t=n.dynamicAnimation)?void 0:t.easing)?r:n.easing)}(a),o=this._live;let u=!1;const h={finish(){u||(u=!0,o.delete(h),r(1),n&&n())}};this._hold(h);const d=performance.now()+e,c=e=>{if(u)return;if(a.globals.isDestroyed)return u=!0,void o.delete(h);const n=Math.max(0,Math.min(1,(e-d)/t));r(s(n)),n<1?m.requestAnimationFrame(c):h.finish()};r(0),i?i.animate(t,e).during(e=>u||r(e)).after(()=>h.finish()):m.requestAnimationFrame(c)}_hold(e){const t=this._live,r=this.w.globals;t.add(e),r.highlightTween={finish:()=>Array.from(t).forEach(e=>e.finish())}}bar(e,t){var r,n,l,i,a,s,u,h;const d=this.w,c=d.highlightData;if(!c)return;this._render!==e&&this._beginRender(e,Ie);const p=this._prev(),g=c.active;if(!g&&!(null==p?void 0:p.size))return;const{j:f,realIndex:v}=t,b=Ie+`${v}::${e._keys(v)[f]}`;this._seen.add(b);const m=null==p?void 0:p.get(b),y=g?null==(r=c.parts[v])?void 0:r[f]:null;if(!g&&!m)return;const A=this.cfg,_=g?null!=(n=A.fadeOpacity)?n:.2:1,x=null==(l=d.seriesData.series[v])?void 0:l[f],w=!!d.config.chart.stacked,k=g&&w?this._stackGeometry(e,t,y,x,m):null==y?null:this._barGeometry(e,t,y,x),S={paint:(r,n)=>this._paintBar(t,r,n,{key:b,prev:m,geo:k,fadeTo:_,active:g,whole:x,bar:w?e:null})};if(g){const e={};"part"===(null!=(a=null==(i=A.dataLabels)?void 0:i.value)?a:"part")&&Object.assign(e,null==y?{hide:!0}:o({val:null!=(s=null==k?void 0:k.val)?s:y},null==k?void 0:k.label)),w&&"part"===(null!=(h=null==(u=A.dataLabels)?void 0:u.total)?h:"part")&&(e.total=k.total(null!=e.val?e.val<0:x<0)),S.label=e}return S}_beginRender(e,t){var r;this._render=e,this._targets=new Map,this._seen=new Set,this._seriesEls=new Map,this._cu=new c(this.w),this._stk=new Map,this._stkPrev=[],this._br=null,this._held=!1,t===Ie&&!this.w.config.chart.stacked&&(null==(r=this._prev())?void 0:r.size)&&Promise.resolve().then(()=>this._orphans())}_orphans(){const e=this.w,t=this._prev();t&&!e.globals.isDestroyed&&this._animates()&&t.forEach((t,r)=>{var n;if(this._seen.has(r)||0!==r.indexOf(Ie))return;const l=r.slice(2),i=this._seriesEls.get(l.slice(0,l.indexOf("::")));if(!i)return;const a=Array.from(i.querySelectorAll(".apexcharts-bar-ghost")).find(e=>e.getAttribute("data:ghostKey")===l);if(!a)return;if(a.setAttribute("fill-opacity",String(t.f)),!t.d)return;const s=new d(e,this.ctx).drawPath({d:t.d,stroke:"none",strokeWidth:0,fill:q(a.getAttribute("fill"))[0],fillOpacity:null!=(n=t.al)?n:1,classes:`${I} apexcharts-highlight-ghost`}).node;s.setAttribute("pointer-events","none"),s.setAttribute("clip-path",a.getAttribute("clip-path")||""),a.after(s);const o=a.style.transformOrigin||"",u=/^(left|right)/.test(o),h=parseFloat(a.getAttribute("data:ghostEdge")||""),[c]=We(t.d,u?0:1),p=s.style;p.transformBox="fill-box",p.transformOrigin=isFinite(h)?u?h-c+"px 50%":`50% ${h-c}px`:o;const g=()=>{a.parentNode&&!e.globals.isDestroyed?(p.transform=a.style.transform,p.opacity=a.style.opacity,m.requestAnimationFrame(g)):s.remove()};g()})}_barGeometry(e,t,r,n){const l=this.w,{j:i,realIndex:a,translationsIndex:s,paths:o}=t,u=e.barHelpers,h=u.getStrokeWidth(t.i,i,a);if(e.isFunnel){const e=n?Math.min(Math.abs(r/n),1):0,t=l.layout.gridWidth/2;return{pathTo:Ve(o.pathTo,r=>t+(r-t)*e),base:Ve(o.pathTo,()=>t),overflow:!1}}const d=l.config.yaxis[l.globals.seriesYAxisReverseMap[a]],c=(null==d?void 0:d.logarithmic)&&!l.globals.invalidLogScale&&this._cu?Math.max(0,this._cu.getLogValAtSeriesIndex(r,a)):r;if(e.isHorizontal){const e=t.zeroW,l=u.getXForValue(c,t.zeroW),s=this._rect(u,{a:o.barYPosition,len:o.barHeight,v1:e,v2:l,strokeWidth:h,realIndex:a,j:i,dir:c>=0?1:-1,horizontal:!0});return{pathTo:s.pathTo,base:s.base,overflow:Xe(r,n),label:{x:l,barWidth:Math.abs(l-e)}}}const p=t.zeroH,g=u.getYForValue(c,t.zeroH,s),f=this._rect(u,{a:o.barXPosition,len:o.barWidth,v1:p,v2:g,strokeWidth:h,realIndex:a,j:i,dir:c>=0?1:-1,horizontal:!1});return{pathTo:f.pathTo,base:f.base,overflow:Xe(r,n),label:{y:g,barHeight:Math.abs(g-p)}}}_rect(e,t){const r=((Array.isArray(t.strokeWidth)?t.strokeWidth[t.realIndex]:t.strokeWidth)||0)/2,n=t.v2-t.v1;if(Math.abs(n)<2*r){const l=t.v1+n/2,i=r*t.dir*(e.barCtx.isReversed?-1:1)*(t.horizontal?-1:1);t=u(o({},t),{v1:l+i,v2:l-i})}return e.barRect(t)}_stackGeometry(e,t,r,n,l){var i,a;const s=this.w,{j:o,realIndex:u,translationsIndex:h,paths:d}=t,c=e.barHelpers,p=e.isHorizontal,f=p?t.zeroW:t.zeroH;this._br||(this._br=c.createBorderRadiusArr(((null==(i=s.highlightData)?void 0:i.parts)||[]).map(e=>e.map(e=>null!=e?e:0))),g.isSafari()&&(this._br=this._br.map(e=>e.map(()=>"none"))));const v=this._br,b=this._barKey(u,o);let m=this._stk.get(b);m||(m={p:f,n:f,raw:0,any:!1},this._stk.set(b,m));const y="100%"===s.config.chart.stackType,A=s.seriesData.stackedSeriesTotals[o],_=null==r?null:y?A?100*r/A:0:r,x=null!=_?_:0,w=null!=_?_<0:null!=(null==l?void 0:l.s)?l.s<0:n<0,k=(e,t)=>p?c.getXForValue(e,t):c.getYForValue(e,t,h);let S=w?m.n:m.p,M=k(x,S);w?m.n=M:m.p=M,null!=r&&(m.raw+=r,m.any=!0);const C=m.raw,E=m.any,T={p:m.p,n:m.n};let $=!1;if(y){const e=k(100,f),t=k(-100,f),r=Math.min(e,t),n=Math.max(e,t),l=e=>Math.min(n,Math.max(r,e));$=l(M)!==M,S=l(S),M=l(M),T.p=l(T.p),T.n=l(T.n)}const P=c.arrBorderRadius;let L;c.arrBorderRadius=v;try{L=this._rect(c,{a:p?d.barYPosition:d.barXPosition,len:p?s.globals.barHeight:s.globals.barWidth,v1:S,v2:M,strokeWidth:p?c.getStrokeWidth(t.i,o,u):e.strokeWidth,realIndex:u,j:o,dir:w?-1:1,horizontal:p})}finally{c.arrBorderRadius=P}return{pathTo:null==r?null:L.pathTo,square:L.squarePathTo,base:L.base,flip:null!=r&&e.cornerFlip(null==(a=v[u])?void 0:a[o],x),s:w?-1:1,overflow:$,val:_,label:p?{x:M,barWidth:Math.abs(M-S)}:{y:M,barHeight:Math.abs(M-S)},total:e=>!!E&&{val:C,edge:e?T.n:T.p}}}_barKey(e,t){var r;const n=this.w;return n.labelData.seriesGroupIndex[e]+"|"+(n.axisFlags.isXNumeric?null==(r=n.seriesData.seriesX[e])?void 0:r[t]:t)}line(e,t,r,n,l,i,a){var s,h;const d=this.w,c=d.highlightData;if(!c||"line"!==t&&"area"!==t)return;this._render!==e&&this._beginRender(e,"l:");const p=this._prev(),g=c.active;if(!g&&!(null==p?void 0:p.size))return;const f="l:"+l,v=null==p?void 0:p.get(f);if(!g&&!v)return;const b=d.globals,m=this._animates(),y="area"===t,A=g&&c.parts[l]||[],x=A.some(e=>null!=e),w=g&&e._shapeOnly,k=(e,t)=>e&&(e._cmd?e._cmd[t]:e.node.getAttribute(t)),S=e.marks||[],M=y?S.find(e=>"none"!==k(e,"fill")):null,C=S.find(e=>e!==M),[E,T]=M&&d.config.chart.stacked?q(k(M,"fill")):[M&&k(M,"fill"),1],$=S.concat(y?S.filter(e=>e!==M&&!e._cmd).map(e=>e.node.nextElementSibling).filter(e=>/#forecastMask/.test((null==e?void 0:e.getAttribute("clip-path"))||"")).map(e=>({node:e})):[]),P=g&&!w&&(x||d.config.chart.stacked)?this._lineBuild(e,t,r,n,l,i,this._partRow(A,n,l)):null;let L=w?{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")}:x?{d:P.linePaths.join(" "),a:P.areaPaths.join(" "),num:P.numericXY}:null;const D=!L&&!!(null==v?void 0:v.d)&&m,O=g&&m&&(D||L&&!(null==v?void 0:v.d)&&(v||"baseline"===this.cfg.enter))?this._lineBase(e,t,r,n,l,i,x?A:null):null;P&&d.config.chart.stacked&&(this._swap(e,()=>e._recordStackTops(l,P.yArrj,P.S[n])),this._stkPrev.push(P.yArrj)),D&&(L=g?O:{d:a.linePaths.join(" "),a:a.areaPaths.join(" ")});const I=D&&!g;let N=L;const B={};let z=null,H=!1;if(L&&m)if(null==v?void 0:v.d){if(N={d:v.d,a:v.a||L.a},!D)if(z=function(e,t,r,n){var l;const i=e.globals,a=i.prevStreamFrame;if(!a||!i.dataChanged||!(null==(l=e.axisFlags)?void 0:l.isXNumeric))return null;const s=a.seriesX[t],o=a.seriesY[t],u=e.seriesData.seriesX[t],h=e.seriesData.series[t];if(!(s&&o&&u&&h))return null;if(s.length<3||u.length<3)return null;let d=-1;for(let e=0;e<s.length;e++)if(s[e]===u[0]){d=e;break}if(-1===d)return null;const c=Math.min(s.length-d,u.length);if(c<2)return null;const p=u.length-c;if(0===d&&0===p)return null;for(let e=0;e<c;e++){if(s[d+e]!==u[e])return null;const t=o[d+e],r=h[e];if(t!==r&&(null!=t||null!=r))return null}const g=a.xPixels[t],f=a.yPixels[t];if(!g||!f)return null;let v=-1,b=-1;for(let e=0;e<c;e++)null!=g[d+e]&&null!=f[d+e]&&null!=r[e]&&null!=n[e]&&(-1===v&&(v=e),b=e);if(-1===v||b<=v)return null;const m=r[v],y=r[b],A=g[d+v],_=g[d+b];if(Math.abs(y-m)<1e-6)return null;const x=(_-A)/(y-m),w=A-x*m;if(!isFinite(x)||!isFinite(w))return null;if(Math.abs(x-1)>.02)return null;if(Math.abs(w)<.5)return null;let k=v,S=v;for(let e=v;e<=b;e++){const t=n[e];null!=t&&null!=f[d+e]&&(t<n[k]&&(k=e),t>n[S]&&(S=e))}let M=1,C=0;const E=n[k],T=n[S];if(Math.abs(T-E)>1e-6?(M=(f[d+S]-f[d+k])/(T-E),C=f[d+k]-M*E):C=f[d+k]-E,!isFinite(M)||!isFinite(C)||M<.2||M>5)return null;const $=Math.floor((v+b)/2);if($!==v&&$!==b&&null!=r[$]&&null!=g[d+$]){const e=x*r[$]+w;if(Math.abs(e-g[d+$])>1.5)return null;if(null!=n[$]&&null!=f[d+$]){const e=M*n[$]+C;if(Math.abs(e-f[d+$])>1.5)return null}}return i.streamScrolled=!0,{ax:x,bx:w,ay:M,by:C}}(d,l,a.xArrj,a.yArrj),z)N={d:j(L.d,z),a:j(L.a,z)};else{const e=P||a,r=F(d,{type:t,realIndex:l,pathFromLine:v.d,pathFromArea:v.a||"",linePaths:e.linePaths,areaPaths:e.areaPaths});(null==r?void 0:r.line)&&([N.d,B.d]=[r.line.from,r.line.toInterp]),(null==r?void 0:r.area)&&([N.a,B.a]=[r.area.from,r.area.toInterp])}}else O?N=O:(H=!0,N={d:(null==C?void 0:C.node.getAttribute("pathFrom"))||L.d,a:(null==M?void 0:M.node.getAttribute("pathFrom"))||L.a});let W=null,Y=null,X=null;if(L){const r=this._partGroup(e.elSeries,"apexcharts-line-highlight"),i=L.num,a={i:n,j:"h",realIndex:l,delay:n,speed:d.config.chart.animations.dynamicAnimation.speed,cls:`apexcharts-${t} apexcharts-line-highlight-part`,chartType:t,clip:`url(#gridRectMask${b.cuid})`,scroll:!!z};if(M&&(W=this._emitPart(r,u(o({},a),{from:N.a,to:L.a,interp:B.a,paint:E,num:i&&{xs:i.xs,ys:i.ys,closeY:i.areaCloseY}}))),C){const t=u(o({},a),{from:N.d,to:L.d,interp:B.d,paint:"none",stroke:k(C,"stroke"),width:e.strokeWidth,num:i&&{xs:i.xs,ys:i.ys}});Y=this._emitPart(r,t),null==Y||Y.attr("fill-rule","evenodd");const n=!C._cmd&&C.node.getAttribute("clip-path");if(Y&&n&&n.indexOf("nonForecast")>-1){const e=d.config.forecastDataPoints;Y.attr("clip-path",n),X=this._emitPart(r,u(o({},t),{j:"hf",clip:`url(#forecastMask${b.cuid})`})),null==X||X.attr({"fill-rule":"evenodd","stroke-dasharray":e.dashArray,"stroke-width":e.strokeWidth||void 0})}}const s=this.ctx.renderer;s&&s.kind&&"svg"!==s.kind||!d.config.chart.animations.enabled||b.resized||b.dataChanged||[Y,y&&C].forEach(e=>{const t=e&&e.node.getAttribute("stroke-dasharray");!e||t&&"0"!==t||e.node.setAttribute("stroke-dasharray","none")})}const G={d:null,a:null,f:1,o:g?1:0,n:D?null==Y?void 0:Y.node:null,m:D?null==W?void 0:W.node:null,c:!g};this._targets.set(f,G);const V=H?T:(null==v?void 0:v.d)&&null!=(s=v.al)?s:1,J=I?T:1;G.al=J,this._fadeLine(t,$,H?ze:v?{f:v.f,o:null!=(h=v.o)?h:0}:Ne,I?ze:g?Be:Ne,{width:e.strokeWidth,also:W&&(V<1||J<1)?e=>{const t=R(V,J,e);G.la=t,W.node.setAttribute("fill-opacity",String(t))}:void 0,force:!!W&&V!==J,land:I?Ne:void 0,done:D?()=>{null==Y||Y.remove(),null==X||X.remove(),null==W||W.remove()}:void 0,rec:G,ease:z?_("linear"):void 0}),L&&!D&&Object.assign(G,{d:L.d,a:L.a,n:null==Y?void 0:Y.node,m:null==W?void 0:W.node}),this._lineLabels(e,t,n,l,A,P,a)}_partRow(e,t,r){const n=this.w,l=this._cu,i=n.config.yaxis[n.globals.seriesYAxisReverseMap[r]],a=(null==i?void 0:i.logarithmic)&&!n.globals.invalidLogScale?e.map(e=>l.getLogValAtSeriesIndex(e,r)):e.slice(),s=n.config.fill.type,o=a.length-1;return"gradient"!==s&&"gradient"!==s[t]||null==a[o]||!a.every(e=>e===a[0])||(a[o]+=1e-6),a}_lineBuild(e,t,r,n,l,i,a){const s=this.w.globals.pointsArray,o=s[l],u=o?o.length:0,h=[e._shapeOnly,e.appendPathFrom],d=r.slice();d[n]=a,e._shapeOnly=!0;try{const r=this._swap(e,()=>e._buildSeriesPaths(t,d,n,l,i));return r.S=d,r}finally{[e._shapeOnly,e.appendPathFrom]=h,o?o.length=u:delete s[l]}}_swap(e,t){if(!this.w.config.chart.stacked)return t();const r=[e.prevSeriesYByX,e.prevSeriesY];e.prevSeriesYByX=this._stk,e.prevSeriesY=this._stkPrev;try{return t()}finally{[e.prevSeriesYByX,e.prevSeriesY]=r}}_lineBase(e,t,r,n,l,i,a){const s=(a||r[n]).map(e=>null==e?null:0),o=this._lineBuild(e,t,r,n,l,i,s);return{d:o.linePaths.join(" "),a:o.areaPaths.join(" "),num:o.numericXY}}_fadeLine(e,t,r,n,l){var i,a,s,o,u,h,d;const c=this.cfg,p=null!=(i=c.fadeOpacity)?i:.2,g=null!=(s=null==(a=c.outline)?void 0:a.width)?s:1,f=null!=(u=null==(o=c.outline)?void 0:o.opacity)?u:1,v=null!=(d=null==(h=c.line)?void 0:h.dashArray)?d:4,b=l.rec,m=["fill-opacity","stroke-opacity","stroke-width","stroke-dasharray"],y=t.map(t=>{var r;const n=t.node,l=m.map(e=>n.getAttribute(e)),i=parseFloat(null!=(r=l[0])?r:"1");return{node:n,own:l,k:isFinite(i)?i:1,fill:"area"===e&&"none"!==(t._cmd?t._cmd.fill:n.getAttribute("fill"))}}),A=(t,r)=>{b.lf=t,b.lo=r,y.forEach(({node:n,own:i,k:a,fill:s})=>{t>=1&&r<=0?m.forEach((e,t)=>null==i[t]?n.removeAttribute(e):n.setAttribute(e,i[t])):s?n.setAttribute("fill-opacity",String(a*t*R(1,p,r))):"area"===e?(n.setAttribute("stroke-opacity",String(t*R(1,f,r))),n.setAttribute("stroke-width",String(R(l.width,g,r)))):(n.setAttribute("stroke-opacity",String(t)),n.setAttribute("stroke-dasharray",r<1?`${v} ${v*r}`:String(v)))})},_=e=>{A(R(r.f,n.f,e),R(r.o,n.o,e)),l.also&&l.also(e)},x=()=>{b.run=!1,l.land&&A(l.land.f,l.land.o),l.done&&l.done()};this._animates()&&(r.f!==n.f||r.o!==n.o||l.done||l.force)?(b.run=!0,this._tween(0,this.w.config.chart.animations.dynamicAnimation.speed,_,x,l.ease)):(_(1),x())}_lineLabels(e,t,r,n,l,i,a){var s,o,u,h;const d=this.w,c=d.globals,p=e.elDataLabelsWrap;if(!d.config.dataLabels.enabled||!(null==p?void 0:p.node)||e._shapeOnly)return;const g=(null==(s=d.highlightData)?void 0:s.active)&&"part"===(null!=(u=null==(o=this.cfg.dataLabels)?void 0:o.value)?u:"part");if(g){const a=p.node;for(;a.firstChild;)a.removeChild(a.firstChild);const s=c.dataLabelsRects;if(s[n]=[],c.lastDrawnDataLabelsIndexes[n]=[],i&&l.some(e=>null!=e)){const a=new b(d,this.ctx);for(let o=0;o<i.xArrj.length-1;o++){const u=e.lineHelpers.calculatePoints({series:i.S,x:i.xArrj[o+1],y:i.yArrj[o+1],realIndex:n,i:r,j:o,prevY:i.yArrj[0]});u.x.forEach((e,r)=>{if(null==l[o?o+1:r])return void s[n].push({x:NaN,y:NaN,width:0,height:0});const i=a.drawDataLabel({type:t,pos:{x:o?[e]:r?[NaN,e]:[e,NaN],y:u.y},i:n,j:o?o+1:1,row:l});i&&p.add(i)})}}}const f=g?null==i?void 0:i.xArrj:a.xArrj,v=g?null==i?void 0:i.yArrj:a.yArrj;if(!this._animates()||!f||D(d,n))return;const m=c.riseLabels;if(null==m?void 0:m.has(n)){const e=new Map(m);e.delete(n),c.riseLabels=e.size?e:null}const y=c.prevStreamFrame,A=null==(h=c.prevHighlightLabels)?void 0:h.get(n);Promise.resolve().then(()=>{var e,t;return this._rideLabels(p.node,f,v,A,[null==(e=null==y?void 0:y.xPixels)?void 0:e[n],null==(t=null==y?void 0:y.yPixels)?void 0:t[n]])})}_captureLabels(){const e=this.w,t=e.config.chart.type,r=e.dom.baseEl,n=oe.indexOf(t)>-1;if(!e.config.dataLabels.enabled||"line"!==t&&"area"!==t&&!n||!r||!y.isBrowser())return null;const l=new Map;if(n){const e=new Map;return r.querySelectorAll(".apexcharts-pie-label").forEach(t=>{const[r,n]=G(t);e.set(Number(t.parentNode.getAttribute("data:slice")),{x:r,y:n})}),l.set(-1,e),l}return r.querySelectorAll(".apexcharts-datalabels[data\\:realIndex]").forEach(t=>{const r=Number(t.getAttribute("data:realIndex")),n=e.globals.seriesXvalues[r]||[],i=new Map;t.querySelectorAll(`text.apexcharts-datalabel, text.${je}`).forEach(e=>{var t;const r=Ye(n,parseFloat(e.getAttribute("cx")));if(r<0)return;const[l,a]=G(e);i.set(r,{x:l,y:a,o:parseFloat(null!=(t=e.getAttribute("opacity"))?t:"1"),els:qe(e)})}),l.set(r,i)}),l}_rideLabels(e,t,r,n,l){const i=this.w;if(i.globals.isDestroyed||!e.isConnected)return;const[a,s]=l,o=[],u=new Set,h=e=>"number"==typeof e&&isFinite(e);e.querySelectorAll("text.apexcharts-datalabel").forEach(e=>{const l=Ye(t,parseFloat(e.getAttribute("cx")));if(l<0)return;const[i,d]=G(e),c=null==n?void 0:n.get(l);let p=0,g=0,f=0;c?(u.add(l),p=c.x-i,g=c.y-d,f=c.o):!(null==n?void 0:n.size)&&[null==a?void 0:a[l],null==s?void 0:s[l],t[l],r[l]].every(h)&&(p=a[l]-t[l],g=s[l]-r[l]),(f<1||Math.abs(p)>.01||Math.abs(g)>.01)&&o.push({els:qe(e),dx:p,dy:g,o:f,to:1})}),null==n||n.forEach((t,r)=>{if(u.has(r))return;const n=t.els.map(t=>{const r=t.cloneNode(!0);return r.setAttribute("class",je),r.setAttribute("pointer-events","none"),r.removeAttribute("transform"),e.appendChild(r),r}),[l,i]=G(n[n.length-1]);o.push({els:n,dx:t.x-l,dy:t.y-i,o:t.o,to:0,out:!0})}),o.length&&(o.forEach(e=>{e.bases=e.els.map(e=>e.getAttribute("transform")||""),e.ops=e.els.map(t=>{var r;return parseFloat(null!=(r=t.getAttribute("opacity"))?r:"1")/(e.out&&e.o>0?e.o:1)})}),this._tween(0,i.config.chart.animations.dynamicAnimation.speed,e=>o.forEach(({els:t,dx:r,dy:n,o:l,to:i,out:a,bases:s,ops:o})=>t.forEach((t,u)=>{const h=s[u],d=a?1:1-e;d?t.setAttribute("transform",`translate(${r*d} ${n*d}) ${h}`.trim()):h?t.setAttribute("transform",h):t.removeAttribute("transform");const c=R(l,i,e),p=o[u];c>=1&&p>=1?t.removeAttribute("opacity"):t.setAttribute("opacity",String(p*c))})),()=>o.forEach(e=>e.out&&e.els.forEach(e=>e.remove()))))}_paintBar(e,t,r,n){var l,i,a,s,o,u,h,c,p,g;const f=this.w,v=this.cfg,b=this._animates(),{key:m,prev:y,geo:A,fadeTo:_,active:x,bar:w}=n,k=r.elSeries;this._seriesEls.set(String(e.realIndex),k.node);let S=(null==A?void 0:A.pathTo)||null;const M=!S&&!!(null==y?void 0:y.d)&&b;M&&(S=this._exitTo(y,x,r.pathTo,null==A?void 0:A.base));const C=S&&!M?this._from(y,null==A?void 0:A.base,r.pathFrom,!!w):null;let E=C?C.d:(null==y?void 0:y.d)||null;const T=M&&!x;let $="apexcharts-bar-highlight-part",P=!1,L=null;if(w&&S){if(E&&E!==S){const e=w._pathToInterp;w._pathToInterp=null;const t=w.cornerMorph(E,S,M?void 0:A.square);t!==S&&(E=t,L=w._pathToInterp),w._pathToInterp=e}const e=w.isHorizontal?De:Fe,r=t.node.classList.contains(e);P=M?x?!!y.flip:r:A.flip;const n=(null==y?void 0:y.d)?!!y.flip:!!(null==C?void 0:C.cover)&&r;(P||b&&n)&&($+=" "+e),!P&&b&&n&&($+=" "+Oe,this._settleHeld(w))}const D="string"==typeof r.fill&&"none"!==r.fill&&r.fill.indexOf("url")<0?r.fill:f.globals.colors[f.config.plotOptions.bar.distributed?e.j:e.realIndex],[F,O]=q(r.fill&&"none"!==r.fill?r.fill:D),j=e.j>0&&r.elBarShadows?r.elBarShadows.node.lastElementChild:null,H=y?y.f:1,W=this._partGroup(k,"apexcharts-bar-highlight"),X=S?this._emitPart(W,{i:e.i,j:e.j,realIndex:e.realIndex,from:E||S,to:S,interp:L,paint:F,delay:r.delay,speed:r.speed,cls:$,chartType:"bar",clip:`url(#gridRectBarMask${f.globals.cuid})`}):null,G=Y(t.node),V=(null==C?void 0:C.cover)&&b?O:(null==y?void 0:y.d)&&null!=(l=y.al)?l:1,J=T?O:1,U=n.whole||(null==y?void 0:y.o)?null!=(a=null==(i=v.outline)?void 0:i.width)?a:1:0,Z=t.node,K=Z.getAttribute("stroke"),Q=(null==C?void 0:C.cover)&&b?1:(null==y?void 0:y.d)&&null!=(s=y.k)?s:0,ee=T?1:0,te=!!X&&U>0&&(Q>0||ee>0)&&parseFloat(Z.getAttribute("stroke-width"))>0&&!!K&&"none"!==K&&"transparent"!==K,re=Y(Z,"stroke-opacity"),ne={};te&&(["stroke","stroke-width","stroke-opacity","stroke-dasharray"].forEach(e=>{var t;ne[e]=X.node.getAttribute(e),X.node.setAttribute(e,null!=(t=Z.getAttribute(e))?t:"")}),Z.hasAttribute("stroke-dasharray")||X.node.removeAttribute("stroke-dasharray"));const le={d:null,f:_,base:null!=(o=null==A?void 0:A.base)?o:null==y?void 0:y.base,edge:!1,s:null!=(u=null==A?void 0:A.s)?u:null==y?void 0:y.s,n:M?null==X?void 0:X.node:null,c:!x,al:J,k:te?ee:0};this._targets.set(m,le);const ie=T?B:z(_);if(this._fade(t.node,(null==C?void 0:C.cover)&&b?B:y?{f:y.f,o:null!=(h=y.o)?h:z(y.f).o}:N,n.whole?ie:{f:ie.f,o:0},r,{outline:U>0?{color:D,width:U,opacity:null!=(p=null==(c=v.outline)?void 0:c.opacity)?p:1}:null,also:e=>{null==j||j.setAttribute("fill-opacity",String(R(H,_,e))),(e=>{const t=R(V,J,e);if(le.la=t,X&&(G<1||V<1||J<1)&&X.node.setAttribute("fill-opacity",String(G*t)),!te)return;const r=R(Q,ee,e);le.lk=r,r>0||e<1?(X.node.setAttribute("stroke-opacity",String(re*r)),!(le.lo>0)&&r>0&&Z.setAttribute("stroke-opacity","0")):X.attr(ne)})(e)},force:!!X&&(V!==J||te),land:T?N:void 0,done:M?()=>null==X?void 0:X.remove():void 0,rec:le}),!X||!S||M)return;if((null==A?void 0:A.overflow)&&X.node.classList.add("apexcharts-highlight-overflow"),(null==A?void 0:A.overflow)&&!w){const e=new d(f,this.ctx).drawPath({d:r.pathTo,stroke:"#fff",strokeWidth:1,fill:"none",strokeDashArray:3,classes:`${I} apexcharts-highlight-edge`});e.attr("clip-path",`url(#gridRectBarMask${f.globals.cuid})`),e.node.setAttribute("pointer-events","none"),W.add(e);const t=t=>e.node.setAttribute("stroke-opacity",String(.75*t));b&&!(null==y?void 0:y.edge)?this._tween(r.delayMs,r.speed,t):t(1)}const ae=null==(g=this.ctx.renderer)?void 0:g.kind;ae&&"svg"!==ae||f.config.plotOptions.bar.isFunnel||this._hitProxy(W,S,r.pathTo,t.node,!!f.globals.isBarHorizontal),r.labels&&this._contrastLabels(r.labels,S),Object.assign(le,{d:S,base:null==A?void 0:A.base,edge:!!(null==A?void 0:A.overflow)&&!w,s:null==A?void 0:A.s,flip:P,n:X.node})}_hitProxy(e,t,r,n,l){const i=l?0:1,[a,s]=We(t,i),[o,u]=We(r,i),[h,c]=We(t,i?0:1);if(!(s-a>.5&&c-h>.5))return;const p=[];u-o>.5?(a<o&&p.push([a,Math.min(s,o)]),s>u&&p.push([Math.max(a,u),s])):p.push([a,s]);const g=new d(this.w,this.ctx);for(const[t,r]of p){if(r-t<.5)continue;const i=g.drawPath({d:l?`M ${t} ${h} L ${r} ${h} L ${r} ${c} L ${t} ${c} Z`:`M ${h} ${t} L ${c} ${t} L ${c} ${r} L ${h} ${r} Z`,stroke:"none",strokeWidth:0,fill:"none",classes:"apexcharts-highlight-hit"}).node;i.setAttribute("pointer-events","all"),i.setAttribute("clip-path",`url(#gridRectBarMask${this.w.globals.cuid})`),J(n,i),e.add(i)}}_settleHeld(e){if(this._held)return;this._held=!0;const t=this.w;Promise.resolve().then(()=>{var r;t.globals.isDestroyed||(null==(r=t.dom.baseEl)?void 0:r.querySelector(`.apexcharts-series > .${Oe}`))||e.settleHeldMirrors()})}_from(e,t,r,n){var l;return(null==e?void 0:e.d)?{d:e.d,cover:!1}:t&&(e||"baseline"===this.cfg.enter||n&&(!this.w.globals.dataChanged||(null==(l=this._prev())?void 0:l.size)))?{d:t,cover:!1}:r?{d:r,cover:!0}:null}_exitTo(e,t,r,n){return t?n||e.base||e.d:r}_partGroup(e,t){let r=e.node._apxHighlight;return r&&r.node.parentNode===e.node||(r=new d(this.w,this.ctx).group({class:t}),e.node._apxHighlight=r),e.add(r),r}_emitPart(e,t){const r=this.w,n=function(e,t){const r=e&&e.renderer;return r&&r.kind&&"svg"!==r.kind?r:t}(this.ctx,new d(r,this.ctx)).renderPaths({i:t.i,j:t.j,realIndex:t.realIndex,pathFrom:t.from,pathTo:t.to,pathToInterp:t.interp||void 0,pathToNumeric:t.num,scrollMorph:!!t.scroll,stroke:t.stroke||"none",strokeWidth:t.width||0,fill:t.paint,animationDelay:t.delay,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:t.speed,className:`${I} ${t.cls}`,chartType:t.chartType,bindEventsOnPaths:!1});return n&&n.node?(n.attr("clip-path",t.clip),n.node.setAttribute("pointer-events","none"),n.node.setAttribute("index",String(t.realIndex)),n.node.setAttribute("j",String(t.j)),e.add(n),n):null}_fade(e,t,r,n,l){var i;const a=l.attr||"fill-opacity",s=Y(e,a),o=l.outline,u=l.rec||{},h=o&&null==o.width?["stroke","stroke-opacity"]:["stroke","stroke-width","stroke-opacity"],d=h.map(t=>e.getAttribute(t)),c=(t,r)=>{u.lf=t,u.lo=o?r:0,e.setAttribute(a,String(s*t)),o&&(r<=0?h.forEach((t,r)=>null==d[r]?e.removeAttribute(t):e.setAttribute(t,d[r])):(e.setAttribute("stroke",o.color),null!=o.width&&e.setAttribute("stroke-width",String(o.width)),e.setAttribute("stroke-opacity",String(o.opacity*Math.min(1,r)))))},p=e=>{c(R(t.f,r.f,e),R(t.o,r.o,e)),l.also&&l.also(e)},g=()=>{u.run=!1,l.land&&c(l.land.f,l.land.o),l.done&&l.done()};(null!=(i=l.anim)?i:this._animates())&&(t.f!==r.f||t.o!==r.o||l.done||l.force)?(u.run=!0,this._tween(n.delayMs,n.speed,p,g,l.curve,n.el)):(p(1),g())}_runningExt(e,t,r){if(!t)return e;const n=new Map;return e.map((e,l)=>e.map((e,i)=>{if(null==e)return null;const a=t(l,i)+(r&&e<0?"-":"+"),s=(n.get(a)||0)+e;return n.set(a,s),s}))}_contrastLabels(e,t){const r=this.w,n=e.node;if(!n||/rotate\((?!0\))/.test(n.getAttribute("transform")||""))return;const[l,i]=We(t,0),[a,s]=We(t,1),o=new d(r);n.querySelectorAll("text").forEach(e=>{const t=(e.getAttribute("fill")||"").toLowerCase();if("#fff"!==t&&"#ffffff"!==t&&"white"!==t)return;const n=o.getTextRects(e.textContent,e.getAttribute("font-size"),e.getAttribute("font-family"),void 0,!0,e.getAttribute("font-weight")),u=parseFloat(e.getAttribute("x")),h=parseFloat(e.getAttribute("y")),d=e.getAttribute("text-anchor"),c="middle"===d?u-n.width/2:"end"===d?u-n.width:u;c>=l-1&&c+n.width<=i+1&&h-.75*n.height>=a-1&&h+.25*n.height<=s+1||e.setAttribute("fill",r.config.chart.foreColor)})}tooltipRow(e,t,r,n){var l,i,a,s,h,d,c,p,f,v,b;const m=this.w,y=this.cfg,A=y.tooltip||{},_=m.globals.axisCharts,x=this.isActive()&&!1!==A.show&&(null!=r||!_)&&!!e.yValue,w=_||"lanes"!==this._ind||"radialBar"!==m.config.chart.type?void 0:(null==(l=this._lane)?void 0:l[0])===t?this._lane[1]:"part";if(e.marker&&function(e,t,r=.2,n){const l=e.style,i=e.firstElementChild;if(!t){if(!e._apxHl)return;return e._apxHl=!1,l.background=l.boxShadow=l.borderRadius="",void(i&&(i.style.display=""))}e._apxHl=!0;const a="#"===t.charAt(0)?g.hexToRgba(t,r):`color-mix(in srgb, ${t} ${100*r}%, transparent)`;l.background="part"===n?t:n?a:`linear-gradient(90deg, ${t} 50%, ${a} 50%)`,l.boxShadow=`inset 0 0 0 1px ${t}`,l.borderRadius="3px",i&&(i.style.display="none")}(e.marker,x&&!m.config.tooltip.fillSeriesColor?(null==(a=null==(i=this._tiles)?void 0:i.get(t+"|"+r))?void 0:a.base)||m.globals.colors[t]:null,w?null!=(d=null==(h=null==(s=y.radialBar)?void 0:s.lanes)?void 0:h.opacity)?d:be:y.fadeOpacity,w),!x)return;const k=this.valueAt(t,r),S=m.seriesData.series,M=_?null==(c=S[t])?void 0:c[r]:S[t],C=_?{series:S,seriesIndex:t,dataPointIndex:r,w:m}:u(o({},m),{w:m,series:S,seriesIndex:t,dataPointIndex:t,highlight:X(k,M),lane:w});if("function"==typeof A.formatter)return void(e.yValue.innerHTML=String(null!=(p=A.formatter(k,null!=M?M:null,C))?p:""));const E='<span class="apexcharts-highlight-total" style="font-weight: 400; opacity: 0.6">';if("whole"===w){if(null!=k){const t=null!=(b=null==(v=null==(f=m.globals.locale)?void 0:f.highlightFilter)?void 0:v.part)?b:"part";e.yValue.innerHTML+=` ${E}(${t} ${n.yLbFormatter(k,C)})</span>`}return}let T=e.yValue.innerHTML;null!=k&&(T=`/ ${T}`,A.share&&M&&(T+=` \xb7 ${Math.round(k/M*100)}%`)),e.yValue.innerHTML=(null==k?"":`${n.yLbFormatter(k,C)} `)+`${E}${T}</span>`}drillView(e){Array.isArray(null==e?void 0:e.series)&&(e.series=e.series.map(ee),this._level={series:e.series,base:this.w.globals.initialSeries}),e&&null!=this.cfg.data&&(e.highlightFilter=u(o({},e.highlightFilter),{data:null}))}_drilled(){var e;const t=this._level;return!!(t&&((null==(e=this.ctx.drilldown)?void 0:e.depth)||0)>0&&this.w.globals.initialSeries===t.base)}_fire(e){var t;const r=null==(t=this.w.config.chart.events)?void 0:t.highlightFilterChanged;"function"==typeof r&&r(this.ctx,{active:"clear"!==e,phase:e})}pie(e){"radialBar"===e.chartType?ye(this,e):ue(this,e)}treemap(e){return $e(this,e)}afterRender(){this._tipOn&&(this._tipOn=!1,this.w.config.tooltip.enabled=!1);const e=this._ride;this._ride=null;const t=this.w.globals.circleTween;!e||t&&!t.done||e();const r=this._drawnSig,n=this._sig;r!==n&&(this._drawnSig=n,this._fire(r?n?"update":"clear":"enter"))}set(e,t={}){var r;const n=this.w,l=n.globals;if(!l.axisCharts)return this._setCircle(e,t);const i=t.series||this._rawSeries();if("treemap"===n.config.chart.type&&l.treemapRoots)return this._apply(function(e,t,r){const n=e.w;return t.map((e,t)=>{const l=ee(e),i=Array.isArray(null==r?void 0:r[t])?r[t]:null;if("function"!=typeof r&&!i)return l;let a=0;const s=l=>{var h,d,c;if(W(l)&&Array.isArray(l.children)&&l.children.length)return u(o({},l),{children:l.children.map(s)});const p=a++,g=W(l)?o({},l):{x:"",y:l};return g.highlight="function"==typeof r?r({seriesIndex:t,dataPointIndex:p,seriesName:e.name,x:null!=(h=g.x)?h:g.name,value:"number"==typeof(null!=(d=g.y)?d:g.value)?null!=(c=g.y)?c:g.value:null,datum:l,w:n}):null==i?void 0:i[p],g};return Array.isArray(l.data)&&(l.data=l.data.map(s)),l})}(this,i,e),t);const a=!t.series&&!!l.dataReducerRawSeries&&!!(null==(r=n.config.chart.dataReducer)?void 0:r.enabled),s=i.map((r,l)=>{const i=Array.isArray(r.data)?r.data:[],s="function"==typeof e?i.map((i,s)=>{var o;return e({seriesIndex:l,dataPointIndex:s,seriesName:r.name,x:W(i)?i.x:Array.isArray(i)?i[0]:n.labelData.labels[s],value:Ge(i,t.series||a?null:null==(o=n.seriesData.series[l])?void 0:o[s]),datum:i,w:n})}):Array.isArray(null==e?void 0:e[l])?e[l]:null,h=ee(r);return s&&(a&&h.data.every(e=>"number"!=typeof e)?h.data=h.data.map((e,t)=>null==e?e:Array.isArray(e)?{x:e[0],y:e[1],highlight:s[t]}:u(o({},e),{highlight:s[t]})):h.highlightData=s),h});return this._apply(s,t)}clear(e={}){return this.w.globals.axisCharts?this._apply(this._rawSeries().map(ee),e):this._setCircle(null,e)}_setCircle(e,t){const r=this.w,n=t.series||this._rawSeries(),l={};if((t.series||n.some(re))&&(l.series=n.map(ee)),"function"==typeof e){const l=te(n),i=t.series?[]:r.seriesData.series,a=r.seriesData.seriesNames,s=l.length||n.length,o=[];for(let t=0;t<s;t++){const s=l.length?l[t]:n[t];o.push(e({seriesIndex:t,dataPointIndex:t,seriesName:l.length?String(s.x):a[t],x:l.length?s.x:a[t],value:Ge(s,i[t]),datum:s,w:r}))}e=o}return l.highlightFilter={data:Array.isArray(e)?e:null},this.ctx.updateOptions(l,!1,!1!==t.animate,!0,!this._drilled())}_apply(e,t){const r=this._drilled();return r&&this._level&&(this._level.series=e.map(ee)),this.ctx.updateSeries(e,!1!==t.animate,!r)}_rawSeries(){var e,t;const r=this.w.globals;return(this._drilled()&&(null==(e=this._level)?void 0:e.series)||r.treemapRawSeries||(r.dataReducerRawSeries&&(null==(t=this.w.config.chart.dataReducer)?void 0:t.enabled)?r.initialSeries:null)||r.initialSeries||this.w.config.series).map(e=>W(e)?o({},e):e)}teardown(){var e,t;Array.from(this._live).forEach(e=>e.finish()),this._live.clear(),this._targets=new Map,this._render=null,this._cu=null,this._level=null,this._seriesEls=new Map,this._tiles=null,this._tmDefs=[],null==(e=this.ctx.events)||e.removeEventListener("mounted",this._onRender),null==(t=this.ctx.events)||t.removeEventListener("updated",this._onRender)}}}),e.default=h,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexHighlightFilter={})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const s=n(require("apexcharts/core")),o=s.__apex_Utils,r=s.__apex_Environment_Environment;function a(t,e){const i=null!=t,n=null!=e;return i||n?{min:i?t:null,max:n?e:null}:null}function l(t){return Array.isArray(t)?t.map(t=>Array.isArray(t)?t.slice():t):[]}function c(t,e){return"function"==typeof t&&e?t===e.addXaxisAnnotation?"xaxis":t===e.addYaxisAnnotation?"yaxis":t===e.addPointAnnotation?"point":null:null}function h(t,e){const i=t.config.annotations?o.clone(t.config.annotations):null,n=[],s=t.globals.memory&&t.globals.memory.methodsToExec||[];for(const t of s){if(!t||"addAnnotation"!==t.label)continue;const i=c(t.method,e);i&&n.push({kind:i,params:o.clone(t.params)})}return{static:i,dynamic:n}}function d(t){const e=t&&t.measure;if(!e||"function"!=typeof e.getPins)return null;const i=e.getPins();return Array.isArray(i)&&i.length?{pins:i}:null}function u(t,e){if(!t||!e)return;const i=t.w;i.interact.zoomed=!!e.zoomed,function(t,e,i){const n=t.w;if(null==e&&null==i)return;const s=n.globals.seriesNames||[],o=new Set([...e||[],...i||[]]),r=new Set([...n.globals.collapsedSeriesIndices||[],...n.globals.ancillaryCollapsedSeriesIndices||[]]);for(let e=0;e<s.length;e++){const i=s[e];if(null==i)continue;const n=o.has(e),a=r.has(e);n&&!a?t.hideSeries(i):!n&&a&&t.showSeries(i)}}(t,e.collapsed,e.ancillaryCollapsed),e.annotations&&Array.isArray(e.annotations.dynamic)&&e.annotations.dynamic.forEach(e=>{const i=function(t){switch(t){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(e.kind);i&&"function"==typeof t[i]&&t[i](e.params,!0)}),function(t,e){Array.isArray(e)&&(t.w.interact.selectedDataPoints=l(e))}(t,e.selectedDataPoints),e.locale&&e.locale!==i.config.chart.defaultLocale&&t.setLocale(e.locale),t.measure&&"function"==typeof t.measure.setPins&&t.measure.setPins(e.measure&&e.measure.pins||[])}s.default.registerFeatures({history:class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){const t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=null!=e.coalesceMs?e.coalesceMs:250,this.keyboard=!1!==e.keyboard}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}_wireKeyboard(){if(this._keydownTarget)return;const t=this.ctx.el,e=t&&t.ownerDocument;r.isBrowser()&&e&&(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&0===this.stack.length&&this._commit("initial",!0)}_onUpdated(){this._syncConfig(),this.enabled&&(this.applying?this._refreshSettle():this._schedule("update"))}_onSelection(){this.enabled&&!this.applying&&this._schedule("selection")}_onPointerDown(t){const e=this.ctx.el;this._engaged=!!(e&&t.target&&e.contains(t.target))}_onKeyDown(t){if(!t.metaKey&&!t.ctrlKey)return;const e=(t.key||"").toLowerCase();if("z"!==e&&"y"!==e)return;const i=this.ctx.el;if(!i)return;const n=i.ownerDocument,s=n&&n.activeElement;if(function(t){if(!t)return!1;const e=t.tagName;return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e||!0===t.isContentEditable}(s))return;if(!i.contains(s)&&!this._engaged)return;const o="y"===e||t.shiftKey;t.preventDefault(),o?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&r.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;const i=this._capture(t),n=this.stack[this.pointer];if(!n||n.sig!==i.sig){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(i),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){const e=function(t,e){var i,n;const s=t.config.xaxis||{},o=(Array.isArray(t.config.yaxis)?t.config.yaxis:t.config.yaxis?[t.config.yaxis]:[]).map(t=>a(t&&t.min,t&&t.max)),r=o.some(t=>null!==t),c=t.config.theme,u=e&&e.drilldown;return{v:1,window:{xaxis:a(s.min,s.max),yaxis:r?o:null},zoomed:!!t.interact.zoomed,collapsed:(t.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(t.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:l(t.interact.selectedDataPoints),theme:c?{mode:null!=(i=c.mode)?i:null,palette:null!=(n=c.palette)?n:null}:null,locale:t.config.chart&&t.config.chart.defaultLocale||null,annotations:h(t,e),drill:u&&u.depth>0?{path:u.path.slice()}:null,measure:d(e)}}(this.w,this.ctx),{config:i,seriesSig:n}=this._cloneConfigCOW();return{id:"hist-"+ ++this._counter,view:e,config:i,seriesSig:n,label:t||"change",at:r.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,i)}}_cloneConfigCOW(){const n=this.w,s=this.stack[this.pointer];let r=null;try{r=JSON.stringify(n.config.series)}catch(t){r=null}const a=this.ctx.responsive?this.ctx.responsive.withoutBreakpoints(n.config):n.config;let l;if(s&&null!==r&&s.seriesSig===r){const n=a,{series:r}=n,c=((n,s)=>{var o={};for(var r in n)e.call(n,r)&&s.indexOf(r)<0&&(o[r]=n[r]);if(null!=n&&t)for(var r of t(n))s.indexOf(r)<0&&i.call(n,r)&&(o[r]=n[r]);return o})(n,["series"]);l=o.clone(c),l.series=s.config.series}else l=o.clone(a);return{config:l,seriesSig:r}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch(t){return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;let i;this.applying=!0;try{this.ctx.clearAnnotations(),i=this.ctx.updateOptions(o.clone(t.config),!1,e,!1,!1)}catch(t){throw this.applying=!1,t}Promise.resolve(i).then(()=>{this.w.globals.isDestroyed?this.applying=!1:(u(this.ctx,t.view),this._refreshSettle(),this._emitChange())}).catch(()=>{this.applying=!1})}_refreshSettle(){r.isBrowser()?(clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)):this.applying=!1}snapshot(t){this.enabled&&!this.applying&&this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){const i=this.stack.findIndex(e=>e.id===t);-1!==i&&i!==this.pointer&&(this.pointer=i,this._restore(this.stack[i],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;const t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if("function"!=typeof t)return Promise.resolve();const i=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=i,i||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,i,n,s,o,r,a;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onMounted),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onUpdated),null==(o=(s=this.ctx).removeEventListener)||o.call(s,"scrolled",this._onUpdated),null==(a=(r=this.ctx).removeEventListener)||a.call(r,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>s.default});
@@ -14,7 +14,7 @@ var __objRest = (source, exclude) => {
14
14
  return target;
15
15
  };
16
16
  /*!
17
- * ApexCharts v8.2.0
17
+ * ApexCharts v8.3.0
18
18
  * (c) 2018-2026 ApexCharts
19
19
  */
20
20
  import * as _core from "apexcharts/core";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  !function(t){var e="undefined"!=typeof globalThis?globalThis:self,i=e.ApexCharts;if(i&&i.__internals)return t.call(e);if(i)throw new Error("ApexCharts: dist/features/history.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return t.call(e);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/history.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/features/history.js",run:t,done:!1},s=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);s.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var i=e.ApexCharts;if(i)if(i.__internals){n.done=!0;var o=s.indexOf(n);-1!==o&&s.splice(o,1);try{t.call(e),i.__drainsAddons||e.console.warn("ApexCharts: dist/features/history.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(t){e.console.error("ApexCharts: dist/features/history.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/features/history.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else e.console.warn("ApexCharts: dist/features/history.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var t,e;t=this,e=function(t){"use strict";var e=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;const s=globalThis.ApexCharts,o=globalThis.ApexCharts.__internals.__apex_Utils,a=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function r(t,e){const i=null!=t,n=null!=e;return i||n?{min:i?t:null,max:n?e:null}:null}function h(t){return Array.isArray(t)?t.map(t=>Array.isArray(t)?t.slice():t):[]}function l(t,e){return"function"==typeof t&&e?t===e.addXaxisAnnotation?"xaxis":t===e.addYaxisAnnotation?"yaxis":t===e.addPointAnnotation?"point":null:null}function c(t,e){const i=t.config.annotations?o.clone(t.config.annotations):null,n=[],s=t.globals.memory&&t.globals.memory.methodsToExec||[];for(const t of s){if(!t||"addAnnotation"!==t.label)continue;const i=l(t.method,e);i&&n.push({kind:i,params:o.clone(t.params)})}return{static:i,dynamic:n}}function d(t){const e=t&&t.measure;if(!e||"function"!=typeof e.getPins)return null;const i=e.getPins();return Array.isArray(i)&&i.length?{pins:i}:null}function u(t,e){if(!t||!e)return;const i=t.w;i.interact.zoomed=!!e.zoomed,function(t,e,i){const n=t.w;if(null==e&&null==i)return;const s=n.globals.seriesNames||[],o=new Set([...e||[],...i||[]]),a=new Set([...n.globals.collapsedSeriesIndices||[],...n.globals.ancillaryCollapsedSeriesIndices||[]]);for(let e=0;e<s.length;e++){const i=s[e];if(null==i)continue;const n=o.has(e),r=a.has(e);n&&!r?t.hideSeries(i):!n&&r&&t.showSeries(i)}}(t,e.collapsed,e.ancillaryCollapsed),e.annotations&&Array.isArray(e.annotations.dynamic)&&e.annotations.dynamic.forEach(e=>{const i=function(t){switch(t){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(e.kind);i&&"function"==typeof t[i]&&t[i](e.params,!0)}),function(t,e){Array.isArray(e)&&(t.w.interact.selectedDataPoints=h(e))}(t,e.selectedDataPoints),e.locale&&e.locale!==i.config.chart.defaultLocale&&t.setLocale(e.locale),t.measure&&"function"==typeof t.measure.setPins&&t.measure.setPins(e.measure&&e.measure.pins||[])}s.registerFeatures({history:class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){const t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=null!=e.coalesceMs?e.coalesceMs:250,this.keyboard=!1!==e.keyboard}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}_wireKeyboard(){if(this._keydownTarget)return;const t=this.ctx.el,e=t&&t.ownerDocument;a.isBrowser()&&e&&(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&0===this.stack.length&&this._commit("initial",!0)}_onUpdated(){this._syncConfig(),this.enabled&&(this.applying?this._refreshSettle():this._schedule("update"))}_onSelection(){this.enabled&&!this.applying&&this._schedule("selection")}_onPointerDown(t){const e=this.ctx.el;this._engaged=!!(e&&t.target&&e.contains(t.target))}_onKeyDown(t){if(!t.metaKey&&!t.ctrlKey)return;const e=(t.key||"").toLowerCase();if("z"!==e&&"y"!==e)return;const i=this.ctx.el;if(!i)return;const n=i.ownerDocument,s=n&&n.activeElement;if(function(t){if(!t)return!1;const e=t.tagName;return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e||!0===t.isContentEditable}(s))return;if(!i.contains(s)&&!this._engaged)return;const o="y"===e||t.shiftKey;t.preventDefault(),o?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&a.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;const i=this._capture(t),n=this.stack[this.pointer];if(!n||n.sig!==i.sig){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(i),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){const e=function(t,e){var i,n;const s=t.config.xaxis||{},o=(Array.isArray(t.config.yaxis)?t.config.yaxis:t.config.yaxis?[t.config.yaxis]:[]).map(t=>r(t&&t.min,t&&t.max)),a=o.some(t=>null!==t),l=t.config.theme,u=e&&e.drilldown;return{v:1,window:{xaxis:r(s.min,s.max),yaxis:a?o:null},zoomed:!!t.interact.zoomed,collapsed:(t.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(t.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:h(t.interact.selectedDataPoints),theme:l?{mode:null!=(i=l.mode)?i:null,palette:null!=(n=l.palette)?n:null}:null,locale:t.config.chart&&t.config.chart.defaultLocale||null,annotations:c(t,e),drill:u&&u.depth>0?{path:u.path.slice()}:null,measure:d(e)}}(this.w,this.ctx),{config:i,seriesSig:n}=this._cloneConfigCOW();return{id:"hist-"+ ++this._counter,view:e,config:i,seriesSig:n,label:t||"change",at:a.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,i)}}_cloneConfigCOW(){const t=this.w,s=this.stack[this.pointer];let a=null;try{a=JSON.stringify(t.config.series)}catch(t){a=null}const r=this.ctx.responsive?this.ctx.responsive.withoutBreakpoints(t.config):t.config;let h;if(s&&null!==a&&s.seriesSig===a){const t=r,{series:a}=t,l=((t,s)=>{var o={};for(var a in t)i.call(t,a)&&s.indexOf(a)<0&&(o[a]=t[a]);if(null!=t&&e)for(var a of e(t))s.indexOf(a)<0&&n.call(t,a)&&(o[a]=t[a]);return o})(t,["series"]);h=o.clone(l),h.series=s.config.series}else h=o.clone(r);return{config:h,seriesSig:a}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch(t){return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;let i;this.applying=!0;try{this.ctx.clearAnnotations(),i=this.ctx.updateOptions(o.clone(t.config),!1,e,!1,!1)}catch(t){throw this.applying=!1,t}Promise.resolve(i).then(()=>{this.w.globals.isDestroyed?this.applying=!1:(u(this.ctx,t.view),this._refreshSettle(),this._emitChange())}).catch(()=>{this.applying=!1})}_refreshSettle(){a.isBrowser()?(clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)):this.applying=!1}snapshot(t){this.enabled&&!this.applying&&this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){const i=this.stack.findIndex(e=>e.id===t);-1!==i&&i!==this.pointer&&(this.pointer=i,this._restore(this.stack[i],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;const t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if("function"!=typeof t)return Promise.resolve();const i=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=i,i||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,i,n,s,o,a,r;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onMounted),null==(n=(i=this.ctx).removeEventListener)||n.call(i,"updated",this._onUpdated),null==(o=(s=this.ctx).removeEventListener)||o.call(s,"scrolled",this._onUpdated),null==(r=(a=this.ctx).removeEventListener)||r.call(a,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}}}),t.default=s,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexHistory={})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function t(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const n in t)if("default"!==n){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}return e.default=t,Object.freeze(e)}const e=t(require("apexcharts/core")),n=e.__apex_Utils,i=e.__apex_Options,a=e.__apex_tooltip_Utils,s=["point","xaxis","yaxis"],o=[10,11,12,14,17,20],r=["circle","square","diamond","triangle"],l={circle:"\u25cf",square:"\u25a0",diamond:"\u25c6",triangle:"\u25b2"},c=["#ffffff","#334155","#2563eb","#16a34a","#d97706","#dc2626"];class d{constructor(t,e){this.w=t,this.ctx=e,this._wired=!1,this._drag=null,this._editor=null,this._creating=!1,this._createSeq=0,this._attach=this._attach.bind(this),this._onRerender=this._onRerender.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onCreateClick=this._onCreateClick.bind(this),this._onDocDownEditor=this._onDocDownEditor.bind(this),(this._enabledGlobally()||this._hasDraggable()||this._paletteEnabled())&&this._wire()}_enabledGlobally(){const t=this.w.config.chart.ink;return!(!t||!t.enabled)}_paletteEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.palette)}_snapEnabled(){const t=this.w.config.chart.ink;return!(!t||!t.snap)}_nearest(t,e){let n=t,i=1/0;for(let a=0;a<e.length;a++){const s=Math.abs(e[a]-t);s<i&&(i=s,n=e[a])}return n}_snapX(t){if(!this._snapEnabled()||"number"!=typeof t)return t;const e=this.w.globals.xAxisScale;return e&&Array.isArray(e.result)&&e.result.length?this._nearest(t,e.result):t}_snapY(t,e){if(!this._snapEnabled()||"number"!=typeof t)return t;const n=this.w.globals.yAxisScale,i=n&&n[e];return i&&Array.isArray(i.result)&&i.result.length?this._nearest(t,i.result):t}_annoList(t){const e=this.w.config.annotations;if(!e)return[];const n="point"===t?"points":t;return Array.isArray(e[n])?e[n]:[]}_isDraggable(t){return!!t&&(!0===t.draggable||!1!==t.draggable&&this._enabledGlobally())}_hasDraggable(){return s.some(t=>this._annoList(t).some(t=>this._isDraggable(t)))}_wire(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onRerender),this.ctx.addEventListener("updated",this._onRerender))}_onRerender(){if(this._closeEditor(!1),this._attach(),this._creating){const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0))}}_attach(){const t=this.w,e=t.dom.baseEl;e&&(s.forEach(n=>{this._annoList(n).forEach((i,a)=>{this._isDraggable(i)&&(i.id||(i.id="apexcharts-ink-"+n+"-"+a+"-"+t.globals.chartID),e.querySelectorAll("."+i.id).forEach(t=>{t.__inkBound||(t.__inkBound=!0,t.style.cursor="move",t.classList.add("apexcharts-ink-draggable"),t.addEventListener("mousedown",t=>this._onDown(t,n,a)),t.addEventListener("touchstart",t=>this._onDown(t,n,a)),t.addEventListener("dblclick",t=>{t.preventDefault(),t.stopPropagation(),this._startEdit(n,a,{select:!0})}))}))})}),this._paletteEnabled()&&this._renderPalette())}_onDown(t,e,n){if(t.button&&0!==t.button)return;const i=this.w,a=i.dom.baseEl&&i.dom.baseEl.ownerDocument;if(!a)return;t.stopPropagation(),t.cancelable&&t.preventDefault();const s="touchstart"===t.type?t.touches[0]:t,o=i.dom.Paper&&i.dom.Paper.node,r=o&&o.getScreenCTM?o.getScreenCTM():null,l=this._annoList(e)[n];let c="move",d=null,h=0,p=0;if("xaxis"===e&&null!=l.x2&&(d=i.dom.baseEl.querySelector(".apexcharts-annotation-rect."+l.id),d)){const t=d.getBoundingClientRect();Math.abs(s.clientX-t.left)<=8?c="resize-x1":Math.abs(s.clientX-t.right)<=8&&(c="resize-x2"),h=parseFloat(d.getAttribute("x"))||0,p=parseFloat(d.getAttribute("width"))||0}this._drag={type:e,index:n,anno:l,els:Array.from(i.dom.baseEl.querySelectorAll("."+l.id)),mode:c,rect:d,origX:h,origW:p,startX:s.clientX,startY:s.clientY,scaleX:r&&r.a?r.a:1,scaleY:r&&r.d?r.d:1,dxPixel:0,dyPixel:0,moved:!1},a.addEventListener("mousemove",this._onMove),a.addEventListener("touchmove",this._onMove,{passive:!1}),a.addEventListener("mouseup",this._onUp),a.addEventListener("touchend",this._onUp)}_onMove(t){const e=this._drag;if(!e)return;t.cancelable&&t.preventDefault();const n="touchmove"===t.type?t.touches[0]:t;if(e.dxPixel=(n.clientX-e.startX)/e.scaleX,e.dyPixel=(n.clientY-e.startY)/e.scaleY,(Math.abs(e.dxPixel)>2||Math.abs(e.dyPixel)>2)&&(e.moved=!0),"move"===e.mode){const t=`translate(${e.dxPixel} ${e.dyPixel})`;e.els.forEach(e=>e.setAttribute("transform",t))}else e.rect&&("resize-x1"===e.mode?(e.rect.setAttribute("x",e.origX+e.dxPixel),e.rect.setAttribute("width",Math.max(1,e.origW-e.dxPixel))):"resize-x2"===e.mode&&e.rect.setAttribute("width",Math.max(1,e.origW+e.dxPixel)))}_onUp(){const t=this._drag;if(this._drag=null,this._teardownDocListeners(),!t||!t.moved)return void(t&&(t.els.forEach(t=>t.removeAttribute("transform")),this._startEdit(t.type,t.index)));const e=this._annoList(t.type)[t.index];e&&(this._applyDelta(t,e),t.els.forEach(t=>t.removeAttribute("transform")),this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:drag"),this._fireDragged(t.type,e,t.index))}_checkpoint(t){var e,n;null==(n=null==(e=this.ctx.history)?void 0:e.snapshot)||n.call(e,t)}_applyDelta(t,e){const n=this.w,i=n.layout.gridWidth?t.dxPixel*(n.globals.xRange/n.layout.gridWidth):0;if("point"===t.type){const{newX:i,newY:a}=this._invertPoint(e,t.dxPixel,t.dyPixel);if(e.x=this._snapX(i),null!=a){const t=e.yAxisIndex||0,i=n.globals.seriesYAxisMap;e.y=this._snapY(a,i&&i[t]?i[t][0]:0)}return}if("xaxis"!==t.type){if("yaxis"===t.type){const i=e.yAxisIndex||0,a=n.globals.seriesYAxisMap,s=a&&a[i]?a[i][0]:0,o=n.globals.yRange?n.globals.yRange[s]:null;if(null==o||!n.layout.gridHeight)return;const r=-t.dyPixel*(o/n.layout.gridHeight);"number"==typeof e.y2?("number"==typeof e.y&&(e.y+=r),e.y2+=r):"number"==typeof e.y&&(e.y=this._snapY(e.y+r,s))}}else{if("number"!=typeof e.x)return;if("move"===t.mode)"number"==typeof e.x2?(e.x+=i,e.x2+=i):e.x=this._snapX(e.x+i);else if("resize-x1"===t.mode||"resize-x2"===t.mode){const n=null==e.x2||e.x<=e.x2;("resize-x2"===t.mode?!n:n)?e.x=this._snapX(e.x+i):"number"==typeof e.x2&&(e.x2=this._snapX(e.x2+i))}}}_invertPoint(t,e,n){const i=this.w,a=("category"===i.config.xaxis.type||i.config.xaxis.convertedCatToNumeric)&&!i.axisFlags.dataFormatXNumeric;let s=t.x;!a&&"number"==typeof t.x&&i.layout.gridWidth&&(s=t.x+e*(i.globals.xRange/i.layout.gridWidth));let o=t.y;const r=t.yAxisIndex||0,l=i.globals.seriesYAxisMap,c=l&&l[r]?l[r][0]:0,d=i.globals.yRange?i.globals.yRange[c]:null,h=i.config.yaxis[r]&&i.config.yaxis[r].logarithmic;return"number"==typeof t.y&&null!=d&&!h&&i.layout.gridHeight&&(o=t.y-n*(d/i.layout.gridHeight)),{newX:s,newY:o}}_redrawAnno(t,e,n){const i=this.w.dom.baseEl,a=this.ctx.annotations;if(!i||!a)return;i.querySelectorAll("."+e.id).forEach(t=>t.remove());const s=i.querySelector(".apexcharts-"+t+"-annotations");if(!s)return;"point"===t&&a.pointsAnnotations?a.pointsAnnotations.addPointAnnotation(e,s,n):"xaxis"===t&&a.xAxisAnnotations?a.xAxisAnnotations.addXaxisAnnotation(e,s,n):"yaxis"===t&&a.yAxisAnnotations&&a.yAxisAnnotations.addYaxisAnnotation(e,s,n);const o=i.querySelector(".apexcharts-"+t+"-annotation-label."+e.id);if(o&&a.helpers&&e.label&&e.label.text){const t=a.helpers.addBackgroundToAnno(o,e);t&&o.parentNode&&o.parentNode.insertBefore(t.node,o)}this._attach()}_fireAnnotationEvent(t,e){var n;const i=this.w.config.chart.events;"function"==typeof i[t]&&i[t](this.ctx,e),null==(n=this.ctx.events)||n.fireEvent(t,[this.ctx,e])}_fireDragged(t,e,n){const i={type:t,id:e.id,index:n,x:e.x,y:e.y};null!=e.x2&&(i.x2=e.x2),null!=e.y2&&(i.y2=e.y2),this._fireAnnotationEvent("annotationDragged",i)}startCreate(){if(this._creating)return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(this._creating=!0,t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0),this._syncPalette())}stopCreate(){if(!this._creating)return;this._creating=!1;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="",t.removeEventListener("click",this._onCreateClick,!0)),this._syncPalette()}_onCreateClick(t){if(!this._creating)return;t.preventDefault(),t.stopPropagation();const e=this._pixelToData(t.clientX,t.clientY);this.stopCreate(),e&&this.createAt(e.x,e.y)}createAt(t,e,a={}){const s=this.w;this._wire(),this._createSeq+=1;const o="apexcharts-ink-new-"+this._createSeq+"-"+s.globals.chartID,r=n.extend((new i).pointAnnotation,{x:t,y:e,id:o,owner:"ink",draggable:!0,label:{text:a.text||"Note"}});s.config.annotations||(s.config.annotations={}),Array.isArray(s.config.annotations.points)||(s.config.annotations.points=[]),s.config.annotations.points.push(r);const l=s.config.annotations.points.length-1;return this._redrawAnno("point",r,l),this._checkpoint("ink:create"),this._fireCreated("point",r,l),this._startEdit("point",l,{select:!0}),r}createLineAt(t,e,a={}){const s=this.w;this._wire(),this._createSeq+=1;const o="apexcharts-ink-new-"+this._createSeq+"-"+s.globals.chartID,r="y"===t?"yaxis":"xaxis",l="yaxis"===r?(new i).yAxisAnnotation:(new i).xAxisAnnotation,c={id:o,owner:"ink",draggable:!0,strokeDashArray:null!=a.strokeDashArray?a.strokeDashArray:4,label:{text:a.text||""}};a.color&&(c.borderColor=a.color,c.label.borderColor=a.color),"yaxis"===r?c.y=e:c.x=e;const d=n.extend(l,c);s.config.annotations||(s.config.annotations={}),Array.isArray(s.config.annotations[r])||(s.config.annotations[r]=[]),s.config.annotations[r].push(d);const h=s.config.annotations[r].length-1;return this._redrawAnno(r,d,h),this._checkpoint("ink:create"),this._fireCreated(r,d,h),!1!==a.select&&this._startEdit(r,h,{select:!0}),d}_pixelToData(t,e){const n=this.w;if(!n.globals.axisCharts||!n.dom.baseEl||!n.dom.baseEl.querySelector(".apexcharts-svg"))return null;const i=a.plotRect(n);if(!i.width||!i.height)return null;const s=(t-i.left)/i.width,o=(e-i.top)/i.height;let r=n.globals.minX+s*n.globals.xRange;const l=(n.globals.minYArr&&null!=n.globals.minYArr[0]?n.globals.minYArr[0]:n.globals.minY)+(1-o)*(n.globals.yRange&&null!=n.globals.yRange[0]?n.globals.yRange[0]:n.globals.maxY-n.globals.minY);return("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric)&&!n.axisFlags.dataFormatXNumeric&&(r=Math.round(r)),{x:r,y:l}}_fireCreated(t,e,n){const i={type:t,id:e.id,index:n};void 0!==e.x&&(i.x=e.x),void 0!==e.y&&(i.y=e.y),this._fireAnnotationEvent("annotationCreated",i)}_renderPalette(){const t=this.w.dom.elWrap;if(!t||t.querySelector(".apexcharts-ink-palette"))return;const e=t.ownerDocument,n=e.createElement("div");n.className="apexcharts-ink-palette";const i=n.style;i.position="absolute",i.top="6px",i.left="6px",i.zIndex="15";const a=e.createElement("button");a.type="button",a.className="apexcharts-ink-add",a.textContent="+ Note";const s=a.style;s.cursor="pointer",s.font="12px sans-serif",s.padding="4px 9px",s.borderRadius="5px",s.border="1px solid #6366f1",s.color="#4338ca",s.background="#fff",a.addEventListener("click",t=>{t.stopPropagation(),this._creating?this.stopCreate():this.startCreate()}),n.appendChild(a),t.appendChild(n),this._syncPalette()}_syncPalette(){const t=this.w.dom.elWrap,e=t&&t.querySelector(".apexcharts-ink-add");e&&(this._creating?(e.style.background="#6366f1",e.style.color="#fff",e.textContent="Click chart..."):(e.style.background="#fff",e.style.color="#4338ca",e.textContent="+ Note"))}_noteColors(){const t=this.w.config.chart.ink;return t&&Array.isArray(t.noteColors)&&t.noteColors.length?t.noteColors:c}static _isLight(t){const e=String(t||"").replace("#",""),n=3===e.length?e.split("").map(t=>t+t).join(""):e,i=parseInt(n,16);if(isNaN(i)||6!==n.length)return!1;return(.299*(i>>16&255)+.587*(i>>8&255)+.114*(255&i))/255>.72}static _isBold(t){const e=t&&t.fontWeight;return"bold"===e||parseInt(String(e),10)>=600}_cardBtn(t,e,n,i,a,s){const o=t.createElement("button");return o.type="button",o.className="apexcharts-ink-btn"+(a?" "+a:""),o.title=n,o.setAttribute("aria-label",n),s?o.innerHTML=e:o.textContent=e,o.addEventListener("mousedown",t=>t.preventDefault()),o.addEventListener("click",t=>{t.stopPropagation(),i()}),o}_cardLabel(t,e){const n=t.createElement("span");return n.className="apexcharts-ink-cardlabel",n.textContent=e,n}_mkSwatch(t,e,n,i){const a=t.createElement("button");return a.type="button",a.className="apexcharts-ink-swatch"+(i?" "+i:""),a.title=e,a.setAttribute("aria-label","Color "+e),a.dataset.color=e,a.style.background=e,a.addEventListener("mousedown",t=>t.preventDefault()),a.addEventListener("click",t=>{t.stopPropagation(),n(e)}),a}_startEdit(t,e,n={}){const i=this.w,a=this._annoList(t)[e],s=i.dom.baseEl,o=i.dom.elWrap;if(!(a&&a.id&&s&&o))return;this._closeEditor(!1);const r=s.ownerDocument,c=r.createElement("div");c.className="apexcharts-ink-card",c.setAttribute("role","dialog"),c.setAttribute("aria-label","Edit note"),c.style.visibility="hidden";const d=r.createElement("div");d.className="apexcharts-ink-card-row";const h=r.createElement("input");h.type="text",h.className="apexcharts-ink-editor",h.placeholder="Note text",h.value=a.label&&a.label.text||"",d.appendChild(h),d.appendChild(this._cardBtn(r,'<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/></svg>',"Delete note",()=>this._deleteAnno(),"apexcharts-ink-btn--delete",!0)),c.appendChild(d);const p=r.createElement("div");p.className="apexcharts-ink-card-row","point"!==t&&p.appendChild(this._cardLabel(r,"Label")),this._noteColors().forEach(t=>{p.appendChild(this._mkSwatch(r,t,t=>this._applyColor(t)))});const _=r.createElement("span");if(_.className="apexcharts-ink-sep",p.appendChild(_),p.appendChild(this._cardBtn(r,"B","Bold",()=>this._toggleBold(),"apexcharts-ink-btn--bold")),p.appendChild(this._cardBtn(r,"A-","Smaller text",()=>this._stepFont(-1))),p.appendChild(this._cardBtn(r,"A+","Larger text",()=>this._stepFont(1))),c.appendChild(p),"point"!==t){const t=r.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(r,"Line")),this._noteColors().forEach(e=>{t.appendChild(this._mkSwatch(r,e,t=>this._applyLineColor(t),"apexcharts-ink-swatch--line"))}),c.appendChild(t)}if("point"===t){const t=r.createElement("div");t.className="apexcharts-ink-card-row",t.appendChild(this._cardLabel(r,"Marker")),t.appendChild(this._cardBtn(r,"-","Smaller marker",()=>this._stepMarker(-1)));const e=r.createElement("span");e.className="apexcharts-ink-marker-size",t.appendChild(e),t.appendChild(this._cardBtn(r,"+","Larger marker",()=>this._stepMarker(1))),t.appendChild(this._cardBtn(r,l.circle,"Marker shape",()=>this._cycleShape(),"apexcharts-ink-btn--shape")),c.appendChild(t)}o.appendChild(c),this._editor={card:c,input:h,type:t,index:e},this._positionCard(),this._syncCard(),c.style.visibility="",h.focus(),n.select&&h.select(),c.addEventListener("keydown",t=>{"Escape"===t.key?(t.preventDefault(),t.stopPropagation(),this._closeEditor(!1)):"Enter"===t.key&&t.target===h&&(t.preventDefault(),this._closeEditor(!0))}),r.addEventListener("mousedown",this._onDocDownEditor,!0),r.addEventListener("touchstart",this._onDocDownEditor,!0)}_onDocDownEditor(t){const e=this._editor;e&&!e.card.contains(t.target)&&this._closeEditor(!0)}_positionCard(){const t=this._editor;if(!t)return;const e=this.w,n=e.dom.baseEl,i=e.dom.elWrap,a=this._annoList(t.type)[t.index];if(!n||!i||!a)return;const s=n.querySelector(".apexcharts-"+t.type+"-annotation-label."+a.id)||n.querySelector("."+a.id);if(!s)return;const o=i.getBoundingClientRect(),r=s.getBoundingClientRect(),l=t.card.offsetWidth,c=t.card.offsetHeight;let d=Math.round(r.left-o.left),h=Math.round(r.bottom-o.top)+8;h+c>i.clientHeight-4&&(h=Math.round(r.top-o.top)-c-8),d+l>i.clientWidth-4&&(d=i.clientWidth-l-4),t.card.style.left=Math.max(4,d)+"px",t.card.style.top=Math.max(4,h)+"px"}_syncCard(){const t=this._editor;if(!t)return;const e=this._annoList(t.type)[t.index];if(!e)return;const n=e.label&&e.label.style||{},i=String(n.background||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===i)});const a=String(e.borderColor||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch--line").forEach(t=>{t.classList.toggle("apexcharts-ink-swatch--active",(t.dataset.color||"").toLowerCase()===a)});const s=t.card.querySelector(".apexcharts-ink-btn--bold");s&&s.classList.toggle("apexcharts-ink-btn--active",d._isBold(n));const o=e.marker||{},r=t.card.querySelector(".apexcharts-ink-marker-size");r&&(r.textContent=String("number"==typeof o.size?o.size:4));const c=t.card.querySelector(".apexcharts-ink-btn--shape");c&&(c.textContent=l[o.shape]||l.circle)}_commitTextOf(t){const e=this._annoList(t.type)[t.index];if(!e)return;const n=t.input.value;e.label||(e.label={}),e.label.text!==n&&(e.label.text=n,this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:edit"),this._fireEdited(t.type,e,t.index))}_closeEditor(t){const e=this._editor;if(!e)return;this._editor=null;const n=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;n&&(n.removeEventListener("mousedown",this._onDocDownEditor,!0),n.removeEventListener("touchstart",this._onDocDownEditor,!0)),e.card.parentNode&&e.card.parentNode.removeChild(e.card),t&&this._commitTextOf(e)}_applyStyle(t,e){const n=this._editor;if(!n)return;const i=this._annoList(n.type)[n.index];i&&(this._commitTextOf(n),i.label||(i.label={}),i.label.style||(i.label.style={}),e(i),this._redrawAnno(n.type,i,n.index),this._checkpoint(t),this._fireStyled(n.type,i,n.index),this._syncCard(),this._positionCard())}_applyColor(t){const e=this._editor;if(!e)return;const n=d._isLight(t);this._applyStyle("ink:style",i=>{i.label.style.background=t,i.label.style.color=n?"#334155":"#ffffff",i.label.borderColor=n?"#cbd5e1":t,"point"===e.type&&(i.marker||(i.marker={}),i.marker.strokeColor=n?"#334155":t,i.marker.fillColor=n?"#ffffff":t)})}_applyLineColor(t){const e=this._editor;e&&"point"!==e.type&&this._applyStyle("ink:style",e=>{e.borderColor=t,null==e.x2&&null==e.y2||(e.fillColor=t)})}_stepFont(t){this._applyStyle("ink:style",e=>{const n=parseFloat(e.label.style.fontSize)||11;let i=0;for(let t=1;t<o.length;t++)Math.abs(o[t]-n)<Math.abs(o[i]-n)&&(i=t);i=Math.min(o.length-1,Math.max(0,i+t)),e.label.style.fontSize=o[i]+"px"})}_toggleBold(){this._applyStyle("ink:style",t=>{t.label.style.fontWeight=d._isBold(t.label.style)?400:700})}_stepMarker(t){this._applyStyle("ink:style",e=>{e.marker||(e.marker={});const n="number"==typeof e.marker.size?e.marker.size:4;e.marker.size=Math.min(14,Math.max(2,n+t))})}_cycleShape(){this._applyStyle("ink:style",t=>{t.marker||(t.marker={});const e=r.indexOf(t.marker.shape);t.marker.shape=r[(e+1)%r.length]})}_deleteAnno(){const t=this._editor;if(!t)return;const e=this._annoList(t.type),n=e[t.index];if(this._closeEditor(!1),!n)return;const i=this.w.dom.baseEl;i&&n.id&&i.querySelectorAll("."+n.id).forEach(t=>t.remove()),e.splice(t.index,1);for(let n=t.index;n<e.length;n++)this._redrawAnno(t.type,e[n],n);this._checkpoint("ink:delete"),this._fireDeleted(t.type,n,t.index)}_fireEdited(t,e,n){const i={type:t,id:e.id,index:n,text:e.label?e.label.text:""};this._fireAnnotationEvent("annotationEdited",i)}_fireStyled(t,e,n){const i={type:t,id:e.id,index:n,label:e.label,marker:e.marker};this._fireAnnotationEvent("annotationStyled",i)}_fireDeleted(t,e,n){const i={type:t,id:e.id,index:n};this._fireAnnotationEvent("annotationDeleted",i)}_teardownDocListeners(){const t=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchend",this._onUp))}teardown(){var t,e,n,i;this._teardownDocListeners(),this._closeEditor(!1),this.stopCreate(),this._drag=null,this._wired&&(null==(e=(t=this.ctx).removeEventListener)||e.call(t,"mounted",this._onRerender),null==(i=(n=this.ctx).removeEventListener)||i.call(n,"updated",this._onRerender),this._wired=!1)}}e.default.registerFeatures({ink:d}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>e.default});