apexcharts 8.2.0 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +19793 -19713
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +38 -8
  6. package/dist/apexcharts.esm.js +1882 -1625
  7. package/dist/apexcharts.full.js +22044 -21634
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +21414 -21124
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +21413 -21123
  13. package/dist/area.common.js +2 -2
  14. package/dist/area.esm.js +91 -40
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +478 -406
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +409 -334
  20. package/dist/bubble.common.js +2 -2
  21. package/dist/bubble.esm.js +91 -40
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +409 -334
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +478 -406
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +19793 -19713
  29. package/dist/donut.common.js +2 -2
  30. package/dist/donut.esm.js +3 -9
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +478 -406
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +442 -324
  35. package/dist/features/annotations.common.js +2 -2
  36. package/dist/features/annotations.esm.js +65 -48
  37. package/dist/features/annotations.js +2 -2
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +2 -2
  42. package/dist/features/drilldown.esm.js +4 -2
  43. package/dist/features/drilldown.js +2 -2
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +2 -2
  48. package/dist/features/exports.esm.js +10 -4
  49. package/dist/features/exports.js +2 -2
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +2 -2
  54. package/dist/features/highlight-filter.esm.js +14 -9
  55. package/dist/features/highlight-filter.js +2 -2
  56. package/dist/features/history.common.js +1 -1
  57. package/dist/features/history.esm.js +1 -1
  58. package/dist/features/history.js +1 -1
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +2 -2
  63. package/dist/features/keyboard.esm.js +97 -145
  64. package/dist/features/keyboard.js +2 -2
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +64 -44
  67. package/dist/features/legend.js +2 -2
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +2 -2
  78. package/dist/features/morph.esm.js +9 -5
  79. package/dist/features/morph.js +2 -2
  80. package/dist/features/perspectives.common.js +2 -2
  81. package/dist/features/perspectives.esm.js +4 -1
  82. package/dist/features/perspectives.js +2 -2
  83. package/dist/features/raincloud.common.js +2 -2
  84. package/dist/features/raincloud.esm.js +26 -27
  85. package/dist/features/raincloud.js +2 -2
  86. package/dist/features/renderer-canvas.common.js +2 -2
  87. package/dist/features/renderer-canvas.esm.js +2 -1
  88. package/dist/features/renderer-canvas.js +2 -2
  89. package/dist/features/stats.common.js +2 -2
  90. package/dist/features/stats.esm.js +52 -59
  91. package/dist/features/stats.js +2 -2
  92. package/dist/features/storyboard.common.js +2 -2
  93. package/dist/features/storyboard.esm.js +4 -1
  94. package/dist/features/storyboard.js +2 -2
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +48 -14
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +148 -18
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +150 -63
  103. package/dist/features/trellis.js +2 -2
  104. package/dist/features/waterfall.common.js +1 -1
  105. package/dist/features/waterfall.esm.js +1 -1
  106. package/dist/features/waterfall.js +1 -1
  107. package/dist/features/weave.common.js +2 -2
  108. package/dist/features/weave.esm.js +13 -12
  109. package/dist/features/weave.js +2 -2
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +1068 -842
  112. package/dist/heatmap.common.js +2 -2
  113. package/dist/heatmap.esm.js +3 -17
  114. package/dist/heatmap.js +2 -2
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +529 -464
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +80 -46
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +2 -2
  121. package/dist/line.esm.js +91 -40
  122. package/dist/line.js +2 -2
  123. package/dist/locales/en.json +2 -1
  124. package/dist/locales/ro.json +3 -2
  125. package/dist/pictograms.common.js +1 -1
  126. package/dist/pictograms.esm.js +1 -1
  127. package/dist/pictograms.js +1 -1
  128. package/dist/pie.common.js +2 -2
  129. package/dist/pie.esm.js +3 -9
  130. package/dist/pie.js +2 -2
  131. package/dist/polarArea.common.js +2 -2
  132. package/dist/polarArea.esm.js +3 -9
  133. package/dist/radar.common.js +2 -2
  134. package/dist/radar.esm.js +5 -4
  135. package/dist/radar.js +2 -2
  136. package/dist/radialBar.common.js +2 -2
  137. package/dist/radialBar.esm.js +5 -12
  138. package/dist/radialBar.js +2 -2
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +97 -52
  141. package/dist/rangeArea.common.js +2 -2
  142. package/dist/rangeArea.esm.js +91 -40
  143. package/dist/rangeBar.common.js +2 -2
  144. package/dist/rangeBar.esm.js +478 -406
  145. package/dist/scatter.common.js +2 -2
  146. package/dist/scatter.esm.js +91 -40
  147. package/dist/streamgraph.common.js +2 -2
  148. package/dist/streamgraph.esm.js +138 -53
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +116 -94
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +138 -104
  154. package/dist/treemap.js +2 -2
  155. package/dist/unit-shapes.common.js +1 -1
  156. package/dist/unit-shapes.esm.js +1 -1
  157. package/dist/unit-shapes.js +1 -1
  158. package/dist/unit.common.js +2 -2
  159. package/dist/unit.esm.js +280 -202
  160. package/dist/unit.js +2 -2
  161. package/dist/violin.common.js +2 -2
  162. package/dist/violin.esm.js +72 -26
  163. package/dist/violin.js +2 -2
  164. package/dist/waterfall.common.js +2 -2
  165. package/dist/waterfall.esm.js +477 -405
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +40 -59
  168. package/src/assets/apexcharts.css +38 -8
  169. package/src/charts/Bar.js +62 -55
  170. package/src/charts/BarStacked.js +80 -88
  171. package/src/charts/BoxCandleStick.js +28 -31
  172. package/src/charts/Icicle.js +68 -47
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Pie.js +2 -8
  175. package/src/charts/Radar.js +5 -7
  176. package/src/charts/Radial.js +2 -6
  177. package/src/charts/RangeBar.js +47 -43
  178. package/src/charts/Sunburst.js +101 -98
  179. package/src/charts/Treemap.js +150 -88
  180. package/src/charts/Unit.js +368 -250
  181. package/src/charts/Violin.js +48 -30
  182. package/src/charts/common/Breadcrumb.js +2 -2
  183. package/src/charts/common/Hierarchy.js +32 -11
  184. package/src/charts/common/Jitter.js +32 -7
  185. package/src/charts/common/Stats.js +30 -23
  186. package/src/charts/common/bar/DataLabels.js +76 -81
  187. package/src/charts/common/bar/Helpers.js +43 -7
  188. package/src/charts/common/line/Helpers.js +12 -15
  189. package/src/charts/common/partition/NodeTooltip.js +29 -7
  190. package/src/charts/common/partition/Partition.js +33 -1
  191. package/src/charts/common/treemap/Helpers.js +3 -11
  192. package/src/charts/common/treemap/Nested.js +2 -3
  193. package/src/features/raincloud.js +16 -10
  194. package/src/features/stats.js +67 -62
  195. package/src/locales/en.json +2 -1
  196. package/src/locales/ro.json +3 -2
  197. package/src/modules/Animations.js +102 -95
  198. package/src/modules/AxisMapping.js +47 -12
  199. package/src/modules/Core.js +4 -0
  200. package/src/modules/CoreUtils.js +18 -42
  201. package/src/modules/Data.js +23 -24
  202. package/src/modules/DataLabels.js +6 -6
  203. package/src/modules/Exports.js +12 -5
  204. package/src/modules/Fill.js +17 -8
  205. package/src/modules/Filters.js +50 -50
  206. package/src/modules/Graphics.js +69 -51
  207. package/src/modules/Markers.js +3 -1
  208. package/src/modules/MorphTypeChange.js +13 -7
  209. package/src/modules/Range.js +44 -29
  210. package/src/modules/RendererController.js +17 -3
  211. package/src/modules/Scales.js +32 -9
  212. package/src/modules/Series.js +41 -19
  213. package/src/modules/Theme.js +1 -1
  214. package/src/modules/Toolbar.js +3 -2
  215. package/src/modules/UnitMarkRegistry.js +0 -5
  216. package/src/modules/ZoomPanSelection.js +123 -2
  217. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  218. package/src/modules/animations/Easing.js +2 -1
  219. package/src/modules/animations/LengthTransition.js +22 -2
  220. package/src/modules/annotations/Helpers.js +68 -52
  221. package/src/modules/axes/Grid.js +21 -7
  222. package/src/modules/axes/YAxis.js +8 -9
  223. package/src/modules/dimensions/Dimensions.js +9 -3
  224. package/src/modules/dimensions/Grid.js +2 -2
  225. package/src/modules/dimensions/XAxis.js +2 -5
  226. package/src/modules/drilldown/Breadcrumb.js +5 -2
  227. package/src/modules/helpers/Destroy.js +1 -1
  228. package/src/modules/helpers/UpdateHelpers.js +33 -15
  229. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  230. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  231. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  232. package/src/modules/legend/Helpers.js +8 -1
  233. package/src/modules/legend/Legend.js +11 -12
  234. package/src/modules/license/LicenseEnforcer.js +5 -0
  235. package/src/modules/settings/Defaults.js +28 -56
  236. package/src/modules/settings/Globals.js +5 -0
  237. package/src/modules/settings/Options.js +7 -7
  238. package/src/modules/settings/TypeAliases.js +33 -16
  239. package/src/modules/streamgraph/StreamLabels.js +1 -0
  240. package/src/modules/tooltip/Labels.js +73 -76
  241. package/src/modules/tooltip/Marker.js +25 -21
  242. package/src/modules/tooltip/Position.js +88 -51
  243. package/src/modules/tooltip/Tooltip.js +242 -255
  244. package/src/modules/tooltip/Utils.js +71 -130
  245. package/src/modules/tooltip/constants.js +5 -5
  246. package/src/modules/trellis/Trellis.js +6 -0
  247. package/src/modules/trellis/TrellisChrome.js +18 -7
  248. package/src/modules/trellis/TrellisSync.js +2 -0
  249. package/src/modules/trellis/TrellisTooltip.js +2 -11
  250. package/src/modules/weave/WeaveHost.js +18 -12
  251. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  252. package/src/ssr/DOMShim.js +10 -0
  253. package/src/svg/SVGFilter.js +26 -17
  254. package/src/types/internal.d.ts +9 -3
  255. package/src/utils/Utils.js +0 -14
  256. package/types/apexcharts.d.ts +33 -12
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- !function(e){var t="undefined"!=typeof globalThis?globalThis:self,n=t.ApexCharts;if(n&&n.__internals)return e.call(t);if(n)throw new Error("ApexCharts: dist/features/perspectives.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/perspectives.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 i={file:"dist/features/perspectives.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var n=t.ApexCharts;if(n)if(n.__internals){i.done=!0;var r=s.indexOf(i);-1!==r&&s.splice(r,1);try{e.call(t),n.__drainsAddons||t.console.warn("ApexCharts: dist/features/perspectives.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/perspectives.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/perspectives.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/perspectives.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,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Utils,h=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function p(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function f(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function m(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function g(e,t){const n=e.config.annotations?u.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=m(e.method,t);n&&i.push({kind:n,params:u.clone(e.params)})}return{static:n,dynamic:i}}function y(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function v(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?u.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=t.window&&t.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=u.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)}),function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=f(t))}(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale),e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const b=globalThis.console;function x(e,...t){b.error(e,...t)}function w(e){b.warn(e)}const A="APEX-",_=new Date("2027-07-31T00:00:00Z"),S="__apex_license_v1__";function T(){const e=globalThis;let t=e[S];return t||(t={key:null,listeners:new Set,result:null},e[S]=t),t}const k=class{static get licenseKey(){return T().key}static set licenseKey(e){T().key=e}static get listeners(){return T().listeners}static get validationResult(){return T().result}static set validationResult(e){T().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||x(`[Apex] ${i.message}`)):w(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(l({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(A))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(A))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=_)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,w(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=c(l({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),x(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};k.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],k.verdicts=new Map,k.verifying=new Set,k.warnedUnverifiable=!1,k.epoch=0;let O=k;const C=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=O.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,O.onChange(()=>{this.reconcile()}))}};C.WATERMARK_ATTR="data-apexcharts-watermark",C.WATERMARK_TEXT="APEXCHARTS",C.ATTR="data-apexcharts-watermark",C.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},C.managed=new Set,C.subscribed=!1;let j=C;const R="https://apexcharts.com/pricing",D="__apexcharts_license_enforcer_v1__";globalThis[D]||(globalThis[D]={perspectivesTokenDecoded:!1,enforced:new Set});const E=globalThis[D],K=E.enforced;function P(){E.perspectivesTokenDecoded=!0,M()}const L=new Set(["premium","enterprise"]);function I(e,t){const n=j.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=j.node(t);e&&(i.disconnect(),j.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function $(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&j.remove(n,{manage:!1})}function W(e,t){try{if(!h.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void K.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||E.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return K.delete(t),void $(t,n);K.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=O.getKey();if(n)return n;const i=h.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=O.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&L.has(n.toLowerCase())}(s))return void $(t,n);!function(e,t){if(I(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{j.node(t)||I(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${R}`);const s=O.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${R}`)}t!==O.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function M(){if(!h.isBrowser())return;const e=new Set,t=h.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),W(n.w,n))}),Array.from(K).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||W(n,t):K.delete(t)})}O.onChange(M);const U="apex";function N(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function B(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class V{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>p(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,l=t&&t.drilldown;return{v:1,window:{xaxis:p(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:f(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:g(e,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:y(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return N(JSON.stringify(t))}decode(e){return V.decode(e)}toURL(){if(!h.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${U}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?V.decode(e):e;if(!n||!n.view)return;this._used=!0,W(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=u.extend(n.options?u.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{v(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,W(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(B(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(h.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===U);return i&&null!=i[1]?V.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:V,perspectivesStatics:{decode:e=>(P(),V.decode(e)),fromURL:e=>(P(),V.fromURL(e))}}),e.default=d,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).ApexPerspectives={})});
5
+ !function(e){var t="undefined"!=typeof globalThis?globalThis:self,n=t.ApexCharts;if(n&&n.__internals)return e.call(t);if(n)throw new Error("ApexCharts: dist/features/perspectives.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/perspectives.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 i={file:"dist/features/perspectives.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var n=t.ApexCharts;if(n)if(n.__internals){i.done=!0;var r=s.indexOf(i);-1!==r&&s.splice(r,1);try{e.call(t),n.__drainsAddons||t.console.warn("ApexCharts: dist/features/perspectives.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/perspectives.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/perspectives.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/perspectives.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,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Utils,h=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function p(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function f(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function m(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function g(e,t){const n=e.config.annotations?u.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=m(e.method,t);n&&i.push({kind:n,params:u.clone(e.params)})}return{static:n,dynamic:i}}function y(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function v(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?u.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=t.window&&t.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=u.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)}),function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=f(t))}(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale),e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const b=globalThis.console;function w(e,...t){b.error(e,...t)}function x(e){b.warn(e)}const _="APEX-",A=new Date("2027-07-31T00:00:00Z"),S="__apex_license_v1__";function T(){const e=globalThis;let t=e[S];return t||(t={key:null,listeners:new Set,result:null},e[S]=t),t}const k=class{static get licenseKey(){return T().key}static set licenseKey(e){T().key=e}static get listeners(){return T().listeners}static get validationResult(){return T().result}static set validationResult(e){T().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||w(`[Apex] ${i.message}`)):x(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(l({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(_))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(_))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=A)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,x(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=c(l({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),w(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};k.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],k.verdicts=new Map,k.verifying=new Set,k.warnedUnverifiable=!1,k.epoch=0;let O=k;const C=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=O.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,O.onChange(()=>{this.reconcile()}))}};C.WATERMARK_ATTR="data-apexcharts-watermark",C.WATERMARK_TEXT="APEXCHARTS",C.ATTR="data-apexcharts-watermark",C.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},C.managed=new Set,C.subscribed=!1;let j=C;const R="https://apexcharts.com/pricing",P="__apexcharts_license_enforcer_v1__";globalThis[P]||(globalThis[P]={perspectivesTokenDecoded:!1,enforced:new Set});const D=globalThis[P],E=D.enforced;function K(){D.perspectivesTokenDecoded=!0,M()}const L=new Set(["premium","enterprise"]);function I(e,t){const n=j.add(t,{manage:!1});if(e._wmPainted=!0,!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=j.node(t);e&&(i.disconnect(),j.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function $(e,t){if(!e._wmPainted)return;e._wmPainted=!1,e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&j.remove(n,{manage:!1})}function W(e,t){try{if(!h.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void E.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||D.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return E.delete(t),void $(t,n);E.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=O.getKey();if(n)return n;const i=h.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=O.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&L.has(n.toLowerCase())}(s))return void $(t,n);!function(e,t){if(I(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{j.node(t)||I(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${R}`);const s=O.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${R}`)}t!==O.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function M(){if(!h.isBrowser())return;const e=new Set,t=h.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),W(n.w,n))}),Array.from(E).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||W(n,t):E.delete(t)})}O.onChange(M);const U="apex";function N(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function B(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class V{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>p(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,l=t&&t.drilldown;return{v:1,window:{xaxis:p(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:f(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:g(e,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:y(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return N(JSON.stringify(t))}decode(e){return V.decode(e)}toURL(){if(!h.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${U}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?V.decode(e):e;if(!n||!n.view)return;this._used=!0,W(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=u.extend(n.options?u.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{v(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,W(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(B(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(h.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===U);return i&&null!=i[1]?V.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:V,perspectivesStatics:{decode:e=>(K(),V.decode(e)),fromURL:e=>(K(),V.fromURL(e))}}),e.default=d,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).ApexPerspectives={})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var r=Object.defineProperty,t=Object.defineProperties,e=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a=(r,t)=>{for(var e in t||(t={}))o.call(t,e)&&s(r,e,t[e]);if(n)for(var e of n(t))i.call(t,e)&&s(r,e,t[e]);return r},l=(r,n)=>t(r,e(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(r){if(r&&r.__esModule)return r;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r)for(const e in r)if("default"!==e){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}return t.default=r,Object.freeze(t)}const c=u(require("apexcharts/core")),y="__apexcharts_series_transforms__";globalThis[y]||(globalThis[y]={});const f=c.__apex_Utils;function p(r,t){const e=r.length;if(0===e)return NaN;if(1===e)return r[0];const n=(e-1)*t,o=Math.floor(n),i=Math.ceil(n);return o===i?r[o]:r[o]+(r[i]-r[o])*(n-o)}function d(r,t={}){if(!Array.isArray(r)||0===r.length)return null;const e=r.slice().sort((r,t)=>r-t),n=e.length;let o=t.bandwidth;if(!("number"==typeof o&&o>0)){const r=function(r){const t=r.length;if(t<2)return 0;let e=0;for(let n=0;n<t;n++)e+=r[n];const n=e/t;let o=0;for(let e=0;e<t;e++){const t=r[e]-n;o+=t*t}return Math.sqrt(o/t)}(e),t=p(e,.75)-p(e,.25);o=.9*(t>0?Math.min(r,t/1.349):r)*Math.pow(n,-.2)}if(!isFinite(o)||o<=0){const r=e[0],t=Math.abs(r)>0?.001*Math.abs(r):.001;return{density:[[r-t,0],[r,1],[r+t,0]],bandwidth:t}}const i=Math.max(8,Math.floor(t.resolution||64)),s=e[0]-2*o,a=(e[n-1]+2*o-s)/(i-1),l=1/(n*o*Math.sqrt(2*Math.PI)),u=[];for(let r=0;r<i;r++){const t=s+r*a;let i=0;for(let r=0;r<n;r++){const n=(t-e[r])/o;i+=Math.exp(-.5*n*n)}u.push([t,i*l])}return{density:u,bandwidth:o}}function h(r,t){var e,n;const o=null!=(e=r.statsDerived)?e:r.statsDerived={};return null!=(n=o[t])?n:o[t]=new Map}function b(r,t,e){const n=r.get(t);if(!n||!Array.isArray(e)||n.length!==e.length)return!1;for(let r=0;r<e.length;r++){const t=n[r],o=e[r];if(t!==o&&(!Array.isArray(t)||!Array.isArray(o)||t[0]!==o[0]||t[1]!==o[1]))return!1}return!0}function m(r,t){var e,n;if(!Array.isArray(r))return r;const o=(null==(e=t.config.plotOptions)?void 0:e.violin)||{},i=o.kde||{},s=(null==(n=o.box)?void 0:n.whiskers)||"minmax",u=h(t,"raincloudDensity"),c=h(t,"raincloudSummary");return r.map((r,t)=>{if(!Array.isArray(null==r?void 0:r.data)||r.type&&"raincloud"!==r.type&&"violin"!==r.type)return r;let e=!1;const n=r.data.map((r,n)=>{const o=t+":"+n,y=(null==r?void 0:r.y)&&"object"==typeof r.y&&!Array.isArray(r.y)?r.y:{},h=!Array.isArray(y.density)||!y.density.length||b(u,o,y.density),m=!Array.isArray(y.summary)||5!==y.summary.length||b(c,o,y.summary);if(!h&&!m)return r;const g=function(r){var t;if(!r||"object"!=typeof r||Array.isArray(r))return null;let e=null;if(Array.isArray(r.points)?e=r.points:Array.isArray(null==(t=r.y)?void 0:t.points)?e=r.y.points:Array.isArray(r.y)&&"number"==typeof r.y[0]&&(e=r.y),!e)return null;const n=[];for(let r=0;r<e.length;r++){const t=f.parseNumber(e[r]);null!==t&&isFinite(t)&&n.push(t)}return n.length?n:null}(r);if(!g)return r;const A=a({},y);if(h){const t=d(g,{bandwidth:i.bandwidth,resolution:i.resolution});if(!t)return r;A.density=t.density,A.points=g,u.set(o,t.density)}if(m){const r=function(r,t={}){if(!Array.isArray(r)||0===r.length)return null;const e=r.slice().sort((r,t)=>r-t),n=p(e,.25),o=p(e,.5),i=p(e,.75),s=i-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===t.whiskers&&s>0){const r=n-1.5*s,t=i+1.5*s;let o=0;for(;o<e.length&&e[o]<r;)o++;let c=e.length-1;for(;c>=0&&e[c]>t;)c--;o<=c&&(a=e[o],l=e[c],u=e.slice(0,o).concat(e.slice(c+1)))}return{summary:[a,n,o,i,l],outliers:u,iqr:s}}(g,{whiskers:s});r&&(A.summary=r.summary,c.set(o,r.summary))}return e=!0,l(a({},r),{y:A})});return e?l(a({},r),{data:n}):r})}var g,A;g="raincloud","function"==typeof(A=m)?globalThis[y][g]=A:console.warn(`ApexCharts: registerSeriesTransform("${g}") expects a function (series, w) => series.`),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.raincloudTransform=m;
5
+ "use strict";var t=Object.defineProperty,r=Object.defineProperties,e=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(r,e,n)=>e in r?t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,a=(t,r)=>{for(var e in r||(r={}))i.call(r,e)&&s(t,e,r[e]);if(n)for(var e of n(r))o.call(r,e)&&s(t,e,r[e]);return t},l=(t,n)=>r(t,e(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t){if(t&&t.__esModule)return t;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}return r.default=t,Object.freeze(r)}const c=u(require("apexcharts/core")),y="__apexcharts_series_transforms__";globalThis[y]||(globalThis[y]={});const f=c.__apex_Utils;function p(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,i=Math.floor(n),o=Math.ceil(n);return i===o?t[i]:t[i]+(t[o]-t[i])*(n-i)}function d(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=p(e,.25),i=p(e,.5),o=p(e,.75),s=o-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===r.whiskers&&s>0){const t=n-1.5*s,r=o+1.5*s;let i=0;for(;i<e.length&&e[i]<t;)i++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;i<=c&&(a=e[i],l=e[c],u=e.slice(0,i).concat(e.slice(c+1)))}return{summary:[a,n,i,o,l],outliers:u,iqr:s}}function h(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let i=r.bandwidth;if(!("number"==typeof i&&i>0)){const t=function(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let i=0;for(let e=0;e<r;e++){const r=t[e]-n;i+=r*r}return Math.sqrt(i/r)}(e),r=p(e,.75)-p(e,.25);i=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(i)||i<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const o=Math.max(8,Math.floor(r.resolution||64)),s=e[0]-2*i,a=(e[n-1]+2*i-s)/(o-1),l=1/(n*i*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<o;t++){const r=s+t*a;let o=0;for(let t=0;t<n;t++){const n=(r-e[t])/i;o+=Math.exp(-.5*n*n)}u.push([r,o*l])}return{density:u,bandwidth:i}}function b(t,r){const e=t.statsDerived||(t.statsDerived={});return e[r]||(e[r]=new Map)}function m(t,r,e,n,i){const o=JSON.stringify(n)+e;let s=t.get(r);return s&&s.s===o||t.set(r,s={s:o,e:i(e,n)}),s.e}function g(t,r,e){const n=(t.get(r)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(e)}function A(t,r){var e,n;if(!Array.isArray(t))return t;const i=(null==(e=r.config.plotOptions)?void 0:e.violin)||{},o=i.kde||{},s=(null==(n=i.box)?void 0:n.whiskers)||"minmax",u=b(r,"raincloudDensity"),c=b(r,"raincloudSummary");return t.map((t,r)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"raincloud"!==t.type&&"violin"!==t.type)return t;let e=!1;const n=t.data.map((t,n)=>{const i=r+":"+n,y=(null==t?void 0:t.y)&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{},p=!Array.isArray(y.density)||!y.density.length||g(u,i,y.density),b=!Array.isArray(y.summary)||5!==y.summary.length||g(c,i,y.summary);if(!p&&!b)return t;const A=function(t){var r;if(!t||"object"!=typeof t||Array.isArray(t))return null;let e=null;if(Array.isArray(t.points)?e=t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?e=t.y.points:Array.isArray(t.y)&&"number"==typeof t.y[0]&&(e=t.y),!e)return null;const n=[];for(let t=0;t<e.length;t++){const r=f.parseNumber(e[t]);null!==r&&isFinite(r)&&n.push(r)}return n.length?n:null}(t);if(!A)return t;const O=a({},y);if(p){const r=m(u,i,A,{bandwidth:o.bandwidth,resolution:o.resolution},h);if(!r)return t;O.density=r.density,O.points=A}if(b){const t=m(c,i,A,{whiskers:s},d);t&&(O.summary=t.summary)}return e=!0,l(a({},t),{y:O})});return e?l(a({},t),{data:n}):t})}var O,v;O="raincloud","function"==typeof(v=A)?globalThis[y][O]=v:console.warn(`ApexCharts: registerSeriesTransform("${O}") expects a function (series, w) => series.`),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.raincloudTransform=A;
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.2.0
21
+ * ApexCharts v8.3.1
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -148,24 +148,18 @@ function observationsOf(d, allowFlatY) {
148
148
  return out.length ? out : null;
149
149
  }
150
150
  function derivedStats(w, kind) {
151
- var _a, _b;
152
- const all = (_a = w.statsDerived) != null ? _a : w.statsDerived = {};
153
- return (_b = all[kind]) != null ? _b : all[kind] = /* @__PURE__ */ new Map();
151
+ const all = w.statsDerived || (w.statsDerived = {});
152
+ return all[kind] || (all[kind] = /* @__PURE__ */ new Map());
153
+ }
154
+ function deriveStat(derived, key, values, opts, fn) {
155
+ const s = JSON.stringify(opts) + values;
156
+ let hit = derived.get(key);
157
+ if (!hit || hit.s !== s) derived.set(key, hit = { s, e: fn(values, opts) });
158
+ return hit.e;
154
159
  }
155
160
  function isDerived(derived, key, value) {
156
- const ours = derived.get(key);
157
- if (!ours || !Array.isArray(value) || ours.length !== value.length) {
158
- return false;
159
- }
160
- for (let k = 0; k < value.length; k++) {
161
- const a = ours[k];
162
- const b = value[k];
163
- if (a === b) continue;
164
- if (!Array.isArray(a) || !Array.isArray(b) || a[0] !== b[0] || a[1] !== b[1]) {
165
- return false;
166
- }
167
- }
168
- return true;
161
+ const e = (derived.get(key) || {}).e;
162
+ return !!e && JSON.stringify(e.density || e.summary) === JSON.stringify(value);
169
163
  }
170
164
  function raincloudTransform(ser, w) {
171
165
  var _a, _b;
@@ -190,21 +184,26 @@ function raincloudTransform(ser, w) {
190
184
  if (!values) return d;
191
185
  const out = __spreadValues({}, y);
192
186
  if (needDensity) {
193
- const est = kernelDensity(values, {
194
- bandwidth: kde.bandwidth,
195
- resolution: kde.resolution
196
- });
187
+ const est = deriveStat(
188
+ ourDensity,
189
+ key,
190
+ values,
191
+ { bandwidth: kde.bandwidth, resolution: kde.resolution },
192
+ kernelDensity
193
+ );
197
194
  if (!est) return d;
198
195
  out.density = est.density;
199
196
  out.points = values;
200
- ourDensity.set(key, est.density);
201
197
  }
202
198
  if (needSummary) {
203
- const est = fiveNumberSummary(values, { whiskers });
204
- if (est) {
205
- out.summary = est.summary;
206
- ourSummary.set(key, est.summary);
207
- }
199
+ const est = deriveStat(
200
+ ourSummary,
201
+ key,
202
+ values,
203
+ { whiskers },
204
+ fiveNumberSummary
205
+ );
206
+ if (est) out.summary = est.summary;
208
207
  }
209
208
  touched = true;
210
209
  return __spreadProps(__spreadValues({}, d), { y: out });
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- !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/raincloud.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/raincloud.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/raincloud.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.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 a=s.indexOf(n);-1!==a&&s.splice(a,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/features/raincloud.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/raincloud.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/raincloud.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/raincloud.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,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,l=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&o(e,r,t[r]);if(s)for(var r of s(t))i.call(t,r)&&o(e,r,t[r]);return e},c=(e,t)=>r(e,n(t));const d=globalThis.ApexCharts,u="__apexcharts_series_transforms__";globalThis[u]||(globalThis[u]={});const h=globalThis.ApexCharts.__internals.__apex_Utils;function f(e,t){const r=e.length;if(0===r)return NaN;if(1===r)return e[0];const n=(r-1)*t,s=Math.floor(n),a=Math.ceil(n);return s===a?e[s]:e[s]+(e[a]-e[s])*(n-s)}function p(e,t={}){if(!Array.isArray(e)||0===e.length)return null;const r=e.slice().sort((e,t)=>e-t),n=r.length;let s=t.bandwidth;if(!("number"==typeof s&&s>0)){const e=function(e){const t=e.length;if(t<2)return 0;let r=0;for(let n=0;n<t;n++)r+=e[n];const n=r/t;let s=0;for(let r=0;r<t;r++){const t=e[r]-n;s+=t*t}return Math.sqrt(s/t)}(r),t=f(r,.75)-f(r,.25);s=.9*(t>0?Math.min(e,t/1.349):e)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const e=r[0],t=Math.abs(e)>0?.001*Math.abs(e):.001;return{density:[[e-t,0],[e,1],[e+t,0]],bandwidth:t}}const a=Math.max(8,Math.floor(t.resolution||64)),i=r[0]-2*s,o=(r[n-1]+2*s-i)/(a-1),l=1/(n*s*Math.sqrt(2*Math.PI)),c=[];for(let e=0;e<a;e++){const t=i+e*o;let a=0;for(let e=0;e<n;e++){const n=(t-r[e])/s;a+=Math.exp(-.5*n*n)}c.push([t,a*l])}return{density:c,bandwidth:s}}function y(e,t){var r,n;const s=null!=(r=e.statsDerived)?r:e.statsDerived={};return null!=(n=s[t])?n:s[t]=new Map}function g(e,t,r){const n=e.get(t);if(!n||!Array.isArray(r)||n.length!==r.length)return!1;for(let e=0;e<r.length;e++){const t=n[e],s=r[e];if(!(t===s||Array.isArray(t)&&Array.isArray(s)&&t[0]===s[0]&&t[1]===s[1]))return!1}return!0}function m(e,t){var r,n;if(!Array.isArray(e))return e;const s=(null==(r=t.config.plotOptions)?void 0:r.violin)||{},a=s.kde||{},i=(null==(n=s.box)?void 0:n.whiskers)||"minmax",o=y(t,"raincloudDensity"),d=y(t,"raincloudSummary");return e.map((e,t)=>{if(!Array.isArray(null==e?void 0:e.data)||e.type&&"raincloud"!==e.type&&"violin"!==e.type)return e;let r=!1;const n=e.data.map((e,n)=>{const s=t+":"+n,u=(null==e?void 0:e.y)&&"object"==typeof e.y&&!Array.isArray(e.y)?e.y:{},y=!Array.isArray(u.density)||!u.density.length||g(o,s,u.density),m=!Array.isArray(u.summary)||5!==u.summary.length||g(d,s,u.summary);if(!y&&!m)return e;const A=function(e){var t;if(!e||"object"!=typeof e||Array.isArray(e))return null;let r=null;if(Array.isArray(e.points)?r=e.points:Array.isArray(null==(t=e.y)?void 0:t.points)?r=e.y.points:Array.isArray(e.y)&&"number"==typeof e.y[0]&&(r=e.y),!r)return null;const n=[];for(let e=0;e<r.length;e++){const t=h.parseNumber(r[e]);null!==t&&isFinite(t)&&n.push(t)}return n.length?n:null}(e);if(!A)return e;const x=l({},u);if(y){const t=p(A,{bandwidth:a.bandwidth,resolution:a.resolution});if(!t)return e;x.density=t.density,x.points=A,o.set(s,t.density)}if(m){const e=function(e,t={}){if(!Array.isArray(e)||0===e.length)return null;const r=e.slice().sort((e,t)=>e-t),n=f(r,.25),s=f(r,.5),a=f(r,.75),i=a-n;let o=r[0],l=r[r.length-1],c=[];if("tukey"===t.whiskers&&i>0){const e=n-1.5*i,t=a+1.5*i;let s=0;for(;s<r.length&&r[s]<e;)s++;let d=r.length-1;for(;d>=0&&r[d]>t;)d--;s<=d&&(o=r[s],l=r[d],c=r.slice(0,s).concat(r.slice(d+1)))}return{summary:[o,n,s,a,l],outliers:c,iqr:i}}(A,{whiskers:i});e&&(x.summary=e.summary,d.set(s,e.summary))}return r=!0,c(l({},e),{y:x})});return r?c(l({},e),{data:n}):e})}var A,x;A="raincloud","function"==typeof(x=m)?globalThis[u][A]=x:console.warn(`ApexCharts: registerSeriesTransform("${A}") expects a function (series, w) => series.`),e.default=d,e.raincloudTransform=m,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).ApexRaincloud={})});
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/raincloud.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/raincloud.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/raincloud.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.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 a=s.indexOf(n);-1!==a&&s.splice(a,1);try{e.call(t),r.__drainsAddons||t.console.warn("ApexCharts: dist/features/raincloud.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/raincloud.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/raincloud.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/raincloud.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,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,l=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&o(e,r,t[r]);if(s)for(var r of s(t))i.call(t,r)&&o(e,r,t[r]);return e},c=(e,t)=>r(e,n(t));const d=globalThis.ApexCharts,u="__apexcharts_series_transforms__";globalThis[u]||(globalThis[u]={});const f=globalThis.ApexCharts.__internals.__apex_Utils;function h(e,t){const r=e.length;if(0===r)return NaN;if(1===r)return e[0];const n=(r-1)*t,s=Math.floor(n),a=Math.ceil(n);return s===a?e[s]:e[s]+(e[a]-e[s])*(n-s)}function p(e,t={}){if(!Array.isArray(e)||0===e.length)return null;const r=e.slice().sort((e,t)=>e-t),n=h(r,.25),s=h(r,.5),a=h(r,.75),i=a-n;let o=r[0],l=r[r.length-1],c=[];if("tukey"===t.whiskers&&i>0){const e=n-1.5*i,t=a+1.5*i;let s=0;for(;s<r.length&&r[s]<e;)s++;let d=r.length-1;for(;d>=0&&r[d]>t;)d--;s<=d&&(o=r[s],l=r[d],c=r.slice(0,s).concat(r.slice(d+1)))}return{summary:[o,n,s,a,l],outliers:c,iqr:i}}function y(e,t={}){if(!Array.isArray(e)||0===e.length)return null;const r=e.slice().sort((e,t)=>e-t),n=r.length;let s=t.bandwidth;if(!("number"==typeof s&&s>0)){const e=function(e){const t=e.length;if(t<2)return 0;let r=0;for(let n=0;n<t;n++)r+=e[n];const n=r/t;let s=0;for(let r=0;r<t;r++){const t=e[r]-n;s+=t*t}return Math.sqrt(s/t)}(r),t=h(r,.75)-h(r,.25);s=.9*(t>0?Math.min(e,t/1.349):e)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const e=r[0],t=Math.abs(e)>0?.001*Math.abs(e):.001;return{density:[[e-t,0],[e,1],[e+t,0]],bandwidth:t}}const a=Math.max(8,Math.floor(t.resolution||64)),i=r[0]-2*s,o=(r[n-1]+2*s-i)/(a-1),l=1/(n*s*Math.sqrt(2*Math.PI)),c=[];for(let e=0;e<a;e++){const t=i+e*o;let a=0;for(let e=0;e<n;e++){const n=(t-r[e])/s;a+=Math.exp(-.5*n*n)}c.push([t,a*l])}return{density:c,bandwidth:s}}function g(e,t){const r=e.statsDerived||(e.statsDerived={});return r[t]||(r[t]=new Map)}function m(e,t,r,n,s){const a=JSON.stringify(n)+r;let i=e.get(t);return i&&i.s===a||e.set(t,i={s:a,e:s(r,n)}),i.e}function x(e,t,r){const n=(e.get(t)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(r)}function b(e,t){var r,n;if(!Array.isArray(e))return e;const s=(null==(r=t.config.plotOptions)?void 0:r.violin)||{},a=s.kde||{},i=(null==(n=s.box)?void 0:n.whiskers)||"minmax",o=g(t,"raincloudDensity"),d=g(t,"raincloudSummary");return e.map((e,t)=>{if(!Array.isArray(null==e?void 0:e.data)||e.type&&"raincloud"!==e.type&&"violin"!==e.type)return e;let r=!1;const n=e.data.map((e,n)=>{const s=t+":"+n,u=(null==e?void 0:e.y)&&"object"==typeof e.y&&!Array.isArray(e.y)?e.y:{},h=!Array.isArray(u.density)||!u.density.length||x(o,s,u.density),g=!Array.isArray(u.summary)||5!==u.summary.length||x(d,s,u.summary);if(!h&&!g)return e;const b=function(e){var t;if(!e||"object"!=typeof e||Array.isArray(e))return null;let r=null;if(Array.isArray(e.points)?r=e.points:Array.isArray(null==(t=e.y)?void 0:t.points)?r=e.y.points:Array.isArray(e.y)&&"number"==typeof e.y[0]&&(r=e.y),!r)return null;const n=[];for(let e=0;e<r.length;e++){const t=f.parseNumber(r[e]);null!==t&&isFinite(t)&&n.push(t)}return n.length?n:null}(e);if(!b)return e;const A=l({},u);if(h){const t=m(o,s,b,{bandwidth:a.bandwidth,resolution:a.resolution},y);if(!t)return e;A.density=t.density,A.points=b}if(g){const e=m(d,s,b,{whiskers:i},p);e&&(A.summary=e.summary)}return r=!0,c(l({},e),{y:A})});return r?c(l({},e),{data:n}):e})}var A,w;A="raincloud","function"==typeof(w=b)?globalThis[u][A]=w:console.warn(`ApexCharts: registerSeriesTransform("${A}") expects a function (series, w) => series.`),e.default=d,e.raincloudTransform=b,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).ApexRaincloud={})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,n=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,a=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))l.call(e,i)&&n(t,i,e[i]);return t},o=(t,s)=>e(t,i(s));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const c=h(require("apexcharts/core")),_=c.__apex_Graphics,d={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},u=Symbol("never");const p={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},f=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function y(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let i=1/0,s=1/0,r=-1/0,l=-1/0,n=0,a=0,o=0,h=0,c="",_=0;const d=()=>Number(e[_++]),u=(t,e)=>{isFinite(t)&&isFinite(e)&&(i=Math.min(i,t),s=Math.min(s,e),r=Math.max(r,t),l=Math.max(l,e))},p=t=>{const e=c===c.toLowerCase();let i=n,s=a;for(let r=0;r<t;r++)i=d()+(e?n:0),s=d()+(e?a:0),u(i,s);n=i,a=s};for(;_<e.length;){if(/^[a-z]$/i.test(e[_])){c=e[_++],"Z"!==c&&"z"!==c||(n=o,a=h);continue}const t=c===c.toLowerCase();switch(c.toUpperCase()){case"M":p(1),o=n,h=a,c=t?"l":"L";break;case"L":case"T":p(1);break;case"H":n=d()+(t?n:0),u(n,a);break;case"V":a=d()+(t?a:0),u(n,a);break;case"S":case"Q":p(2);break;case"C":p(3);break;case"A":_+=5,p(1);break;default:_++}}return isFinite(i)?{x:i,y:s,width:r-i,height:l-s}:null}(t.d),t.boxOf=t.d),t.box}const m={attr:()=>m,plot:()=>m,during:()=>m,after:t=>("function"==typeof t&&t(),m),animate:()=>m,delay:()=>m,loop:()=>m,finish:()=>m,stop:()=>m},g={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},k={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>k,add:()=>k,addTo:()=>k,remove:()=>k,clear:()=>k,css:()=>k,hide:()=>k,show:()=>k,removeClass:()=>k,animate:()=>m};class w{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return g}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return m}}const x={__isCanvasMark:!0,node:g,attr:()=>x,add:()=>x,addTo:()=>x,remove:()=>x,css:()=>x,animate:()=>m};class b{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,i){e._applyAttr(t,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const i=this._cmd;if(!i)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(i.clip=t))}const s=d[t];void 0!==s&&(i[s]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?y(t):null;return e?a({},e):{x:0,y:0,width:0,height:0}}animate(){return m}}class v{constructor(t){this.w=t,this._g=new _(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=u,this._ls=u,this._lsw=u,this._ld=u,this._lfo=u,this._lso=u,this._lid=-1,this._lofFill=u,this._lofBase=-1,this._lofId=-1,this._rlf=u,this._rls=u,this._rlsw=u,this._rlfo=u,this._rlso=u,this._rlid=-1}_resetStyleCache(){this._lf=u,this._ls=u,this._lsw=u,this._ld=u,this._lfo=u,this._lso=u,this._lid=-1,this._lofFill=u,this._lofBase=-1,this._lofId=-1,this._rlf=u,this._rls=u,this._rlsw=u,this._rlfo=u,this._rlso=u,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let e=16;for(let i=0;i<t.length;i++){const s=t[i]&&t[i].data;Array.isArray(s)&&(e+=s.length)}e=Math.ceil(1.15*e)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const i=new Float64Array(t);i.set(this._cry),this._cry=i;const s=new Float64Array(t);s.set(this._crw),this._crw=s;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const l=new Int32Array(t);l.set(this._crstyle),this._crstyle=l;const n=new Int32Array(t);n.set(this._crsi),this._crsi=n;const a=new Int32Array(t);a.set(this._crdi),this._crdi=a,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const i=new Float64Array(t);i.set(this._my),this._my=i;const s=new Float64Array(t);s.set(this._msize),this._msize=s;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const l=new Int32Array(t);l.set(this._mstyle),this._mstyle=l;const n=new Int32Array(t);n.set(this._msi),this._msi=n;const a=new Int32Array(t);a.set(this._mdi),this._mdi=a,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,i,s,r,l){const n=`${t}|${e}|${i}|${s}|${r}|${l}`,a=this._styleMap.get(n);if(void 0!==a)return a;const o=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:i,strokeDash:s,fillOpacity:r,strokeOpacity:l}),this._styleMap.set(n,o),o}_setMarkerFill(t,e){const i=this._mstyle[t];if(e===this._lofFill&&i===this._lofBase)return void(this._mstyle[t]=this._lofId);const s=this._styles[i];if(!s||s.fill===e)return this._lofFill=e,this._lofBase=i,void(this._lofId=i);const r=this._internStyle(e,s.stroke,s.strokeWidth,s.strokeDash,s.fillOpacity,s.strokeOpacity);this._mstyle[t]=r,this._lofFill=e,this._lofBase=i,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return f[t]||"circle"}drawRectCell(t,e,i,s,r={}){const l=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const n=this._crn++;return this._crx[n]=t||0,this._cry[n]=e||0,this._crw[n]=i>0?i:0,this._crh[n]=s>0?s:0,this._crstyle[n]=l,this._crsi[n]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[n]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),x}_rectStyleId(t){const e=t.fill,i=t.stroke,s=t.strokeWidth,r=t.fillOpacity,l=t.strokeOpacity;if(e===this._rlf&&i===this._rls&&s===this._rlsw&&r===this._rlfo&&l===this._rlso)return this._rlid;const n=this._internStyle(e,i,s,0,r,l);return this._rlf=e,this._rls=i,this._rlsw=s,this._rlfo=r,this._rlso=l,this._rlid=n,n}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const i={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(i),i}group(t){return k}drawMarker(t,e,i={}){var s;const r=this._markerStyleId(i);this._mn>=this._mcap&&this._growMarkers();const l=this._mn++;return this._mx[l]=t||0,this._my[l]="number"==typeof e?e:NaN,this._msize[l]=i.pSize||0,this._mshape[l]=null!=(s=p[i.shape||"circle"])?s:0,this._mstyle[l]=r,this._msi[l]=null==i.seriesIndex?-1:i.seriesIndex,this._mdi[l]=-1,new w(this,l)}_markerStyleId(t){const e=t.shape||"circle",i="line"===e||"plus"===e||"cross"===e,s=i?"none":t.pointFillColor,r=i?t.pointFillColor:t.pointStrokeColor,l=t.pointStrokeWidth,n=t.pointStrokeDashArray,a=t.pointFillOpacity,o=i?t.pointFillOpacity:t.pointStrokeOpacity;if(s===this._lf&&r===this._ls&&l===this._lsw&&n===this._ld&&a===this._lfo&&o===this._lso)return this._lid;const h=this._internStyle(s,r,l,n,a,o);return this._lf=s,this._ls=r,this._lsw=l,this._ld=n,this._lfo=a,this._lso=o,this._lid=h,h}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const i=this.w.globals;e.clip="bar"===t.chartType&&!i.isBarHorizontal||i.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new b(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new b(e)}drawLine(t,e,i,s,r="#a8a8a8",l=0,n=1){const a=this._cmd("line",0);return a.lx1=t,a.ly1=e,a.lx2=i,a.ly2=s,a.stroke=r,a.strokeDash=l,a.strokeWidth=n,new b(a)}drawRect(t=0,e=0,i=0,s=0,r=0,l="#fefefe",n=1,a=null,o=null,h=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=e,c.rw=i>0?i:0,c.rh=s>0?s:0,c.radius=r,c.fill=l,c.fillOpacity=n,null!=o&&(c.stroke=o,c.strokeWidth=null==a?1:a,c.strokeDash=h),new b(c)}drawCircle(t,e=null){const i=this._cmd("circle",0);return i.r=t<0?0:t,e&&(i.cx=e.cx,i.cy=e.cy,void 0!==e.fill&&(i.fill=e.fill),void 0!==e.stroke&&(i.stroke=e.stroke)),new b(i)}drawText(t){const e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new b(e)}markerPath(t,e,i,s){return this._g.getMarkerPath(t,e,f[i]||"circle",s)}}const A=c.__apex_SVGElement,M=c.__apex_math_SVGNS,S=c.__apex_BrowserAPIs_BrowserAPIs,P=c.__apex_axes_Grid,C=2*Math.PI;class I{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),i=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),s=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,r=Math.ceil(s+8),l=P.maskRects(this.w),n={left:r,top:r,right:r,bottom:r},a=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(l).forEach(t=>{n.left=Math.max(n.left,a(-t.x)),n.top=Math.max(n.top,a(-t.y)),n.right=Math.max(n.right,a(t.x+t.width-e)),n.bottom=Math.max(n.bottom,a(t.y+t.height-i))}),{gw:e,gh:i,pad:n,clips:l}}createHost(){const t=S.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:i,pad:s,clips:r}=this._plotDims();this._pad=s,this._clips=r;const l=e+s.left+s.right,n=i+s.top+s.bottom,a=S.createElementNS(M,"foreignObject");a.setAttribute("x",String(-s.left)),a.setAttribute("y",String(-s.top)),a.setAttribute("width",String(l)),a.setAttribute("height",String(n)),a.setAttribute("class","apexcharts-canvas-series"),a.style.overflow="visible";const o=S.createElement("canvas");return o.setAttribute("class","apexcharts-series-canvas"),o.width=Math.max(1,Math.round(l*this._dpr)),o.height=Math.max(1,Math.round(n*this._dpr)),o.style.width=l+"px",o.style.height=n+"px",o.style.pointerEvents="none",a.appendChild(o),this._canvas=o,this._c2d=o.getContext("2d"),this._host=new A(a),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const i=this.clipRect(e);if(i!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=i,i)){const e=this._dpr,{left:s,top:r}=this._pad,l=Math.floor((s+i.x)*e),n=Math.floor((r+i.y)*e),a=Math.ceil((s+i.x+i.width)*e),o=Math.ceil((r+i.y+i.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(l,n,a-l,o-n),t.clip(),t.setTransform(e,0,0,e,s*e,r*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=S.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const i=parseFloat(this._canvas.style.width)||0,s=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(i*e)),this._canvas.height=Math.max(1,Math.round(s*e))}paint(t,e,i=null){const s=this._c2d;if(!s)return;this._dim=i||null,this._syncDpr(),this.clear();const r=this._dpr,{left:l,top:n}=this._pad;if(s.setTransform(r,0,0,r,l*r,n*r),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const i=e[t];this._alpha=this._dim?this._seriesAlpha(i.si):1,this._clipTo(s,i.clip),this._paintOne(s,i)}this._clipTo(s,null)}this._paintRects(s,e),this._clipTo(s,"marker"),this._paintMarkers(s,e),this._clipTo(s,null),this._alpha=1}_paintRects(t,e){const i=e.rectCount?e.rectCount():0;if(!i)return;const s=e._crx,r=e._cry,l=e._crw,n=e._crh,a=e._crstyle,o=e._cellRadius||0,h=t,c=o>0&&"function"==typeof h.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),u=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,u),t.clip();let p=0;for(;p<i;){const d=a[p],u=e.rectStyle(p);if(!u){p++;continue}const f=u.fill,y=f&&"none"!==f&&!("string"==typeof f&&0===f.indexOf("url(")),m=u.stroke,g=null==u.strokeWidth?0:Number(u.strokeWidth),k=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));y&&(t.fillStyle=f),k&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const w=null==u.fillOpacity?1:Number(u.fillOpacity),x=null==u.strokeOpacity?1:Number(u.strokeOpacity);let b=p;for(;b<i&&a[b]===d;){const i=l[b],a=n[b];if(i>0&&a>0){const l=_?this._seriesAlpha(e.rectSeries(b)):1;c?(t.beginPath(),h.roundRect(s[b],r[b],i,a,o),y&&(t.globalAlpha=w*l,t.fill()),k&&(t.globalAlpha=x*l,t.stroke())):(y&&(t.globalAlpha=w*l,t.fillRect(s[b],r[b],i,a)),k&&(t.globalAlpha=x*l,t.strokeRect(s[b],r[b],i,a)))}b++}p=b}t.globalAlpha=1,t.restore()}_unitPath(t,e,i){const s=e+"|"+i;let r=this._unitPaths.get(s);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,e,i))}catch(t){r=null}this._unitPaths.set(s,r)}return r}_paintMarkers(t,e){this._markerBatches=0;const i=e.markerCount();if(!i)return;const s=e._mx,r=e._my,l=e._msize,n=e._mshape,a=e._mstyle,o=!!this._dim;o||(this._alpha=1);let h=0;for(;h<i;){const c=a[h],_=n[h],d=e.markerStyle(h);if(!d){h++;continue}const u=this._applyFill(t,d),p=this._applyStroke(t,d);this._markerBatches++;const f=null==d.fillOpacity?1:Number(d.fillOpacity),y=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=h;for(;_<i&&0===n[_]&&a[_]===c;){const i=l[_]||0,n=r[_];if(i>0&&n==n)if(t.beginPath(),t.arc(s[_],n,i,0,C),o){const i=this._seriesAlpha(e.markerSeries(_));u&&(t.globalAlpha=f*i,t.fill()),p&&(t.globalAlpha=y*i,t.stroke())}else u&&t.fill(),p&&t.stroke();_++}t.globalAlpha=1,h=_}else{const d=this._dpr,m=this._pad.left,g=this._pad.top;let k=h;for(;k<i&&n[k]===_&&a[k]===c;){const i=r[k],n=l[k];if(i==i&&n>0){const r=this._unitPath(e,_,n);if(r){t.setTransform(d,0,0,d,(m+s[k])*d,(g+i)*d);const l=o?this._seriesAlpha(e.markerSeries(k)):1;u&&(t.globalAlpha=f*l,t.fill(r)),p&&(t.globalAlpha=y*l,t.stroke(r))}}k++}t.setTransform(d,0,0,d,m*d,g*d),t.globalAlpha=1,h=k}}}_paintNumericPath(t,e){const i=e.nxs,s=e.nys,r=i.length;if(r){t.beginPath(),t.moveTo(i[0],s[0]);for(let e=1;e<r;e++)t.lineTo(i[e],s[e]);null!=e.ncloseY&&(t.lineTo(i[r-1],e.ncloseY),t.lineTo(i[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const i=new Path2D;e.radius&&"function"==typeof i.roundRect?i.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):i.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,i);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,C),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const i=e.fontSize||"11px";t.font=`${"number"==typeof i?i+"px":i} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,i){this._applyFill(t,e)&&t.fill(i,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(i),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const i=e.fill;return!(!i||"none"===i)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=i,!0))}_applyStroke(t,e){const i=e.stroke,s=null==e.strokeWidth?1:Number(e.strokeWidth);if(!(i&&"none"!==i&&s>0))return!1;if("string"==typeof i&&0===i.indexOf("url("))return!1;t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=i,t.lineWidth=s,t.lineCap=e.lineCap||"butt";const r=e.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class O{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new v(t),this._compositor=new I(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,i,s,r){return this._g.drawRectCell(t,e,i,s,r)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,i){return this._g.drawMarker(t,e,i)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const i=this._g,s=i.rectCount?i.rectCount():0,r=i._crx,l=i._cry,n=i._crw,a=i._crh;for(let o=s-1;o>=0;o--){const s=n[o],h=a[o];if(!(s<=0||h<=0)&&(t>=r[o]&&t<r[o]+s&&e>=l[o]&&e<l[o]+h))return{seriesIndex:i._crsi[o],dataPointIndex:i._crdi[o],x:r[o],y:l[o],width:s,height:h}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const i=this._g.displayList();for(let s=i.length-1;s>=0;s--){const r=i[s];if("path"!==r.tag||null==r.dj||!r.d)continue;const l=!!r.fill&&"none"!==r.fill,n=!!r.stroke&&"none"!==r.stroke&&r.strokeWidth>0;if(!l&&!n)continue;const o=this._compositor.clipRect(r.clip);if(o&&(t<o.x||t>o.x+o.width||e<o.y||e>o.y+o.height))continue;const h=y(r);if(!h)continue;const c=n?5*r.strokeWidth:0;if(t<h.x-c||t>h.x+h.width+c||e<h.y-c||e>h.y+h.height+c)continue;const _=this._hitContext();if(!_)return null;if(!r.path2d)try{r.path2d=new Path2D(r.d)}catch(t){continue}const d="evenodd"===r.fillRule?"evenodd":"nonzero";let u=l&&_.isPointInPath(r.path2d,t,e,d);if(!u&&n&&(_.lineWidth=r.strokeWidth,_.lineCap=r.lineCap||"butt",u=_.isPointInStroke(r.path2d,t,e)),u)return a({seriesIndex:r.si,dataPointIndex:r.dj},h)}return null}hitTestMarker(t,e){const i=this._g,s=i.markerCount();if(!s)return null;const r=this._compositor.clipRect("marker");if(r&&(t<r.x||t>r.x+r.width||e<r.y||e>r.y+r.height))return null;for(let r=s-1;r>=0;r--){const s=i._msize[r],l=i._mx[r],n=i._my[r],a=i._mdi[r];if(!(s>0)||n!=n||a<0)continue;const o=i.markerStyle(r),h=!!(null==o?void 0:o.stroke)&&"none"!==o.stroke&&o.strokeWidth>0,c=h?o.strokeWidth/2:0,_=1.2*s+c,d=t-l,u=e-n;if(d<-_||d>_||u<-_||u>_)continue;let p;if(p=0===i._mshape[r]?d*d+u*u<=(s+c)*(s+c):this._hitsMarkerShape(r,d,u,s,o,h),p)return{seriesIndex:i._msi[r],dataPointIndex:a,x:l,y:n,size:s}}return null}_hitsMarkerShape(t,e,i,s,r,l){const n=this._hitContext();if(!n)return!1;let a;try{a=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],s))}catch(t){return!1}return!(!(null==r?void 0:r.fill)||"none"===r.fill||!n.isPointInPath(a,e,i))||!!l&&(n.lineWidth=r.strokeWidth,n.lineCap="butt",n.isPointInStroke(a,e,i))}findMark(t,e){const i=this._g.displayList();for(let s=0;s<i.length;s++){const r=i[s];if("path"!==r.tag||!r.d)continue;if(r.si!==t||r.dj!==e)continue;const l=y(r);if(l)return o(a({seriesIndex:t,dataPointIndex:e},l),{d:r.d})}return null}findMarker(t,e){const i=this._g;for(let s=i.markerCount()-1;s>=0;s--){if(i._msi[s]!==t||i._mdi[s]!==e)continue;const r=i._msize[s],l=i._my[s];if(!(r>0)||l!=l)continue;const n=i._mx[s];return{seriesIndex:t,dataPointIndex:e,x:n,y:l,size:r,d:i.markerPath(n,l,i._mshape[s],r)}}return null}findCell(t,e){const i=this._g,s=i.rectCount?i.rectCount():0,r=i._crsi,l=i._crdi;for(let n=s-1;n>=0;n--)if(r[n]===t&&l[n]===e)return{seriesIndex:t,dataPointIndex:e,x:i._crx[n],y:i._cry[n],width:i._crw[n],height:i._crh[n],radius:i._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=S.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,i=this.w.config.chart,s=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(i.offsetX||0)-s.left,y:(e.translateY||0)+(i.offsetY||0)-s.top,w:(this.w.layout.gridWidth||0)+s.left+s.right,h:(this.w.layout.gridHeight||0)+s.top+s.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}c.default.registerRenderer("canvas",(t,e)=>new O(t,e)),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
5
+ "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,n=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,a=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))l.call(e,i)&&n(t,i,e[i]);return t},h=(t,s)=>e(t,i(s));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function o(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 s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const c=o(require("apexcharts/core")),_=c.__apex_Graphics,d={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},u=Symbol("never");const p={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},f=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function y(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let i=1/0,s=1/0,r=-1/0,l=-1/0,n=0,a=0,h=0,o=0,c="",_=0;const d=()=>Number(e[_++]),u=(t,e)=>{isFinite(t)&&isFinite(e)&&(i=Math.min(i,t),s=Math.min(s,e),r=Math.max(r,t),l=Math.max(l,e))},p=t=>{const e=c===c.toLowerCase();let i=n,s=a;for(let r=0;r<t;r++)i=d()+(e?n:0),s=d()+(e?a:0),u(i,s);n=i,a=s};for(;_<e.length;){if(/^[a-z]$/i.test(e[_])){c=e[_++],"Z"!==c&&"z"!==c||(n=h,a=o);continue}const t=c===c.toLowerCase();switch(c.toUpperCase()){case"M":p(1),h=n,o=a,c=t?"l":"L";break;case"L":case"T":p(1);break;case"H":n=d()+(t?n:0),u(n,a);break;case"V":a=d()+(t?a:0),u(n,a);break;case"S":case"Q":p(2);break;case"C":p(3);break;case"A":_+=5,p(1);break;default:_++}}return isFinite(i)?{x:i,y:s,width:r-i,height:l-s}:null}(t.d),t.boxOf=t.d),t.box}const m={attr:()=>m,plot:()=>m,during:()=>m,after:t=>("function"==typeof t&&t(),m),animate:()=>m,delay:()=>m,loop:()=>m,finish:()=>m,stop:()=>m},g={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},k={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>k,add:()=>k,addTo:()=>k,remove:()=>k,clear:()=>k,css:()=>k,hide:()=>k,show:()=>k,removeClass:()=>k,animate:()=>m};class w{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return g}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return m}}const x={__isCanvasMark:!0,node:g,attr:()=>x,add:()=>x,addTo:()=>x,remove:()=>x,css:()=>x,animate:()=>m};class b{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,i){e._applyAttr(t,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const i=this._cmd;if(!i)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(i.clip=t))}const s=d[t];void 0!==s&&(i[s]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?y(t):null;return e?a({},e):{x:0,y:0,width:0,height:0}}animate(){return m}}class v{constructor(t){this.w=t,this._g=new _(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=u,this._ls=u,this._lsw=u,this._ld=u,this._lfo=u,this._lso=u,this._lid=-1,this._lofFill=u,this._lofBase=-1,this._lofId=-1,this._rlf=u,this._rls=u,this._rlsw=u,this._rlfo=u,this._rlso=u,this._rlid=-1}_resetStyleCache(){this._lf=u,this._ls=u,this._lsw=u,this._ld=u,this._lfo=u,this._lso=u,this._lid=-1,this._lofFill=u,this._lofBase=-1,this._lofId=-1,this._rlf=u,this._rls=u,this._rlsw=u,this._rlfo=u,this._rlso=u,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let e=16;for(let i=0;i<t.length;i++){const s=t[i]&&t[i].data;Array.isArray(s)&&(e+=s.length)}e=Math.ceil(1.15*e)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const i=new Float64Array(t);i.set(this._cry),this._cry=i;const s=new Float64Array(t);s.set(this._crw),this._crw=s;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const l=new Int32Array(t);l.set(this._crstyle),this._crstyle=l;const n=new Int32Array(t);n.set(this._crsi),this._crsi=n;const a=new Int32Array(t);a.set(this._crdi),this._crdi=a,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const i=new Float64Array(t);i.set(this._my),this._my=i;const s=new Float64Array(t);s.set(this._msize),this._msize=s;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const l=new Int32Array(t);l.set(this._mstyle),this._mstyle=l;const n=new Int32Array(t);n.set(this._msi),this._msi=n;const a=new Int32Array(t);a.set(this._mdi),this._mdi=a,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,i,s,r,l){const n=`${t}|${e}|${i}|${s}|${r}|${l}`,a=this._styleMap.get(n);if(void 0!==a)return a;const h=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:i,strokeDash:s,fillOpacity:r,strokeOpacity:l}),this._styleMap.set(n,h),h}_setMarkerFill(t,e){const i=this._mstyle[t];if(e===this._lofFill&&i===this._lofBase)return void(this._mstyle[t]=this._lofId);const s=this._styles[i];if(!s||s.fill===e)return this._lofFill=e,this._lofBase=i,void(this._lofId=i);const r=this._internStyle(e,s.stroke,s.strokeWidth,s.strokeDash,s.fillOpacity,s.strokeOpacity);this._mstyle[t]=r,this._lofFill=e,this._lofBase=i,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return f[t]||"circle"}drawRectCell(t,e,i,s,r={}){const l=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const n=this._crn++;return this._crx[n]=t||0,this._cry[n]=e||0,this._crw[n]=i>0?i:0,this._crh[n]=s>0?s:0,this._crstyle[n]=l,this._crsi[n]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[n]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),x}_rectStyleId(t){const e=t.fill,i=t.stroke,s=t.strokeWidth,r=t.fillOpacity,l=t.strokeOpacity;if(e===this._rlf&&i===this._rls&&s===this._rlsw&&r===this._rlfo&&l===this._rlso)return this._rlid;const n=this._internStyle(e,i,s,0,r,l);return this._rlf=e,this._rls=i,this._rlsw=s,this._rlfo=r,this._rlso=l,this._rlid=n,n}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const i={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(i),i}group(t){return k}drawMarker(t,e,i={}){var s;const r=this._markerStyleId(i);this._mn>=this._mcap&&this._growMarkers();const l=this._mn++;return this._mx[l]=t||0,this._my[l]="number"==typeof e?e:NaN,this._msize[l]=i.pSize||0,this._mshape[l]=null!=(s=p[i.shape||"circle"])?s:0,this._mstyle[l]=r,this._msi[l]=null==i.seriesIndex?-1:i.seriesIndex,this._mdi[l]=-1,new w(this,l)}_markerStyleId(t){const e=t.shape||"circle",i="line"===e||"plus"===e||"cross"===e,s=i?"none":t.pointFillColor,r=i?t.pointFillColor:t.pointStrokeColor,l=t.pointStrokeWidth,n=t.pointStrokeDashArray,a=t.pointFillOpacity,h=i?t.pointFillOpacity:t.pointStrokeOpacity;if(s===this._lf&&r===this._ls&&l===this._lsw&&n===this._ld&&a===this._lfo&&h===this._lso)return this._lid;const o=this._internStyle(s,r,l,n,a,h);return this._lf=s,this._ls=r,this._lsw=l,this._ld=n,this._lfo=a,this._lso=h,this._lid=o,o}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.strokeDash=this._g.seriesDash(t.realIndex),e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const i=this.w.globals;e.clip="bar"===t.chartType&&!i.isBarHorizontal||i.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new b(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new b(e)}drawLine(t,e,i,s,r="#a8a8a8",l=0,n=1){const a=this._cmd("line",0);return a.lx1=t,a.ly1=e,a.lx2=i,a.ly2=s,a.stroke=r,a.strokeDash=l,a.strokeWidth=n,new b(a)}drawRect(t=0,e=0,i=0,s=0,r=0,l="#fefefe",n=1,a=null,h=null,o=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=e,c.rw=i>0?i:0,c.rh=s>0?s:0,c.radius=r,c.fill=l,c.fillOpacity=n,null!=h&&(c.stroke=h,c.strokeWidth=null==a?1:a,c.strokeDash=o),new b(c)}drawCircle(t,e=null){const i=this._cmd("circle",0);return i.r=t<0?0:t,e&&(i.cx=e.cx,i.cy=e.cy,void 0!==e.fill&&(i.fill=e.fill),void 0!==e.stroke&&(i.stroke=e.stroke)),new b(i)}drawText(t){const e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new b(e)}markerPath(t,e,i,s){return this._g.getMarkerPath(t,e,f[i]||"circle",s)}}const A=c.__apex_SVGElement,M=c.__apex_math_SVGNS,S=c.__apex_BrowserAPIs_BrowserAPIs,P=c.__apex_axes_Grid,C=2*Math.PI;class I{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),i=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),s=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,r=Math.ceil(s+8),l=P.maskRects(this.w),n={left:r,top:r,right:r,bottom:r},a=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(l).forEach(t=>{n.left=Math.max(n.left,a(-t.x)),n.top=Math.max(n.top,a(-t.y)),n.right=Math.max(n.right,a(t.x+t.width-e)),n.bottom=Math.max(n.bottom,a(t.y+t.height-i))}),{gw:e,gh:i,pad:n,clips:l}}createHost(){const t=S.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:i,pad:s,clips:r}=this._plotDims();this._pad=s,this._clips=r;const l=e+s.left+s.right,n=i+s.top+s.bottom,a=S.createElementNS(M,"foreignObject");a.setAttribute("x",String(-s.left)),a.setAttribute("y",String(-s.top)),a.setAttribute("width",String(l)),a.setAttribute("height",String(n)),a.setAttribute("class","apexcharts-canvas-series"),a.style.overflow="visible";const h=S.createElement("canvas");return h.setAttribute("class","apexcharts-series-canvas"),h.width=Math.max(1,Math.round(l*this._dpr)),h.height=Math.max(1,Math.round(n*this._dpr)),h.style.width=l+"px",h.style.height=n+"px",h.style.pointerEvents="none",a.appendChild(h),this._canvas=h,this._c2d=h.getContext("2d"),this._host=new A(a),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const i=this.clipRect(e);if(i!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=i,i)){const e=this._dpr,{left:s,top:r}=this._pad,l=Math.floor((s+i.x)*e),n=Math.floor((r+i.y)*e),a=Math.ceil((s+i.x+i.width)*e),h=Math.ceil((r+i.y+i.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(l,n,a-l,h-n),t.clip(),t.setTransform(e,0,0,e,s*e,r*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=S.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const i=parseFloat(this._canvas.style.width)||0,s=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(i*e)),this._canvas.height=Math.max(1,Math.round(s*e))}paint(t,e,i=null){const s=this._c2d;if(!s)return;this._dim=i||null,this._syncDpr(),this.clear();const r=this._dpr,{left:l,top:n}=this._pad;if(s.setTransform(r,0,0,r,l*r,n*r),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const i=e[t];this._alpha=this._dim?this._seriesAlpha(i.si):1,this._clipTo(s,i.clip),this._paintOne(s,i)}this._clipTo(s,null)}this._paintRects(s,e),this._clipTo(s,"marker"),this._paintMarkers(s,e),this._clipTo(s,null),this._alpha=1}_paintRects(t,e){const i=e.rectCount?e.rectCount():0;if(!i)return;const s=e._crx,r=e._cry,l=e._crw,n=e._crh,a=e._crstyle,h=e._cellRadius||0,o=t,c=h>0&&"function"==typeof o.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),u=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,u),t.clip();let p=0;for(;p<i;){const d=a[p],u=e.rectStyle(p);if(!u){p++;continue}const f=u.fill,y=f&&"none"!==f&&!("string"==typeof f&&0===f.indexOf("url(")),m=u.stroke,g=null==u.strokeWidth?0:Number(u.strokeWidth),k=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));y&&(t.fillStyle=f),k&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const w=null==u.fillOpacity?1:Number(u.fillOpacity),x=null==u.strokeOpacity?1:Number(u.strokeOpacity);let b=p;for(;b<i&&a[b]===d;){const i=l[b],a=n[b];if(i>0&&a>0){const l=_?this._seriesAlpha(e.rectSeries(b)):1;c?(t.beginPath(),o.roundRect(s[b],r[b],i,a,h),y&&(t.globalAlpha=w*l,t.fill()),k&&(t.globalAlpha=x*l,t.stroke())):(y&&(t.globalAlpha=w*l,t.fillRect(s[b],r[b],i,a)),k&&(t.globalAlpha=x*l,t.strokeRect(s[b],r[b],i,a)))}b++}p=b}t.globalAlpha=1,t.restore()}_unitPath(t,e,i){const s=e+"|"+i;let r=this._unitPaths.get(s);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,e,i))}catch(t){r=null}this._unitPaths.set(s,r)}return r}_paintMarkers(t,e){this._markerBatches=0;const i=e.markerCount();if(!i)return;const s=e._mx,r=e._my,l=e._msize,n=e._mshape,a=e._mstyle,h=!!this._dim;h||(this._alpha=1);let o=0;for(;o<i;){const c=a[o],_=n[o],d=e.markerStyle(o);if(!d){o++;continue}const u=this._applyFill(t,d),p=this._applyStroke(t,d);this._markerBatches++;const f=null==d.fillOpacity?1:Number(d.fillOpacity),y=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=o;for(;_<i&&0===n[_]&&a[_]===c;){const i=l[_]||0,n=r[_];if(i>0&&n==n)if(t.beginPath(),t.arc(s[_],n,i,0,C),h){const i=this._seriesAlpha(e.markerSeries(_));u&&(t.globalAlpha=f*i,t.fill()),p&&(t.globalAlpha=y*i,t.stroke())}else u&&t.fill(),p&&t.stroke();_++}t.globalAlpha=1,o=_}else{const d=this._dpr,m=this._pad.left,g=this._pad.top;let k=o;for(;k<i&&n[k]===_&&a[k]===c;){const i=r[k],n=l[k];if(i==i&&n>0){const r=this._unitPath(e,_,n);if(r){t.setTransform(d,0,0,d,(m+s[k])*d,(g+i)*d);const l=h?this._seriesAlpha(e.markerSeries(k)):1;u&&(t.globalAlpha=f*l,t.fill(r)),p&&(t.globalAlpha=y*l,t.stroke(r))}}k++}t.setTransform(d,0,0,d,m*d,g*d),t.globalAlpha=1,o=k}}}_paintNumericPath(t,e){const i=e.nxs,s=e.nys,r=i.length;if(r){t.beginPath(),t.moveTo(i[0],s[0]);for(let e=1;e<r;e++)t.lineTo(i[e],s[e]);null!=e.ncloseY&&(t.lineTo(i[r-1],e.ncloseY),t.lineTo(i[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const i=new Path2D;e.radius&&"function"==typeof i.roundRect?i.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):i.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,i);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,C),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const i=e.fontSize||"11px";t.font=`${"number"==typeof i?i+"px":i} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,i){this._applyFill(t,e)&&t.fill(i,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(i),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const i=e.fill;return!(!i||"none"===i)&&(("string"!=typeof i||0!==i.indexOf("url("))&&(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=i,!0))}_applyStroke(t,e){const i=e.stroke,s=null==e.strokeWidth?1:Number(e.strokeWidth);if(!(i&&"none"!==i&&s>0))return!1;if("string"==typeof i&&0===i.indexOf("url("))return!1;t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=i,t.lineWidth=s,t.lineCap=e.lineCap||"butt";const r=e.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class O{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new v(t),this._compositor=new I(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,i,s,r){return this._g.drawRectCell(t,e,i,s,r)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,i){return this._g.drawMarker(t,e,i)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const i=this._g,s=i.rectCount?i.rectCount():0,r=i._crx,l=i._cry,n=i._crw,a=i._crh;for(let h=s-1;h>=0;h--){const s=n[h],o=a[h];if(!(s<=0||o<=0)&&(t>=r[h]&&t<r[h]+s&&e>=l[h]&&e<l[h]+o))return{seriesIndex:i._crsi[h],dataPointIndex:i._crdi[h],x:r[h],y:l[h],width:s,height:o}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const i=this._g.displayList();for(let s=i.length-1;s>=0;s--){const r=i[s];if("path"!==r.tag||null==r.dj||!r.d)continue;const l=!!r.fill&&"none"!==r.fill,n=!!r.stroke&&"none"!==r.stroke&&r.strokeWidth>0;if(!l&&!n)continue;const h=this._compositor.clipRect(r.clip);if(h&&(t<h.x||t>h.x+h.width||e<h.y||e>h.y+h.height))continue;const o=y(r);if(!o)continue;const c=n?5*r.strokeWidth:0;if(t<o.x-c||t>o.x+o.width+c||e<o.y-c||e>o.y+o.height+c)continue;const _=this._hitContext();if(!_)return null;if(!r.path2d)try{r.path2d=new Path2D(r.d)}catch(t){continue}const d="evenodd"===r.fillRule?"evenodd":"nonzero";let u=l&&_.isPointInPath(r.path2d,t,e,d);if(!u&&n&&(_.lineWidth=r.strokeWidth,_.lineCap=r.lineCap||"butt",u=_.isPointInStroke(r.path2d,t,e)),u)return a({seriesIndex:r.si,dataPointIndex:r.dj},o)}return null}hitTestMarker(t,e){const i=this._g,s=i.markerCount();if(!s)return null;const r=this._compositor.clipRect("marker");if(r&&(t<r.x||t>r.x+r.width||e<r.y||e>r.y+r.height))return null;for(let r=s-1;r>=0;r--){const s=i._msize[r],l=i._mx[r],n=i._my[r],a=i._mdi[r];if(!(s>0)||n!=n||a<0)continue;const h=i.markerStyle(r),o=!!(null==h?void 0:h.stroke)&&"none"!==h.stroke&&h.strokeWidth>0,c=o?h.strokeWidth/2:0,_=1.2*s+c,d=t-l,u=e-n;if(d<-_||d>_||u<-_||u>_)continue;let p;if(p=0===i._mshape[r]?d*d+u*u<=(s+c)*(s+c):this._hitsMarkerShape(r,d,u,s,h,o),p)return{seriesIndex:i._msi[r],dataPointIndex:a,x:l,y:n,size:s}}return null}_hitsMarkerShape(t,e,i,s,r,l){const n=this._hitContext();if(!n)return!1;let a;try{a=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],s))}catch(t){return!1}return!(!(null==r?void 0:r.fill)||"none"===r.fill||!n.isPointInPath(a,e,i))||!!l&&(n.lineWidth=r.strokeWidth,n.lineCap="butt",n.isPointInStroke(a,e,i))}findMark(t,e){const i=this._g.displayList();for(let s=0;s<i.length;s++){const r=i[s];if("path"!==r.tag||!r.d)continue;if(r.si!==t||r.dj!==e)continue;const l=y(r);if(l)return h(a({seriesIndex:t,dataPointIndex:e},l),{d:r.d})}return null}findMarker(t,e){const i=this._g;for(let s=i.markerCount()-1;s>=0;s--){if(i._msi[s]!==t||i._mdi[s]!==e)continue;const r=i._msize[s],l=i._my[s];if(!(r>0)||l!=l)continue;const n=i._mx[s];return{seriesIndex:t,dataPointIndex:e,x:n,y:l,size:r,d:i.markerPath(n,l,i._mshape[s],r)}}return null}findCell(t,e){const i=this._g,s=i.rectCount?i.rectCount():0,r=i._crsi,l=i._crdi;for(let n=s-1;n>=0;n--)if(r[n]===t&&l[n]===e)return{seriesIndex:t,dataPointIndex:e,x:i._crx[n],y:i._cry[n],width:i._crw[n],height:i._crh[n],radius:i._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=S.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,i=this.w.config.chart,s=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(i.offsetX||0)-s.left,y:(e.translateY||0)+(i.offsetY||0)-s.top,w:(this.w.layout.gridWidth||0)+s.left+s.right,h:(this.w.layout.gridHeight||0)+s.top+s.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}c.default.registerRenderer("canvas",(t,e)=>new O(t,e)),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.2.0
21
+ * ApexCharts v8.3.1
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -859,6 +859,7 @@ class CanvasGraphics {
859
859
  cmd.strokeWidth = opts.strokeWidth;
860
860
  cmd.fill = opts.fill;
861
861
  cmd.lineCap = opts.strokeLinecap;
862
+ cmd.strokeDash = this._g.seriesDash(opts.realIndex);
862
863
  cmd.si = opts.realIndex;
863
864
  if (typeof opts.j === "number") cmd.dj = opts.j;
864
865
  if (opts.shouldClipToGrid !== false) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.2.0
2
+ * ApexCharts v8.3.1
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
- !function(t){var e="undefined"!=typeof globalThis?globalThis:self,s=e.ApexCharts;if(s&&s.__internals)return t.call(e);if(s)throw new Error("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.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 i={file:"dist/features/renderer-canvas.js",run:t,done:!1},r=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);r.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var s=e.ApexCharts;if(s)if(s.__internals){i.done=!0;var n=r.indexOf(i);-1!==n&&r.splice(n,1);try{t.call(e),s.__drainsAddons||e.console.warn("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.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.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,l=(t,s,i)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[s]=i,o=(t,e)=>{for(var s in e||(e={}))n.call(e,s)&&l(t,s,e[s]);if(r)for(var s of r(e))a.call(e,s)&&l(t,s,e[s]);return t},h=(t,e)=>s(t,i(e));const c=globalThis.ApexCharts,_=globalThis.ApexCharts.__internals.__apex_Graphics,d={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},p=Symbol("never"),u={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},f=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function y(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let s=1/0,i=1/0,r=-1/0,n=-1/0,a=0,l=0,o=0,h=0,c="",_=0;const d=()=>Number(e[_++]),p=(t,e)=>{isFinite(t)&&isFinite(e)&&(s=Math.min(s,t),i=Math.min(i,e),r=Math.max(r,t),n=Math.max(n,e))},u=t=>{const e=c===c.toLowerCase();let s=a,i=l;for(let r=0;r<t;r++)s=d()+(e?a:0),i=d()+(e?l:0),p(s,i);a=s,l=i};for(;_<e.length;){if(/^[a-z]$/i.test(e[_])){c=e[_++],"Z"!==c&&"z"!==c||(a=o,l=h);continue}const t=c===c.toLowerCase();switch(c.toUpperCase()){case"M":u(1),o=a,h=l,c=t?"l":"L";break;case"L":case"T":u(1);break;case"H":a=d()+(t?a:0),p(a,l);break;case"V":l=d()+(t?l:0),p(a,l);break;case"S":case"Q":u(2);break;case"C":u(3);break;case"A":_+=5,u(1);break;default:_++}}return isFinite(s)?{x:s,y:i,width:r-s,height:n-i}:null}(t.d),t.boxOf=t.d),t.box}const m={attr:()=>m,plot:()=>m,during:()=>m,after:t=>("function"==typeof t&&t(),m),animate:()=>m,delay:()=>m,loop:()=>m,finish:()=>m,stop:()=>m},g={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},x={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>x,add:()=>x,addTo:()=>x,remove:()=>x,clear:()=>x,css:()=>x,hide:()=>x,show:()=>x,removeClass:()=>x,animate:()=>m};class w{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return g}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return m}}const k={__isCanvasMark:!0,node:g,attr:()=>k,add:()=>k,addTo:()=>k,remove:()=>k,css:()=>k,animate:()=>m};class b{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,s){e._applyAttr(t,s)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const s=this._cmd;if(!s)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(s.clip=t))}const i=d[t];void 0!==i&&(s[i]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?y(t):null;return e?o({},e):{x:0,y:0,width:0,height:0}}animate(){return m}}class A{constructor(t){this.w=t,this._g=new _(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=p,this._ls=p,this._lsw=p,this._ld=p,this._lfo=p,this._lso=p,this._lid=-1,this._lofFill=p,this._lofBase=-1,this._lofId=-1,this._rlf=p,this._rls=p,this._rlsw=p,this._rlfo=p,this._rlso=p,this._rlid=-1}_resetStyleCache(){this._lf=p,this._ls=p,this._lsw=p,this._ld=p,this._lfo=p,this._lso=p,this._lid=-1,this._lofFill=p,this._lofBase=-1,this._lofId=-1,this._rlf=p,this._rls=p,this._rlsw=p,this._rlfo=p,this._rlso=p,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let e=16;for(let s=0;s<t.length;s++){const i=t[s]&&t[s].data;Array.isArray(i)&&(e+=i.length)}e=Math.ceil(1.15*e)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const s=new Float64Array(t);s.set(this._cry),this._cry=s;const i=new Float64Array(t);i.set(this._crw),this._crw=i;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const n=new Int32Array(t);n.set(this._crstyle),this._crstyle=n;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const l=new Int32Array(t);l.set(this._crdi),this._crdi=l,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const s=new Float64Array(t);s.set(this._my),this._my=s;const i=new Float64Array(t);i.set(this._msize),this._msize=i;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const n=new Int32Array(t);n.set(this._mstyle),this._mstyle=n;const a=new Int32Array(t);a.set(this._msi),this._msi=a;const l=new Int32Array(t);l.set(this._mdi),this._mdi=l,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,s,i,r,n){const a=`${t}|${e}|${s}|${i}|${r}|${n}`,l=this._styleMap.get(a);if(void 0!==l)return l;const o=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:s,strokeDash:i,fillOpacity:r,strokeOpacity:n}),this._styleMap.set(a,o),o}_setMarkerFill(t,e){const s=this._mstyle[t];if(e===this._lofFill&&s===this._lofBase)return void(this._mstyle[t]=this._lofId);const i=this._styles[s];if(!i||i.fill===e)return this._lofFill=e,this._lofBase=s,void(this._lofId=s);const r=this._internStyle(e,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=r,this._lofFill=e,this._lofBase=s,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return f[t]||"circle"}drawRectCell(t,e,s,i,r={}){const n=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=e||0,this._crw[a]=s>0?s:0,this._crh[a]=i>0?i:0,this._crstyle[a]=n,this._crsi[a]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[a]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),k}_rectStyleId(t){const e=t.fill,s=t.stroke,i=t.strokeWidth,r=t.fillOpacity,n=t.strokeOpacity;if(e===this._rlf&&s===this._rls&&i===this._rlsw&&r===this._rlfo&&n===this._rlso)return this._rlid;const a=this._internStyle(e,s,i,0,r,n);return this._rlf=e,this._rls=s,this._rlsw=i,this._rlfo=r,this._rlso=n,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const s={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(s),s}group(t){return x}drawMarker(t,e,s={}){var i;const r=this._markerStyleId(s);this._mn>=this._mcap&&this._growMarkers();const n=this._mn++;return this._mx[n]=t||0,this._my[n]="number"==typeof e?e:NaN,this._msize[n]=s.pSize||0,this._mshape[n]=null!=(i=u[s.shape||"circle"])?i:0,this._mstyle[n]=r,this._msi[n]=null==s.seriesIndex?-1:s.seriesIndex,this._mdi[n]=-1,new w(this,n)}_markerStyleId(t){const e=t.shape||"circle",s="line"===e||"plus"===e||"cross"===e,i=s?"none":t.pointFillColor,r=s?t.pointFillColor:t.pointStrokeColor,n=t.pointStrokeWidth,a=t.pointStrokeDashArray,l=t.pointFillOpacity,o=s?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&r===this._ls&&n===this._lsw&&a===this._ld&&l===this._lfo&&o===this._lso)return this._lid;const h=this._internStyle(i,r,n,a,l,o);return this._lf=i,this._ls=r,this._lsw=n,this._ld=a,this._lfo=l,this._lso=o,this._lid=h,h}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const s=this.w.globals;e.clip="bar"===t.chartType&&!s.isBarHorizontal||s.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new b(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new b(e)}drawLine(t,e,s,i,r="#a8a8a8",n=0,a=1){const l=this._cmd("line",0);return l.lx1=t,l.ly1=e,l.lx2=s,l.ly2=i,l.stroke=r,l.strokeDash=n,l.strokeWidth=a,new b(l)}drawRect(t=0,e=0,s=0,i=0,r=0,n="#fefefe",a=1,l=null,o=null,h=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=e,c.rw=s>0?s:0,c.rh=i>0?i:0,c.radius=r,c.fill=n,c.fillOpacity=a,null!=o&&(c.stroke=o,c.strokeWidth=null==l?1:l,c.strokeDash=h),new b(c)}drawCircle(t,e=null){const s=this._cmd("circle",0);return s.r=t<0?0:t,e&&(s.cx=e.cx,s.cy=e.cy,void 0!==e.fill&&(s.fill=e.fill),void 0!==e.stroke&&(s.stroke=e.stroke)),new b(s)}drawText(t){const e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new b(e)}markerPath(t,e,s,i){return this._g.getMarkerPath(t,e,f[s]||"circle",i)}}const v=globalThis.ApexCharts.__internals.__apex_SVGElement,C=globalThis.ApexCharts.__internals,M=C.__apex_math_SVGNS;C.__apex_math_Point,C.__apex_math_Matrix,C.__apex_math_Box;const S=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,P=globalThis.ApexCharts.__internals.__apex_axes_Grid,I=2*Math.PI;class F{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),s=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,r=Math.ceil(i+8),n=P.maskRects(this.w),a={left:r,top:r,right:r,bottom:r},l=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(n).forEach(t=>{a.left=Math.max(a.left,l(-t.x)),a.top=Math.max(a.top,l(-t.y)),a.right=Math.max(a.right,l(t.x+t.width-e)),a.bottom=Math.max(a.bottom,l(t.y+t.height-s))}),{gw:e,gh:s,pad:a,clips:n}}createHost(){const t=S.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:s,pad:i,clips:r}=this._plotDims();this._pad=i,this._clips=r;const n=e+i.left+i.right,a=s+i.top+i.bottom,l=S.createElementNS(M,"foreignObject");l.setAttribute("x",String(-i.left)),l.setAttribute("y",String(-i.top)),l.setAttribute("width",String(n)),l.setAttribute("height",String(a)),l.setAttribute("class","apexcharts-canvas-series"),l.style.overflow="visible";const o=S.createElement("canvas");return o.setAttribute("class","apexcharts-series-canvas"),o.width=Math.max(1,Math.round(n*this._dpr)),o.height=Math.max(1,Math.round(a*this._dpr)),o.style.width=n+"px",o.style.height=a+"px",o.style.pointerEvents="none",l.appendChild(o),this._canvas=o,this._c2d=o.getContext("2d"),this._host=new v(l),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const s=this.clipRect(e);if(s!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=s,s)){const e=this._dpr,{left:i,top:r}=this._pad,n=Math.floor((i+s.x)*e),a=Math.floor((r+s.y)*e),l=Math.ceil((i+s.x+s.width)*e),o=Math.ceil((r+s.y+s.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(n,a,l-n,o-a),t.clip(),t.setTransform(e,0,0,e,i*e,r*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=S.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const s=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(s*e)),this._canvas.height=Math.max(1,Math.round(i*e))}paint(t,e,s=null){const i=this._c2d;if(!i)return;this._dim=s||null,this._syncDpr(),this.clear();const r=this._dpr,{left:n,top:a}=this._pad;if(i.setTransform(r,0,0,r,n*r,a*r),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const s=e[t];this._alpha=this._dim?this._seriesAlpha(s.si):1,this._clipTo(i,s.clip),this._paintOne(i,s)}this._clipTo(i,null)}this._paintRects(i,e),this._clipTo(i,"marker"),this._paintMarkers(i,e),this._clipTo(i,null),this._alpha=1}_paintRects(t,e){const s=e.rectCount?e.rectCount():0;if(!s)return;const i=e._crx,r=e._cry,n=e._crw,a=e._crh,l=e._crstyle,o=e._cellRadius||0,h=t,c=o>0&&"function"==typeof h.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),p=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,p),t.clip();let u=0;for(;u<s;){const d=l[u],p=e.rectStyle(u);if(!p){u++;continue}const f=p.fill,y=f&&"none"!==f&&!("string"==typeof f&&0===f.indexOf("url(")),m=p.stroke,g=null==p.strokeWidth?0:Number(p.strokeWidth),x=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));y&&(t.fillStyle=f),x&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const w=null==p.fillOpacity?1:Number(p.fillOpacity),k=null==p.strokeOpacity?1:Number(p.strokeOpacity);let b=u;for(;b<s&&l[b]===d;){const s=n[b],l=a[b];if(s>0&&l>0){const n=_?this._seriesAlpha(e.rectSeries(b)):1;c?(t.beginPath(),h.roundRect(i[b],r[b],s,l,o),y&&(t.globalAlpha=w*n,t.fill()),x&&(t.globalAlpha=k*n,t.stroke())):(y&&(t.globalAlpha=w*n,t.fillRect(i[b],r[b],s,l)),x&&(t.globalAlpha=k*n,t.strokeRect(i[b],r[b],s,l)))}b++}u=b}t.globalAlpha=1,t.restore()}_unitPath(t,e,s){const i=e+"|"+s;let r=this._unitPaths.get(i);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,e,s))}catch(t){r=null}this._unitPaths.set(i,r)}return r}_paintMarkers(t,e){this._markerBatches=0;const s=e.markerCount();if(!s)return;const i=e._mx,r=e._my,n=e._msize,a=e._mshape,l=e._mstyle,o=!!this._dim;o||(this._alpha=1);let h=0;for(;h<s;){const c=l[h],_=a[h],d=e.markerStyle(h);if(!d){h++;continue}const p=this._applyFill(t,d),u=this._applyStroke(t,d);this._markerBatches++;const f=null==d.fillOpacity?1:Number(d.fillOpacity),y=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=h;for(;_<s&&0===a[_]&&l[_]===c;){const s=n[_]||0,a=r[_];if(s>0&&a==a)if(t.beginPath(),t.arc(i[_],a,s,0,I),o){const s=this._seriesAlpha(e.markerSeries(_));p&&(t.globalAlpha=f*s,t.fill()),u&&(t.globalAlpha=y*s,t.stroke())}else p&&t.fill(),u&&t.stroke();_++}t.globalAlpha=1,h=_}else{const d=this._dpr,m=this._pad.left,g=this._pad.top;let x=h;for(;x<s&&a[x]===_&&l[x]===c;){const s=r[x],a=n[x];if(s==s&&a>0){const r=this._unitPath(e,_,a);if(r){t.setTransform(d,0,0,d,(m+i[x])*d,(g+s)*d);const n=o?this._seriesAlpha(e.markerSeries(x)):1;p&&(t.globalAlpha=f*n,t.fill(r)),u&&(t.globalAlpha=y*n,t.stroke(r))}}x++}t.setTransform(d,0,0,d,m*d,g*d),t.globalAlpha=1,h=x}}}_paintNumericPath(t,e){const s=e.nxs,i=e.nys,r=s.length;if(r){t.beginPath(),t.moveTo(s[0],i[0]);for(let e=1;e<r;e++)t.lineTo(s[e],i[e]);null!=e.ncloseY&&(t.lineTo(s[r-1],e.ncloseY),t.lineTo(s[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const s=new Path2D;e.radius&&"function"==typeof s.roundRect?s.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):s.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,s);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,I),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const s=e.fontSize||"11px";t.font=`${"number"==typeof s?s+"px":s} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,s){this._applyFill(t,e)&&t.fill(s,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(s),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const s=e.fill;return!(!s||"none"===s||"string"==typeof s&&0===s.indexOf("url(")||(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=s,0))}_applyStroke(t,e){const s=e.stroke,i=null==e.strokeWidth?1:Number(e.strokeWidth);if(!(s&&"none"!==s&&i>0))return!1;if("string"==typeof s&&0===s.indexOf("url("))return!1;t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=s,t.lineWidth=i,t.lineCap=e.lineCap||"butt";const r=e.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class O{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new A(t),this._compositor=new F(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,s,i,r){return this._g.drawRectCell(t,e,s,i,r)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,s){return this._g.drawMarker(t,e,s)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const s=this._g,i=s.rectCount?s.rectCount():0,r=s._crx,n=s._cry,a=s._crw,l=s._crh;for(let o=i-1;o>=0;o--){const i=a[o],h=l[o];if(!(i<=0||h<=0)&&t>=r[o]&&t<r[o]+i&&e>=n[o]&&e<n[o]+h)return{seriesIndex:s._crsi[o],dataPointIndex:s._crdi[o],x:r[o],y:n[o],width:i,height:h}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const s=this._g.displayList();for(let i=s.length-1;i>=0;i--){const r=s[i];if("path"!==r.tag||null==r.dj||!r.d)continue;const n=!!r.fill&&"none"!==r.fill,a=!!r.stroke&&"none"!==r.stroke&&r.strokeWidth>0;if(!n&&!a)continue;const l=this._compositor.clipRect(r.clip);if(l&&(t<l.x||t>l.x+l.width||e<l.y||e>l.y+l.height))continue;const h=y(r);if(!h)continue;const c=a?5*r.strokeWidth:0;if(t<h.x-c||t>h.x+h.width+c||e<h.y-c||e>h.y+h.height+c)continue;const _=this._hitContext();if(!_)return null;if(!r.path2d)try{r.path2d=new Path2D(r.d)}catch(t){continue}const d="evenodd"===r.fillRule?"evenodd":"nonzero";let p=n&&_.isPointInPath(r.path2d,t,e,d);if(!p&&a&&(_.lineWidth=r.strokeWidth,_.lineCap=r.lineCap||"butt",p=_.isPointInStroke(r.path2d,t,e)),p)return o({seriesIndex:r.si,dataPointIndex:r.dj},h)}return null}hitTestMarker(t,e){const s=this._g,i=s.markerCount();if(!i)return null;const r=this._compositor.clipRect("marker");if(r&&(t<r.x||t>r.x+r.width||e<r.y||e>r.y+r.height))return null;for(let r=i-1;r>=0;r--){const i=s._msize[r],n=s._mx[r],a=s._my[r],l=s._mdi[r];if(!(i>0)||a!=a||l<0)continue;const o=s.markerStyle(r),h=!!(null==o?void 0:o.stroke)&&"none"!==o.stroke&&o.strokeWidth>0,c=h?o.strokeWidth/2:0,_=1.2*i+c,d=t-n,p=e-a;if(d<-_||d>_||p<-_||p>_)continue;let u;if(u=0===s._mshape[r]?d*d+p*p<=(i+c)*(i+c):this._hitsMarkerShape(r,d,p,i,o,h),u)return{seriesIndex:s._msi[r],dataPointIndex:l,x:n,y:a,size:i}}return null}_hitsMarkerShape(t,e,s,i,r,n){const a=this._hitContext();if(!a)return!1;let l;try{l=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],i))}catch(t){return!1}return!(!(null==r?void 0:r.fill)||"none"===r.fill||!a.isPointInPath(l,e,s))||!!n&&(a.lineWidth=r.strokeWidth,a.lineCap="butt",a.isPointInStroke(l,e,s))}findMark(t,e){const s=this._g.displayList();for(let i=0;i<s.length;i++){const r=s[i];if("path"!==r.tag||!r.d)continue;if(r.si!==t||r.dj!==e)continue;const n=y(r);if(n)return h(o({seriesIndex:t,dataPointIndex:e},n),{d:r.d})}return null}findMarker(t,e){const s=this._g;for(let i=s.markerCount()-1;i>=0;i--){if(s._msi[i]!==t||s._mdi[i]!==e)continue;const r=s._msize[i],n=s._my[i];if(!(r>0)||n!=n)continue;const a=s._mx[i];return{seriesIndex:t,dataPointIndex:e,x:a,y:n,size:r,d:s.markerPath(a,n,s._mshape[i],r)}}return null}findCell(t,e){const s=this._g,i=s.rectCount?s.rectCount():0,r=s._crsi,n=s._crdi;for(let a=i-1;a>=0;a--)if(r[a]===t&&n[a]===e)return{seriesIndex:t,dataPointIndex:e,x:s._crx[a],y:s._cry[a],width:s._crw[a],height:s._crh[a],radius:s._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=S.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,s=this.w.config.chart,i=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(s.offsetX||0)-i.left,y:(e.translateY||0)+(s.offsetY||0)-i.top,w:(this.w.layout.gridWidth||0)+i.left+i.right,h:(this.w.layout.gridHeight||0)+i.top+i.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}c.registerRenderer("canvas",(t,e)=>new O(t,e)),t.default=c,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).ApexRendererCanvas={})});
5
+ !function(t){var e="undefined"!=typeof globalThis?globalThis:self,s=e.ApexCharts;if(s&&s.__internals)return t.call(e);if(s)throw new Error("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.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 i={file:"dist/features/renderer-canvas.js",run:t,done:!1},r=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);r.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var s=e.ApexCharts;if(s)if(s.__internals){i.done=!0;var n=r.indexOf(i);-1!==n&&r.splice(n,1);try{t.call(e),s.__drainsAddons||e.console.warn("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/features/renderer-canvas.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/renderer-canvas.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.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,l=(t,s,i)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[s]=i,o=(t,e)=>{for(var s in e||(e={}))n.call(e,s)&&l(t,s,e[s]);if(r)for(var s of r(e))a.call(e,s)&&l(t,s,e[s]);return t},h=(t,e)=>s(t,i(e));const c=globalThis.ApexCharts,_=globalThis.ApexCharts.__internals.__apex_Graphics,d={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},p=Symbol("never"),u={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},f=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"];function y(t){return t.boxOf!==t.d&&(t.box=function(t){const e="string"==typeof t?t.match(/[a-df-z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi):null;if(!e)return null;let s=1/0,i=1/0,r=-1/0,n=-1/0,a=0,l=0,o=0,h=0,c="",_=0;const d=()=>Number(e[_++]),p=(t,e)=>{isFinite(t)&&isFinite(e)&&(s=Math.min(s,t),i=Math.min(i,e),r=Math.max(r,t),n=Math.max(n,e))},u=t=>{const e=c===c.toLowerCase();let s=a,i=l;for(let r=0;r<t;r++)s=d()+(e?a:0),i=d()+(e?l:0),p(s,i);a=s,l=i};for(;_<e.length;){if(/^[a-z]$/i.test(e[_])){c=e[_++],"Z"!==c&&"z"!==c||(a=o,l=h);continue}const t=c===c.toLowerCase();switch(c.toUpperCase()){case"M":u(1),o=a,h=l,c=t?"l":"L";break;case"L":case"T":u(1);break;case"H":a=d()+(t?a:0),p(a,l);break;case"V":l=d()+(t?l:0),p(a,l);break;case"S":case"Q":u(2);break;case"C":u(3);break;case"A":_+=5,u(1);break;default:_++}}return isFinite(s)?{x:s,y:i,width:r-s,height:n-i}:null}(t.d),t.boxOf=t.d),t.box}const m={attr:()=>m,plot:()=>m,during:()=>m,after:t=>("function"==typeof t&&t(),m),animate:()=>m,delay:()=>m,loop:()=>m,finish:()=>m,stop:()=>m},g={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},x={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>x,add:()=>x,addTo:()=>x,remove:()=>x,clear:()=>x,css:()=>x,hide:()=>x,show:()=>x,removeClass:()=>x,animate:()=>m};class w{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return g}attr(t,e){return"string"==typeof t?("fill"===t&&void 0!==e?this._g._setMarkerFill(this._i,e):"rel"===t&&void 0!==e&&(this._g._mdi[this._i]=e),void 0===e?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),t&&void 0!==t.rel&&(this._g._mdi[this._i]=t.rel),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return m}}const k={__isCanvasMark:!0,node:g,attr:()=>k,add:()=>k,addTo:()=>k,remove:()=>k,css:()=>k,animate:()=>m};class b{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,s){e._applyAttr(t,s)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>e.bbox()}}_applyAttr(t,e){const s=this._cmd;if(!s)return;if("clip-path"===t){const t=function(t){if(null==t||"none"===t)return null;const e=/^url\(#gridRect(Bar|Marker)?Mask/.exec(String(t));return e?"Bar"===e[1]?"bar":"Marker"===e[1]?"marker":"grid":void 0}(e);return void(void 0!==t&&(s.clip=t))}const i=d[t];void 0!==i&&(s[i]=e)}attr(t,e){if("string"==typeof t)return void 0===e?null:(this._applyAttr(t,e),this);for(const e in t)void 0!==t[e]&&this._applyAttr(e,t[e]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){const t=this._cmd,e=t&&"path"===t.tag?y(t):null;return e?o({},e):{x:0,y:0,width:0,height:0}}animate(){return m}}class A{constructor(t){this.w=t,this._g=new _(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mdi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=p,this._ls=p,this._lsw=p,this._ld=p,this._lfo=p,this._lso=p,this._lid=-1,this._lofFill=p,this._lofBase=-1,this._lofId=-1,this._rlf=p,this._rls=p,this._rlsw=p,this._rlfo=p,this._rlso=p,this._rlid=-1}_resetStyleCache(){this._lf=p,this._ls=p,this._lsw=p,this._ld=p,this._lfo=p,this._lso=p,this._lid=-1,this._lofFill=p,this._lofBase=-1,this._lofId=-1,this._rlf=p,this._rls=p,this._rlsw=p,this._rlfo=p,this._rlso=p,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let e=16;for(let s=0;s<t.length;s++){const i=t[s]&&t[s].data;Array.isArray(i)&&(e+=i.length)}e=Math.ceil(1.15*e)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,e=new Float64Array(t);e.set(this._crx),this._crx=e;const s=new Float64Array(t);s.set(this._cry),this._cry=s;const i=new Float64Array(t);i.set(this._crw),this._crw=i;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const n=new Int32Array(t);n.set(this._crstyle),this._crstyle=n;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const l=new Int32Array(t);l.set(this._crdi),this._crdi=l,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t),this._mdi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,e=new Float64Array(t);e.set(this._mx),this._mx=e;const s=new Float64Array(t);s.set(this._my),this._my=s;const i=new Float64Array(t);i.set(this._msize),this._msize=i;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const n=new Int32Array(t);n.set(this._mstyle),this._mstyle=n;const a=new Int32Array(t);a.set(this._msi),this._msi=a;const l=new Int32Array(t);l.set(this._mdi),this._mdi=l,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,s,i,r,n){const a=`${t}|${e}|${s}|${i}|${r}|${n}`,l=this._styleMap.get(a);if(void 0!==l)return l;const o=this._styles.length;return this._styles.push({fill:t,stroke:e,strokeWidth:s,strokeDash:i,fillOpacity:r,strokeOpacity:n}),this._styleMap.set(a,o),o}_setMarkerFill(t,e){const s=this._mstyle[t];if(e===this._lofFill&&s===this._lofBase)return void(this._mstyle[t]=this._lofId);const i=this._styles[s];if(!i||i.fill===e)return this._lofFill=e,this._lofBase=s,void(this._lofId=s);const r=this._internStyle(e,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=r,this._lofFill=e,this._lofBase=s,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return f[t]||"circle"}drawRectCell(t,e,s,i,r={}){const n=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=e||0,this._crw[a]=s>0?s:0,this._crh[a]=i>0?i:0,this._crstyle[a]=n,this._crsi[a]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[a]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),k}_rectStyleId(t){const e=t.fill,s=t.stroke,i=t.strokeWidth,r=t.fillOpacity,n=t.strokeOpacity;if(e===this._rlf&&s===this._rls&&i===this._rlsw&&r===this._rlfo&&n===this._rlso)return this._rlid;const a=this._internStyle(e,s,i,0,r,n);return this._rlf=e,this._rls=s,this._rlsw=i,this._rlfo=r,this._rlso=n,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const s={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0,clip:null};return this._list.push(s),s}group(t){return x}drawMarker(t,e,s={}){var i;const r=this._markerStyleId(s);this._mn>=this._mcap&&this._growMarkers();const n=this._mn++;return this._mx[n]=t||0,this._my[n]="number"==typeof e?e:NaN,this._msize[n]=s.pSize||0,this._mshape[n]=null!=(i=u[s.shape||"circle"])?i:0,this._mstyle[n]=r,this._msi[n]=null==s.seriesIndex?-1:s.seriesIndex,this._mdi[n]=-1,new w(this,n)}_markerStyleId(t){const e=t.shape||"circle",s="line"===e||"plus"===e||"cross"===e,i=s?"none":t.pointFillColor,r=s?t.pointFillColor:t.pointStrokeColor,n=t.pointStrokeWidth,a=t.pointStrokeDashArray,l=t.pointFillOpacity,o=s?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&r===this._ls&&n===this._lsw&&a===this._ld&&l===this._lfo&&o===this._lso)return this._lid;const h=this._internStyle(i,r,n,a,l,o);return this._lf=i,this._ls=r,this._lsw=n,this._ld=a,this._lfo=l,this._lso=o,this._lid=h,h}renderPaths(t){const e=this._cmd("path",t.realIndex);if(e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.strokeDash=this._g.seriesDash(t.realIndex),e.si=t.realIndex,"number"==typeof t.j&&(e.dj=t.j),!1!==t.shouldClipToGrid){const s=this.w.globals;e.clip="bar"===t.chartType&&!s.isBarHorizontal||s.comboCharts?"bar":"grid"}return this.w.globals.animationEnded=!0,new b(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new b(e)}drawLine(t,e,s,i,r="#a8a8a8",n=0,a=1){const l=this._cmd("line",0);return l.lx1=t,l.ly1=e,l.lx2=s,l.ly2=i,l.stroke=r,l.strokeDash=n,l.strokeWidth=a,new b(l)}drawRect(t=0,e=0,s=0,i=0,r=0,n="#fefefe",a=1,l=null,o=null,h=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=e,c.rw=s>0?s:0,c.rh=i>0?i:0,c.radius=r,c.fill=n,c.fillOpacity=a,null!=o&&(c.stroke=o,c.strokeWidth=null==l?1:l,c.strokeDash=h),new b(c)}drawCircle(t,e=null){const s=this._cmd("circle",0);return s.r=t<0?0:t,e&&(s.cx=e.cx,s.cy=e.cy,void 0!==e.fill&&(s.fill=e.fill),void 0!==e.stroke&&(s.stroke=e.stroke)),new b(s)}drawText(t){const e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new b(e)}markerPath(t,e,s,i){return this._g.getMarkerPath(t,e,f[s]||"circle",i)}}const v=globalThis.ApexCharts.__internals.__apex_SVGElement,C=globalThis.ApexCharts.__internals,M=C.__apex_math_SVGNS;C.__apex_math_Point,C.__apex_math_Matrix,C.__apex_math_Box;const S=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,P=globalThis.ApexCharts.__internals.__apex_axes_Grid,I=2*Math.PI;class F{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._pad={left:0,top:0,right:0,bottom:0},this._clips=null,this._clipRect=null,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||null==e.active||e.active<0||null==t||t<0||t===e.active?1:null==e.opacity?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),s=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0,r=Math.ceil(i+8),n=P.maskRects(this.w),a={left:r,top:r,right:r,bottom:r},l=t=>Number.isFinite(t)?Math.ceil(t):0;return Object.values(n).forEach(t=>{a.left=Math.max(a.left,l(-t.x)),a.top=Math.max(a.top,l(-t.y)),a.right=Math.max(a.right,l(t.x+t.width-e)),a.bottom=Math.max(a.bottom,l(t.y+t.height-s))}),{gw:e,gh:s,pad:a,clips:n}}createHost(){const t=S.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:e,gh:s,pad:i,clips:r}=this._plotDims();this._pad=i,this._clips=r;const n=e+i.left+i.right,a=s+i.top+i.bottom,l=S.createElementNS(M,"foreignObject");l.setAttribute("x",String(-i.left)),l.setAttribute("y",String(-i.top)),l.setAttribute("width",String(n)),l.setAttribute("height",String(a)),l.setAttribute("class","apexcharts-canvas-series"),l.style.overflow="visible";const o=S.createElement("canvas");return o.setAttribute("class","apexcharts-series-canvas"),o.width=Math.max(1,Math.round(n*this._dpr)),o.height=Math.max(1,Math.round(a*this._dpr)),o.style.width=n+"px",o.style.height=a+"px",o.style.pointerEvents="none",l.appendChild(o),this._canvas=o,this._c2d=o.getContext("2d"),this._host=new v(l),this._host}getHost(){return this._host}clipRect(t){const e=t&&this._clips?this._clips[t]:null;return e&&Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?e:null}_clipTo(t,e){const s=this.clipRect(e);if(s!==this._clipRect&&(this._clipRect&&t.restore(),this._clipRect=s,s)){const e=this._dpr,{left:i,top:r}=this._pad,n=Math.floor((i+s.x)*e),a=Math.floor((r+s.y)*e),l=Math.ceil((i+s.x+s.width)*e),o=Math.ceil((r+s.y+s.height)*e);t.save(),t.setTransform(1,0,0,1,0,0),t.beginPath(),t.rect(n,a,l-n,o-a),t.clip(),t.setTransform(e,0,0,e,i*e,r*e)}}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=S.getWindow(),e=Math.min(2,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const s=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(s*e)),this._canvas.height=Math.max(1,Math.round(i*e))}paint(t,e,s=null){const i=this._c2d;if(!i)return;this._dim=s||null,this._syncDpr(),this.clear();const r=this._dpr,{left:n,top:a}=this._pad;if(i.setTransform(r,0,0,r,n*r,a*r),this._clipRect=null,t.length){const e=t.length>1?t.map((t,e)=>[t,e]).sort((t,e)=>t[0].z===e[0].z?t[1]-e[1]:t[0].z-e[0].z).map(t=>t[0]):t;for(let t=0;t<e.length;t++){const s=e[t];this._alpha=this._dim?this._seriesAlpha(s.si):1,this._clipTo(i,s.clip),this._paintOne(i,s)}this._clipTo(i,null)}this._paintRects(i,e),this._clipTo(i,"marker"),this._paintMarkers(i,e),this._clipTo(i,null),this._alpha=1}_paintRects(t,e){const s=e.rectCount?e.rectCount():0;if(!s)return;const i=e._crx,r=e._cry,n=e._crw,a=e._crh,l=e._crstyle,o=e._cellRadius||0,h=t,c=o>0&&"function"==typeof h.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),p=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,p),t.clip();let u=0;for(;u<s;){const d=l[u],p=e.rectStyle(u);if(!p){u++;continue}const f=p.fill,y=f&&"none"!==f&&!("string"==typeof f&&0===f.indexOf("url(")),m=p.stroke,g=null==p.strokeWidth?0:Number(p.strokeWidth),x=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));y&&(t.fillStyle=f),x&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const w=null==p.fillOpacity?1:Number(p.fillOpacity),k=null==p.strokeOpacity?1:Number(p.strokeOpacity);let b=u;for(;b<s&&l[b]===d;){const s=n[b],l=a[b];if(s>0&&l>0){const n=_?this._seriesAlpha(e.rectSeries(b)):1;c?(t.beginPath(),h.roundRect(i[b],r[b],s,l,o),y&&(t.globalAlpha=w*n,t.fill()),x&&(t.globalAlpha=k*n,t.stroke())):(y&&(t.globalAlpha=w*n,t.fillRect(i[b],r[b],s,l)),x&&(t.globalAlpha=k*n,t.strokeRect(i[b],r[b],s,l)))}b++}u=b}t.globalAlpha=1,t.restore()}_unitPath(t,e,s){const i=e+"|"+s;let r=this._unitPaths.get(i);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,e,s))}catch(t){r=null}this._unitPaths.set(i,r)}return r}_paintMarkers(t,e){this._markerBatches=0;const s=e.markerCount();if(!s)return;const i=e._mx,r=e._my,n=e._msize,a=e._mshape,l=e._mstyle,o=!!this._dim;o||(this._alpha=1);let h=0;for(;h<s;){const c=l[h],_=a[h],d=e.markerStyle(h);if(!d){h++;continue}const p=this._applyFill(t,d),u=this._applyStroke(t,d);this._markerBatches++;const f=null==d.fillOpacity?1:Number(d.fillOpacity),y=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=h;for(;_<s&&0===a[_]&&l[_]===c;){const s=n[_]||0,a=r[_];if(s>0&&a==a)if(t.beginPath(),t.arc(i[_],a,s,0,I),o){const s=this._seriesAlpha(e.markerSeries(_));p&&(t.globalAlpha=f*s,t.fill()),u&&(t.globalAlpha=y*s,t.stroke())}else p&&t.fill(),u&&t.stroke();_++}t.globalAlpha=1,h=_}else{const d=this._dpr,m=this._pad.left,g=this._pad.top;let x=h;for(;x<s&&a[x]===_&&l[x]===c;){const s=r[x],a=n[x];if(s==s&&a>0){const r=this._unitPath(e,_,a);if(r){t.setTransform(d,0,0,d,(m+i[x])*d,(g+s)*d);const n=o?this._seriesAlpha(e.markerSeries(x)):1;p&&(t.globalAlpha=f*n,t.fill(r)),u&&(t.globalAlpha=y*n,t.stroke(r))}}x++}t.setTransform(d,0,0,d,m*d,g*d),t.globalAlpha=1,h=x}}}_paintNumericPath(t,e){const s=e.nxs,i=e.nys,r=s.length;if(r){t.beginPath(),t.moveTo(s[0],i[0]);for(let e=1;e<r;e++)t.lineTo(s[e],i[e]);null!=e.ncloseY&&(t.lineTo(s[r-1],e.ncloseY),t.lineTo(s[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill("evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch(t){return}this._fillStrokePath(t,e,e.path2d);break;case"rect":{const s=new Path2D;e.radius&&"function"==typeof s.roundRect?s.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):s.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,s);break}case"circle":if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,I),this._fillStroke(t,e);break;case"line":t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break;case"text":{if(null==e.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const s=e.fontSize||"11px";t.font=`${"number"==typeof s?s+"px":s} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===e.textAnchor?"center":"end"===e.textAnchor?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,s){this._applyFill(t,e)&&t.fill(s,"evenodd"===e.fillRule?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(s),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const s=e.fill;return!(!s||"none"===s||"string"==typeof s&&0===s.indexOf("url(")||(t.globalAlpha=(null==e.fillOpacity?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=s,0))}_applyStroke(t,e){const s=e.stroke,i=null==e.strokeWidth?1:Number(e.strokeWidth);if(!(s&&"none"!==s&&i>0))return!1;if("string"==typeof s&&0===s.indexOf("url("))return!1;t.globalAlpha=(null==e.strokeOpacity?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=s,t.lineWidth=i,t.lineCap=e.lineCap||"butt";const r=e.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._clips=null,this._clipRect=null,this._unitPaths.clear()}}class O{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new A(t),this._compositor=new F(t),this._hitCtx=void 0}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,s,i,r){return this._g.drawRectCell(t,e,s,i,r)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,s){return this._g.drawMarker(t,e,s)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,e){const s=this._g,i=s.rectCount?s.rectCount():0,r=s._crx,n=s._cry,a=s._crw,l=s._crh;for(let o=i-1;o>=0;o--){const i=a[o],h=l[o];if(!(i<=0||h<=0)&&t>=r[o]&&t<r[o]+i&&e>=n[o]&&e<n[o]+h)return{seriesIndex:s._crsi[o],dataPointIndex:s._crdi[o],x:r[o],y:n[o],width:i,height:h}}return this._hitTestMarks(t,e)}_hitTestMarks(t,e){const s=this._g.displayList();for(let i=s.length-1;i>=0;i--){const r=s[i];if("path"!==r.tag||null==r.dj||!r.d)continue;const n=!!r.fill&&"none"!==r.fill,a=!!r.stroke&&"none"!==r.stroke&&r.strokeWidth>0;if(!n&&!a)continue;const l=this._compositor.clipRect(r.clip);if(l&&(t<l.x||t>l.x+l.width||e<l.y||e>l.y+l.height))continue;const h=y(r);if(!h)continue;const c=a?5*r.strokeWidth:0;if(t<h.x-c||t>h.x+h.width+c||e<h.y-c||e>h.y+h.height+c)continue;const _=this._hitContext();if(!_)return null;if(!r.path2d)try{r.path2d=new Path2D(r.d)}catch(t){continue}const d="evenodd"===r.fillRule?"evenodd":"nonzero";let p=n&&_.isPointInPath(r.path2d,t,e,d);if(!p&&a&&(_.lineWidth=r.strokeWidth,_.lineCap=r.lineCap||"butt",p=_.isPointInStroke(r.path2d,t,e)),p)return o({seriesIndex:r.si,dataPointIndex:r.dj},h)}return null}hitTestMarker(t,e){const s=this._g,i=s.markerCount();if(!i)return null;const r=this._compositor.clipRect("marker");if(r&&(t<r.x||t>r.x+r.width||e<r.y||e>r.y+r.height))return null;for(let r=i-1;r>=0;r--){const i=s._msize[r],n=s._mx[r],a=s._my[r],l=s._mdi[r];if(!(i>0)||a!=a||l<0)continue;const o=s.markerStyle(r),h=!!(null==o?void 0:o.stroke)&&"none"!==o.stroke&&o.strokeWidth>0,c=h?o.strokeWidth/2:0,_=1.2*i+c,d=t-n,p=e-a;if(d<-_||d>_||p<-_||p>_)continue;let u;if(u=0===s._mshape[r]?d*d+p*p<=(i+c)*(i+c):this._hitsMarkerShape(r,d,p,i,o,h),u)return{seriesIndex:s._msi[r],dataPointIndex:l,x:n,y:a,size:i}}return null}_hitsMarkerShape(t,e,s,i,r,n){const a=this._hitContext();if(!a)return!1;let l;try{l=new Path2D(this._g.markerPath(0,0,this._g._mshape[t],i))}catch(t){return!1}return!(!(null==r?void 0:r.fill)||"none"===r.fill||!a.isPointInPath(l,e,s))||!!n&&(a.lineWidth=r.strokeWidth,a.lineCap="butt",a.isPointInStroke(l,e,s))}findMark(t,e){const s=this._g.displayList();for(let i=0;i<s.length;i++){const r=s[i];if("path"!==r.tag||!r.d)continue;if(r.si!==t||r.dj!==e)continue;const n=y(r);if(n)return h(o({seriesIndex:t,dataPointIndex:e},n),{d:r.d})}return null}findMarker(t,e){const s=this._g;for(let i=s.markerCount()-1;i>=0;i--){if(s._msi[i]!==t||s._mdi[i]!==e)continue;const r=s._msize[i],n=s._my[i];if(!(r>0)||n!=n)continue;const a=s._mx[i];return{seriesIndex:t,dataPointIndex:e,x:a,y:n,size:r,d:s.markerPath(a,n,s._mshape[i],r)}}return null}findCell(t,e){const s=this._g,i=s.rectCount?s.rectCount():0,r=s._crsi,n=s._crdi;for(let a=i-1;a>=0;a--)if(r[a]===t&&n[a]===e)return{seriesIndex:t,dataPointIndex:e,x:s._crx[a],y:s._cry[a],width:s._crw[a],height:s._crh[a],radius:s._cellRadius||0};return null}_hitContext(){if(void 0===this._hitCtx){const t=S.createElement("canvas");this._hitCtx=(null==t?void 0:t.getContext)&&t.getContext("2d")||null}return this._hitCtx}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,s=this.w.config.chart,i=this._compositor._pad;return{dataURL:t,x:(e.translateX||0)+(s.offsetX||0)-i.left,y:(e.translateY||0)+(s.offsetY||0)-i.top,w:(this.w.layout.gridWidth||0)+i.left+i.right,h:(this.w.layout.gridHeight||0)+i.top+i.bottom}}destroy(){this._compositor.destroy(),this._hitCtx=void 0}}c.registerRenderer("canvas",(t,e)=>new O(t,e)),t.default=c,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).ApexRendererCanvas={})});